Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

RK_2000

@RK_2000
About
Posts
50
Topics
40
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CASE tool
    R RK_2000

    Enterprise Architect. It's built by an Australian company. I have used it both in my current and previous job and it is a very solid tool and quite affordable too (only $95 US for a single licence): http://www.sparxsystems.com.au/

    C / C++ / MFC

  • Mysterious C++ behaviour
    R RK_2000

    I have 4 DLLs as following: CFiles.dll CExceptions.dll CXML.Dll CDataFormat.dll CExceptions contains an Object factory that follows the Loki Object Factory model as following: It has a map containing function pointers with enteries such as following: void CExceptionFactory::InitializeMap() { AddToMethodMap(CExceptionFactory::DATABASE_EXCEPTIONS, CreateDatabaseExceptions); AddToMethodMap(CExceptionFactory::NULL_POINTER_EXCEPTIONS, CreateNullPointerExceptions); AddToMethodMap(CExceptionFactory::READER_EXCEPTIONS, CreateReadExceptions); } Now, within the DataFormat DLL, depending on the type of formatting, I load different DLLs. For instance, if the type is XML, I load the XML dll as following: case ID_XML: { //m_pDataFormat = new XML(); HMODULE hLibrary = 0; DataFormatProc pfnDataFormat = 0; GEA pfnGEA = 0; hLibrary = ::LoadLibrary("CXML.dll"); if(hLibrary != 0) { DWORD dw = 0; pfnDataFormat = (DataFormatProc) GetProcAddress (hLibrary, "CreateXMLSingletonInstance"); dw = GetLastError(); if(pfnDataFormat != 0) m_pDataFormat = pfnDataFormat(); m_pDataFormat->LoadFile(L"Stocks.xml"); ::FreeLibrary(hLibrary); } Now if the method LoadFile above fails, it throws an exception by calling CExcpetionFactory class above and CExceptionFactory will try to look inside its Loki map and retrieve the required method as shown below: CExceptionFactory::CExceptionFactory(int nTypeID, const string & strMessage) { InitializeMap(); CreateObject(nTypeID); if(m_pException != 0) { m_pException->Log(strMessage); delete m_pException; } else { throw CExceptionFactory(CExceptionFactory::NULL_POINTER_EXCEPTIONS,"Unknown Exception."); } } void CExceptionFactory::CreateObject(int nTypeID) { CallbackMap::const_iterator i = m_Callbacks.find(nTypeID); if( i != m_Callbacks.end()) { m_pException = (i->second)(); } else m_pException = 0; } Now, as soon as the code hits (i->second)(); , it leaves the exception dll all together and goes back to the beginning of that case statement above. I am quite puzzled with this behaviour. I am guessing I have a function pointer to begin with the loaded DLL and then I am getting a second function pointer and the compiler gets confused, but why should it? Your help would be highly appreciated. thanks:confused:

    C / C++ / MFC c++ database xml help question

  • dealing with bi-directional association
    R RK_2000

    Suppose I have a dll containing the implementation of a logging tool. I also have another dll containing the implementation of an exception class. Now, I would like any external object INCLUDING an instance of the logging tool to be to throw exceptions using my excpetion class. I also want the Exception class to log every exception thrown into a log file. So, the dilemma is two dlls that depened on each other. Obviously, there are many hackish way of getting around this, but is there a standard and eloquent way of dealing with a situation like this?

    C / C++ / MFC question

  • XML Reader/Writer
    R RK_2000

    Is there any stable and reliable XML Reader/Writer classes anywhere that could be used around here? My particular need is for something for VC6 actually. thank you

    C / C++ / MFC xml question

  • GetCurrentMethod
    R RK_2000

    Is there an equivalent to .Net's GetCurrentMethod for Visual C++ 6?

    C / C++ / MFC c++ csharp question

  • Anyway to automate tabs?
    R RK_2000

    Suppose that I want to have a website top bar similar to Amazon. And I want this to be flexible so that if I want to remove one of the tabs, I don't have to re-do the image. Is there anyway to accomplish this, especially on the client side using Javasript without resorting to server side web controls? And is there anyway to do this using server side web controls? thanks

    ASP.NET sysadmin question

  • Problems with ADO Connection to ORacle using VC
    R RK_2000

    Hi there, I try to connect to Oracle using C++ and ADO with the following conection string...Upon trying to open, I get an access violation error. This is the connection string: "Driver={Microsoft ODBC for Oracle};Server=LST3.WORLD;Uid=MyUserName;Pwd=MyPassword;" The same set of stuff seem to connect me to the database through VB. Any ideas? HRESULT hRes; CLSID clsid; BOOL bRet = FALSE; LONG nOption = 1; CoInitialize(NULL); hRes = CLSIDFromProgID(L"ADODB.Connection", &clsid); if (SUCCEEDED(hRes)) { hRes = CoCreateInstance( clsid, 0, CLSCTX_INPROC_SERVER, __uuidof(_Connection), (void **)&m_pConnection ); } else { bRet = FALSE; } if(SUCCEEDED(hRes)) { SetDSN(nDatabase); try { hRes = m_pConnection->Open(m_varDSN.bstrVal,L"",L"", adConnectUnspecified); } catch (_com_error e) { bRet = FALSE; } ......

    C / C++ / MFC c++ database oracle sysadmin help

  • looking for a web control
    R RK_2000

    I am looking for a web control that is a cross between DataGrid and ListBox. What I need is a multiple column listview that supports row selection and different colors for different texts in different rows. Anyhow, I was curious if there is any already built out there before I embark on it myself.

    ASP.NET

  • Right hand corner notifications
    R RK_2000

    How are these right hand corner notifications are launched by msn or McAfee or others to name a few?

    C / C++ / MFC question

  • Session Management
    R RK_2000

    thanks

    ASP.NET csharp

  • Session Management
    R RK_2000

    I have read up on .Net Session Management a bit lately and I was curious if there are any good examples of its usage kicking around anywhere. Basically I am looking for various ways that people approach a login form and the userid once the user has loggged in..There are some obvious easy solutions, but I was wondering if there are any mores subtle ways and approaches that I may not know about or any intricacies that one may have to watch for.

    ASP.NET csharp

  • Printing Listview contents
    R RK_2000

    Is there any useful articles or classes on printing the contents of a listview in C#?

    C# csharp question

  • Scrolling a Listview in C#
    R RK_2000

    How do you scroll a C# Listview vertically automatically? I am looking for something similar to what you see in SQL Server profiler..it's not very difficult to accomplish this in MFC, but in C# I can't find a ScrollWindow type of function for the Listview or anything else...

    C# csharp c++ database sql-server sysadmin

  • CFrameWnd::Create
    R RK_2000

    Is there anyway to force a window created using this command to stay on top of its parent window at all times (kind of app modal)? However, I have a problem with when other windows overlap the parent window of my message. This message sort of pops up in front of the new dialog as well.. Any solutions?

    C / C++ / MFC help question

  • DateTimePicker and CListCtrl
    R RK_2000

    Is there any Date Time pickers that would allow you to modify both data and time within the same cell?

    C / C++ / MFC question

  • CListCtrl question
    R RK_2000

    I have created a custom, called CCustomListCtrl that inherits from CListCtrl. The only reason for this was to use the CustomDraw features. I am using this CCustomCtrl in a dialog box and I have created it dynamically as following: DWORD dwStyle; dwStyle = LVS_REPORT | WS_VISIBLE | WS_CHILD | WS_HSCROLL | WS_VSCROLL | WS_BORDER | LVS_SINGLESEL ; m_ControllerList.Create(dwStyle, CRect(nLeft, nTop, nRight, nBottom), this, IDC_CONTROLLER_LIST); m_ControllerList.SetExtendedStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); Now, I don't have trouble catching any of the messages pertaining to the list within the CDialog class but it seems like messages pertaining to the header of the list (i.e. ColumnClick, etc) are all going to the CCustomCtrl file and I just don't seem to be able to trap them in my dialog class. any ideas?

    C / C++ / MFC question

  • CListCtrl and wordwrap
    R RK_2000

    is there a wordwrap feature in CListCtrl, so when your data gets longer than the available width, it would break and add a new line?

    C / C++ / MFC question

  • subclassing and messages
    R RK_2000

    If you subclass a CListCtrl and call it CMyListCtrl and then use the CMyListCtrl as a member variable in a dialog box, some of the messages are caught by the parent dialog and some are sent to the CMyListCtrl. I was wondering if there is a way to direct these to catch these in my actual dialog instead of in my control.

    C / C++ / MFC

  • LVN_COLUMNCLICK
    R RK_2000

    I have a CListCtrl that is dynamically created. I am trying to add the columnclick event to it, but it doesn't seem to work. Any ideas why? this is what I am doing? Another question I have is how do you tell OnColumnClick which control you are refering to? I noticed that there are not IDs passed to it. in my .h I have this: //{{AFX_MSG(CFileView) ... afx_msg void OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult); ... //}}AFX_MSG in my .cpp BEGIN_MESSAGE_MAP(CFileView, CListCtrl) //{{AFX_MSG_MAP(CDetailsView) ON_NOTIFY_REFLECT(NM_DBLCLK, OnDoubleClick) //}}AFX_MSG_MAP void CControllerSelection::OnColumnClick(NMHDR * pNMHDR, LRESULT * pResult) { NM_LISTVIEW * pNMListView = (NM_LISTVIEW*) pNMHDR; m_ControllerList.SortItems(CompareFunc, pNMListView->iSubItem); *pResult = 0; }

    C / C++ / MFC question c++

  • CFindReplaceDialog
    R RK_2000

    Just out of curosity, how do you make a CFindReplaceDialog application modal? I noticed that the one that comes with Excel is app modal, but the one I have is not. So, essentially, if you have two workbooks open in excel and open the find dialog on one of them, it doesn't allow you to switch to the other document until you close the dialog. I gather it must be some flag that is set somewhere..any idea what?

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups