PAINTSTRUCT.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 PAINTSTRUCT
  15. {
  16. /// <summary>
  17. /// 是用于绘制的句柄
  18. /// </summary>
  19. public IntPtr hdc;
  20. /// <summary>
  21. /// 如果为非零值则擦除背景,否则不擦除背景
  22. /// </summary>
  23. public bool fErase;
  24. /// <summary>
  25. /// 通过制定左上角和右下角的坐标确定一个要绘制的矩形范围,该矩形单位相对于客户区左上角
  26. /// </summary>
  27. public RECT rcPaint;
  28. /// <summary>
  29. /// Reserved; used internally by the system.
  30. /// </summary>
  31. public bool fRestore;
  32. /// <summary>
  33. /// Reserved; used internally by the system.
  34. /// </summary>
  35. public bool fIncUpdate;
  36. /// <summary>
  37. /// Reserved; used internally by the system.
  38. /// </summary>
  39. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
  40. public byte[] rgbReserved;
  41. }
  42. }
  43. }