5.10 Nonclient-Area Messages

Nonclient-area messages are sent by Windows to create and maintain the nonclient area of an application's window. Normally, applications do not process these messages, but send them on to the DefWindowProc function for processing. The following list briefly describes each nonclient-area message:

Message Description  
WM_NCACTIVATE Sent to a window when its caption bar or icon needs to be changed to indicate an active or inactive state.  
WM_NCCALCSIZE Sent when the size of a window's client area needs to be calculated.  
WM_NCCREATE Sent prior to the WM_CREATE message when a window is first created.  
WM_NCDESTROY Sent after the WM_DESTROY message.  
WM_NCHITTEST Sent to the window that contains the cursor (unless a window has captured the mouse).  
WM_NCLBUTTONDBLCLK Sent to a window when the left mouse button is double-clicked while the cursor is in a nonclient area of the window.  
WM_NCLBUTTONDOWN Sent to a window when the left mouse button is pressed while the cursor is in a nonclient area of the window.  
WM_NCLBUTTONUP Sent to a window when the left mouse button is released while the cursor is in a nonclient area of the window.  
WM_NCMBUTTONDBLCLK Sent to a window when the middle mouse button is double-clicked while the cursor is in a nonclient area of the window.  
WM_NCMBUTTONDOWN Sent to a window when the middle mouse button is pressed while the cursor is in a nonclient area of the window.  
WM_NCMBUTTONUP Sent to a window when the left mouse button is released while the cursor is in a nonclient area of the window.  
Message Description  
WM_NCMOUSEMOVE Sent to a window when the cursor is moved in a nonclient area of the window.  
WM_NCPAINT Sent to a window when its border needs painting.  
WM_NCRBUTTONDBLCLK Sent to a window when the right mouse button is double-clicked while the cursor is in a nonclient area of the window.  
WM_NCRBUTTONDOWN Sent to a window when the right mouse button is pressed while the cursor is in a nonclient area of the window.  
WM_NCRBUTTONUP Sent to a window when the right mouse button is released while the cursor is in a nonclient area of the window.