GET_KEYSTATE_LPARAM macro

Retrieves the state of certain virtual keys from the specified LPARAM value.

Syntax


int GET_KEYSTATE_LPARAM(
  LPARAM lParam
);

Parameters

lParam

The value to be converted.

Return value

The return value is the low-order word representing the virtual key state. It can be one of the following values.

Return code/valueDescription
MK_CONTROL
0x0008

The CTRL key is down.

MK_LBUTTON
0x0001

The left mouse button is down.

MK_MBUTTON
0x0010

The middle mouse button is down.

MK_RBUTTON
0x0002

The right mouse button is down.

MK_SHIFT
0x0004

The SHIFT key is down.

MK_XBUTTON1
0x0020

The first X button is down.

MK_XBUTTON2
0x0040

The second X button is down.

 

Remarks

This macro is identical to the GET_FLAGS_LPARAM macro.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

Reference
GET_FLAGS_LPARAM
Conceptual
Mouse Input

 

 

Community Additions

ADD
Show:
© 2014 Microsoft