Applies to: desktop apps only
Describes a mouse input event in a console INPUT_RECORD structure.
Syntax
typedef struct _MOUSE_EVENT_RECORD {
COORD dwMousePosition;
DWORD dwButtonState;
DWORD dwControlKeyState;
DWORD dwEventFlags;
} MOUSE_EVENT_RECORD;
Members
- dwMousePosition
-
A COORD structure that contains the location of the cursor, in terms of the console screen buffer's character-cell coordinates.
- dwButtonState
-
The status of the mouse buttons. The least significant bit corresponds to the leftmost mouse button. The next least significant bit corresponds to the rightmost mouse button. The next bit indicates the next-to-leftmost mouse button. The bits then correspond left to right to the mouse buttons. A bit is 1 if the button was pressed.
The following constants are defined for the first five mouse buttons.
- dwControlKeyState
-
The state of the control keys. This member can be one or more of the following values.
- dwEventFlags
-
The type of mouse event. If this value is zero, it indicates a mouse button being pressed or released. Otherwise, this member is one of the following values.
Remarks
Mouse events are placed in the input buffer when the console is in mouse mode (ENABLE_MOUSE_INPUT).
Mouse events are generated whenever the user moves the mouse, or presses or releases one of the mouse buttons. Mouse events are placed in a console's input buffer only when the console group has the keyboard focus and the cursor is within the borders of the console's window.
Examples
For an example, see Reading Input Buffer Events.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
See also
Send comments about this topic to Microsoft
Build date: 5/5/2012
