windows_programming_notes.nbk: Home | Index | Next Page: WM_HSCROLL | Previous Page: WM_HELP


 WM_HOTKEY

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.

A window receives this message through its WindowProc function.

    LRESULT CALLBACK WindowProc(
      HWND hwnd,       // handle to window
      UINT uMsg,       // WM_HOTKEY
      WPARAM wParam,   // hot key identifier
      LPARAM lParam    // options and virtual-key code
    );

Parameters

The high-order word specifies the virtual key code of the hot key.

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.

Requirements


windows_programming_notes.nbk: Home | Index | Next Page: WM_HSCROLL | Previous Page: WM_HELP


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time