Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 1.34 KB

thread-specific-hot-keys.md

File metadata and controls

17 lines (13 loc) · 1.34 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: Thread-Specific Hot Keys
Thread-Specific Hot Keys
11/04/2016
CHotKeyCtrl class [MFC], thread-specific hot keys
keyboard shortcuts [MFC], hot keys
threading [MFC], hot keys in CHotKeyCtrl
access keys [MFC], hot keys
b6021274-1498-483f-bcbf-ba5723547cc8

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

Using CHotKeyCtrl
Controls