CWnd::OnNcDestroy

Called by the framework when the nonclient area is being destroyed, and is the last member function called when the Windows window is destroyed.

afx_msg void OnNcDestroy( );

Remarks

The default implementation performs some cleanup, then calls the virtual member function PostNcDestroy.

Override PostNcDestroy if you want to perform your own cleanup, such as a delete this operation. If you override OnNcDestroy, you must call OnNcDestroy in your base class to ensure that any memory internally allocated for the window is freed.

Requirements

Header: afxwin.h

See Also

Reference

CWnd Class

Hierarchy Chart

CWnd::DestroyWindow

CWnd::OnNcCreate

WM_NCDESTROY

CWnd::Default

CWnd::PostNcDestroy

Concepts

CWnd Members