using System; using System.Runtime.InteropServices; namespace Vanara.PInvoke { /// Contains message information from a thread's message queue. [PInvokeData("winuser.h")] [StructLayout(LayoutKind.Sequential)] public struct MSG { /// /// A handle to the window whose window procedure receives the message. This member is NULL when the message is a thread message. /// public HWND hwnd; /// The message identifier. Applications can only use the low word; the high word is reserved by the system. public uint message; /// Additional information about the message. The exact meaning depends on the value of the message member. public IntPtr wParam; /// Additional information about the message. The exact meaning depends on the value of the message member. public IntPtr lParam; /// The time at which the message was posted. public uint time; /// The horizontal cursor position, in screen coordinates, when the message was posted. public int pt_x; /// The vertical cursor position, in screen coordinates, when the message was posted. public int pt_y; } }