diff --git a/PInvoke/User32.Gdi/WinUser.Window.cs b/PInvoke/User32.Gdi/WinUser.Window.cs
index f3873b12..9f93e625 100644
--- a/PInvoke/User32.Gdi/WinUser.Window.cs
+++ b/PInvoke/User32.Gdi/WinUser.Window.cs
@@ -381,6 +381,27 @@ namespace Vanara.PInvoke
MSGFLTINFO_ALLOWED_HIGHER = 3,
}
+ /// The mouse state flags.
+ [PInvokeData("winuser.h")]
+ [Flags]
+ public enum MouseState : ushort
+ {
+ /// Mouse attributes changed; application needs to query the mouse attributes.
+ MOUSE_ATTRIBUTES_CHANGED = 0x04,
+
+ /// Mouse movement data is relative to the last mouse position.
+ MOUSE_MOVE_RELATIVE = 0,
+
+ /// Mouse movement data is based on absolute position.
+ MOUSE_MOVE_ABSOLUTE = 1,
+
+ /// Mouse coordinates are mapped to the virtual desktop (for a multiple monitor system).
+ MOUSE_VIRTUAL_DESKTOP = 0x02,
+
+ /// Do not coalesce mouse moves.
+ MOUSE_MOVE_NOCOALESCE = 0x08,
+ }
+
///
///
/// This topic describes the constant values used to describe the state of objects in an application UI. The state constants are
@@ -566,6 +587,104 @@ namespace Vanara.PInvoke
STATE_SYSTEM_UNAVAILABLE = 0x00000001,
}
+ /// Flags for scan code information.
+ [PInvokeData("winuser.h")]
+ [Flags]
+ public enum RI_KEY : ushort
+ {
+ /// The key is down.
+ RI_KEY_MAKE = 0,
+
+ /// The key is up.
+ RI_KEY_BREAK = 1,
+
+ /// The scan code has the E0 prefix.
+ RI_KEY_E0 = 2,
+
+ /// The scan code has the E1 prefix.
+ RI_KEY_E1 = 4,
+
+ /// Undocumented
+ RI_KEY_TERMSRV_SET_LED = 8,
+
+ /// Undocumented
+ RI_KEY_TERMSRV_SHADOW = 0x10
+ }
+
+ /// Mouse button transition state indicators.
+ [PInvokeData("winuser.h")]
+ [Flags]
+ public enum RI_MOUSE : ushort
+ {
+ /// Left button changed to down.
+ RI_MOUSE_LEFT_BUTTON_DOWN = 0x0001,
+
+ /// Left button changed to up.
+ RI_MOUSE_LEFT_BUTTON_UP = 0x0002,
+
+ /// Right button changed to down.
+ RI_MOUSE_RIGHT_BUTTON_DOWN = 0x0004,
+
+ /// Right button changed to up.
+ RI_MOUSE_RIGHT_BUTTON_UP = 0x0008,
+
+ /// Middle button changed to down.
+ RI_MOUSE_MIDDLE_BUTTON_DOWN = 0x0010,
+
+ /// Middle button changed to up.
+ RI_MOUSE_MIDDLE_BUTTON_UP = 0x0020,
+
+ /// RI_MOUSE_LEFT_BUTTON_DOWN
+ RI_MOUSE_BUTTON_1_DOWN = RI_MOUSE_LEFT_BUTTON_DOWN,
+
+ /// RI_MOUSE_LEFT_BUTTON_UP
+ RI_MOUSE_BUTTON_1_UP = RI_MOUSE_LEFT_BUTTON_UP,
+
+ /// RI_MOUSE_RIGHT_BUTTON_DOWN
+ RI_MOUSE_BUTTON_2_DOWN = RI_MOUSE_RIGHT_BUTTON_DOWN,
+
+ /// RI_MOUSE_RIGHT_BUTTON_UP
+ RI_MOUSE_BUTTON_2_UP = RI_MOUSE_RIGHT_BUTTON_UP,
+
+ /// RI_MOUSE_MIDDLE_BUTTON_DOWN
+ RI_MOUSE_BUTTON_3_DOWN = RI_MOUSE_MIDDLE_BUTTON_DOWN,
+
+ /// RI_MOUSE_MIDDLE_BUTTON_UP
+ RI_MOUSE_BUTTON_3_UP = RI_MOUSE_MIDDLE_BUTTON_UP,
+
+ /// XBUTTON1 changed to down.
+ RI_MOUSE_BUTTON_4_DOWN = 0x0040,
+
+ /// XBUTTON1 changed to up.
+ RI_MOUSE_BUTTON_4_UP = 0x0080,
+
+ /// XBUTTON2 changed to down.
+ RI_MOUSE_BUTTON_5_DOWN = 0x0100,
+
+ /// XBUTTON2 changed to up.
+ RI_MOUSE_BUTTON_5_UP = 0x0200,
+
+ /// Raw input comes from a mouse wheel. The wheel delta is stored in usButtonData.
+ RI_MOUSE_WHEEL = 0x0400,
+
+ /// Raw input comes from a mouse horizontal wheel. The wheel delta is stored in usButtonData.
+ RI_MOUSE_HWHEEL = 0x0800,
+ }
+
+ /// The type of raw input.
+ [PInvokeData("winuser.h")]
+ public enum RIM_TYPE
+ {
+ /// Raw input comes from some device that is not a keyboard or a mouse.
+ RIM_TYPEHID = 2,
+
+ /// Raw input comes from the keyboard.
+ RIM_TYPEKEYBOARD = 1,
+
+ /// Raw input comes from the mouse.
+ RIM_TYPEMOUSE = 0,
+ }
+
/// Window sizing and positioning flags.
[PInvokeData("winuser.h", MSDNShortId = "setwindowpos")]
[Flags]
@@ -2105,6 +2224,220 @@ namespace Vanara.PInvoke
[PInvokeData("winuser.h", MSDNShortId = "deferwindowpos")]
public static extern HDWP DeferWindowPos(HDWP hWinPosInfo, HWND hWnd, HWND hWndInsertAfter, int x, int y, int cx, int cy, SetWindowPosFlags uFlags);
+ ///
+ /// Provides default processing for any window messages that the window procedure of a multiple-document interface (MDI) frame window
+ /// does not process. All window messages that are not explicitly processed by the window procedure must be passed to the
+ /// DefFrameProc function, not the DefWindowProc function.
+ ///
+ ///
+ /// Type: HWND
+ /// A handle to the MDI frame window.
+ ///
+ ///
+ /// Type: HWND
+ /// A handle to the MDI client window.
+ ///
+ ///
+ /// Type: UINT
+ /// The message to be processed.
+ ///
+ ///
+ /// Type: WPARAM
+ /// Additional message-specific information.
+ ///
+ ///
+ /// Type: LPARAM
+ /// Additional message-specific information.
+ ///
+ ///
+ /// Type: Type: LRESULT
+ ///
+ /// The return value specifies the result of the message processing and depends on the message. If the hWndMDIClient parameter is
+ /// NULL, the return value is the same as for the DefWindowProc function.
+ ///
+ ///
+ ///
+ ///
+ /// When an application's window procedure does not handle a message, it typically passes the message to the DefWindowProc function
+ /// to process the message. MDI applications use the DefFrameProc and DefMDIChildProc functions instead of
+ /// DefWindowProc to provide default message processing. All messages that an application would usually pass to
+ /// DefWindowProc (such as nonclient messages and the WM_SETTEXT message) should be passed to DefFrameProc instead. The
+ /// DefFrameProc function also handles the following messages.
+ ///
+ ///
+ ///
+ /// Message
+ /// Response
+ ///
+ /// -
+ /// WM_COMMAND
+ ///
+ /// Activates the MDI child window that the user chooses. This message is sent when the user chooses an MDI child window from the
+ /// window menu of the MDI frame window. The window identifier accompanying this message identifies the MDI child window to be activated.
+ ///
+ ///
+ /// -
+ /// WM_MENUCHAR
+ /// Opens the window menu of the active MDI child window when the user presses the ALT+ – (minus) key combination.
+ ///
+ /// -
+ /// WM_SETFOCUS
+ /// Passes the keyboard focus to the MDI client window, which in turn passes it to the active MDI child window.
+ ///
+ /// -
+ /// WM_SIZE
+ ///
+ /// Resizes the MDI client window to fit in the new frame window's client area. If the frame window procedure sizes the MDI client
+ /// window to a different size, it should not pass the message to the DefWindowProc function.
+ ///
+ ///
+ ///
+ ///
+ // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-defframeproca LRESULT DefFrameProcA( HWND hWnd, HWND
+ // hWndMDIClient, UINT uMsg, WPARAM wParam, LPARAM lParam );
+ [DllImport(Lib.User32, SetLastError = false, CharSet = CharSet.Auto)]
+ [PInvokeData("winuser.h")]
+ public static extern IntPtr DefFrameProc(HWND hWnd, HWND hWndMDIClient, uint uMsg, IntPtr wParam, IntPtr lParam);
+
+ ///
+ /// Provides default processing for any window message that the window procedure of a multiple-document interface (MDI) child window
+ /// does not process. A window message not processed by the window procedure must be passed to the DefMDIChildProc function,
+ /// not to the DefWindowProc function.
+ ///
+ ///
+ /// Type: HWND
+ /// A handle to the MDI child window.
+ ///
+ ///
+ /// Type: UINT
+ /// The message to be processed.
+ ///
+ ///
+ /// Type: WPARAM
+ /// Additional message-specific information.
+ ///
+ ///
+ /// Type: LPARAM
+ /// Additional message-specific information.
+ ///
+ ///
+ /// Type: Type: LRESULT
+ /// The return value specifies the result of the message processing and depends on the message.
+ ///
+ ///
+ ///
+ /// The DefMDIChildProc function assumes that the parent window of the MDI child window identified by the hWnd parameter was
+ /// created with the MDICLIENT class.
+ ///
+ ///
+ /// When an application's window procedure does not handle a message, it typically passes the message to the DefWindowProc function
+ /// to process the message. MDI applications use the DefFrameProc and DefMDIChildProc functions instead of
+ /// DefWindowProc to provide default message processing. All messages that an application would usually pass to
+ /// DefWindowProc (such as nonclient messages and the WM_SETTEXT message) should be passed to DefMDIChildProc instead.
+ /// In addition, DefMDIChildProc also handles the following messages.
+ ///
+ ///
+ ///
+ /// Message
+ /// Response
+ ///
+ /// -
+ /// WM_CHILDACTIVATE
+ /// Performs activation processing when MDI child windows are sized, moved, or displayed. This message must be passed.
+ ///
+ /// -
+ /// WM_GETMINMAXINFO
+ /// Calculates the size of a maximized MDI child window, based on the current size of the MDI client window.
+ ///
+ /// -
+ /// WM_MENUCHAR
+ /// Passes the message to the MDI frame window.
+ ///
+ /// -
+ /// WM_MOVE
+ /// Recalculates MDI client scroll bars if they are present.
+ ///
+ /// -
+ /// WM_SETFOCUS
+ /// Activates the child window if it is not the active MDI child window.
+ ///
+ /// -
+ /// WM_SIZE
+ ///
+ /// Performs operations necessary for changing the size of a window, especially for maximizing or restoring an MDI child window.
+ /// Failing to pass this message to the DefMDIChildProc function produces highly undesirable results.
+ ///
+ ///
+ /// -
+ /// WM_SYSCOMMAND
+ /// Handles window menu commands: SC_NEXTWINDOW, SC_PREVWINDOW, SC_MOVE, SC_SIZE, and SC_MAXIMIZE.
+ ///
+ ///
+ ///
+ // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-defmdichildproca LRESULT LRESULT DefMDIChildProcA( HWND
+ // hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
+ [DllImport(Lib.User32, SetLastError = false, CharSet = CharSet.Auto)]
+ [PInvokeData("winuser.h")]
+ public static extern IntPtr DefMDIChildProc(HWND hWnd, uint uMsg, IntPtr wParam, IntPtr lParam);
+
+ ///
+ /// Calls the default raw input procedure to provide default processing for any raw input messages that an application does not
+ /// process. This function ensures that every message is processed. DefRawInputProc is called with the same parameters
+ /// received by the window procedure.
+ ///
+ ///
+ /// Type: PRAWINPUT*
+ /// An array of RAWINPUT structures.
+ ///
+ ///
+ /// Type: INT
+ /// The number of RAWINPUT structures pointed to by paRawInput.
+ ///
+ ///
+ /// Type: UINT
+ /// The size, in bytes, of the RAWINPUTHEADER structure.
+ ///
+ ///
+ /// Type: LRESULT
+ /// If successful, the function returns S_OK. Otherwise it returns an error value.
+ ///
+ // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-defrawinputproc LRESULT DefRawInputProc( PRAWINPUT
+ // *paRawInput, INT nInput, UINT cbSizeHeader );
+ [DllImport(Lib.User32, SetLastError = false, ExactSpelling = true)]
+ [PInvokeData("winuser.h")]
+ public static extern IntPtr DefRawInputProc(RAWINPUT[] paRawInput, int nInput, uint cbSizeHeader);
+
+ ///
+ /// Calls the default window procedure to provide default processing for any window messages that an application does not process.
+ /// This function ensures that every message is processed. DefWindowProc is called with the same parameters received by the
+ /// window procedure.
+ ///
+ ///
+ /// Type: HWND
+ /// A handle to the window procedure that received the message.
+ ///
+ ///
+ /// Type: UINT
+ /// The message.
+ ///
+ ///
+ /// Type: WPARAM
+ /// Additional message information. The content of this parameter depends on the value of the Msg parameter.
+ ///
+ ///
+ /// Type: LPARAM
+ /// Additional message information. The content of this parameter depends on the value of the Msg parameter.
+ ///
+ ///
+ /// Type: Type: LRESULT
+ /// The return value is the result of the message processing and depends on the message.
+ ///
+ // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-defwindowproca LRESULT LRESULT DefWindowProcA( HWND hWnd,
+ // UINT Msg, WPARAM wParam, LPARAM lParam );
+ [DllImport(Lib.User32, SetLastError = false, CharSet = CharSet.Auto)]
+ [PInvokeData("winuser.h")]
+ public static extern IntPtr DefWindowProc(HWND hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
+
///
/// [This function is not intended for general use. It may be altered or unavailable in subsequent versions of Windows.]
/// Unregisters a specified Shell window that is registered to receive Shell hook messages.
@@ -3365,8 +3698,8 @@ namespace Vanara.PInvoke
/// 2003. If you do not have a header file and import library for this function, you can call the function using LoadLibrary and GetProcAddress.
///
///
- // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-internalgetwindowtext
- // int InternalGetWindowText( HWND hWnd, LPWSTR pString, int cchMaxCount );
+ // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-internalgetwindowtext int InternalGetWindowText( HWND
+ // hWnd, LPWSTR pString, int cchMaxCount );
[DllImport(Lib.User32, SetLastError = true, ExactSpelling = true)]
[PInvokeData("winuser.h", MSDNShortId = "internalgetwindowtext")]
public static extern int InternalGetWindowText(HWND hWnd, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pString, int cchMaxCount);
@@ -5572,6 +5905,362 @@ namespace Vanara.PInvoke
public RECT rcCaret;
}
+ /// Describes the format of the raw input from a Human Interface Device (HID).
+ ///
+ /// Each WM_INPUT can indicate several inputs, but all of the inputs come from the same HID. The size of the bRawData array is
+ /// dwSizeHid * dwCount.
+ ///
+ // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawhid typedef struct tagRAWHID { DWORD dwSizeHid;
+ // DWORD dwCount; BYTE bRawData[1]; } RAWHID, *PRAWHID, *LPRAWHID;
+ [PInvokeData("winuser.h")]
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
+ public struct RAWHID
+ {
+ ///
+ /// Type: DWORD
+ /// The size, in bytes, of each HID input in bRawData.
+ ///
+ public uint dwSizeHid;
+
+ ///
+ /// Type: DWORD
+ /// The number of HID inputs in bRawData.
+ ///
+ public uint dwCount;
+
+ ///
+ /// Type: BYTE[1]
+ /// The raw input data, as an array of bytes.
+ ///
+ public IntPtr bRawData;
+ }
+
+ /// Contains the raw input from a device.
+ ///
+ /// The handle to this structure is passed in the lParam parameter of WM_INPUT.
+ /// To get detailed information -- such as the header and the content of the raw input -- call GetRawInputData.
+ /// To read the RAWINPUT in the message loop as a buffered read, call GetRawInputBuffer.
+ /// To get device specific information, call GetRawInputDeviceInfo with the hDevice from RAWINPUTHEADER.
+ /// Raw input is available only when the application calls RegisterRawInputDevices with valid device specifications.
+ ///
+ // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinput typedef struct tagRAWINPUT { RAWINPUTHEADER
+ // header; union { RAWMOUSE mouse; RAWKEYBOARD keyboard; RAWHID hid; } data; } RAWINPUT, *PRAWINPUT, *LPRAWINPUT;
+ [PInvokeData("winuser.h")]
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
+ public struct RAWINPUT
+ {
+ ///
+ /// Type: RAWINPUTHEADER
+ /// The raw input data.
+ ///
+ public RAWINPUTHEADER header;
+
+ /// The data
+ public DATA data;
+
+ ///
+ [StructLayout(LayoutKind.Explicit)]
+ public struct DATA
+ {
+ /// Type: RAWMOUSE If the data comes from a mouse, this is the raw input data.
+ [FieldOffset(0)]
+ public RAWMOUSE mouse;
+
+ /// Type: RAWKEYBOARD If the data comes from a keyboard, this is the raw input data.
+ [FieldOffset(0)]
+ public RAWKEYBOARD keyboard;
+
+ /// Type: RAWHID If the data comes from an HID, this is the raw input data.
+ [FieldOffset(0)]
+ public RAWHID hid;
+ }
+ }
+
+ ///
+ /// Contains the header information that is part of the raw input data.
+ ///
+ ///
+ /// To get more information on the device, use hDevice in a call to GetRawInputDeviceInfo.
+ ///
+ // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinputheader typedef struct tagRAWINPUTHEADER { DWORD
+ // dwType; DWORD dwSize; HANDLE hDevice; WPARAM wParam; } RAWINPUTHEADER, *PRAWINPUTHEADER, *LPRAWINPUTHEADER;
+ [PInvokeData("winuser.h")]
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
+ public struct RAWINPUTHEADER
+ {
+ ///
+ /// Type: DWORD
+ /// The type of raw input. It can be one of the following values.
+ ///
+ ///
+ /// Value
+ /// Meaning
+ ///
+ /// -
+ /// RIM_TYPEHID 2
+ /// Raw input comes from some device that is not a keyboard or a mouse.
+ ///
+ /// -
+ /// RIM_TYPEKEYBOARD 1
+ /// Raw input comes from the keyboard.
+ ///
+ /// -
+ /// RIM_TYPEMOUSE 0
+ /// Raw input comes from the mouse.
+ ///
+ ///
+ ///
+ public RIM_TYPE dwType;
+
+ ///
+ /// Type: DWORD
+ ///
+ /// The size, in bytes, of the entire input packet of data. This includes RAWINPUT plus possible extra input reports in the
+ /// RAWHID variable length array.
+ ///
+ ///
+ public uint dwSize;
+
+ ///
+ /// Type: HANDLE
+ /// A handle to the device generating the raw input data.
+ ///
+ public HANDLE hDevice;
+
+ ///
+ /// Type: WPARAM
+ /// The value passed in the wParam parameter of the WM_INPUT message.
+ ///
+ public IntPtr wParam;
+ }
+
+ /// Contains information about the state of the keyboard.
+ // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawkeyboard typedef struct tagRAWKEYBOARD { USHORT
+ // MakeCode; USHORT Flags; USHORT Reserved; USHORT VKey; UINT Message; ULONG ExtraInformation; } RAWKEYBOARD, *PRAWKEYBOARD, *LPRAWKEYBOARD;
+ [PInvokeData("winuser.h")]
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
+ public struct RAWKEYBOARD
+ {
+ ///
+ /// Type: USHORT
+ /// The scan code from the key depression. The scan code for keyboard overrun is KEYBOARD_OVERRUN_MAKE_CODE.
+ ///
+ public ushort MakeCode;
+
+ ///
+ /// Type: USHORT
+ /// Flags for scan code information. It can be one or more of the following.
+ ///
+ ///
+ /// Value
+ /// Meaning
+ ///
+ /// -
+ /// RI_KEY_BREAK 1
+ /// The key is up.
+ ///
+ /// -
+ /// RI_KEY_E0 2
+ /// The scan code has the E0 prefix.
+ ///
+ /// -
+ /// RI_KEY_E1 4
+ /// The scan code has the E1 prefix.
+ ///
+ /// -
+ /// RI_KEY_MAKE 0
+ /// The key is down.
+ ///
+ ///
+ ///
+ public RI_KEY Flags;
+
+ ///
+ /// Type: USHORT
+ /// Reserved; must be zero.
+ ///
+ public ushort Reserved;
+
+ ///
+ /// Type: USHORT
+ /// Windows message compatible virtual-key code. For more information, see Virtual Key Codes.
+ ///
+ public ushort VKey;
+
+ ///
+ /// Type: UINT
+ /// The corresponding window message, for example WM_KEYDOWN, WM_SYSKEYDOWN, and so forth.
+ ///
+ public uint Message;
+
+ ///
+ /// Type: ULONG
+ /// The device-specific additional information for the event.
+ ///
+ public uint ExtraInformation;
+ }
+
+ /// Contains information about the state of the mouse.
+ // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawmouse typedef struct tagRAWMOUSE { USHORT usFlags;
+ // union { ULONG ulButtons; struct { USHORT usButtonFlags; USHORT usButtonData; } DUMMYSTRUCTNAME; } DUMMYUNIONNAME; ULONG
+ // ulRawButtons; LONG lLastX; LONG lLastY; ULONG ulExtraInformation; } RAWMOUSE, *PRAWMOUSE, *LPRAWMOUSE;
+ [PInvokeData("winuser.h")]
+ [StructLayout(LayoutKind.Explicit)]
+ public struct RAWMOUSE
+ {
+ ///
+ /// Type: USHORT
+ /// The mouse state. This member can be any reasonable combination of the following.
+ ///
+ ///
+ /// Value
+ /// Meaning
+ ///
+ /// -
+ /// MOUSE_ATTRIBUTES_CHANGED 0x04
+ /// Mouse attributes changed; application needs to query the mouse attributes.
+ ///
+ /// -
+ /// MOUSE_MOVE_RELATIVE 0
+ /// Mouse movement data is relative to the last mouse position.
+ ///
+ /// -
+ /// MOUSE_MOVE_ABSOLUTE 1
+ /// Mouse movement data is based on absolute position.
+ ///
+ /// -
+ /// MOUSE_VIRTUAL_DESKTOP 0x02
+ /// Mouse coordinates are mapped to the virtual desktop (for a multiple monitor system).
+ ///
+ ///
+ ///
+ [FieldOffset(0)]
+ public MouseState usFlags;
+
+ ///
+ /// Type: ULONG
+ /// Reserved.
+ ///
+ [FieldOffset(2)]
+ public uint ulButtons;
+
+ ///
+ /// Type: USHORT
+ /// The transition state of the mouse buttons. This member can be one or more of the following values.
+ ///
+ ///
+ /// Value
+ /// Meaning
+ ///
+ /// -
+ /// RI_MOUSE_LEFT_BUTTON_DOWN 0x0001
+ /// Left button changed to down.
+ ///
+ /// -
+ /// RI_MOUSE_LEFT_BUTTON_UP 0x0002
+ /// Left button changed to up.
+ ///
+ /// -
+ /// RI_MOUSE_MIDDLE_BUTTON_DOWN 0x0010
+ /// Middle button changed to down.
+ ///
+ /// -
+ /// RI_MOUSE_MIDDLE_BUTTON_UP 0x0020
+ /// Middle button changed to up.
+ ///
+ /// -
+ /// RI_MOUSE_RIGHT_BUTTON_DOWN 0x0004
+ /// Right button changed to down.
+ ///
+ /// -
+ /// RI_MOUSE_RIGHT_BUTTON_UP 0x0008
+ /// Right button changed to up.
+ ///
+ /// -
+ /// RI_MOUSE_BUTTON_1_DOWN 0x0001
+ /// RI_MOUSE_LEFT_BUTTON_DOWN
+ ///
+ /// -
+ /// RI_MOUSE_BUTTON_1_UP 0x0002
+ /// RI_MOUSE_LEFT_BUTTON_UP
+ ///
+ /// -
+ /// RI_MOUSE_BUTTON_2_DOWN 0x0004
+ /// RI_MOUSE_RIGHT_BUTTON_DOWN
+ ///
+ /// -
+ /// RI_MOUSE_BUTTON_2_UP 0x0008
+ /// RI_MOUSE_RIGHT_BUTTON_UP
+ ///
+ /// -
+ /// RI_MOUSE_BUTTON_3_DOWN 0x0010
+ /// RI_MOUSE_MIDDLE_BUTTON_DOWN
+ ///
+ /// -
+ /// RI_MOUSE_BUTTON_3_UP 0x0020
+ /// RI_MOUSE_MIDDLE_BUTTON_UP
+ ///
+ /// -
+ /// RI_MOUSE_BUTTON_4_DOWN 0x0040
+ /// XBUTTON1 changed to down.
+ ///
+ /// -
+ /// RI_MOUSE_BUTTON_4_UP 0x0080
+ /// XBUTTON1 changed to up.
+ ///
+ /// -
+ /// RI_MOUSE_BUTTON_5_DOWN 0x100
+ /// XBUTTON2 changed to down.
+ ///
+ /// -
+ /// RI_MOUSE_BUTTON_5_UP 0x0200
+ /// XBUTTON2 changed to up.
+ ///
+ /// -
+ /// RI_MOUSE_WHEEL 0x0400
+ /// Raw input comes from a mouse wheel. The wheel delta is stored in usButtonData.
+ ///
+ ///
+ ///
+ [FieldOffset(2)]
+ public RI_MOUSE usButtonFlags;
+
+ ///
+ /// Type: USHORT
+ /// If usButtonFlags is RI_MOUSE_WHEEL, this member is a signed value that specifies the wheel delta.
+ ///
+ [FieldOffset(4)]
+ public ushort usButtonData;
+
+ ///
+ /// Type: ULONG
+ /// The raw state of the mouse buttons.
+ ///
+ [FieldOffset(6)]
+ public uint ulRawButtons;
+
+ ///
+ /// Type: LONG
+ /// The motion in the X direction. This is signed relative motion or absolute motion, depending on the value of usFlags.
+ ///
+ [FieldOffset(10)]
+ public int lLastX;
+
+ ///
+ /// Type: LONG
+ /// The motion in the Y direction. This is signed relative motion or absolute motion, depending on the value of usFlags.
+ ///
+ [FieldOffset(14)]
+ public int lLastY;
+
+ ///
+ /// Type: ULONG
+ /// The device-specific additional information for the event.
+ ///
+ [FieldOffset(18)]
+ public uint ulExtraInformation;
+ }
+
///
/// Contains title bar information.
///