TechyMaila wrote:Now when I destory the window does the object tha cMainFrame is pointing to also get deleted from memory or do we have to do it explicitly? What I did was
delete cMainFrame ;
cMainFrame = NULL ;
Is this destruction of the Window and object the correct way to do it?
Destroys the Windows window attached to the
CWnd object. The
DestroyWindow member function sends appropriate messages to the window to deactivate it and remove the input focus. It also destroys the window’s menu, flushes the application queue, destroys outstanding timers, removes Clipboard ownership, and breaks the Clipboard-viewer chain if
CWnd is at the top of the viewer chain. It sends
WM_NCDESTROY messages to the window.
It does not destroy the CWnd object.
Programming tips[^] My site[^]