MOUSEINPUT.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Runtime.InteropServices;
  3. namespace Microsoft.Win32
  4. {
  5. /// <summary>
  6. /// MOUSEINPUT定义
  7. /// </summary>
  8. public static partial class NativeMethods
  9. {
  10. /// <summary>
  11. /// 鼠标输入
  12. /// </summary>
  13. [StructLayout(LayoutKind.Sequential)]
  14. public struct MOUSEINPUT
  15. {
  16. /// <summary>
  17. /// Provides the absolute position of the mouse, or the amount of motion since the last mouse event was generated, depending on the value of the dwFlags member. Absolute data is provided as the x coordinate of the mouse; relative data is provided as the number of pixels moved.
  18. /// </summary>
  19. public int dx;
  20. /// <summary>
  21. /// Provides the absolute position of the mouse, or the amount of motion since the last mouse event was generated, depending on the value of the dwFlags member. Absolute data is provided as the y coordinate of the mouse; relative data is provided as the number of pixels moved.
  22. /// </summary>
  23. public int dy;
  24. /// <summary>
  25. /// If dwFlags contains MOUSEEVENTF_WHEEL, then mouseData provides the amount of wheel movement. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as WHEEL_DELTA, which is 120.f dwFlags does not contain MOUSEEVENTF_WHEEL then mouseData should be zero.
  26. /// </summary>
  27. public int mouseData;
  28. /// <summary>
  29. /// Set of bit flags that indicate various aspects of mouse motion and button clicks. The bits in this member can be any reasonable combination of the following values.
  30. /// </summary>
  31. public int dwFlags;
  32. /// <summary>
  33. /// Time stamp for the event, in milliseconds. If this parameter is 0, the system will provide its own time stamp.
  34. /// </summary>
  35. public int time;
  36. /// <summary>
  37. /// Data in this member is ignored.
  38. /// </summary>
  39. public IntPtr dwExtraInfo;
  40. }
  41. }
  42. }