Compartilhar via


Thread-Specific Hot Keys

An application sets a thread-specific hot key (CHotKeyCtrl) by using the Windows RegisterHotKey function. When the user presses a thread-specific hot key, Windows posts a WM_HOTKEY message to the beginning of a particular thread's message queue. The WM_HOTKEY message contains the virtual key code, shift state, and user-defined ID of the specific hot key that was pressed. For a list of standard virtual key codes, see Winuser.h. For more information on this method, see RegisterHotKey.

Note that the shift state flags used in the call to RegisterHotKey are not the same as those returned by the GetHotKey member function; you'll have to translate these flags before calling RegisterHotKey.

See Also

Reference

Using CHotKeyCtrl

Concepts

Controls (MFC)