◄CWnd► ◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── afx_msg void OnNcDestroy(); Remarks Called when the nonclient area is being destroyed. The ◄DestroyWindow► member function sends WM_NCDESTROY. The Default member function frees any memory internally allocated for the Windows window. The OnNcDestroy member function is the last member called when the Windows window is being destroyed. OnNcDestroy can call delete this to free the CWnd object that was dynamically allocated with new. This message-handler member function calls the ◄Default► member function. Override this member function in your derived class to handle the ◄WM_NCDESTROY► message. See Also ◄CWnd::DestroyWindow►, ◄CWnd::OnNcCreate►, ◄WM_NCDESTROY►, ◄CWnd::Default► -♦-