Problem with CDialogBar e CTreeCtrl
-
I need to use a CTreeCtrl in a CDialogBar window but I have problems when I try to perform any operation in the tree control. All operation fails so I have found that the m_hWnd related to the TreeCtrl is 0x00000000. Does someone knows which is the problem ?? Can the CTreeCtrl be used in a CDialogBar ??
-
I need to use a CTreeCtrl in a CDialogBar window but I have problems when I try to perform any operation in the tree control. All operation fails so I have found that the m_hWnd related to the TreeCtrl is 0x00000000. Does someone knows which is the problem ?? Can the CTreeCtrl be used in a CDialogBar ??
Anthiny B. wrote: Can the CTreeCtrl be used in a CDialogBar ?? Of course! 1) Check the block of code, which creates your TreeCtrl. What value is returned with Create function? What about GetLastError? 2) It may be a "race condition" - you might use a TreeCtrl when it has not been created yet. For example, it may be a WM_SIZE handler of your DialogBar
-
Anthiny B. wrote: Can the CTreeCtrl be used in a CDialogBar ?? Of course! 1) Check the block of code, which creates your TreeCtrl. What value is returned with Create function? What about GetLastError? 2) It may be a "race condition" - you might use a TreeCtrl when it has not been created yet. For example, it may be a WM_SIZE handler of your DialogBar
I don't create the TreeCtrl with the Create method !!! I have created a class derived from CDialogBar and I manage the TreeCtrl in that class using a CTreeCtrl member variable created through Class Wizard. I'm sure to don't use that variable before the window creation but I don not know how to verify the creation of the Tree control !!!:((
-
I don't create the TreeCtrl with the Create method !!! I have created a class derived from CDialogBar and I manage the TreeCtrl in that class using a CTreeCtrl member variable created through Class Wizard. I'm sure to don't use that variable before the window creation but I don not know how to verify the creation of the Tree control !!!:((
Override OnCreate (+OnInitDialog for guarantee) in your DialogBar. Set breakpoints at end of functions. Make sure that your TreeCtrl has been created (m_hWnd!=NULL). Just in case try to use GetDlgItem to obtain CTreeCtrl* pointer and check its m_hWnd. If ASSERT or exception raises earlier than you rich these breakpoints, you, it seems, have raise conditions Show us a fragment of code which refuses to run After all, try to rebuild all :)