MOUSE_EVENT_RECORD (Structures)
Last changed: -79.206.152.209

.
Summary
The MOUSE_EVENT_RECORD structure is used in a console INPUT_RECORD structure to report mouse input events.

C# Definition:

    [StructLayout(LayoutKind.Explicit)]
    public struct MOUSE_EVENT_RECORD
    {    
        [FieldOffset(2)]
        public COORD dwMousePosition;
        [FieldOffset(6)]
        public uint dwButtonState;
        [FieldOffset(12)]
        public uint dwControlKeyState;
        [FieldOffset(14)]
        public uint dwEventFlags;
    }

VB Definition:

Structure MOUSE_EVENT_RECORD
   Public TODO
End Structure

User-Defined Field Types:

None.

Notes:

This one seems busted. I added it because there wasn't one, but when I try to capture this event, dwMousePosition.X is always 1 except when Y is 0, then X == 1 || X == 0

UPDATE:

For some weird reason, setting the offsets to the above settings will make this structure work properly. I can't seem to find any rhyme or reason for it, especially the last fields. If anyone finds out why this works, or, if indeed it doesn't work for you please update this entry accordingly.

Documentation