HWND problem with list control
-
Hi all; I am having a serious problem with an application that I am currently developing. It is an SDI application consisting of a CdialogBar (Well, some sort of derivation of that class atually). I have to initialise tabs and add list controls and tree controls on them. This works just fine as I have added initialisation code to the InitDialogBar() function that I have created for the DialogBar. The problem is that I need to fill these controls (list and tree) dynamically. This can only happen when users log onto the program. InitDialogBar() is triggered well before user log-in. So I have created a function in the DialogBar class to add/remove unnecessary items in the controls when user log-in. I use a global pointer to access this function in the login-dialog stuff. However, I always get the following assertion error: AFXWIN_INLINE HICON CWnd::SetIcon(HICON hIcon, BOOL bBigIcon) { ASSERT(::IsWindow(m_hWnd)); return (HICON)::SendMessage(m_hWnd, It occurs in line 309 of AfxWin2 Obviously, it is requiring a handle to the DialogBar but I just can’t figure out how to make it work as I am quite new to Visual C++ programming. Can somebody, please please help me. Thank you, Krugger