TTM.cs 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. namespace Microsoft.Win32
  2. {
  3. //TTM定义
  4. public static partial class NativeMethods
  5. {
  6. /// <summary>
  7. /// Activates or deactivates a tooltip control.
  8. /// </summary>
  9. public const int TTM_ACTIVATE = WM_USER + 1;
  10. /// <summary>
  11. /// Sets the initial, pop-up, and reshow durations for a tooltip control.
  12. /// </summary>
  13. public const int TTM_SETDELAYTIME = WM_USER + 3;
  14. /// <summary>
  15. /// Registers a tool with a tooltip control.
  16. /// </summary>
  17. public const int TTM_ADDTOOL = WM_USER + 50;
  18. /// <summary>
  19. /// Removes a tool from a tooltip control.
  20. /// </summary>
  21. public const int TTM_DELTOOL = WM_USER + 51;
  22. /// <summary>
  23. /// Sets a new bounding rectangle for a tool.
  24. /// </summary>
  25. public const int TTM_NEWTOOLRECT = WM_USER + 52;
  26. /// <summary>
  27. /// Passes a mouse message to a tooltip control for processing.
  28. /// </summary>
  29. public const int TTM_RELAYEVENT = WM_USER + 7;
  30. /// <summary>
  31. /// Retrieves the information that a tooltip control maintains about a tool.
  32. /// </summary>
  33. public const int TTM_GETTOOLINFO = WM_USER + 53;
  34. /// <summary>
  35. /// Sets the information that a tooltip control maintains for a tool.
  36. /// </summary>
  37. public const int TTM_SETTOOLINFO = WM_USER + 54;
  38. /// <summary>
  39. /// Tests a point to determine whether it is within the bounding rectangle of the specified tool and, if it is, retrieves information about the tool.
  40. /// </summary>
  41. public const int TTM_HITTEST = WM_USER + 55;
  42. /// <summary>
  43. /// Retrieves the information a tooltip control maintains about a tool.
  44. /// </summary>
  45. public const int TTM_GETTEXT = WM_USER + 56;
  46. /// <summary>
  47. /// Sets the tooltip text for a tool.
  48. /// </summary>
  49. public const int TTM_UPDATETIPTEXT = WM_USER + 57;
  50. /// <summary>
  51. /// Retrieves a count of the tools maintained by a tooltip control.
  52. /// </summary>
  53. public const int TTM_GETTOOLCOUNT = WM_USER + 13;
  54. /// <summary>
  55. /// Retrieves the information that a tooltip control maintains about the current tool—that is, the tool for which the tooltip is currently displaying text.
  56. /// </summary>
  57. public const int TTM_ENUMTOOLS = WM_USER + 58;
  58. /// <summary>
  59. /// Retrieves the information for the current tool in a tooltip control.
  60. /// </summary>
  61. public const int TTM_GETCURRENTTOOL = WM_USER + 59;
  62. /// <summary>
  63. /// Allows a subclass procedure to cause a tooltip to display text for a window other than the one beneath the mouse cursor.
  64. /// </summary>
  65. public const int TTM_WINDOWFROMPOINT = WM_USER + 16;
  66. /// <summary>
  67. /// Activates or deactivates a tracking tooltip.
  68. /// </summary>
  69. public const int TTM_TRACKACTIVATE = WM_USER + 17;
  70. /// <summary>
  71. /// Sets the position of a tracking tooltip.
  72. /// </summary>
  73. public const int TTM_TRACKPOSITION = WM_USER + 18;
  74. /// <summary>
  75. /// Sets the background color in a tooltip window.
  76. /// </summary>
  77. public const int TTM_SETTIPBKCOLOR = WM_USER + 19;
  78. /// <summary>
  79. /// Sets the text color in a tooltip window.
  80. /// </summary>
  81. public const int TTM_SETTIPTEXTCOLOR = WM_USER + 20;
  82. /// <summary>
  83. /// Retrieves the initial, pop-up, and reshow durations currently set for a tooltip control.
  84. /// </summary>
  85. public const int TTM_GETDELAYTIME = WM_USER + 21;
  86. /// <summary>
  87. /// Retrieves the background color in a tooltip window.
  88. /// </summary>
  89. public const int TTM_GETTIPBKCOLOR = WM_USER + 22;
  90. /// <summary>
  91. /// Retrieves the text color in a tooltip window.
  92. /// </summary>
  93. public const int TTM_GETTIPTEXTCOLOR = WM_USER + 23;
  94. /// <summary>
  95. /// Sets the maximum width for a tooltip window.
  96. /// </summary>
  97. public const int TTM_SETMAXTIPWIDTH = WM_USER + 24;
  98. /// <summary>
  99. /// Retrieves the maximum width for a tooltip window.
  100. /// </summary>
  101. public const int TTM_GETMAXTIPWIDTH = WM_USER + 25;
  102. /// <summary>
  103. /// Sets the top, left, bottom, and right margins for a tooltip window. A margin is the distance, in pixels, between the tooltip window border and the text contained within the tooltip window.
  104. /// </summary>
  105. public const int TTM_SETMARGIN = WM_USER + 26;
  106. /// <summary>
  107. /// Retrieves the top, left, bottom, and right margins set for a tooltip window. A margin is the distance, in pixels, between the tooltip window border and the text contained within the tooltip window.
  108. /// </summary>
  109. public const int TTM_GETMARGIN = WM_USER + 27;
  110. /// <summary>
  111. /// Removes a displayed tooltip window from view.
  112. /// </summary>
  113. public const int TTM_POP = WM_USER + 28;
  114. /// <summary>
  115. /// Forces the current tooltip to be redrawn.
  116. /// </summary>
  117. public const int TTM_UPDATE = WM_USER + 29;
  118. /// <summary>
  119. /// Returns the width and height of a tooltip control.
  120. /// </summary>
  121. public const int TTM_GETBUBBLESIZE = WM_USER + 30;
  122. /// <summary>
  123. /// Calculates a tooltip control's text display rectangle from its window rectangle, or the tooltip window rectangle needed to display a specified text display rectangle.
  124. /// </summary>
  125. public const int TTM_ADJUSTRECT = WM_USER + 31;
  126. /// <summary>
  127. /// Adds a standard icon and title string to a tooltip.
  128. /// </summary>
  129. public const int TTM_SETTITLE = WM_USER + 33;
  130. /// <summary>
  131. /// Causes the tooltip to display at the coordinates of the last mouse message.
  132. /// </summary>
  133. public const int TTM_POPUP = WM_USER + 34;
  134. /// <summary>
  135. /// Retrieve information concerning the title of a tooltip control.
  136. /// </summary>
  137. public const int TTM_GETTITLE = WM_USER + 35;
  138. /// <summary>
  139. /// Sets the visual style of a tooltip control.
  140. /// </summary>
  141. public const int TTM_SETWINDOWTHEME = 0x200B;
  142. }
  143. }