The WM_NCACTIVATE message is sent to a window when its nonclient area needs to be changed to indicate an active or inactive state. The WM_NCHITTEST message is sent to a window when the cursor moves, or when a mouse button is pressed or released. If the mouse is not captured, the message is sent to the window beneath the cursor. Otherwise, the message is sent to the window that has captured the mouse. The WM_NCPAINT message is sent to a window when its frame must be painted