ERROR - Object deleted before window was destroyed
-
Im a beginner of WTL. I want to subclass a CStatic control, my code is very simple like following: class CMyStatic : public CWindowImpl(CMyStatic,CStatic) { BEGIN_MSG_MAP_EX( CMyStatic) //message handle macros here END_MSG_MAP( ) //there are message implements } And, in the main dialog window, I use SubclassWindow function to subclass a spcified static control. But, the problem iss, when the main dialog is closing, i would get an atl assert: ERROR - Object deleted before window was destroyed. I know the problem is due to the deconstructor of its base class. It's deleted before the window has been destroyed. So, how to fix it?
-
Im a beginner of WTL. I want to subclass a CStatic control, my code is very simple like following: class CMyStatic : public CWindowImpl(CMyStatic,CStatic) { BEGIN_MSG_MAP_EX( CMyStatic) //message handle macros here END_MSG_MAP( ) //there are message implements } And, in the main dialog window, I use SubclassWindow function to subclass a spcified static control. But, the problem iss, when the main dialog is closing, i would get an atl assert: ERROR - Object deleted before window was destroyed. I know the problem is due to the deconstructor of its base class. It's deleted before the window has been destroyed. So, how to fix it?
Unsubclass[^] the window in a WM_CLOSE handler?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
Unsubclass[^] the window in a WM_CLOSE handler?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
Unsubclass[^] the window in a WM_CLOSE handler?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p