Skip to content

Latest commit

 

History

History
46 lines (43 loc) · 1.75 KB

File metadata and controls

46 lines (43 loc) · 1.75 KB
title Thread-Specific Hot Keys | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic article
dev_langs
C++
helpviewer_keywords
CHotKeyCtrl class, thread-specific hot keys
keyboard shortcuts [C++], hot keys
threading [C++], hot keys in CHotKeyCtrl
access keys [C++], hot keys
ms.assetid b6021274-1498-483f-bcbf-ba5723547cc8
caps.latest.revision 10
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

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