WINDOWPOS.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Runtime.InteropServices;
  3. namespace Microsoft.Win32
  4. {
  5. /// <summary>
  6. /// 窗口位置结构定义
  7. /// </summary>
  8. public static partial class NativeMethods
  9. {
  10. /// <summary>
  11. /// 窗口位置结构
  12. /// </summary>
  13. [StructLayout(LayoutKind.Sequential)]
  14. public struct WINDOWPOS
  15. {
  16. /// <summary>
  17. /// A handle to the window.
  18. /// </summary>
  19. public IntPtr hwnd;
  20. /// <summary>
  21. /// The position of the window in Z order (front-to-back position). This member can be a handle to the window behind which this window is placed, or can be one of the special values listed with the SetWindowPos function.
  22. /// </summary>
  23. public IntPtr hwndInsertAfter;
  24. /// <summary>
  25. /// The position of the left edge of the window.
  26. /// </summary>
  27. public int x;
  28. /// <summary>
  29. /// The position of the top edge of the window.
  30. /// </summary>
  31. public int y;
  32. /// <summary>
  33. /// The window width, in pixels.
  34. /// </summary>
  35. public int cx;
  36. /// <summary>
  37. /// The window height, in pixels.
  38. /// </summary>
  39. public int cy;
  40. /// <summary>
  41. /// The window position. This member can be one or more of the following values. 参见 SWP
  42. /// </summary>
  43. public uint flags;
  44. }
  45. }
  46. }