WM.cs 70 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948
  1. using System;
  2. namespace Microsoft.Win32
  3. {
  4. //Windows Messages
  5. //Defined in winuser.h from Windows SDK v6.1
  6. //Documentation pulled from MSDN.
  7. public static partial class NativeMethods
  8. {
  9. /// <summary>
  10. /// The WM_NULL message performs no operation. An application sends the WM_NULL message if it wants to post a message that the recipient window will ignore.
  11. /// </summary>
  12. public const int WM_NULL = 0x0000;
  13. /// <summary>
  14. /// The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window receives this message after the window is created, but before the window becomes visible.
  15. /// </summary>
  16. public const int WM_CREATE = 0x0001;
  17. /// <summary>
  18. /// The WM_DESTROY message is sent when a window is being destroyed. It is sent to the window procedure of the window being destroyed after the window is removed from the screen.
  19. /// This message is sent first to the window being destroyed and then to the child windows (if any) as they are destroyed. During the processing of the message, it can be assumed that all child windows still exist.
  20. /// /// </summary>
  21. public const int WM_DESTROY = 0x0002;
  22. /// <summary>
  23. /// The WM_MOVE message is sent after a window has been moved.
  24. /// </summary>
  25. public const int WM_MOVE = 0x0003;
  26. /// <summary>
  27. /// The WM_SIZE message is sent to a window after its size has changed.
  28. /// </summary>
  29. public const int WM_SIZE = 0x0005;
  30. /// <summary>
  31. /// The WM_ACTIVATE message is sent to both the window being activated and the window being deactivated. If the windows use the same input queue, the message is sent synchronously, first to the window procedure of the top-level window being deactivated, then to the window procedure of the top-level window being activated. If the windows use different input queues, the message is sent asynchronously, so the window is activated immediately.
  32. /// </summary>
  33. public const int WM_ACTIVATE = 0x0006;
  34. /// <summary>
  35. /// The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus.
  36. /// </summary>
  37. public const int WM_SETFOCUS = 0x0007;
  38. /// <summary>
  39. /// The WM_KILLFOCUS message is sent to a window immediately before it loses the keyboard focus.
  40. /// </summary>
  41. public const int WM_KILLFOCUS = 0x0008;
  42. /// <summary>
  43. /// The WM_ENABLE message is sent when an application changes the enabled state of a window. It is sent to the window whose enabled state is changing. This message is sent before the EnableWindow function returns, but after the enabled state (WS_DISABLED style bit) of the window has changed.
  44. /// </summary>
  45. public const int WM_ENABLE = 0x000A;
  46. /// <summary>
  47. /// An application sends the WM_SETREDRAW message to a window to allow changes in that window to be redrawn or to prevent changes in that window from being redrawn.
  48. /// </summary>
  49. public const int WM_SETREDRAW = 0x000B;
  50. /// <summary>
  51. /// An application sends a WM_SETTEXT message to set the text of a window.
  52. /// </summary>
  53. public const int WM_SETTEXT = 0x000C;
  54. /// <summary>
  55. /// An application sends a WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller.
  56. /// </summary>
  57. public const int WM_GETTEXT = 0x000D;
  58. /// <summary>
  59. /// An application sends a WM_GETTEXTLENGTH message to determine the length, in characters, of the text associated with a window.
  60. /// </summary>
  61. public const int WM_GETTEXTLENGTH = 0x000E;
  62. /// <summary>
  63. /// The WM_PAINT message is sent when the system or another application makes a request to paint a portion of an application's window. The message is sent when the UpdateWindow or RedrawWindow function is called, or by the DispatchMessage function when the application obtains a WM_PAINT message by using the GetMessage or PeekMessage function.
  64. /// </summary>
  65. public const int WM_PAINT = 0x000F;
  66. /// <summary>
  67. /// The WM_CLOSE message is sent as a signal that a window or an application should terminate.
  68. /// </summary>
  69. public const int WM_CLOSE = 0x0010;
  70. /// <summary>
  71. /// The WM_QUERYENDSESSION message is sent when the user chooses to end the session or when an application calls one of the system shutdown functions. If any application returns zero, the session is not ended. The system stops sending WM_QUERYENDSESSION messages as soon as one application returns zero.
  72. /// After processing this message, the system sends the WM_ENDSESSION message with the wParam parameter set to the results of the WM_QUERYENDSESSION message.
  73. /// </summary>
  74. public const int WM_QUERYENDSESSION = 0x0011;
  75. /// <summary>
  76. /// The WM_QUERYOPEN message is sent to an icon when the user requests that the window be restored to its previous size and position.
  77. /// </summary>
  78. public const int WM_QUERYOPEN = 0x0013;
  79. /// <summary>
  80. /// The WM_ENDSESSION message is sent to an application after the system processes the results of the WM_QUERYENDSESSION message. The WM_ENDSESSION message informs the application whether the session is ending.
  81. /// </summary>
  82. public const int WM_ENDSESSION = 0x0016;
  83. /// <summary>
  84. /// The WM_QUIT message indicates a request to terminate an application and is generated when the application calls the PostQuitMessage function. It causes the GetMessage function to return zero.
  85. /// </summary>
  86. public const int WM_QUIT = 0x0012;
  87. /// <summary>
  88. /// The WM_ERASEBKGND message is sent when the window background must be erased (for example, when a window is resized). The message is sent to prepare an invalidated portion of a window for painting.
  89. /// </summary>
  90. public const int WM_ERASEBKGND = 0x0014;
  91. /// <summary>
  92. /// This message is sent to all top-level windows when a change is made to a system color setting.
  93. /// </summary>
  94. public const int WM_SYSCOLORCHANGE = 0x0015;
  95. /// <summary>
  96. /// The WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown.
  97. /// </summary>
  98. public const int WM_SHOWWINDOW = 0x0018;
  99. /// <summary>
  100. /// An application sends the WM_WININICHANGE message to all top-level windows after making a change to the WIN.INI file. The SystemParametersInfo function sends this message after an application uses the function to change a setting in WIN.INI.
  101. /// Note The WM_WININICHANGE message is provided only for compatibility with earlier versions of the system. Applications should use the WM_SETTINGCHANGE message.
  102. /// </summary>
  103. public const int WM_WININICHANGE = 0x001A;
  104. /// <summary>
  105. /// An application sends the WM_WININICHANGE message to all top-level windows after making a change to the WIN.INI file. The SystemParametersInfo function sends this message after an application uses the function to change a setting in WIN.INI.
  106. /// Note The WM_WININICHANGE message is provided only for compatibility with earlier versions of the system. Applications should use the WM_SETTINGCHANGE message.
  107. /// </summary>
  108. public const int WM_SETTINGCHANGE = WM_WININICHANGE;
  109. /// <summary>
  110. /// The WM_DEVMODECHANGE message is sent to all top-level windows whenever the user changes device-mode settings.
  111. /// </summary>
  112. public const int WM_DEVMODECHANGE = 0x001B;
  113. /// <summary>
  114. /// The WM_ACTIVATEAPP message is sent when a window belonging to a different application than the active window is about to be activated. The message is sent to the application whose window is being activated and to the application whose window is being deactivated.
  115. /// </summary>
  116. public const int WM_ACTIVATEAPP = 0x001C;
  117. /// <summary>
  118. /// An application sends the WM_FONTCHANGE message to all top-level windows in the system after changing the pool of font resources.
  119. /// </summary>
  120. public const int WM_FONTCHANGE = 0x001D;
  121. /// <summary>
  122. /// A message that is sent whenever there is a change in the system time.
  123. /// </summary>
  124. public const int WM_TIMECHANGE = 0x001E;
  125. /// <summary>
  126. /// The WM_CANCELMODE message is sent to cancel certain modes, such as mouse capture. For example, the system sends this message to the active window when a dialog box or message box is displayed. Certain functions also send this message explicitly to the specified window regardless of whether it is the active window. For example, the EnableWindow function sends this message when disabling the specified window.
  127. /// </summary>
  128. public const int WM_CANCELMODE = 0x001F;
  129. /// <summary>
  130. /// The WM_SETCURSOR message is sent to a window if the mouse causes the cursor to move within a window and mouse input is not captured.
  131. /// </summary>
  132. public const int WM_SETCURSOR = 0x0020;
  133. /// <summary>
  134. /// The WM_MOUSEACTIVATE message is sent when the cursor is in an inactive window and the user presses a mouse button. The parent window receives this message only if the child window passes it to the DefWindowProc function.
  135. /// </summary>
  136. public const int WM_MOUSEACTIVATE = 0x0021;
  137. /// <summary>
  138. /// The WM_CHILDACTIVATE message is sent to a child window when the user clicks the window's title bar or when the window is activated, moved, or sized.
  139. /// </summary>
  140. public const int WM_CHILDACTIVATE = 0x0022;
  141. /// <summary>
  142. /// The WM_QUEUESYNC message is sent by a computer-based training (CBT) application to separate user-input messages from other messages sent through the WH_JOURNALPLAYBACK Hook procedure.
  143. /// </summary>
  144. public const int WM_QUEUESYNC = 0x0023;
  145. /// <summary>
  146. /// The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size.
  147. /// </summary>
  148. public const int WM_GETMINMAXINFO = 0x0024;
  149. /// <summary>
  150. /// Windows NT 3.51 and earlier: The WM_PAINTICON message is sent to a minimized window when the icon is to be painted. This message is not sent by newer versions of Microsoft Windows, except in unusual circumstances explained in the Remarks.
  151. /// </summary>
  152. public const int WM_PAINTICON = 0x0026;
  153. /// <summary>
  154. /// Windows NT 3.51 and earlier: The WM_ICONERASEBKGND message is sent to a minimized window when the background of the icon must be filled before painting the icon. A window receives this message only if a class icon is defined for the window; otherwise, WM_ERASEBKGND is sent. This message is not sent by newer versions of Windows.
  155. /// </summary>
  156. public const int WM_ICONERASEBKGND = 0x0027;
  157. /// <summary>
  158. /// The WM_NEXTDLGCTL message is sent to a dialog box procedure to set the keyboard focus to a different control in the dialog box.
  159. /// </summary>
  160. public const int WM_NEXTDLGCTL = 0x0028;
  161. /// <summary>
  162. /// The WM_SPOOLERSTATUS message is sent from Print Manager whenever a job is added to or removed from the Print Manager queue.
  163. /// </summary>
  164. public const int WM_SPOOLERSTATUS = 0x002A;
  165. /// <summary>
  166. /// The WM_DRAWITEM message is sent to the parent window of an owner-drawn button, combo box, list box, or menu when a visual aspect of the button, combo box, list box, or menu has changed.
  167. /// </summary>
  168. public const int WM_DRAWITEM = 0x002B;
  169. /// <summary>
  170. /// The WM_MEASUREITEM message is sent to the owner window of a combo box, list box, list view control, or menu item when the control or menu is created.
  171. /// </summary>
  172. public const int WM_MEASUREITEM = 0x002C;
  173. /// <summary>
  174. /// Sent to the owner of a list box or combo box when the list box or combo box is destroyed or when items are removed by the LB_DELETESTRING, LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT message. The system sends a WM_DELETEITEM message for each deleted item. The system sends the WM_DELETEITEM message for any deleted list box or combo box item with nonzero item data.
  175. /// </summary>
  176. public const int WM_DELETEITEM = 0x002D;
  177. /// <summary>
  178. /// Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_KEYDOWN message.
  179. /// </summary>
  180. public const int WM_VKEYTOITEM = 0x002E;
  181. /// <summary>
  182. /// Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_CHAR message.
  183. /// </summary>
  184. public const int WM_CHARTOITEM = 0x002F;
  185. /// <summary>
  186. /// An application sends a WM_SETFONT message to specify the font that a control is to use when drawing text.
  187. /// </summary>
  188. public const int WM_SETFONT = 0x0030;
  189. /// <summary>
  190. /// An application sends a WM_GETFONT message to a control to retrieve the font with which the control is currently drawing its text.
  191. /// </summary>
  192. public const int WM_GETFONT = 0x0031;
  193. /// <summary>
  194. /// An application sends a WM_SETHOTKEY message to a window to associate a hot key with the window. When the user presses the hot key, the system activates the window.
  195. /// </summary>
  196. public const int WM_SETHOTKEY = 0x0032;
  197. /// <summary>
  198. /// An application sends a WM_GETHOTKEY message to determine the hot key associated with a window.
  199. /// </summary>
  200. public const int WM_GETHOTKEY = 0x0033;
  201. /// <summary>
  202. /// The WM_QUERYDRAGICON message is sent to a minimized (iconic) window. The window is about to be dragged by the user but does not have an icon defined for its class. An application can return a handle to an icon or cursor. The system displays this cursor or icon while the user drags the icon.
  203. /// </summary>
  204. public const int WM_QUERYDRAGICON = 0x0037;
  205. /// <summary>
  206. /// The system sends the WM_COMPAREITEM message to determine the relative position of a new item in the sorted list of an owner-drawn combo box or list box. Whenever the application adds a new item, the system sends this message to the owner of a combo box or list box created with the CBS_SORT or LBS_SORT style.
  207. /// </summary>
  208. public const int WM_COMPAREITEM = 0x0039;
  209. /// <summary>
  210. /// Active Accessibility sends the WM_GETOBJECT message to obtain information about an accessible object contained in a server application.
  211. /// Applications never send this message directly. It is sent only by Active Accessibility in response to calls to AccessibleObjectFromPoint, AccessibleObjectFromEvent, or AccessibleObjectFromWindow. However, server applications handle this message.
  212. /// </summary>
  213. public const int WM_GETOBJECT = 0x003D;
  214. /// <summary>
  215. /// The WM_COMPACTING message is sent to all top-level windows when the system detects more than 12.5 percent of system time over a 30- to 60-second interval is being spent compacting memory. This indicates that system memory is low.
  216. /// </summary>
  217. public const int WM_COMPACTING = 0x0041;
  218. /// <summary>
  219. /// WM_COMMNOTIFY is Obsolete for Win32-Based Applications
  220. /// </summary>
  221. [Obsolete]
  222. public const int WM_COMMNOTIFY = 0x0044;
  223. /// <summary>
  224. /// The WM_WINDOWPOSCHANGING message is sent to a window whose size, position, or place in the Z order is about to change as a result of a call to the SetWindowPos function or another window-management function.
  225. /// </summary>
  226. public const int WM_WINDOWPOSCHANGING = 0x0046;
  227. /// <summary>
  228. /// The WM_WINDOWPOSCHANGED message is sent to a window whose size, position, or place in the Z order has changed as a result of a call to the SetWindowPos function or another window-management function.
  229. /// </summary>
  230. public const int WM_WINDOWPOSCHANGED = 0x0047;
  231. /// <summary>
  232. /// Notifies applications that the system, typically a battery-powered personal computer, is about to enter a suspended mode.
  233. /// Use: POWERBROADCAST
  234. /// </summary>
  235. [Obsolete]
  236. public const int WM_POWER = 0x0048;
  237. /// <summary>
  238. /// An application sends the WM_COPYDATA message to pass data to another application.
  239. /// </summary>
  240. public const int WM_COPYDATA = 0x004A;
  241. /// <summary>
  242. /// The WM_CANCELJOURNAL message is posted to an application when a user cancels the application's journaling activities. The message is posted with a NULL window handle.
  243. /// </summary>
  244. public const int WM_CANCELJOURNAL = 0x004B;
  245. /// <summary>
  246. /// Sent by a common control to its parent window when an event has occurred or the control requires some information.
  247. /// </summary>
  248. public const int WM_NOTIFY = 0x004E;
  249. /// <summary>
  250. /// The WM_INPUTLANGCHANGEREQUEST message is posted to the window with the focus when the user chooses a new input language, either with the hotkey (specified in the Keyboard control panel application) or from the indicator on the system taskbar. An application can accept the change by passing the message to the DefWindowProc function or reject the change (and prevent it from taking place) by returning immediately.
  251. /// </summary>
  252. public const int WM_INPUTLANGCHANGEREQUEST = 0x0050;
  253. /// <summary>
  254. /// The WM_INPUTLANGCHANGE message is sent to the topmost affected window after an application's input language has been changed. You should make any application-specific settings and pass the message to the DefWindowProc function, which passes the message to all first-level child windows. These child windows can pass the message to DefWindowProc to have it pass the message to their child windows, and so on.
  255. /// </summary>
  256. public const int WM_INPUTLANGCHANGE = 0x0051;
  257. /// <summary>
  258. /// Sent to an application that has initiated a training card with Microsoft Windows Help. The message informs the application when the user clicks an authorable button. An application initiates a training card by specifying the HELP_TCARD command in a call to the WinHelp function.
  259. /// </summary>
  260. public const int WM_TCARD = 0x0052;
  261. /// <summary>
  262. /// Indicates that the user pressed the F1 key. If a menu is active when F1 is pressed, WM_HELP is sent to the window associated with the menu; otherwise, WM_HELP is sent to the window that has the keyboard focus. If no window has the keyboard focus, WM_HELP is sent to the currently active window.
  263. /// </summary>
  264. public const int WM_HELP = 0x0053;
  265. /// <summary>
  266. /// The WM_USERCHANGED message is sent to all windows after the user has logged on or off. When the user logs on or off, the system updates the user-specific settings. The system sends this message immediately after updating the settings.
  267. /// </summary>
  268. public const int WM_USERCHANGED = 0x0054;
  269. /// <summary>
  270. /// Determines if a window accepts ANSI or Unicode structures in the WM_NOTIFY notification message. WM_NOTIFYFORMAT messages are sent from a common control to its parent window and from the parent window to the common control.
  271. /// </summary>
  272. public const int WM_NOTIFYFORMAT = 0x0055;
  273. /// <summary>
  274. /// The WM_CONTEXTMENU message notifies a window that the user clicked the right mouse button (right-clicked) in the window.
  275. /// </summary>
  276. public const int WM_CONTEXTMENU = 0x007B;
  277. /// <summary>
  278. /// The WM_STYLECHANGING message is sent to a window when the SetWindowLong function is about to change one or more of the window's styles.
  279. /// </summary>
  280. public const int WM_STYLECHANGING = 0x007C;
  281. /// <summary>
  282. /// The WM_STYLECHANGED message is sent to a window after the SetWindowLong function has changed one or more of the window's styles
  283. /// </summary>
  284. public const int WM_STYLECHANGED = 0x007D;
  285. /// <summary>
  286. /// The WM_DISPLAYCHANGE message is sent to all windows when the display resolution has changed.
  287. /// </summary>
  288. public const int WM_DISPLAYCHANGE = 0x007E;
  289. /// <summary>
  290. /// The WM_GETICON message is sent to a window to retrieve a handle to the large or small icon associated with a window. The system displays the large icon in the ALT+TAB dialog, and the small icon in the window caption.
  291. /// </summary>
  292. public const int WM_GETICON = 0x007F;
  293. /// <summary>
  294. /// An application sends the WM_SETICON message to associate a new large or small icon with a window. The system displays the large icon in the ALT+TAB dialog box, and the small icon in the window caption.
  295. /// </summary>
  296. public const int WM_SETICON = 0x0080;
  297. /// <summary>
  298. /// The WM_NCCREATE message is sent prior to the WM_CREATE message when a window is first created.
  299. /// </summary>
  300. public const int WM_NCCREATE = 0x0081;
  301. /// <summary>
  302. /// The WM_NCDESTROY message informs a window that its nonclient area is being destroyed. The DestroyWindow function sends the WM_NCDESTROY message to the window following the WM_DESTROY message. WM_DESTROY is used to free the allocated memory object associated with the window.
  303. /// The WM_NCDESTROY message is sent after the child windows have been destroyed. In contrast, WM_DESTROY is sent before the child windows are destroyed.
  304. /// </summary>
  305. public const int WM_NCDESTROY = 0x0082;
  306. /// <summary>
  307. /// The WM_NCCALCSIZE message is sent when the size and position of a window's client area must be calculated. By processing this message, an application can control the content of the window's client area when the size or position of the window changes.
  308. /// </summary>
  309. public const int WM_NCCALCSIZE = 0x0083;
  310. /// <summary>
  311. /// The WM_NCHITTEST message is sent to a window when the cursor moves, or when a mouse button is pressed or released. If the mouse is not captured, the message is sent to the window beneath the cursor. Otherwise, the message is sent to the window that has captured the mouse.
  312. /// </summary>
  313. public const int WM_NCHITTEST = 0x0084;
  314. /// <summary>
  315. /// The WM_NCPAINT message is sent to a window when its frame must be painted.
  316. /// </summary>
  317. public const int WM_NCPAINT = 0x0085;
  318. /// <summary>
  319. /// The WM_NCACTIVATE message is sent to a window when its nonclient area needs to be changed to indicate an active or inactive state.
  320. /// </summary>
  321. public const int WM_NCACTIVATE = 0x0086;
  322. /// <summary>
  323. /// The WM_GETDLGCODE message is sent to the window procedure associated with a control. By default, the system handles all keyboard input to the control; the system interprets certain types of keyboard input as dialog box navigation keys. To override this default behavior, the control can respond to the WM_GETDLGCODE message to indicate the types of input it wants to process itself.
  324. /// </summary>
  325. public const int WM_GETDLGCODE = 0x0087;
  326. /// <summary>
  327. /// The WM_SYNCPAINT message is used to synchronize painting while avoiding linking independent GUI threads.
  328. /// </summary>
  329. public const int WM_SYNCPAINT = 0x0088;
  330. /// <summary>
  331. /// The WM_NCMOUSEMOVE message is posted to a window when the cursor is moved within the nonclient area of the window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  332. /// </summary>
  333. public const int WM_NCMOUSEMOVE = 0x00A0;
  334. /// <summary>
  335. /// The WM_NCLBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  336. /// </summary>
  337. public const int WM_NCLBUTTONDOWN = 0x00A1;
  338. /// <summary>
  339. /// The WM_NCLBUTTONUP message is posted when the user releases the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  340. /// </summary>
  341. public const int WM_NCLBUTTONUP = 0x00A2;
  342. /// <summary>
  343. /// The WM_NCLBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  344. /// </summary>
  345. public const int WM_NCLBUTTONDBLCLK = 0x00A3;
  346. /// <summary>
  347. /// The WM_NCRBUTTONDOWN message is posted when the user presses the right mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  348. /// </summary>
  349. public const int WM_NCRBUTTONDOWN = 0x00A4;
  350. /// <summary>
  351. /// The WM_NCRBUTTONUP message is posted when the user releases the right mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  352. /// </summary>
  353. public const int WM_NCRBUTTONUP = 0x00A5;
  354. /// <summary>
  355. /// The WM_NCRBUTTONDBLCLK message is posted when the user double-clicks the right mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  356. /// </summary>
  357. public const int WM_NCRBUTTONDBLCLK = 0x00A6;
  358. /// <summary>
  359. /// The WM_NCMBUTTONDOWN message is posted when the user presses the middle mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  360. /// </summary>
  361. public const int WM_NCMBUTTONDOWN = 0x00A7;
  362. /// <summary>
  363. /// The WM_NCMBUTTONUP message is posted when the user releases the middle mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  364. /// </summary>
  365. public const int WM_NCMBUTTONUP = 0x00A8;
  366. /// <summary>
  367. /// The WM_NCMBUTTONDBLCLK message is posted when the user double-clicks the middle mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  368. /// </summary>
  369. public const int WM_NCMBUTTONDBLCLK = 0x00A9;
  370. /// <summary>
  371. /// The WM_NCXBUTTONDOWN message is posted when the user presses the first or second X button while the cursor is in the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  372. /// </summary>
  373. public const int WM_NCXBUTTONDOWN = 0x00AB;
  374. /// <summary>
  375. /// The WM_NCXBUTTONUP message is posted when the user releases the first or second X button while the cursor is in the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  376. /// </summary>
  377. public const int WM_NCXBUTTONUP = 0x00AC;
  378. /// <summary>
  379. /// The WM_NCXBUTTONDBLCLK message is posted when the user double-clicks the first or second X button while the cursor is in the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
  380. /// </summary>
  381. public const int WM_NCXBUTTONDBLCLK = 0x00AD;
  382. /// <summary>
  383. /// The WM_INPUT_DEVICE_CHANGE message is sent to the window that registered to receive raw input. A window receives this message through its WindowProc function.
  384. /// </summary>
  385. public const int WM_INPUT_DEVICE_CHANGE = 0x00FE;
  386. /// <summary>
  387. /// The WM_INPUT message is sent to the window that is getting raw input.
  388. /// </summary>
  389. public const int WM_INPUT = 0x00FF;
  390. /// <summary>
  391. /// This message filters for keyboard messages.
  392. /// </summary>
  393. public const int WM_KEYFIRST = 0x0100;
  394. /// <summary>
  395. /// The WM_KEYDOWN message is posted to the window with the keyboard focus when a nonsystem key is pressed. A nonsystem key is a key that is pressed when the ALT key is not pressed.
  396. /// </summary>
  397. public const int WM_KEYDOWN = 0x0100;
  398. /// <summary>
  399. /// The WM_KEYUP message is posted to the window with the keyboard focus when a nonsystem key is released. A nonsystem key is a key that is pressed when the ALT key is not pressed, or a keyboard key that is pressed when a window has the keyboard focus.
  400. /// </summary>
  401. public const int WM_KEYUP = 0x0101;
  402. /// <summary>
  403. /// The WM_CHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage function. The WM_CHAR message contains the character code of the key that was pressed.
  404. /// </summary>
  405. public const int WM_CHAR = 0x0102;
  406. /// <summary>
  407. /// The WM_DEADCHAR message is posted to the window with the keyboard focus when a WM_KEYUP message is translated by the TranslateMessage function. WM_DEADCHAR specifies a character code generated by a dead key. A dead key is a key that generates a character, such as the umlaut (double-dot), that is combined with another character to form a composite character. For example, the umlaut-O character (Ö) is generated by typing the dead key for the umlaut character, and then typing the O key.
  408. /// </summary>
  409. public const int WM_DEADCHAR = 0x0103;
  410. /// <summary>
  411. /// The WM_SYSKEYDOWN message is posted to the window with the keyboard focus when the user presses the F10 key (which activates the menu bar) or holds down the ALT key and then presses another key. It also occurs when no window currently has the keyboard focus; in this case, the WM_SYSKEYDOWN message is sent to the active window. The window that receives the message can distinguish between these two contexts by checking the context code in the lParam parameter.
  412. /// </summary>
  413. public const int WM_SYSKEYDOWN = 0x0104;
  414. /// <summary>
  415. /// The WM_SYSKEYUP message is posted to the window with the keyboard focus when the user releases a key that was pressed while the ALT key was held down. It also occurs when no window currently has the keyboard focus; in this case, the WM_SYSKEYUP message is sent to the active window. The window that receives the message can distinguish between these two contexts by checking the context code in the lParam parameter.
  416. /// </summary>
  417. public const int WM_SYSKEYUP = 0x0105;
  418. /// <summary>
  419. /// The WM_SYSCHAR message is posted to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated by the TranslateMessage function. It specifies the character code of a system character key — that is, a character key that is pressed while the ALT key is down.
  420. /// </summary>
  421. public const int WM_SYSCHAR = 0x0106;
  422. /// <summary>
  423. /// The WM_SYSDEADCHAR message is sent to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated by the TranslateMessage function. WM_SYSDEADCHAR specifies the character code of a system dead key — that is, a dead key that is pressed while holding down the ALT key.
  424. /// </summary>
  425. public const int WM_SYSDEADCHAR = 0x0107;
  426. /// <summary>
  427. /// The WM_UNICHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage function. The WM_UNICHAR message contains the character code of the key that was pressed.
  428. /// The WM_UNICHAR message is equivalent to WM_CHAR, but it uses Unicode Transformation Format (UTF)-32, whereas WM_CHAR uses UTF-16. It is designed to send or post Unicode characters to ANSI windows and it can can handle Unicode Supplementary Plane characters.
  429. /// </summary>
  430. public const int WM_UNICHAR = 0x0109;
  431. /// <summary>
  432. /// This message filters for keyboard messages.
  433. /// </summary>
  434. public const int WM_KEYLAST = 0x0109;
  435. /// <summary>
  436. /// Sent immediately before the IME generates the composition string as a result of a keystroke. A window receives this message through its WindowProc function.
  437. /// </summary>
  438. public const int WM_IME_STARTCOMPOSITION = 0x010D;
  439. /// <summary>
  440. /// Sent to an application when the IME ends composition. A window receives this message through its WindowProc function.
  441. /// </summary>
  442. public const int WM_IME_ENDCOMPOSITION = 0x010E;
  443. /// <summary>
  444. /// Sent to an application when the IME changes composition status as a result of a keystroke. A window receives this message through its WindowProc function.
  445. /// </summary>
  446. public const int WM_IME_COMPOSITION = 0x010F;
  447. /// <summary>
  448. /// TODO
  449. /// </summary>
  450. public const int WM_IME_KEYLAST = 0x010F;
  451. /// <summary>
  452. /// The WM_INITDIALOG message is sent to the dialog box procedure immediately before a dialog box is displayed. Dialog box procedures typically use this message to initialize controls and carry out any other initialization tasks that affect the appearance of the dialog box.
  453. /// </summary>
  454. public const int WM_INITDIALOG = 0x0110;
  455. /// <summary>
  456. /// The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated.
  457. /// </summary>
  458. public const int WM_COMMAND = 0x0111;
  459. /// <summary>
  460. /// A window receives this message when the user chooses a command from the Window menu, clicks the maximize button, minimize button, restore button, close button, or moves the form. You can stop the form from moving by filtering this out.
  461. /// </summary>
  462. public const int WM_SYSCOMMAND = 0x0112;
  463. /// <summary>
  464. /// The WM_TIMER message is posted to the installing thread's message queue when a timer expires. The message is posted by the GetMessage or PeekMessage function.
  465. /// </summary>
  466. public const int WM_TIMER = 0x0113;
  467. /// <summary>
  468. /// The WM_HSCROLL message is sent to a window when a scroll event occurs in the window's standard horizontal scroll bar. This message is also sent to the owner of a horizontal scroll bar control when a scroll event occurs in the control.
  469. /// </summary>
  470. public const int WM_HSCROLL = 0x0114;
  471. /// <summary>
  472. /// The WM_VSCROLL message is sent to a window when a scroll event occurs in the window's standard vertical scroll bar. This message is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control.
  473. /// </summary>
  474. public const int WM_VSCROLL = 0x0115;
  475. /// <summary>
  476. /// The WM_INITMENU message is sent when a menu is about to become active. It occurs when the user clicks an item on the menu bar or presses a menu key. This allows the application to modify the menu before it is displayed.
  477. /// </summary>
  478. public const int WM_INITMENU = 0x0116;
  479. /// <summary>
  480. /// The WM_INITMENUPOPUP message is sent when a drop-down menu or submenu is about to become active. This allows an application to modify the menu before it is displayed, without changing the entire menu.
  481. /// </summary>
  482. public const int WM_INITMENUPOPUP = 0x0117;
  483. /// <summary>
  484. /// The WM_MENUSELECT message is sent to a menu's owner window when the user selects a menu item.
  485. /// </summary>
  486. public const int WM_MENUSELECT = 0x011F;
  487. /// <summary>
  488. /// The WM_MENUCHAR message is sent when a menu is active and the user presses a key that does not correspond to any mnemonic or accelerator key. This message is sent to the window that owns the menu.
  489. /// </summary>
  490. public const int WM_MENUCHAR = 0x0120;
  491. /// <summary>
  492. /// The WM_ENTERIDLE message is sent to the owner window of a modal dialog box or menu that is entering an idle state. A modal dialog box or menu enters an idle state when no messages are waiting in its queue after it has processed one or more previous messages.
  493. /// </summary>
  494. public const int WM_ENTERIDLE = 0x0121;
  495. /// <summary>
  496. /// The WM_MENURBUTTONUP message is sent when the user releases the right mouse button while the cursor is on a menu item.
  497. /// </summary>
  498. public const int WM_MENURBUTTONUP = 0x0122;
  499. /// <summary>
  500. /// The WM_MENUDRAG message is sent to the owner of a drag-and-drop menu when the user drags a menu item.
  501. /// </summary>
  502. public const int WM_MENUDRAG = 0x0123;
  503. /// <summary>
  504. /// The WM_MENUGETOBJECT message is sent to the owner of a drag-and-drop menu when the mouse cursor enters a menu item or moves from the center of the item to the top or bottom of the item.
  505. /// </summary>
  506. public const int WM_MENUGETOBJECT = 0x0124;
  507. /// <summary>
  508. /// The WM_UNINITMENUPOPUP message is sent when a drop-down menu or submenu has been destroyed.
  509. /// </summary>
  510. public const int WM_UNINITMENUPOPUP = 0x0125;
  511. /// <summary>
  512. /// The WM_MENUCOMMAND message is sent when the user makes a selection from a menu.
  513. /// </summary>
  514. public const int WM_MENUCOMMAND = 0x0126;
  515. /// <summary>
  516. /// An application sends the WM_CHANGEUISTATE message to indicate that the user interface (UI) state should be changed.
  517. /// </summary>
  518. public const int WM_CHANGEUISTATE = 0x0127;
  519. /// <summary>
  520. /// An application sends the WM_UPDATEUISTATE message to change the user interface (UI) state for the specified window and all its child windows.
  521. /// </summary>
  522. public const int WM_UPDATEUISTATE = 0x0128;
  523. /// <summary>
  524. /// An application sends the WM_QUERYUISTATE message to retrieve the user interface (UI) state for a window.
  525. /// </summary>
  526. public const int WM_QUERYUISTATE = 0x0129;
  527. /// <summary>
  528. /// The WM_CTLCOLORMSGBOX message is sent to the owner window of a message box before Windows draws the message box. By responding to this message, the owner window can set the text and background colors of the message box by using the given display device context handle.
  529. /// </summary>
  530. public const int WM_CTLCOLORMSGBOX = 0x0132;
  531. /// <summary>
  532. /// An edit control that is not read-only or disabled sends the WM_CTLCOLOREDIT message to its parent window when the control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to set the text and background colors of the edit control.
  533. /// </summary>
  534. public const int WM_CTLCOLOREDIT = 0x0133;
  535. /// <summary>
  536. /// Sent to the parent window of a list box before the system draws the list box. By responding to this message, the parent window can set the text and background colors of the list box by using the specified display device context handle.
  537. /// </summary>
  538. public const int WM_CTLCOLORLISTBOX = 0x0134;
  539. /// <summary>
  540. /// The WM_CTLCOLORBTN message is sent to the parent window of a button before drawing the button. The parent window can change the button's text and background colors. However, only owner-drawn buttons respond to the parent window processing this message.
  541. /// </summary>
  542. public const int WM_CTLCOLORBTN = 0x0135;
  543. /// <summary>
  544. /// The WM_CTLCOLORDLG message is sent to a dialog box before the system draws the dialog box. By responding to this message, the dialog box can set its text and background colors using the specified display device context handle.
  545. /// </summary>
  546. public const int WM_CTLCOLORDLG = 0x0136;
  547. /// <summary>
  548. /// The WM_CTLCOLORSCROLLBAR message is sent to the parent window of a scroll bar control when the control is about to be drawn. By responding to this message, the parent window can use the display context handle to set the background color of the scroll bar control.
  549. /// </summary>
  550. public const int WM_CTLCOLORSCROLLBAR = 0x0137;
  551. /// <summary>
  552. /// A static control, or an edit control that is read-only or disabled, sends the WM_CTLCOLORSTATIC message to its parent window when the control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to set the text and background colors of the static control.
  553. /// </summary>
  554. public const int WM_CTLCOLORSTATIC = 0x0138;
  555. /// <summary>
  556. /// Use WM_MOUSEFIRST to specify the first mouse message. Use the PeekMessage() Function.
  557. /// </summary>
  558. public const int WM_MOUSEFIRST = 0x0200;
  559. /// <summary>
  560. /// The WM_MOUSEMOVE message is posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  561. /// </summary>
  562. public const int WM_MOUSEMOVE = 0x0200;
  563. /// <summary>
  564. /// The WM_LBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  565. /// </summary>
  566. public const int WM_LBUTTONDOWN = 0x0201;
  567. /// <summary>
  568. /// The WM_LBUTTONUP message is posted when the user releases the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  569. /// </summary>
  570. public const int WM_LBUTTONUP = 0x0202;
  571. /// <summary>
  572. /// The WM_LBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  573. /// </summary>
  574. public const int WM_LBUTTONDBLCLK = 0x0203;
  575. /// <summary>
  576. /// The WM_RBUTTONDOWN message is posted when the user presses the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  577. /// </summary>
  578. public const int WM_RBUTTONDOWN = 0x0204;
  579. /// <summary>
  580. /// The WM_RBUTTONUP message is posted when the user releases the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  581. /// </summary>
  582. public const int WM_RBUTTONUP = 0x0205;
  583. /// <summary>
  584. /// The WM_RBUTTONDBLCLK message is posted when the user double-clicks the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  585. /// </summary>
  586. public const int WM_RBUTTONDBLCLK = 0x0206;
  587. /// <summary>
  588. /// The WM_MBUTTONDOWN message is posted when the user presses the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  589. /// </summary>
  590. public const int WM_MBUTTONDOWN = 0x0207;
  591. /// <summary>
  592. /// The WM_MBUTTONUP message is posted when the user releases the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  593. /// </summary>
  594. public const int WM_MBUTTONUP = 0x0208;
  595. /// <summary>
  596. /// The WM_MBUTTONDBLCLK message is posted when the user double-clicks the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  597. /// </summary>
  598. public const int WM_MBUTTONDBLCLK = 0x0209;
  599. /// <summary>
  600. /// The WM_MOUSEWHEEL message is sent to the focus window when the mouse wheel is rotated. The DefWindowProc function propagates the message to the window's parent. There should be no internal forwarding of the message, since DefWindowProc propagates it up the parent chain until it finds a window that processes it.
  601. /// </summary>
  602. public const int WM_MOUSEWHEEL = 0x020A;
  603. /// <summary>
  604. /// The WM_XBUTTONDOWN message is posted when the user presses the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  605. /// </summary>
  606. public const int WM_XBUTTONDOWN = 0x020B;
  607. /// <summary>
  608. /// The WM_XBUTTONUP message is posted when the user releases the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  609. /// </summary>
  610. public const int WM_XBUTTONUP = 0x020C;
  611. /// <summary>
  612. /// The WM_XBUTTONDBLCLK message is posted when the user double-clicks the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
  613. /// </summary>
  614. public const int WM_XBUTTONDBLCLK = 0x020D;
  615. /// <summary>
  616. /// The WM_MOUSEHWHEEL message is sent to the focus window when the mouse's horizontal scroll wheel is tilted or rotated. The DefWindowProc function propagates the message to the window's parent. There should be no internal forwarding of the message, since DefWindowProc propagates it up the parent chain until it finds a window that processes it.
  617. /// </summary>
  618. public const int WM_MOUSEHWHEEL = 0x020E;
  619. /// <summary>
  620. /// Use WM_MOUSELAST to specify the last mouse message. Used with PeekMessage() Function.
  621. /// </summary>
  622. public const int WM_MOUSELAST = 0x020E;
  623. /// <summary>
  624. /// The WM_PARENTNOTIFY message is sent to the parent of a child window when the child window is created or destroyed, or when the user clicks a mouse button while the cursor is over the child window. When the child window is being created, the system sends WM_PARENTNOTIFY just before the CreateWindow or CreateWindowEx function that creates the window returns. When the child window is being destroyed, the system sends the message before any processing to destroy the window takes place.
  625. /// </summary>
  626. public const int WM_PARENTNOTIFY = 0x0210;
  627. /// <summary>
  628. /// The WM_ENTERMENULOOP message informs an application's main window procedure that a menu modal loop has been entered.
  629. /// </summary>
  630. public const int WM_ENTERMENULOOP = 0x0211;
  631. /// <summary>
  632. /// The WM_EXITMENULOOP message informs an application's main window procedure that a menu modal loop has been exited.
  633. /// </summary>
  634. public const int WM_EXITMENULOOP = 0x0212;
  635. /// <summary>
  636. /// The WM_NEXTMENU message is sent to an application when the right or left arrow key is used to switch between the menu bar and the system menu.
  637. /// </summary>
  638. public const int WM_NEXTMENU = 0x0213;
  639. /// <summary>
  640. /// The WM_SIZING message is sent to a window that the user is resizing. By processing this message, an application can monitor the size and position of the drag rectangle and, if needed, change its size or position.
  641. /// </summary>
  642. public const int WM_SIZING = 0x0214;
  643. /// <summary>
  644. /// The WM_CAPTURECHANGED message is sent to the window that is losing the mouse capture.
  645. /// </summary>
  646. public const int WM_CAPTURECHANGED = 0x0215;
  647. /// <summary>
  648. /// The WM_MOVING message is sent to a window that the user is moving. By processing this message, an application can monitor the position of the drag rectangle and, if needed, change its position.
  649. /// </summary>
  650. public const int WM_MOVING = 0x0216;
  651. /// <summary>
  652. /// Notifies applications that a power-management event has occurred.
  653. /// </summary>
  654. public const int WM_POWERBROADCAST = 0x0218;
  655. /// <summary>
  656. /// Notifies an application of a change to the hardware configuration of a device or the computer.
  657. /// </summary>
  658. public const int WM_DEVICECHANGE = 0x0219;
  659. /// <summary>
  660. /// An application sends the WM_MDICREATE message to a multiple-document interface (MDI) client window to create an MDI child window.
  661. /// </summary>
  662. public const int WM_MDICREATE = 0x0220;
  663. /// <summary>
  664. /// An application sends the WM_MDIDESTROY message to a multiple-document interface (MDI) client window to close an MDI child window.
  665. /// </summary>
  666. public const int WM_MDIDESTROY = 0x0221;
  667. /// <summary>
  668. /// An application sends the WM_MDIACTIVATE message to a multiple-document interface (MDI) client window to instruct the client window to activate a different MDI child window.
  669. /// </summary>
  670. public const int WM_MDIACTIVATE = 0x0222;
  671. /// <summary>
  672. /// An application sends the WM_MDIRESTORE message to a multiple-document interface (MDI) client window to restore an MDI child window from maximized or minimized size.
  673. /// </summary>
  674. public const int WM_MDIRESTORE = 0x0223;
  675. /// <summary>
  676. /// An application sends the WM_MDINEXT message to a multiple-document interface (MDI) client window to activate the next or previous child window.
  677. /// </summary>
  678. public const int WM_MDINEXT = 0x0224;
  679. /// <summary>
  680. /// An application sends the WM_MDIMAXIMIZE message to a multiple-document interface (MDI) client window to maximize an MDI child window. The system resizes the child window to make its client area fill the client window. The system places the child window's window menu icon in the rightmost position of the frame window's menu bar, and places the child window's restore icon in the leftmost position. The system also appends the title bar text of the child window to that of the frame window.
  681. /// </summary>
  682. public const int WM_MDIMAXIMIZE = 0x0225;
  683. /// <summary>
  684. /// An application sends the WM_MDITILE message to a multiple-document interface (MDI) client window to arrange all of its MDI child windows in a tile format.
  685. /// </summary>
  686. public const int WM_MDITILE = 0x0226;
  687. /// <summary>
  688. /// An application sends the WM_MDICASCADE message to a multiple-document interface (MDI) client window to arrange all its child windows in a cascade format.
  689. /// </summary>
  690. public const int WM_MDICASCADE = 0x0227;
  691. /// <summary>
  692. /// An application sends the WM_MDIICONARRANGE message to a multiple-document interface (MDI) client window to arrange all minimized MDI child windows. It does not affect child windows that are not minimized.
  693. /// </summary>
  694. public const int WM_MDIICONARRANGE = 0x0228;
  695. /// <summary>
  696. /// An application sends the WM_MDIGETACTIVE message to a multiple-document interface (MDI) client window to retrieve the handle to the active MDI child window.
  697. /// </summary>
  698. public const int WM_MDIGETACTIVE = 0x0229;
  699. /// <summary>
  700. /// An application sends the WM_MDISETMENU message to a multiple-document interface (MDI) client window to replace the entire menu of an MDI frame window, to replace the window menu of the frame window, or both.
  701. /// </summary>
  702. public const int WM_MDISETMENU = 0x0230;
  703. /// <summary>
  704. /// The WM_ENTERSIZEMOVE message is sent one time to a window after it enters the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns.
  705. /// The system sends the WM_ENTERSIZEMOVE message regardless of whether the dragging of full windows is enabled.
  706. /// </summary>
  707. public const int WM_ENTERSIZEMOVE = 0x0231;
  708. /// <summary>
  709. /// The WM_EXITSIZEMOVE message is sent one time to a window, after it has exited the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns.
  710. /// </summary>
  711. public const int WM_EXITSIZEMOVE = 0x0232;
  712. /// <summary>
  713. /// Sent when the user drops a file on the window of an application that has registered itself as a recipient of dropped files.
  714. /// </summary>
  715. public const int WM_DROPFILES = 0x0233;
  716. /// <summary>
  717. /// An application sends the WM_MDIREFRESHMENU message to a multiple-document interface (MDI) client window to refresh the window menu of the MDI frame window.
  718. /// </summary>
  719. public const int WM_MDIREFRESHMENU = 0x0234;
  720. /// <summary>
  721. /// Sent to an application when a window is activated. A window receives this message through its WindowProc function.
  722. /// </summary>
  723. public const int WM_IME_SETCONTEXT = 0x0281;
  724. /// <summary>
  725. /// Sent to an application to notify it of changes to the IME window. A window receives this message through its WindowProc function.
  726. /// </summary>
  727. public const int WM_IME_NOTIFY = 0x0282;
  728. /// <summary>
  729. /// Sent by an application to direct the IME window to carry out the requested command. The application uses this message to control the IME window that it has created. To send this message, the application calls the SendMessage function with the following parameters.
  730. /// </summary>
  731. public const int WM_IME_CONTROL = 0x0283;
  732. /// <summary>
  733. /// Sent to an application when the IME window finds no space to extend the area for the composition window. A window receives this message through its WindowProc function.
  734. /// </summary>
  735. public const int WM_IME_COMPOSITIONFULL = 0x0284;
  736. /// <summary>
  737. /// Sent to an application when the operating system is about to change the current IME. A window receives this message through its WindowProc function.
  738. /// </summary>
  739. public const int WM_IME_SELECT = 0x0285;
  740. /// <summary>
  741. /// Sent to an application when the IME gets a character of the conversion result. A window receives this message through its WindowProc function.
  742. /// </summary>
  743. public const int WM_IME_CHAR = 0x0286;
  744. /// <summary>
  745. /// Sent to an application to provide commands and request information. A window receives this message through its WindowProc function.
  746. /// </summary>
  747. public const int WM_IME_REQUEST = 0x0288;
  748. /// <summary>
  749. /// Sent to an application by the IME to notify the application of a key press and to keep message order. A window receives this message through its WindowProc function.
  750. /// </summary>
  751. public const int WM_IME_KEYDOWN = 0x0290;
  752. /// <summary>
  753. /// Sent to an application by the IME to notify the application of a key release and to keep message order. A window receives this message through its WindowProc function.
  754. /// </summary>
  755. public const int WM_IME_KEYUP = 0x0291;
  756. /// <summary>
  757. /// The WM_MOUSEHOVER message is posted to a window when the cursor hovers over the client area of the window for the period of time specified in a prior call to TrackMouseEvent.
  758. /// </summary>
  759. public const int WM_MOUSEHOVER = 0x02A1;
  760. /// <summary>
  761. /// The WM_MOUSELEAVE message is posted to a window when the cursor leaves the client area of the window specified in a prior call to TrackMouseEvent.
  762. /// </summary>
  763. public const int WM_MOUSELEAVE = 0x02A3;
  764. /// <summary>
  765. /// The WM_NCMOUSEHOVER message is posted to a window when the cursor hovers over the nonclient area of the window for the period of time specified in a prior call to TrackMouseEvent.
  766. /// </summary>
  767. public const int WM_NCMOUSEHOVER = 0x02A0;
  768. /// <summary>
  769. /// The WM_NCMOUSELEAVE message is posted to a window when the cursor leaves the nonclient area of the window specified in a prior call to TrackMouseEvent.
  770. /// </summary>
  771. public const int WM_NCMOUSELEAVE = 0x02A2;
  772. /// <summary>
  773. /// The WM_WTSSESSION_CHANGE message notifies applications of changes in session state.
  774. /// </summary>
  775. public const int WM_WTSSESSION_CHANGE = 0x02B1;
  776. /// <summary>
  777. /// TODO
  778. /// </summary>
  779. public const int WM_TABLET_FIRST = 0x02C0;
  780. /// <summary>
  781. /// TODO
  782. /// </summary>
  783. public const int WM_TABLET_LAST = 0x02DF;
  784. /// <summary>
  785. /// An application sends a WM_CUT message to an edit control or combo box to delete (cut) the current selection, if any, in the edit control and copy the deleted text to the clipboard in CF_TEXT format.
  786. /// </summary>
  787. public const int WM_CUT = 0x0300;
  788. /// <summary>
  789. /// An application sends the WM_COPY message to an edit control or combo box to copy the current selection to the clipboard in CF_TEXT format.
  790. /// </summary>
  791. public const int WM_COPY = 0x0301;
  792. /// <summary>
  793. /// An application sends a WM_PASTE message to an edit control or combo box to copy the current content of the clipboard to the edit control at the current caret position. Data is inserted only if the clipboard contains data in CF_TEXT format.
  794. /// </summary>
  795. public const int WM_PASTE = 0x0302;
  796. /// <summary>
  797. /// An application sends a WM_CLEAR message to an edit control or combo box to delete (clear) the current selection, if any, from the edit control.
  798. /// </summary>
  799. public const int WM_CLEAR = 0x0303;
  800. /// <summary>
  801. /// An application sends a WM_UNDO message to an edit control to undo the last operation. When this message is sent to an edit control, the previously deleted text is restored or the previously added text is deleted.
  802. /// </summary>
  803. public const int WM_UNDO = 0x0304;
  804. /// <summary>
  805. /// The WM_RENDERFORMAT message is sent to the clipboard owner if it has delayed rendering a specific clipboard format and if an application has requested data in that format. The clipboard owner must render data in the specified format and place it on the clipboard by calling the SetClipboardData function.
  806. /// </summary>
  807. public const int WM_RENDERFORMAT = 0x0305;
  808. /// <summary>
  809. /// The WM_RENDERALLFORMATS message is sent to the clipboard owner before it is destroyed, if the clipboard owner has delayed rendering one or more clipboard formats. For the content of the clipboard to remain available to other applications, the clipboard owner must render data in all the formats it is capable of generating, and place the data on the clipboard by calling the SetClipboardData function.
  810. /// </summary>
  811. public const int WM_RENDERALLFORMATS = 0x0306;
  812. /// <summary>
  813. /// The WM_DESTROYCLIPBOARD message is sent to the clipboard owner when a call to the EmptyClipboard function empties the clipboard.
  814. /// </summary>
  815. public const int WM_DESTROYCLIPBOARD = 0x0307;
  816. /// <summary>
  817. /// The WM_DRAWCLIPBOARD message is sent to the first window in the clipboard viewer chain when the content of the clipboard changes. This enables a clipboard viewer window to display the new content of the clipboard.
  818. /// </summary>
  819. public const int WM_DRAWCLIPBOARD = 0x0308;
  820. /// <summary>
  821. /// The WM_PAINTCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY format and the clipboard viewer's client area needs repainting.
  822. /// </summary>
  823. public const int WM_PAINTCLIPBOARD = 0x0309;
  824. /// <summary>
  825. /// The WM_VSCROLLCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's vertical scroll bar. The owner should scroll the clipboard image and update the scroll bar values.
  826. /// </summary>
  827. public const int WM_VSCROLLCLIPBOARD = 0x030A;
  828. /// <summary>
  829. /// The WM_SIZECLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY format and the clipboard viewer's client area has changed size.
  830. /// </summary>
  831. public const int WM_SIZECLIPBOARD = 0x030B;
  832. /// <summary>
  833. /// The WM_ASKCBFORMATNAME message is sent to the clipboard owner by a clipboard viewer window to request the name of a CF_OWNERDISPLAY clipboard format.
  834. /// </summary>
  835. public const int WM_ASKCBFORMATNAME = 0x030C;
  836. /// <summary>
  837. /// The WM_CHANGECBCHAIN message is sent to the first window in the clipboard viewer chain when a window is being removed from the chain.
  838. /// </summary>
  839. public const int WM_CHANGECBCHAIN = 0x030D;
  840. /// <summary>
  841. /// The WM_HSCROLLCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window. This occurs when the clipboard contains data in the CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's horizontal scroll bar. The owner should scroll the clipboard image and update the scroll bar values.
  842. /// </summary>
  843. public const int WM_HSCROLLCLIPBOARD = 0x030E;
  844. /// <summary>
  845. /// This message informs a window that it is about to receive the keyboard focus, giving the window the opportunity to realize its logical palette when it receives the focus.
  846. /// </summary>
  847. public const int WM_QUERYNEWPALETTE = 0x030F;
  848. /// <summary>
  849. /// The WM_PALETTEISCHANGING message informs applications that an application is going to realize its logical palette.
  850. /// </summary>
  851. public const int WM_PALETTEISCHANGING = 0x0310;
  852. /// <summary>
  853. /// This message is sent by the OS to all top-level and overlapped windows after the window with the keyboard focus realizes its logical palette.
  854. /// This message enables windows that do not have the keyboard focus to realize their logical palettes and update their client areas.
  855. /// </summary>
  856. public const int WM_PALETTECHANGED = 0x0311;
  857. /// <summary>
  858. /// The WM_HOTKEY message is posted when the user presses a hot key registered by the RegisterHotKey function. The message is placed at the top of the message queue associated with the thread that registered the hot key.
  859. /// </summary>
  860. public const int WM_HOTKEY = 0x0312;
  861. /// <summary>
  862. /// The WM_PRINT message is sent to a window to request that it draw itself in the specified device context, most commonly in a printer device context.
  863. /// </summary>
  864. public const int WM_PRINT = 0x0317;
  865. /// <summary>
  866. /// The WM_PRINTCLIENT message is sent to a window to request that it draw its client area in the specified device context, most commonly in a printer device context.
  867. /// </summary>
  868. public const int WM_PRINTCLIENT = 0x0318;
  869. /// <summary>
  870. /// The WM_APPCOMMAND message notifies a window that the user generated an application command event, for example, by clicking an application command button using the mouse or typing an application command key on the keyboard.
  871. /// </summary>
  872. public const int WM_APPCOMMAND = 0x0319;
  873. /// <summary>
  874. /// The WM_THEMECHANGED message is broadcast to every window following a theme change event. Examples of theme change events are the activation of a theme, the deactivation of a theme, or a transition from one theme to another.
  875. /// </summary>
  876. public const int WM_THEMECHANGED = 0x031A;
  877. /// <summary>
  878. /// Sent when the contents of the clipboard have changed.
  879. /// </summary>
  880. public const int WM_CLIPBOARDUPDATE = 0x031D;
  881. /// <summary>
  882. /// The system will send a window the WM_DWMCOMPOSITIONCHANGED message to indicate that the availability of desktop composition has changed.
  883. /// </summary>
  884. public const int WM_DWMCOMPOSITIONCHANGED = 0x031E;
  885. /// <summary>
  886. /// WM_DWMNCRENDERINGCHANGED is called when the non-client area rendering status of a window has changed. Only windows that have set the flag DWM_BLURBEHIND.fTransitionOnMaximized to true will get this message.
  887. /// </summary>
  888. public const int WM_DWMNCRENDERINGCHANGED = 0x031F;
  889. /// <summary>
  890. /// Sent to all top-level windows when the colorization color has changed.
  891. /// </summary>
  892. public const int WM_DWMCOLORIZATIONCOLORCHANGED = 0x0320;
  893. /// <summary>
  894. /// WM_DWMWINDOWMAXIMIZEDCHANGE will let you know when a DWM composed window is maximized. You also have to register for this message as well. You'd have other windowd go opaque when this message is sent.
  895. /// </summary>
  896. public const int WM_DWMWINDOWMAXIMIZEDCHANGE = 0x0321;
  897. /// <summary>
  898. /// Sent to request extended title bar information. A window receives this message through its WindowProc function.
  899. /// </summary>
  900. public const int WM_GETTITLEBARINFOEX = 0x033F;
  901. /// <summary>
  902. /// TODO
  903. /// </summary>
  904. public const int WM_HANDHELDFIRST = 0x0358;
  905. /// <summary>
  906. /// TODO
  907. /// </summary>
  908. public const int WM_HANDHELDLAST = 0x035F;
  909. /// <summary>
  910. /// TODO
  911. /// </summary>
  912. public const int WM_AFXFIRST = 0x0360;
  913. /// <summary>
  914. /// TODO
  915. /// </summary>
  916. public const int WM_AFXLAST = 0x037F;
  917. /// <summary>
  918. /// TODO
  919. /// </summary>
  920. public const int WM_PENWINFIRST = 0x0380;
  921. /// <summary>
  922. /// TODO
  923. /// </summary>
  924. public const int WM_PENWINLAST = 0x038F;
  925. /// <summary>
  926. /// The WM_APP constant is used by applications to help define private messages, usually of the form WM_APP+X, where X is an integer value.
  927. /// </summary>
  928. public const int WM_APP = 0x8000;
  929. /// <summary>
  930. /// The WM_USER constant is used by applications to help define private messages for use by private window classes, usually of the form WM_USER+X, where X is an integer value.
  931. /// </summary>
  932. public const int WM_USER = 0x0400;
  933. /// <summary>
  934. /// An application sends the WM_CPL_LAUNCH message to Windows Control Panel to request that a Control Panel application be started.
  935. /// </summary>
  936. public const int WM_CPL_LAUNCH = WM_USER + 0x1000;
  937. /// <summary>
  938. /// The WM_CPL_LAUNCHED message is sent when a Control Panel application, started by the WM_CPL_LAUNCH message, has closed. The WM_CPL_LAUNCHED message is sent to the window identified by the wParam parameter of the WM_CPL_LAUNCH message that started the application.
  939. /// </summary>
  940. public const int WM_CPL_LAUNCHED = WM_USER + 0x1001;
  941. /// <summary>
  942. /// WM_SYSTIMER is a well-known yet still undocumented message. Windows uses WM_SYSTIMER for internal actions like scrolling.
  943. /// </summary>
  944. public const int WM_SYSTIMER = 0x118;
  945. }
  946. }