WM_NCACTIVATE

This message is sent to a window when its nonclient area needs to be changed to indicate an active or inactive state.

Parameter Description  

wParam Specifies when a caption bar or icon needs to be changed to indicate an active or inactive state. The wParam parameter is nonzero if an active caption or icon is to be drawn. It is zero for an inactive caption or icon.  
lParam Is not used.  

Default Action

The DefWindowProc function draws a gray caption bar for an inactive window and a black caption bar for an active window.