WM_NCDESTROY
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_NCDESTROY is used to free the allocated memory object associated with the window.
This message has no parameters.
An application should return zero if it processes this message.
This message frees any memory internally allocated for the window.