CHotKey

Win32++

CHotKey Class

Description

The CHotKey class adds support for the hot key control. A hot key control is a window that enables the user to enter a combination of keystrokes to be used as a hot key.

Refer to the documentation that ships with the Microsoft Windows Software Development Kit for more information on the use of animation controls. 

CHotKey Members

CHotKey
CHotKey();
Constructs a hot key control.
GetHotKey
DWORD GetHotKey() const;
Gets the virtual key code and modifier flags of a hot key from the hot key control. GetKeyName
CString GetKeyName(UINT vk, BOOL fExtended) const;
Translates the virtual-key code to a scan code. SetHotKey
void SetHotKey(DWORD dwKey);
PSets the hot key combination for a hot key control. SetRules
void SetRules(WORD wInvalidComb, WORD wModifiers);
Defines the invalid combinations and the default modifier combination for a hot key control.   Overridables PreRegisterClass
virtual void PreRegisterClass(WNDCLASS &wc);
Set the window class parameters before the window is created.
Base class Members

For base class members, refer to the members of CWnd.

Remarks

A hot key is a key combination that the user can press to perform an action quickly. For example, a user can create a hot key that activates a given window and brings it to the top of the z-order. The hot key control displays the user's choices and ensures that the user selects a valid key combination.

Summary Information

Header file controls.h
Win32/64 support Yes
WinCE support Yes
Library required Comctl32.lib