WMNCDESTROY
WMNCDESTROY, properly named WM_NCDESTROY in the Win32 API, is a Windows message sent to a window procedure when the non-client area of a window is being destroyed. The term WMNCDESTROY is a common shorthand found in documentation and code, but the official constant is WM_NCDESTROY.
This message concerns the non-client area, which includes elements outside the window’s client drawing area such
Handling guidance: a window procedure may process WM_NCDESTROY to perform necessary cleanup of non-client resources and
In summary, WM_NCDESTROY signals the impending destruction of a window’s non-client frame, enabling appropriate cleanup prior