WM_HOTKEY Notification

The WM_HOTKEY message is posted when the user presses a hot key registered by the RegisterHotKey function. The message is placed at the top of the message queue associated with the thread that registered the hot key.

Syntax

WM_HOTKEY

    WPARAM wParam
    LPARAM lParam;
    

Parameters

wParam
Specifies the identifier of the hot key that generated the message. If the message was generated by a system-defined hot key, this parameter will be one of the following values.
IDHOT_SNAPDESKTOP
The "snap desktop" hot key was pressed.
IDHOT_SNAPWINDOW
The "snap window" hot key was pressed.
lParam
The low-order word specifies the keys that were to be pressed in combination with the key specified by the high-order word to generate the WM_HOTKEY message. This word can be one or more of the following values. The high-order word specifies the virtual key code of the hot key.
MOD_ALT
Either ALT key was held down.
MOD_CONTROL
Either CTRL key was held down.
MOD_SHIFT
Either SHIFT key was held down.
MOD_WIN
Either WINDOWS key was held down. These keys are labeled with the Microsoft Windows logo. Hotkeys that involve the Windows key are reserved for use by the operating system.

Return Value

No return value.

Remarks

WM_HOTKEY is unrelated to the WM_GETHOTKEY and WM_SETHOTKEY hot keys. The WM_HOTKEY message is sent for generic hot keys while the WM_SETHOTKEY and WM_GETHOTKEY messages relate to window activation hot keys.

Notification Requirements

Minimum DLL Version None
HeaderDeclared in Winuser.h, include Windows.h
Minimum operating systems Windows 95, Windows NT 3.1

See Also

Tags :


Community Content

Đonny
Value
WM_HOTKEY = &H312
Public Enum WM_HOTKEY As Integer
IDHOT_SNAPDESKTOP = (-2)
IDHOT_SNAPWINDOW = (-1)
End Enum
<Flags()> Public Enum WM_HOTKEY_low As Short
MOD_ALT = &H1
MOD_CONTROL = &H2
MOD_SHIFT = &H4
MOD_WIN = &H8
End Enum

Page view tracker