Platform SDK: Interprocess Communications

MOUSEHOOKSTRUCTEX

The MOUSEHOOKSTRUCTEX structure contains information about a mouse event passed to a WH_MOUSE hook procedure, MouseProc.

This is an extension of the MOUSEHOOKSTRUCT structure that includes information about wheel movement or the use of the X button.

 typedef struct tagMOUSEHOOKSTRUCTEX {
    MOUSEHOOKSTRUCT;
    DWORD mouseData;
} MOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX;

Members

MOUSEHOOKSTRUCT
The members of a MOUSEHOOKSTRUCT structure make up the first part of this structure.
mouseData
If the message is WM_MOUSEWHEEL, the HIWORD of this member is the wheel delta. The LOWORD is undefined and reserved. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as WHEEL_DELTA, which is 120.

If the message is WM_XBUTTONDOWN, WM_XBUTTONUP, WM_XBUTTONDBLCLK, WM_NCXBUTTONDOWN, WM_NCXBUTTONUP, or WM_NCXBUTTONDBLCLK, the HIWORD OF mouseData specifies which X button was pressed or released, and the LOWORD is undefined and reserved. This member can be one or more of the following values.
Value Meaning
XBUTTON1 The first X button was pressed or released.
XBUTTON2 The second X button was pressed or released.

Otherwise, mouseData is not used.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Winuser.h; include Windows.h.

See Also

Hooks Overview, Hook Structures, MouseProc, MOUSEHOOKSTRUCT, WM_MOUSEWHEEL, WM_XBUTTONDOWN, WM_XBUTTONUP, WM_XBUTTONDBLCLK, WM_NCXBUTTONDOWN, WM_NCXBUTTONUP, WM_NCXBUTTONDBLCLK