Compartir a través de


Thread-Specific Hot Keys

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at 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