The WM_NCDESTROY message informs a window that its nonclient area is being destroyed. The DestroyWindow function sends the WM_NCDESTROY message to the window following the WM_DESTROY message. WM_DESTROY is used to free the allocated memory object associated with the window.
WM_NCDESTROY
This message has no parameters.
If an application processes this message, it should return zero.
This message frees any memory internally allocated for the window.