Default Hot-Key Message Processing

This section describes the window messages handled by the window procedure for the predefined HOTKEY_CLASS window class used with hot-key controls.

Message Processing performed
WM_CHAR Retrieves the virtual-key code.
WM_CREATE Initializes the hot-key control, sets no hot-key rules, and uses the system font.
WM_ERASEBKGND Hides the caret, calls the DefWindowProc function, and shows the caret again.
WM_GETDLGCODE Returns a combination of the DLGC_WANTCHARS and DLGC_WANTARROWS values.
WM_GETFONT Retrieves the font.
WM_KEYDOWN Calls the DefWindowProc function if the key is ENTER, TAB, SPACE BAR, DEL, ESC, or BACKSPACE. If the key is SHIFT, CTRL, or ALT, it checks whether the combination is valid and, if it is, sets the hot key using the combination. Other keys are set as hot keys without their validity being checked first.
WM_KEYUP Retrieves the virtual-key code.
WM_KILLFOCUS Destroys the caret.
WM_LBUTTONDOWN Sets the focus to the window.
WM_NCCREATE Sets the WS_EX_CLIENTEDGE window style.
WM_PAINT Paints the hot-key control.
WM_SETFOCUS Creates and shows the caret.
WM_SETFONT Sets the font.
WM_SYSCHAR Retrieves the virtual-key code.
WM_SYSKEYDOWN Calls the DefWindowProc function if the key is ENTER, TAB, SPACE BAR, DEL, ESC, or BACKSPACE. If the key is SHIFT, CTRL, or ALT, it checks whether the combination is valid and, if it is, sets the hot key using the combination. Other keys are set as hot keys without their validity being checked first.
WM_SYSKEYUP Retrieves the virtual-key code.