NONCLIENTMETRICS.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. using System.Diagnostics.CodeAnalysis;
  3. using System.Runtime.InteropServices;
  4. namespace Standard;
  5. internal struct NONCLIENTMETRICS
  6. {
  7. [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
  8. public static NONCLIENTMETRICS VistaMetricsStruct
  9. {
  10. get
  11. {
  12. return new NONCLIENTMETRICS
  13. {
  14. cbSize = Marshal.SizeOf(typeof(NONCLIENTMETRICS))
  15. };
  16. }
  17. }
  18. [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
  19. public static NONCLIENTMETRICS XPMetricsStruct
  20. {
  21. get
  22. {
  23. return new NONCLIENTMETRICS
  24. {
  25. cbSize = Marshal.SizeOf(typeof(NONCLIENTMETRICS)) - 4
  26. };
  27. }
  28. }
  29. public int cbSize;
  30. public int iBorderWidth;
  31. public int iScrollWidth;
  32. public int iScrollHeight;
  33. public int iCaptionWidth;
  34. public int iCaptionHeight;
  35. public LOGFONT lfCaptionFont;
  36. public int iSmCaptionWidth;
  37. public int iSmCaptionHeight;
  38. public LOGFONT lfSmCaptionFont;
  39. public int iMenuWidth;
  40. public int iMenuHeight;
  41. public LOGFONT lfMenuFont;
  42. public LOGFONT lfStatusFont;
  43. public LOGFONT lfMessageFont;
  44. public int iPaddedBorderWidth;
  45. }