The messages specifically handled by the predefined static control class (WC_STATIC) are as follows:
┌──────────────────────┬──────────────────────────────────────┐ │Message Name │Description │ ├──────────────────────┼──────────────────────────────────────┤ │SM_QUERYHANDLE │Returns the handle associated with the│ │ │static control window. │ ├──────────────────────┼──────────────────────────────────────┤ │SM_SETHANDLE │Sets the handle associated with the │ │ │static control and invalidates the │ │ │control window, forcing it to be │ │ │redrawn. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_ADJUSTWINDOWPOS │Adjusts the SWP data structure so that│ │ │the new window size matches the bit │ │ │map, icon, or system-pointer │ │ │dimensions associated with the static │ │ │control. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_CREATE │Sets the text for a static-text │ │ │control. Loads the bit map or icon │ │ │resource for the bit map or icon │ │ │static control. Returns TRUE if the │ │ │resource cannot be loaded. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_DESTROY │Frees the text for a static-text │ │ │control. Destroys the bit map or icon │ │ │for a bit map or icon static control. │ │ │The icon for a system-pointer static │ │ │control is not destroyed because it │ │ │belongs to the system. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_ENABLE │Invalidates the entire static control │ │ │window, forcing it to be redrawn. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_HITTEST │Returns the value HT_TRANSPARENT for │ │ │the following static-control styles: │ │ │o SS_BKGNDFRAME │ │ │o SS_BKGNDRECT │ │ │o SS_FGNDFRAME │ │ │o SS_FGNDRECT │ │ │o SS_GROUPBOX │ │ │o SS_HALFTONEFRAME │ │ │o SS_HALFTONERECT. │ │ │ │ │ │For other styles, this message returns│ │ │the result of WinDefWindowProc. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_MATCHMNEMONIC │Returns TRUE if the mnemonic passed in│ │ │the mp1 parameter matches the mnemonic│ │ │in the control-window text. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_MOUSEMOVE │Sets the mouse pointer to the arrow │ │ │pointer and returns TRUE. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_PAINT │Draws the static control based on its │ │ │style attributes. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_QUERYDLGCODE │Returns the predefined constant │ │ │DLGC_STATIC. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_QUERYWINDOWPARAMS │Returns the requested window │ │ │parameters. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_SETFOCUS │Sets the focus to the next sibling │ │ │window that can accept the focus; or │ │ │if no such sibling exists, sets the │ │ │focus to the parent window. │ ├──────────────────────┼──────────────────────────────────────┤ │WM_SETWINDOWPARAMS │Allows the text to be set (static-text│ │ │controls only). │ └──────────────────────┴──────────────────────────────────────┘