MOUSEMSG

This structure is used to hold mouse message and is defined as follows:

struct MOUSEMSG
{
	UINT uMsg;			// Current mouse message.
	bool mkCtrl;		// The CTRL key is down.
	bool mkShift;		// The SHIFT key is down.
	bool mkLButton;		// The left mouse button is down.
	bool mkMButton;		// The middle mouse button is down.
	bool mkRButton;		// The right mouse button is down.
	int x;				// The x-coordinate of the cursor. (physical coordinates)
	int y;				// The y-coordinate of the cursor. (physical coordinates)
	int wheel;			// The mouse wheel scroll value.
};

Members

uMsg

Specify the mouse message identifier, which can be the following values.

Value Description
WM_MOUSEMOVE The message of the mouse movement.
WM_MOUSEWHEEL The message of the mouse wheel scroll.
WM_LBUTTONDOWN The message of the left mouse button down.
WM_LBUTTONUP The message of the left mouse button up.
WM_LBUTTONDBLCLK The message of the left mouse button double click.
WM_MBUTTONDOWN The message of the middle mouse button down.
WM_MBUTTONUP The message of the middle mouse button up.
WM_MBUTTONDBLCLK The message of the middle mouse button double click.
WM_RBUTTONDOWN The message of the right mouse button down.
WM_RBUTTONUP The message of the right mouse button up.
WM_RBUTTONDBLCLK The message of the right mouse button double click.

mkCtrl

The CTRL key is down.

mkShift

The SHIFT key is down.

mkLButton

The left mouse button is down.

mkMButton

The middle mouse button is down.

mkRButton

The right mouse button is down.

x

The x-coordinate of the cursor. (physical coordinates)

y

The y-coordinate of the cursor. (physical coordinates)

wheel

The mouse wheel scroll value, a multiple of 120.

Remarks

This structure is obsolete and is declared only in graphics.h. It is recommended that use ExMessage instead of the structure.

Examples

None

(贡献者:Krissi  编辑