Widow – Blame information for rev 18

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 using System;
18 office 2 using System.Drawing;
1 office 3 using System.Runtime.InteropServices;
4 using System.Text;
5  
6 namespace Widow
7 {
8 public static class Natives
9 {
11 office 10 #region Public Events & Delegates
11  
12 public delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
13  
14 #endregion
15  
1 office 16 #region Public Enums, Properties and Fields
17  
18 office 18 public enum OCR_SYSTEM_CURSORS : uint
19 {
20 /// <summary>
21 /// Standard arrow and small hourglass
22 /// </summary>
23 OCR_APPSTARTING = 32650,
24  
25 /// <summary>
26 /// Standard arrow
27 /// </summary>
28 OCR_NORMAL = 32512,
29  
30 /// <summary>
31 /// Crosshair
32 /// </summary>
33 OCR_CROSS = 32515,
34  
35 /// <summary>
36 /// Windows 2000/XP: Hand
37 /// </summary>
38 OCR_HAND = 32649,
39  
40 /// <summary>
41 /// Arrow and question mark
42 /// </summary>
43 OCR_HELP = 32651,
44  
45 /// <summary>
46 /// I-beam
47 /// </summary>
48 OCR_IBEAM = 32513,
49  
50 /// <summary>
51 /// Slashed circle
52 /// </summary>
53 OCR_NO = 32648,
54  
55 /// <summary>
56 /// Four-pointed arrow pointing north, south, east, and west
57 /// </summary>
58 OCR_SIZEALL = 32646,
59  
60 /// <summary>
61 /// Double-pointed arrow pointing northeast and southwest
62 /// </summary>
63 OCR_SIZENESW = 32643,
64  
65 /// <summary>
66 /// Double-pointed arrow pointing north and south
67 /// </summary>
68 OCR_SIZENS = 32645,
69  
70 /// <summary>
71 /// Double-pointed arrow pointing northwest and southeast
72 /// </summary>
73 OCR_SIZENWSE = 32642,
74  
75 /// <summary>
76 /// Double-pointed arrow pointing west and east
77 /// </summary>
78 OCR_SIZEWE = 32644,
79  
80 /// <summary>
81 /// Vertical arrow
82 /// </summary>
83 OCR_UP = 32516,
84  
85 /// <summary>
86 /// Hourglass
87 /// </summary>
88 OCR_WAIT = 32514
89 }
90  
1 office 91 /// <summary>
92 /// Windows Messages
93 /// Defined in winuser.h from Windows SDK v6.1
94 /// Documentation pulled from MSDN.
95 /// </summary>
96 public enum WM : uint
97 {
98 /// <summary>
99 /// The WM_NULL message performs no operation. An application sends the WM_NULL message if it wants to post a message
100 /// that the recipient window will ignore.
101 /// </summary>
102 NULL = 0x0000,
103  
104 /// <summary>
105 /// The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx
106 /// or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window
107 /// receives this message after the window is created, but before the window becomes visible.
108 /// </summary>
109 CREATE = 0x0001,
110  
111 /// <summary>
112 /// The WM_DESTROY message is sent when a window is being destroyed. It is sent to the window procedure of the window
113 /// being destroyed after the window is removed from the screen.
114 /// This message is sent first to the window being destroyed and then to the child windows (if any) as they are
115 /// destroyed. During the processing of the message, it can be assumed that all child windows still exist.
116 /// ///
117 /// </summary>
118 DESTROY = 0x0002,
119  
120 /// <summary>
121 /// The WM_MOVE message is sent after a window has been moved.
122 /// </summary>
123 MOVE = 0x0003,
124  
125 /// <summary>
126 /// The WM_SIZE message is sent to a window after its size has changed.
127 /// </summary>
128 SIZE = 0x0005,
129  
130 /// <summary>
131 /// The WM_ACTIVATE message is sent to both the window being activated and the window being deactivated. If the windows
132 /// use the same input queue, the message is sent synchronously, first to the window procedure of the top-level window
133 /// being deactivated, then to the window procedure of the top-level window being activated. If the windows use
134 /// different input queues, the message is sent asynchronously, so the window is activated immediately.
135 /// </summary>
136 ACTIVATE = 0x0006,
137  
138 /// <summary>
139 /// The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus.
140 /// </summary>
141 SETFOCUS = 0x0007,
142  
143 /// <summary>
144 /// The WM_KILLFOCUS message is sent to a window immediately before it loses the keyboard focus.
145 /// </summary>
146 KILLFOCUS = 0x0008,
147  
148 /// <summary>
149 /// The WM_ENABLE message is sent when an application changes the enabled state of a window. It is sent to the window
150 /// whose enabled state is changing. This message is sent before the EnableWindow function returns, but after the
151 /// enabled state (WS_DISABLED style bit) of the window has changed.
152 /// </summary>
153 ENABLE = 0x000A,
154  
155 /// <summary>
156 /// An application sends the WM_SETREDRAW message to a window to allow changes in that window to be redrawn or to
157 /// prevent changes in that window from being redrawn.
158 /// </summary>
159 SETREDRAW = 0x000B,
160  
161 /// <summary>
162 /// An application sends a WM_SETTEXT message to set the text of a window.
163 /// </summary>
164 SETTEXT = 0x000C,
165  
166 /// <summary>
167 /// An application sends a WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by
168 /// the caller.
169 /// </summary>
170 GETTEXT = 0x000D,
171  
172 /// <summary>
173 /// An application sends a WM_GETTEXTLENGTH message to determine the length, in characters, of the text associated with
174 /// a window.
175 /// </summary>
176 GETTEXTLENGTH = 0x000E,
177  
178 /// <summary>
179 /// The WM_PAINT message is sent when the system or another application makes a request to paint a portion of an
180 /// application's window. The message is sent when the UpdateWindow or RedrawWindow function is called, or by the
181 /// DispatchMessage function when the application obtains a WM_PAINT message by using the GetMessage or PeekMessage
182 /// function.
183 /// </summary>
184 PAINT = 0x000F,
185  
186 /// <summary>
187 /// The WM_CLOSE message is sent as a signal that a window or an application should terminate.
188 /// </summary>
189 CLOSE = 0x0010,
190  
191 /// <summary>
192 /// The WM_QUERYENDSESSION message is sent when the user chooses to end the session or when an application calls one of
193 /// the system shutdown functions. If any application returns zero, the session is not ended. The system stops sending
194 /// WM_QUERYENDSESSION messages as soon as one application returns zero.
195 /// After processing this message, the system sends the WM_ENDSESSION message with the wParam parameter set to the
196 /// results of the WM_QUERYENDSESSION message.
197 /// </summary>
198 QUERYENDSESSION = 0x0011,
199  
200 /// <summary>
201 /// The WM_QUERYOPEN message is sent to an icon when the user requests that the window be restored to its previous size
202 /// and position.
203 /// </summary>
204 QUERYOPEN = 0x0013,
205  
206 /// <summary>
207 /// The WM_ENDSESSION message is sent to an application after the system processes the results of the
208 /// WM_QUERYENDSESSION message. The WM_ENDSESSION message informs the application whether the session is ending.
209 /// </summary>
210 ENDSESSION = 0x0016,
211  
212 /// <summary>
213 /// The WM_QUIT message indicates a request to terminate an application and is generated when the application calls the
214 /// PostQuitMessage function. It causes the GetMessage function to return zero.
215 /// </summary>
216 QUIT = 0x0012,
217  
218 /// <summary>
219 /// The WM_ERASEBKGND message is sent when the window background must be erased (for example, when a window is
220 /// resized). The message is sent to prepare an invalidated portion of a window for painting.
221 /// </summary>
222 ERASEBKGND = 0x0014,
223  
224 /// <summary>
225 /// This message is sent to all top-level windows when a change is made to a system color setting.
226 /// </summary>
227 SYSCOLORCHANGE = 0x0015,
228  
229 /// <summary>
230 /// The WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown.
231 /// </summary>
232 SHOWWINDOW = 0x0018,
233  
234 /// <summary>
235 /// An application sends the WM_WININICHANGE message to all top-level windows after making a change to the WIN.INI
236 /// file. The SystemParametersInfo function sends this message after an application uses the function to change a
237 /// setting in WIN.INI.
238 /// Note The WM_WININICHANGE message is provided only for compatibility with earlier versions of the system.
239 /// Applications should use the WM_SETTINGCHANGE message.
240 /// </summary>
241 WININICHANGE = 0x001A,
242  
243 /// <summary>
244 /// An application sends the WM_WININICHANGE message to all top-level windows after making a change to the WIN.INI
245 /// file. The SystemParametersInfo function sends this message after an application uses the function to change a
246 /// setting in WIN.INI.
247 /// Note The WM_WININICHANGE message is provided only for compatibility with earlier versions of the system.
248 /// Applications should use the WM_SETTINGCHANGE message.
249 /// </summary>
250 SETTINGCHANGE = WININICHANGE,
251  
252 /// <summary>
253 /// The WM_DEVMODECHANGE message is sent to all top-level windows whenever the user changes device-mode settings.
254 /// </summary>
255 DEVMODECHANGE = 0x001B,
256  
257 /// <summary>
258 /// The WM_ACTIVATEAPP message is sent when a window belonging to a different application than the active window is
259 /// about to be activated. The message is sent to the application whose window is being activated and to the
260 /// application whose window is being deactivated.
261 /// </summary>
262 ACTIVATEAPP = 0x001C,
263  
264 /// <summary>
265 /// An application sends the WM_FONTCHANGE message to all top-level windows in the system after changing the pool of
266 /// font resources.
267 /// </summary>
268 FONTCHANGE = 0x001D,
269  
270 /// <summary>
271 /// A message that is sent whenever there is a change in the system time.
272 /// </summary>
273 TIMECHANGE = 0x001E,
274  
275 /// <summary>
276 /// The WM_CANCELMODE message is sent to cancel certain modes, such as mouse capture. For example, the system sends
277 /// this message to the active window when a dialog box or message box is displayed. Certain functions also send this
278 /// message explicitly to the specified window regardless of whether it is the active window. For example, the
279 /// EnableWindow function sends this message when disabling the specified window.
280 /// </summary>
281 CANCELMODE = 0x001F,
282  
283 /// <summary>
284 /// The WM_SETCURSOR message is sent to a window if the mouse causes the cursor to move within a window and mouse input
285 /// is not captured.
286 /// </summary>
287 SETCURSOR = 0x0020,
288  
289 /// <summary>
290 /// The WM_MOUSEACTIVATE message is sent when the cursor is in an inactive window and the user presses a mouse button.
291 /// The parent window receives this message only if the child window passes it to the DefWindowProc function.
292 /// </summary>
293 MOUSEACTIVATE = 0x0021,
294  
295 /// <summary>
296 /// The WM_CHILDACTIVATE message is sent to a child window when the user clicks the window's title bar or when the
297 /// window is activated, moved, or sized.
298 /// </summary>
299 CHILDACTIVATE = 0x0022,
300  
301 /// <summary>
302 /// The WM_QUEUESYNC message is sent by a computer-based training (CBT) application to separate user-input messages
303 /// from other messages sent through the WH_JOURNALPLAYBACK Hook procedure.
304 /// </summary>
305 QUEUESYNC = 0x0023,
306  
307 /// <summary>
308 /// The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An
309 /// application can use this message to override the window's default maximized size and position, or its default
310 /// minimum or maximum tracking size.
311 /// </summary>
312 GETMINMAXINFO = 0x0024,
313  
314 /// <summary>
315 /// Windows NT 3.51 and earlier: The WM_PAINTICON message is sent to a minimized window when the icon is to be painted.
316 /// This message is not sent by newer versions of Microsoft Windows, except in unusual circumstances explained in the
317 /// Remarks.
318 /// </summary>
319 PAINTICON = 0x0026,
320  
321 /// <summary>
322 /// Windows NT 3.51 and earlier: The WM_ICONERASEBKGND message is sent to a minimized window when the background of the
323 /// icon must be filled before painting the icon. A window receives this message only if a class icon is defined for
324 /// the window; otherwise, WM_ERASEBKGND is sent. This message is not sent by newer versions of Windows.
325 /// </summary>
326 ICONERASEBKGND = 0x0027,
327  
328 /// <summary>
329 /// The WM_NEXTDLGCTL message is sent to a dialog box procedure to set the keyboard focus to a different control in the
330 /// dialog box.
331 /// </summary>
332 NEXTDLGCTL = 0x0028,
333  
334 /// <summary>
335 /// The WM_SPOOLERSTATUS message is sent from Print Manager whenever a job is added to or removed from the Print
336 /// Manager queue.
337 /// </summary>
338 SPOOLERSTATUS = 0x002A,
339  
340 /// <summary>
341 /// The WM_DRAWITEM message is sent to the parent window of an owner-drawn button, combo box, list box, or menu when a
342 /// visual aspect of the button, combo box, list box, or menu has changed.
343 /// </summary>
344 DRAWITEM = 0x002B,
345  
346 /// <summary>
347 /// The WM_MEASUREITEM message is sent to the owner window of a combo box, list box, list view control, or menu item
348 /// when the control or menu is created.
349 /// </summary>
350 MEASUREITEM = 0x002C,
351  
352 /// <summary>
353 /// 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
354 /// by the LB_DELETESTRING, LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT message. The system sends a
355 /// WM_DELETEITEM message for each deleted item. The system sends the WM_DELETEITEM message for any deleted list box or
356 /// combo box item with nonzero item data.
357 /// </summary>
358 DELETEITEM = 0x002D,
359  
360 /// <summary>
361 /// Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_KEYDOWN message.
362 /// </summary>
363 VKEYTOITEM = 0x002E,
364  
365 /// <summary>
366 /// Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_CHAR message.
367 /// </summary>
368 CHARTOITEM = 0x002F,
369  
370 /// <summary>
371 /// An application sends a WM_SETFONT message to specify the font that a control is to use when drawing text.
372 /// </summary>
373 SETFONT = 0x0030,
374  
375 /// <summary>
376 /// An application sends a WM_GETFONT message to a control to retrieve the font with which the control is currently
377 /// drawing its text.
378 /// </summary>
379 GETFONT = 0x0031,
380  
381 /// <summary>
382 /// An application sends a WM_SETHOTKEY message to a window to associate a hot key with the window. When the user
383 /// presses the hot key, the system activates the window.
384 /// </summary>
385 SETHOTKEY = 0x0032,
386  
387 /// <summary>
388 /// An application sends a WM_GETHOTKEY message to determine the hot key associated with a window.
389 /// </summary>
390 GETHOTKEY = 0x0033,
391  
392 /// <summary>
393 /// The WM_QUERYDRAGICON message is sent to a minimized (iconic) window. The window is about to be dragged by the user
394 /// but does not have an icon defined for its class. An application can return a handle to an icon or cursor. The
395 /// system displays this cursor or icon while the user drags the icon.
396 /// </summary>
397 QUERYDRAGICON = 0x0037,
398  
399 /// <summary>
400 /// The system sends the WM_COMPAREITEM message to determine the relative position of a new item in the sorted list of
401 /// an owner-drawn combo box or list box. Whenever the application adds a new item, the system sends this message to
402 /// the owner of a combo box or list box created with the CBS_SORT or LBS_SORT style.
403 /// </summary>
404 COMPAREITEM = 0x0039,
405  
406 /// <summary>
407 /// Active Accessibility sends the WM_GETOBJECT message to obtain information about an accessible object contained in a
408 /// server application.
409 /// Applications never send this message directly. It is sent only by Active Accessibility in response to calls to
410 /// AccessibleObjectFromPoint, AccessibleObjectFromEvent, or AccessibleObjectFromWindow. However, server applications
411 /// handle this message.
412 /// </summary>
413 GETOBJECT = 0x003D,
414  
415 /// <summary>
416 /// The WM_COMPACTING message is sent to all top-level windows when the system detects more than 12.5 percent of system
417 /// time over a 30- to 60-second interval is being spent compacting memory. This indicates that system memory is low.
418 /// </summary>
419 COMPACTING = 0x0041,
420  
421 /// <summary>
422 /// WM_COMMNOTIFY is Obsolete for Win32-Based Applications
423 /// </summary>
424 [Obsolete] COMMNOTIFY = 0x0044,
425  
426 /// <summary>
427 /// The WM_WINDOWPOSCHANGING message is sent to a window whose size, position, or place in the Z order is about to
428 /// change as a result of a call to the SetWindowPos function or another window-management function.
429 /// </summary>
430 WINDOWPOSCHANGING = 0x0046,
431  
432 /// <summary>
433 /// The WM_WINDOWPOSCHANGED message is sent to a window whose size, position, or place in the Z order has changed as a
434 /// result of a call to the SetWindowPos function or another window-management function.
435 /// </summary>
436 WINDOWPOSCHANGED = 0x0047,
437  
438 /// <summary>
439 /// Notifies applications that the system, typically a battery-powered personal computer, is about to enter a suspended
440 /// mode.
441 /// Use: POWERBROADCAST
442 /// </summary>
443 [Obsolete] POWER = 0x0048,
444  
445 /// <summary>
446 /// An application sends the WM_COPYDATA message to pass data to another application.
447 /// </summary>
448 COPYDATA = 0x004A,
449  
450 /// <summary>
451 /// The WM_CANCELJOURNAL message is posted to an application when a user cancels the application's journaling
452 /// activities. The message is posted with a NULL window handle.
453 /// </summary>
454 CANCELJOURNAL = 0x004B,
455  
456 /// <summary>
457 /// Sent by a common control to its parent window when an event has occurred or the control requires some information.
458 /// </summary>
459 NOTIFY = 0x004E,
460  
461 /// <summary>
462 /// The WM_INPUTLANGCHANGEREQUEST message is posted to the window with the focus when the user chooses a new input
463 /// language, either with the hotkey (specified in the Keyboard control panel application) or from the indicator on the
464 /// system taskbar. An application can accept the change by passing the message to the DefWindowProc function or reject
465 /// the change (and prevent it from taking place) by returning immediately.
466 /// </summary>
467 INPUTLANGCHANGEREQUEST = 0x0050,
468  
469 /// <summary>
470 /// The WM_INPUTLANGCHANGE message is sent to the topmost affected window after an application's input language has
471 /// been changed. You should make any application-specific settings and pass the message to the DefWindowProc function,
472 /// which passes the message to all first-level child windows. These child windows can pass the message to
473 /// DefWindowProc to have it pass the message to their child windows, and so on.
474 /// </summary>
475 INPUTLANGCHANGE = 0x0051,
476  
477 /// <summary>
478 /// Sent to an application that has initiated a training card with Microsoft Windows Help. The message informs the
479 /// application when the user clicks an authorable button. An application initiates a training card by specifying the
480 /// HELP_TCARD command in a call to the WinHelp function.
481 /// </summary>
482 TCARD = 0x0052,
483  
484 /// <summary>
485 /// Indicates that the user pressed the F1 key. If a menu is active when F1 is pressed, WM_HELP is sent to the window
486 /// associated with the menu; otherwise, WM_HELP is sent to the window that has the keyboard focus. If no window has
487 /// the keyboard focus, WM_HELP is sent to the currently active window.
488 /// </summary>
489 HELP = 0x0053,
490  
491 /// <summary>
492 /// The WM_USERCHANGED message is sent to all windows after the user has logged on or off. When the user logs on or
493 /// off, the system updates the user-specific settings. The system sends this message immediately after updating the
494 /// settings.
495 /// </summary>
496 USERCHANGED = 0x0054,
497  
498 /// <summary>
499 /// Determines if a window accepts ANSI or Unicode structures in the WM_NOTIFY notification message. WM_NOTIFYFORMAT
500 /// messages are sent from a common control to its parent window and from the parent window to the common control.
501 /// </summary>
502 NOTIFYFORMAT = 0x0055,
503  
504 /// <summary>
505 /// The WM_CONTEXTMENU message notifies a window that the user clicked the right mouse button (right-clicked) in the
506 /// window.
507 /// </summary>
508 CONTEXTMENU = 0x007B,
509  
510 /// <summary>
511 /// The WM_STYLECHANGING message is sent to a window when the SetWindowLong function is about to change one or more of
512 /// the window's styles.
513 /// </summary>
514 STYLECHANGING = 0x007C,
515  
516 /// <summary>
517 /// The WM_STYLECHANGED message is sent to a window after the SetWindowLong function has changed one or more of the
518 /// window's styles
519 /// </summary>
520 STYLECHANGED = 0x007D,
521  
522 /// <summary>
523 /// The WM_DISPLAYCHANGE message is sent to all windows when the display resolution has changed.
524 /// </summary>
525 DISPLAYCHANGE = 0x007E,
526  
527 /// <summary>
528 /// The WM_GETICON message is sent to a window to retrieve a handle to the large or small icon associated with a
529 /// window. The system displays the large icon in the ALT+TAB dialog, and the small icon in the window caption.
530 /// </summary>
531 GETICON = 0x007F,
532  
533 /// <summary>
534 /// An application sends the WM_SETICON message to associate a new large or small icon with a window. The system
535 /// displays the large icon in the ALT+TAB dialog box, and the small icon in the window caption.
536 /// </summary>
537 SETICON = 0x0080,
538  
539 /// <summary>
540 /// The WM_NCCREATE message is sent prior to the WM_CREATE message when a window is first created.
541 /// </summary>
542 NCCREATE = 0x0081,
543  
544 /// <summary>
545 /// The WM_NCDESTROY message informs a window that its nonclient area is being destroyed. The DestroyWindow function
546 /// sends the WM_NCDESTROY message to the window following the WM_DESTROY message. WM_DESTROY is used to free the
547 /// allocated memory object associated with the window.
548 /// The WM_NCDESTROY message is sent after the child windows have been destroyed. In contrast, WM_DESTROY is sent
549 /// before the child windows are destroyed.
550 /// </summary>
551 NCDESTROY = 0x0082,
552  
553 /// <summary>
554 /// The WM_NCCALCSIZE message is sent when the size and position of a window's client area must be calculated. By
555 /// processing this message, an application can control the content of the window's client area when the size or
556 /// position of the window changes.
557 /// </summary>
558 NCCALCSIZE = 0x0083,
559  
560 /// <summary>
561 /// The WM_NCHITTEST message is sent to a window when the cursor moves, or when a mouse button is pressed or released.
562 /// If the mouse is not captured, the message is sent to the window beneath the cursor. Otherwise, the message is sent
563 /// to the window that has captured the mouse.
564 /// </summary>
565 NCHITTEST = 0x0084,
566  
567 /// <summary>
568 /// The WM_NCPAINT message is sent to a window when its frame must be painted.
569 /// </summary>
570 NCPAINT = 0x0085,
571  
572 /// <summary>
573 /// The WM_NCACTIVATE message is sent to a window when its nonclient area needs to be changed to indicate an active or
574 /// inactive state.
575 /// </summary>
576 NCACTIVATE = 0x0086,
577  
578 /// <summary>
579 /// The WM_GETDLGCODE message is sent to the window procedure associated with a control. By default, the system handles
580 /// all keyboard input to the control; the system interprets certain types of keyboard input as dialog box navigation
581 /// keys. To override this default behavior, the control can respond to the WM_GETDLGCODE message to indicate the types
582 /// of input it wants to process itself.
583 /// </summary>
584 GETDLGCODE = 0x0087,
585  
586 /// <summary>
587 /// The WM_SYNCPAINT message is used to synchronize painting while avoiding linking independent GUI threads.
588 /// </summary>
589 SYNCPAINT = 0x0088,
590  
591 /// <summary>
592 /// The WM_NCMOUSEMOVE message is posted to a window when the cursor is moved within the nonclient area of the window.
593 /// This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is
594 /// not posted.
595 /// </summary>
596 NCMOUSEMOVE = 0x00A0,
597  
598 /// <summary>
599 /// The WM_NCLBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is within the
600 /// nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured
601 /// the mouse, this message is not posted.
602 /// </summary>
603 NCLBUTTONDOWN = 0x00A1,
604  
605 /// <summary>
606 /// The WM_NCLBUTTONUP message is posted when the user releases the left mouse button while the cursor is within the
607 /// nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured
608 /// the mouse, this message is not posted.
609 /// </summary>
610 NCLBUTTONUP = 0x00A2,
611  
612 /// <summary>
613 /// The WM_NCLBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is
614 /// within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window
615 /// has captured the mouse, this message is not posted.
616 /// </summary>
617 NCLBUTTONDBLCLK = 0x00A3,
618  
619 /// <summary>
620 /// The WM_NCRBUTTONDOWN message is posted when the user presses the right mouse button while the cursor is within the
621 /// nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured
622 /// the mouse, this message is not posted.
623 /// </summary>
624 NCRBUTTONDOWN = 0x00A4,
625  
626 /// <summary>
627 /// The WM_NCRBUTTONUP message is posted when the user releases the right mouse button while the cursor is within the
628 /// nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured
629 /// the mouse, this message is not posted.
630 /// </summary>
631 NCRBUTTONUP = 0x00A5,
632  
633 /// <summary>
634 /// The WM_NCRBUTTONDBLCLK message is posted when the user double-clicks the right mouse button while the cursor is
635 /// within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window
636 /// has captured the mouse, this message is not posted.
637 /// </summary>
638 NCRBUTTONDBLCLK = 0x00A6,
639  
640 /// <summary>
641 /// The WM_NCMBUTTONDOWN message is posted when the user presses the middle mouse button while the cursor is within the
642 /// nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured
643 /// the mouse, this message is not posted.
644 /// </summary>
645 NCMBUTTONDOWN = 0x00A7,
646  
647 /// <summary>
648 /// The WM_NCMBUTTONUP message is posted when the user releases the middle mouse button while the cursor is within the
649 /// nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured
650 /// the mouse, this message is not posted.
651 /// </summary>
652 NCMBUTTONUP = 0x00A8,
653  
654 /// <summary>
655 /// The WM_NCMBUTTONDBLCLK message is posted when the user double-clicks the middle mouse button while the cursor is
656 /// within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window
657 /// has captured the mouse, this message is not posted.
658 /// </summary>
659 NCMBUTTONDBLCLK = 0x00A9,
660  
661 /// <summary>
662 /// The WM_NCXBUTTONDOWN message is posted when the user presses the first or second X button while the cursor is in
663 /// the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has
664 /// captured the mouse, this message is not posted.
665 /// </summary>
666 NCXBUTTONDOWN = 0x00AB,
667  
668 /// <summary>
669 /// The WM_NCXBUTTONUP message is posted when the user releases the first or second X button while the cursor is in the
670 /// nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured
671 /// the mouse, this message is not posted.
672 /// </summary>
673 NCXBUTTONUP = 0x00AC,
674  
675 /// <summary>
676 /// The WM_NCXBUTTONDBLCLK message is posted when the user double-clicks the first or second X button while the cursor
677 /// is in the nonclient area of a window. This message is posted to the window that contains the cursor. If a window
678 /// has captured the mouse, this message is not posted.
679 /// </summary>
680 NCXBUTTONDBLCLK = 0x00AD,
681  
682 /// <summary>
683 /// The WM_INPUT_DEVICE_CHANGE message is sent to the window that registered to receive raw input. A window receives
684 /// this message through its WindowProc function.
685 /// </summary>
686 INPUT_DEVICE_CHANGE = 0x00FE,
687  
688 /// <summary>
689 /// The WM_INPUT message is sent to the window that is getting raw input.
690 /// </summary>
691 INPUT = 0x00FF,
692  
693 /// <summary>
694 /// This message filters for keyboard messages.
695 /// </summary>
696 KEYFIRST = 0x0100,
697  
698 /// <summary>
699 /// The WM_KEYDOWN message is posted to the window with the keyboard focus when a nonsystem key is pressed. A nonsystem
700 /// key is a key that is pressed when the ALT key is not pressed.
701 /// </summary>
702 KEYDOWN = 0x0100,
703  
704 /// <summary>
705 /// The WM_KEYUP message is posted to the window with the keyboard focus when a nonsystem key is released. A nonsystem
706 /// 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
707 /// the keyboard focus.
708 /// </summary>
709 KEYUP = 0x0101,
710  
711 /// <summary>
712 /// The WM_CHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the
713 /// TranslateMessage function. The WM_CHAR message contains the character code of the key that was pressed.
714 /// </summary>
715 CHAR = 0x0102,
716  
717 /// <summary>
718 /// The WM_DEADCHAR message is posted to the window with the keyboard focus when a WM_KEYUP message is translated by
719 /// the TranslateMessage function. WM_DEADCHAR specifies a character code generated by a dead key. A dead key is a key
720 /// that generates a character, such as the umlaut (double-dot), that is combined with another character to form a
721 /// composite character. For example, the umlaut-O character (Ö) is generated by typing the dead key for the umlaut
722 /// character, and then typing the O key.
723 /// </summary>
724 DEADCHAR = 0x0103,
725  
726 /// <summary>
727 /// The WM_SYSKEYDOWN message is posted to the window with the keyboard focus when the user presses the F10 key (which
728 /// activates the menu bar) or holds down the ALT key and then presses another key. It also occurs when no window
729 /// currently has the keyboard focus; in this case, the WM_SYSKEYDOWN message is sent to the active window. The window
730 /// that receives the message can distinguish between these two contexts by checking the context code in the lParam
731 /// parameter.
732 /// </summary>
733 SYSKEYDOWN = 0x0104,
734  
735 /// <summary>
736 /// The WM_SYSKEYUP message is posted to the window with the keyboard focus when the user releases a key that was
737 /// pressed while the ALT key was held down. It also occurs when no window currently has the keyboard focus; in this
738 /// case, the WM_SYSKEYUP message is sent to the active window. The window that receives the message can distinguish
739 /// between these two contexts by checking the context code in the lParam parameter.
740 /// </summary>
741 SYSKEYUP = 0x0105,
742  
743 /// <summary>
744 /// The WM_SYSCHAR message is posted to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated
745 /// by the TranslateMessage function. It specifies the character code of a system character key — that is, a character
746 /// key that is pressed while the ALT key is down.
747 /// </summary>
748 SYSCHAR = 0x0106,
749  
750 /// <summary>
751 /// The WM_SYSDEADCHAR message is sent to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated
752 /// by the TranslateMessage function. WM_SYSDEADCHAR specifies the character code of a system dead key — that is, a
753 /// dead key that is pressed while holding down the ALT key.
754 /// </summary>
755 SYSDEADCHAR = 0x0107,
756  
757 /// <summary>
758 /// The WM_UNICHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by
759 /// the TranslateMessage function. The WM_UNICHAR message contains the character code of the key that was pressed.
760 /// The WM_UNICHAR message is equivalent to WM_CHAR, but it uses Unicode Transformation Format (UTF)-32, whereas
761 /// WM_CHAR uses UTF-16. It is designed to send or post Unicode characters to ANSI windows and it can can handle
762 /// Unicode Supplementary Plane characters.
763 /// </summary>
764 UNICHAR = 0x0109,
765  
766 /// <summary>
767 /// This message filters for keyboard messages.
768 /// </summary>
769 KEYLAST = 0x0108,
770  
771 /// <summary>
772 /// Sent immediately before the IME generates the composition string as a result of a keystroke. A window receives this
773 /// message through its WindowProc function.
774 /// </summary>
775 IME_STARTCOMPOSITION = 0x010D,
776  
777 /// <summary>
778 /// Sent to an application when the IME ends composition. A window receives this message through its WindowProc
779 /// function.
780 /// </summary>
781 IME_ENDCOMPOSITION = 0x010E,
782  
783 /// <summary>
784 /// Sent to an application when the IME changes composition status as a result of a keystroke. A window receives this
785 /// message through its WindowProc function.
786 /// </summary>
787 IME_COMPOSITION = 0x010F,
788  
789 IME_KEYLAST = 0x010F,
790  
791 /// <summary>
792 /// The WM_INITDIALOG message is sent to the dialog box procedure immediately before a dialog box is displayed. Dialog
793 /// box procedures typically use this message to initialize controls and carry out any other initialization tasks that
794 /// affect the appearance of the dialog box.
795 /// </summary>
796 INITDIALOG = 0x0110,
797  
798 /// <summary>
799 /// The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a
800 /// notification message to its parent window, or when an accelerator keystroke is translated.
801 /// </summary>
802 COMMAND = 0x0111,
803  
804 /// <summary>
805 /// A window receives this message when the user chooses a command from the Window menu, clicks the maximize button,
806 /// minimize button, restore button, close button, or moves the form. You can stop the form from moving by filtering
807 /// this out.
808 /// </summary>
809 SYSCOMMAND = 0x0112,
810  
811 /// <summary>
812 /// The WM_TIMER message is posted to the installing thread's message queue when a timer expires. The message is posted
813 /// by the GetMessage or PeekMessage function.
814 /// </summary>
815 TIMER = 0x0113,
816  
817 /// <summary>
818 /// The WM_HSCROLL message is sent to a window when a scroll event occurs in the window's standard horizontal scroll
819 /// bar. This message is also sent to the owner of a horizontal scroll bar control when a scroll event occurs in the
820 /// control.
821 /// </summary>
822 HSCROLL = 0x0114,
823  
824 /// <summary>
825 /// The WM_VSCROLL message is sent to a window when a scroll event occurs in the window's standard vertical scroll bar.
826 /// This message is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control.
827 /// </summary>
828 VSCROLL = 0x0115,
829  
830 /// <summary>
831 /// The WM_INITMENU message is sent when a menu is about to become active. It occurs when the user clicks an item on
832 /// the menu bar or presses a menu key. This allows the application to modify the menu before it is displayed.
833 /// </summary>
834 INITMENU = 0x0116,
835  
836 /// <summary>
837 /// The WM_INITMENUPOPUP message is sent when a drop-down menu or submenu is about to become active. This allows an
838 /// application to modify the menu before it is displayed, without changing the entire menu.
839 /// </summary>
840 INITMENUPOPUP = 0x0117,
841  
842 /// <summary>
843 /// The WM_MENUSELECT message is sent to a menu's owner window when the user selects a menu item.
844 /// </summary>
845 MENUSELECT = 0x011F,
846  
847 /// <summary>
848 /// The WM_MENUCHAR message is sent when a menu is active and the user presses a key that does not correspond to any
849 /// mnemonic or accelerator key. This message is sent to the window that owns the menu.
850 /// </summary>
851 MENUCHAR = 0x0120,
852  
853 /// <summary>
854 /// The WM_ENTERIDLE message is sent to the owner window of a modal dialog box or menu that is entering an idle state.
855 /// A modal dialog box or menu enters an idle state when no messages are waiting in its queue after it has processed
856 /// one or more previous messages.
857 /// </summary>
858 ENTERIDLE = 0x0121,
859  
860 /// <summary>
861 /// The WM_MENURBUTTONUP message is sent when the user releases the right mouse button while the cursor is on a menu
862 /// item.
863 /// </summary>
864 MENURBUTTONUP = 0x0122,
865  
866 /// <summary>
867 /// The WM_MENUDRAG message is sent to the owner of a drag-and-drop menu when the user drags a menu item.
868 /// </summary>
869 MENUDRAG = 0x0123,
870  
871 /// <summary>
872 /// The WM_MENUGETOBJECT message is sent to the owner of a drag-and-drop menu when the mouse cursor enters a menu item
873 /// or moves from the center of the item to the top or bottom of the item.
874 /// </summary>
875 MENUGETOBJECT = 0x0124,
876  
877 /// <summary>
878 /// The WM_UNINITMENUPOPUP message is sent when a drop-down menu or submenu has been destroyed.
879 /// </summary>
880 UNINITMENUPOPUP = 0x0125,
881  
882 /// <summary>
883 /// The WM_MENUCOMMAND message is sent when the user makes a selection from a menu.
884 /// </summary>
885 MENUCOMMAND = 0x0126,
886  
887 /// <summary>
888 /// An application sends the WM_CHANGEUISTATE message to indicate that the user interface (UI) state should be changed.
889 /// </summary>
890 CHANGEUISTATE = 0x0127,
891  
892 /// <summary>
893 /// An application sends the WM_UPDATEUISTATE message to change the user interface (UI) state for the specified window
894 /// and all its child windows.
895 /// </summary>
896 UPDATEUISTATE = 0x0128,
897  
898 /// <summary>
899 /// An application sends the WM_QUERYUISTATE message to retrieve the user interface (UI) state for a window.
900 /// </summary>
901 QUERYUISTATE = 0x0129,
902  
903 /// <summary>
904 /// The WM_CTLCOLORMSGBOX message is sent to the owner window of a message box before Windows draws the message box. By
905 /// responding to this message, the owner window can set the text and background colors of the message box by using the
906 /// given display device context handle.
907 /// </summary>
908 CTLCOLORMSGBOX = 0x0132,
909  
910 /// <summary>
911 /// An edit control that is not read-only or disabled sends the WM_CTLCOLOREDIT message to its parent window when the
912 /// control is about to be drawn. By responding to this message, the parent window can use the specified device context
913 /// handle to set the text and background colors of the edit control.
914 /// </summary>
915 CTLCOLOREDIT = 0x0133,
916  
917 /// <summary>
918 /// Sent to the parent window of a list box before the system draws the list box. By responding to this message, the
919 /// parent window can set the text and background colors of the list box by using the specified display device context
920 /// handle.
921 /// </summary>
922 CTLCOLORLISTBOX = 0x0134,
923  
924 /// <summary>
925 /// The WM_CTLCOLORBTN message is sent to the parent window of a button before drawing the button. The parent window
926 /// can change the button's text and background colors. However, only owner-drawn buttons respond to the parent window
927 /// processing this message.
928 /// </summary>
929 CTLCOLORBTN = 0x0135,
930  
931 /// <summary>
932 /// The WM_CTLCOLORDLG message is sent to a dialog box before the system draws the dialog box. By responding to this
933 /// message, the dialog box can set its text and background colors using the specified display device context handle.
934 /// </summary>
935 CTLCOLORDLG = 0x0136,
936  
937 /// <summary>
938 /// The WM_CTLCOLORSCROLLBAR message is sent to the parent window of a scroll bar control when the control is about to
939 /// be drawn. By responding to this message, the parent window can use the display context handle to set the background
940 /// color of the scroll bar control.
941 /// </summary>
942 CTLCOLORSCROLLBAR = 0x0137,
943  
944 /// <summary>
945 /// A static control, or an edit control that is read-only or disabled, sends the WM_CTLCOLORSTATIC message to its
946 /// parent window when the control is about to be drawn. By responding to this message, the parent window can use the
947 /// specified device context handle to set the text and background colors of the static control.
948 /// </summary>
949 CTLCOLORSTATIC = 0x0138,
950  
951 /// <summary>
952 /// Use WM_MOUSEFIRST to specify the first mouse message. Use the PeekMessage() Function.
953 /// </summary>
954 MOUSEFIRST = 0x0200,
955  
956 /// <summary>
957 /// The WM_MOUSEMOVE message is posted to a window when the cursor moves. If the mouse is not captured, the message is
958 /// posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the
959 /// mouse.
960 /// </summary>
961 MOUSEMOVE = 0x0200,
962  
963 /// <summary>
964 /// The WM_LBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is in the client
965 /// area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise,
966 /// the message is posted to the window that has captured the mouse.
967 /// </summary>
968 LBUTTONDOWN = 0x0201,
969  
970 /// <summary>
971 /// The WM_LBUTTONUP message is posted when the user releases the left mouse button while the cursor is in the client
972 /// area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise,
973 /// the message is posted to the window that has captured the mouse.
974 /// </summary>
975 LBUTTONUP = 0x0202,
976  
977 /// <summary>
978 /// The WM_LBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is in the
979 /// client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor.
980 /// Otherwise, the message is posted to the window that has captured the mouse.
981 /// </summary>
982 LBUTTONDBLCLK = 0x0203,
983  
984 /// <summary>
985 /// The WM_RBUTTONDOWN message is posted when the user presses the right mouse button while the cursor is in the client
986 /// area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise,
987 /// the message is posted to the window that has captured the mouse.
988 /// </summary>
989 RBUTTONDOWN = 0x0204,
990  
991 /// <summary>
992 /// The WM_RBUTTONUP message is posted when the user releases the right mouse button while the cursor is in the client
993 /// area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise,
994 /// the message is posted to the window that has captured the mouse.
995 /// </summary>
996 RBUTTONUP = 0x0205,
997  
998 /// <summary>
999 /// The WM_RBUTTONDBLCLK message is posted when the user double-clicks the right mouse button while the cursor is in
1000 /// the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor.
1001 /// Otherwise, the message is posted to the window that has captured the mouse.
1002 /// </summary>
1003 RBUTTONDBLCLK = 0x0206,
1004  
1005 /// <summary>
1006 /// The WM_MBUTTONDOWN message is posted when the user presses the middle mouse button while the cursor is in the
1007 /// client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor.
1008 /// Otherwise, the message is posted to the window that has captured the mouse.
1009 /// </summary>
1010 MBUTTONDOWN = 0x0207,
1011  
1012 /// <summary>
1013 /// The WM_MBUTTONUP message is posted when the user releases the middle mouse button while the cursor is in the client
1014 /// area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise,
1015 /// the message is posted to the window that has captured the mouse.
1016 /// </summary>
1017 MBUTTONUP = 0x0208,
1018  
1019 /// <summary>
1020 /// The WM_MBUTTONDBLCLK message is posted when the user double-clicks the middle mouse button while the cursor is in
1021 /// the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor.
1022 /// Otherwise, the message is posted to the window that has captured the mouse.
1023 /// </summary>
1024 MBUTTONDBLCLK = 0x0209,
1025  
1026 /// <summary>
1027 /// The WM_MOUSEWHEEL message is sent to the focus window when the mouse wheel is rotated. The DefWindowProc function
1028 /// propagates the message to the window's parent. There should be no internal forwarding of the message, since
1029 /// DefWindowProc propagates it up the parent chain until it finds a window that processes it.
1030 /// </summary>
1031 MOUSEWHEEL = 0x020A,
1032  
1033 /// <summary>
1034 /// The WM_XBUTTONDOWN message is posted when the user presses the first or second X button while the cursor is in the
1035 /// client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor.
1036 /// Otherwise, the message is posted to the window that has captured the mouse.
1037 /// </summary>
1038 XBUTTONDOWN = 0x020B,
1039  
1040 /// <summary>
1041 /// The WM_XBUTTONUP message is posted when the user releases the first or second X button while the cursor is in the
1042 /// client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor.
1043 /// Otherwise, the message is posted to the window that has captured the mouse.
1044 /// </summary>
1045 XBUTTONUP = 0x020C,
1046  
1047 /// <summary>
1048 /// The WM_XBUTTONDBLCLK message is posted when the user double-clicks the first or second X button while the cursor is
1049 /// in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the
1050 /// cursor. Otherwise, the message is posted to the window that has captured the mouse.
1051 /// </summary>
1052 XBUTTONDBLCLK = 0x020D,
1053  
1054 /// <summary>
1055 /// The WM_MOUSEHWHEEL message is sent to the focus window when the mouse's horizontal scroll wheel is tilted or
1056 /// rotated. The DefWindowProc function propagates the message to the window's parent. There should be no internal
1057 /// forwarding of the message, since DefWindowProc propagates it up the parent chain until it finds a window that
1058 /// processes it.
1059 /// </summary>
1060 MOUSEHWHEEL = 0x020E,
1061  
1062 /// <summary>
1063 /// Use WM_MOUSELAST to specify the last mouse message. Used with PeekMessage() Function.
1064 /// </summary>
1065 MOUSELAST = 0x020E,
1066  
1067 /// <summary>
1068 /// The WM_PARENTNOTIFY message is sent to the parent of a child window when the child window is created or destroyed,
1069 /// or when the user clicks a mouse button while the cursor is over the child window. When the child window is being
1070 /// created, the system sends WM_PARENTNOTIFY just before the CreateWindow or CreateWindowEx function that creates the
1071 /// window returns. When the child window is being destroyed, the system sends the message before any processing to
1072 /// destroy the window takes place.
1073 /// </summary>
1074 PARENTNOTIFY = 0x0210,
1075  
1076 /// <summary>
1077 /// The WM_ENTERMENULOOP message informs an application's main window procedure that a menu modal loop has been
1078 /// entered.
1079 /// </summary>
1080 ENTERMENULOOP = 0x0211,
1081  
1082 /// <summary>
1083 /// The WM_EXITMENULOOP message informs an application's main window procedure that a menu modal loop has been exited.
1084 /// </summary>
1085 EXITMENULOOP = 0x0212,
1086  
1087 /// <summary>
1088 /// The WM_NEXTMENU message is sent to an application when the right or left arrow key is used to switch between the
1089 /// menu bar and the system menu.
1090 /// </summary>
1091 NEXTMENU = 0x0213,
1092  
1093 /// <summary>
1094 /// The WM_SIZING message is sent to a window that the user is resizing. By processing this message, an application can
1095 /// monitor the size and position of the drag rectangle and, if needed, change its size or position.
1096 /// </summary>
1097 SIZING = 0x0214,
1098  
1099 /// <summary>
1100 /// The WM_CAPTURECHANGED message is sent to the window that is losing the mouse capture.
1101 /// </summary>
1102 CAPTURECHANGED = 0x0215,
1103  
1104 /// <summary>
1105 /// The WM_MOVING message is sent to a window that the user is moving. By processing this message, an application can
1106 /// monitor the position of the drag rectangle and, if needed, change its position.
1107 /// </summary>
1108 MOVING = 0x0216,
1109  
1110 /// <summary>
1111 /// Notifies applications that a power-management event has occurred.
1112 /// </summary>
1113 POWERBROADCAST = 0x0218,
1114  
1115 /// <summary>
1116 /// Notifies an application of a change to the hardware configuration of a device or the computer.
1117 /// </summary>
1118 DEVICECHANGE = 0x0219,
1119  
1120 /// <summary>
1121 /// An application sends the WM_MDICREATE message to a multiple-document interface (MDI) client window to create an MDI
1122 /// child window.
1123 /// </summary>
1124 MDICREATE = 0x0220,
1125  
1126 /// <summary>
1127 /// An application sends the WM_MDIDESTROY message to a multiple-document interface (MDI) client window to close an MDI
1128 /// child window.
1129 /// </summary>
1130 MDIDESTROY = 0x0221,
1131  
1132 /// <summary>
1133 /// An application sends the WM_MDIACTIVATE message to a multiple-document interface (MDI) client window to instruct
1134 /// the client window to activate a different MDI child window.
1135 /// </summary>
1136 MDIACTIVATE = 0x0222,
1137  
1138 /// <summary>
1139 /// An application sends the WM_MDIRESTORE message to a multiple-document interface (MDI) client window to restore an
1140 /// MDI child window from maximized or minimized size.
1141 /// </summary>
1142 MDIRESTORE = 0x0223,
1143  
1144 /// <summary>
1145 /// An application sends the WM_MDINEXT message to a multiple-document interface (MDI) client window to activate the
1146 /// next or previous child window.
1147 /// </summary>
1148 MDINEXT = 0x0224,
1149  
1150 /// <summary>
1151 /// An application sends the WM_MDIMAXIMIZE message to a multiple-document interface (MDI) client window to maximize an
1152 /// MDI child window. The system resizes the child window to make its client area fill the client window. The system
1153 /// places the child window's window menu icon in the rightmost position of the frame window's menu bar, and places the
1154 /// child window's restore icon in the leftmost position. The system also appends the title bar text of the child
1155 /// window to that of the frame window.
1156 /// </summary>
1157 MDIMAXIMIZE = 0x0225,
1158  
1159 /// <summary>
1160 /// An application sends the WM_MDITILE message to a multiple-document interface (MDI) client window to arrange all of
1161 /// its MDI child windows in a tile format.
1162 /// </summary>
1163 MDITILE = 0x0226,
1164  
1165 /// <summary>
1166 /// An application sends the WM_MDICASCADE message to a multiple-document interface (MDI) client window to arrange all
1167 /// its child windows in a cascade format.
1168 /// </summary>
1169 MDICASCADE = 0x0227,
1170  
1171 /// <summary>
1172 /// An application sends the WM_MDIICONARRANGE message to a multiple-document interface (MDI) client window to arrange
1173 /// all minimized MDI child windows. It does not affect child windows that are not minimized.
1174 /// </summary>
1175 MDIICONARRANGE = 0x0228,
1176  
1177 /// <summary>
1178 /// An application sends the WM_MDIGETACTIVE message to a multiple-document interface (MDI) client window to retrieve
1179 /// the handle to the active MDI child window.
1180 /// </summary>
1181 MDIGETACTIVE = 0x0229,
1182  
1183 /// <summary>
1184 /// An application sends the WM_MDISETMENU message to a multiple-document interface (MDI) client window to replace the
1185 /// entire menu of an MDI frame window, to replace the window menu of the frame window, or both.
1186 /// </summary>
1187 MDISETMENU = 0x0230,
1188  
1189 /// <summary>
1190 /// The WM_ENTERSIZEMOVE message is sent one time to a window after it enters the moving or sizing modal loop. The
1191 /// window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when
1192 /// the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message
1193 /// specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns.
1194 /// The system sends the WM_ENTERSIZEMOVE message regardless of whether the dragging of full windows is enabled.
1195 /// </summary>
1196 ENTERSIZEMOVE = 0x0231,
1197  
1198 /// <summary>
1199 /// The WM_EXITSIZEMOVE message is sent one time to a window, after it has exited the moving or sizing modal loop. The
1200 /// window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when
1201 /// the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message
1202 /// specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns.
1203 /// </summary>
1204 EXITSIZEMOVE = 0x0232,
1205  
1206 /// <summary>
1207 /// Sent when the user drops a file on the window of an application that has registered itself as a recipient of
1208 /// dropped files.
1209 /// </summary>
1210 DROPFILES = 0x0233,
1211  
1212 /// <summary>
1213 /// An application sends the WM_MDIREFRESHMENU message to a multiple-document interface (MDI) client window to refresh
1214 /// the window menu of the MDI frame window.
1215 /// </summary>
1216 MDIREFRESHMENU = 0x0234,
1217  
1218 /// <summary>
1219 /// Sent to an application when a window is activated. A window receives this message through its WindowProc function.
1220 /// </summary>
1221 IME_SETCONTEXT = 0x0281,
1222  
1223 /// <summary>
1224 /// Sent to an application to notify it of changes to the IME window. A window receives this message through its
1225 /// WindowProc function.
1226 /// </summary>
1227 IME_NOTIFY = 0x0282,
1228  
1229 /// <summary>
1230 /// Sent by an application to direct the IME window to carry out the requested command. The application uses this
1231 /// message to control the IME window that it has created. To send this message, the application calls the SendMessage
1232 /// function with the following parameters.
1233 /// </summary>
1234 IME_CONTROL = 0x0283,
1235  
1236 /// <summary>
1237 /// Sent to an application when the IME window finds no space to extend the area for the composition window. A window
1238 /// receives this message through its WindowProc function.
1239 /// </summary>
1240 IME_COMPOSITIONFULL = 0x0284,
1241  
1242 /// <summary>
1243 /// Sent to an application when the operating system is about to change the current IME. A window receives this message
1244 /// through its WindowProc function.
1245 /// </summary>
1246 IME_SELECT = 0x0285,
1247  
1248 /// <summary>
1249 /// Sent to an application when the IME gets a character of the conversion result. A window receives this message
1250 /// through its WindowProc function.
1251 /// </summary>
1252 IME_CHAR = 0x0286,
1253  
1254 /// <summary>
1255 /// Sent to an application to provide commands and request information. A window receives this message through its
1256 /// WindowProc function.
1257 /// </summary>
1258 IME_REQUEST = 0x0288,
1259  
1260 /// <summary>
1261 /// Sent to an application by the IME to notify the application of a key press and to keep message order. A window
1262 /// receives this message through its WindowProc function.
1263 /// </summary>
1264 IME_KEYDOWN = 0x0290,
1265  
1266 /// <summary>
1267 /// Sent to an application by the IME to notify the application of a key release and to keep message order. A window
1268 /// receives this message through its WindowProc function.
1269 /// </summary>
1270 IME_KEYUP = 0x0291,
1271  
1272 /// <summary>
1273 /// The WM_MOUSEHOVER message is posted to a window when the cursor hovers over the client area of the window for the
1274 /// period of time specified in a prior call to TrackMouseEvent.
1275 /// </summary>
1276 MOUSEHOVER = 0x02A1,
1277  
1278 /// <summary>
1279 /// The WM_MOUSELEAVE message is posted to a window when the cursor leaves the client area of the window specified in a
1280 /// prior call to TrackMouseEvent.
1281 /// </summary>
1282 MOUSELEAVE = 0x02A3,
1283  
1284 /// <summary>
1285 /// The WM_NCMOUSEHOVER message is posted to a window when the cursor hovers over the nonclient area of the window for
1286 /// the period of time specified in a prior call to TrackMouseEvent.
1287 /// </summary>
1288 NCMOUSEHOVER = 0x02A0,
1289  
1290 /// <summary>
1291 /// The WM_NCMOUSELEAVE message is posted to a window when the cursor leaves the nonclient area of the window specified
1292 /// in a prior call to TrackMouseEvent.
1293 /// </summary>
1294 NCMOUSELEAVE = 0x02A2,
1295  
1296 /// <summary>
1297 /// The WM_WTSSESSION_CHANGE message notifies applications of changes in session state.
1298 /// </summary>
1299 WTSSESSION_CHANGE = 0x02B1,
1300  
1301 TABLET_FIRST = 0x02c0,
1302  
1303 TABLET_LAST = 0x02df,
1304  
1305 /// <summary>
1306 /// An application sends a WM_CUT message to an edit control or combo box to delete (cut) the current selection, if
1307 /// any, in the edit control and copy the deleted text to the clipboard in CF_TEXT format.
1308 /// </summary>
1309 CUT = 0x0300,
1310  
1311 /// <summary>
1312 /// An application sends the WM_COPY message to an edit control or combo box to copy the current selection to the
1313 /// clipboard in CF_TEXT format.
1314 /// </summary>
1315 COPY = 0x0301,
1316  
1317 /// <summary>
1318 /// An application sends a WM_PASTE message to an edit control or combo box to copy the current content of the
1319 /// clipboard to the edit control at the current caret position. Data is inserted only if the clipboard contains data
1320 /// in CF_TEXT format.
1321 /// </summary>
1322 PASTE = 0x0302,
1323  
1324 /// <summary>
1325 /// An application sends a WM_CLEAR message to an edit control or combo box to delete (clear) the current selection, if
1326 /// any, from the edit control.
1327 /// </summary>
1328 CLEAR = 0x0303,
1329  
1330 /// <summary>
1331 /// An application sends a WM_UNDO message to an edit control to undo the last operation. When this message is sent to
1332 /// an edit control, the previously deleted text is restored or the previously added text is deleted.
1333 /// </summary>
1334 UNDO = 0x0304,
1335  
1336 /// <summary>
1337 /// The WM_RENDERFORMAT message is sent to the clipboard owner if it has delayed rendering a specific clipboard format
1338 /// and if an application has requested data in that format. The clipboard owner must render data in the specified
1339 /// format and place it on the clipboard by calling the SetClipboardData function.
1340 /// </summary>
1341 RENDERFORMAT = 0x0305,
1342  
1343 /// <summary>
1344 /// The WM_RENDERALLFORMATS message is sent to the clipboard owner before it is destroyed, if the clipboard owner has
1345 /// delayed rendering one or more clipboard formats. For the content of the clipboard to remain available to other
1346 /// applications, the clipboard owner must render data in all the formats it is capable of generating, and place the
1347 /// data on the clipboard by calling the SetClipboardData function.
1348 /// </summary>
1349 RENDERALLFORMATS = 0x0306,
1350  
1351 /// <summary>
1352 /// The WM_DESTROYCLIPBOARD message is sent to the clipboard owner when a call to the EmptyClipboard function empties
1353 /// the clipboard.
1354 /// </summary>
1355 DESTROYCLIPBOARD = 0x0307,
1356  
1357 /// <summary>
1358 /// The WM_DRAWCLIPBOARD message is sent to the first window in the clipboard viewer chain when the content of the
1359 /// clipboard changes. This enables a clipboard viewer window to display the new content of the clipboard.
1360 /// </summary>
1361 DRAWCLIPBOARD = 0x0308,
1362  
1363 /// <summary>
1364 /// The WM_PAINTCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard
1365 /// contains data in the CF_OWNERDISPLAY format and the clipboard viewer's client area needs repainting.
1366 /// </summary>
1367 PAINTCLIPBOARD = 0x0309,
1368  
1369 /// <summary>
1370 /// The WM_VSCROLLCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard
1371 /// contains data in the CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's vertical scroll bar. The
1372 /// owner should scroll the clipboard image and update the scroll bar values.
1373 /// </summary>
1374 VSCROLLCLIPBOARD = 0x030A,
1375  
1376 /// <summary>
1377 /// The WM_SIZECLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard
1378 /// contains data in the CF_OWNERDISPLAY format and the clipboard viewer's client area has changed size.
1379 /// </summary>
1380 SIZECLIPBOARD = 0x030B,
1381  
1382 /// <summary>
1383 /// The WM_ASKCBFORMATNAME message is sent to the clipboard owner by a clipboard viewer window to request the name of a
1384 /// CF_OWNERDISPLAY clipboard format.
1385 /// </summary>
1386 ASKCBFORMATNAME = 0x030C,
1387  
1388 /// <summary>
1389 /// The WM_CHANGECBCHAIN message is sent to the first window in the clipboard viewer chain when a window is being
1390 /// removed from the chain.
1391 /// </summary>
1392 CHANGECBCHAIN = 0x030D,
1393  
1394 /// <summary>
1395 /// The WM_HSCROLLCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window. This occurs when the
1396 /// clipboard contains data in the CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's horizontal
1397 /// scroll bar. The owner should scroll the clipboard image and update the scroll bar values.
1398 /// </summary>
1399 HSCROLLCLIPBOARD = 0x030E,
1400  
1401 /// <summary>
1402 /// This message informs a window that it is about to receive the keyboard focus, giving the window the opportunity to
1403 /// realize its logical palette when it receives the focus.
1404 /// </summary>
1405 QUERYNEWPALETTE = 0x030F,
1406  
1407 /// <summary>
1408 /// The WM_PALETTEISCHANGING message informs applications that an application is going to realize its logical palette.
1409 /// </summary>
1410 PALETTEISCHANGING = 0x0310,
1411  
1412 /// <summary>
1413 /// This message is sent by the OS to all top-level and overlapped windows after the window with the keyboard focus
1414 /// realizes its logical palette.
1415 /// This message enables windows that do not have the keyboard focus to realize their logical palettes and update their
1416 /// client areas.
1417 /// </summary>
1418 PALETTECHANGED = 0x0311,
1419  
1420 /// <summary>
1421 /// The WM_HOTKEY message is posted when the user presses a hot key registered by the RegisterHotKey function. The
1422 /// message is placed at the top of the message queue associated with the thread that registered the hot key.
1423 /// </summary>
1424 HOTKEY = 0x0312,
1425  
1426 /// <summary>
1427 /// The WM_PRINT message is sent to a window to request that it draw itself in the specified device context, most
1428 /// commonly in a printer device context.
1429 /// </summary>
1430 PRINT = 0x0317,
1431  
1432 /// <summary>
1433 /// The WM_PRINTCLIENT message is sent to a window to request that it draw its client area in the specified device
1434 /// context, most commonly in a printer device context.
1435 /// </summary>
1436 PRINTCLIENT = 0x0318,
1437  
1438 /// <summary>
1439 /// The WM_APPCOMMAND message notifies a window that the user generated an application command event, for example, by
1440 /// clicking an application command button using the mouse or typing an application command key on the keyboard.
1441 /// </summary>
1442 APPCOMMAND = 0x0319,
1443  
1444 /// <summary>
1445 /// The WM_THEMECHANGED message is broadcast to every window following a theme change event. Examples of theme change
1446 /// events are the activation of a theme, the deactivation of a theme, or a transition from one theme to another.
1447 /// </summary>
1448 THEMECHANGED = 0x031A,
1449  
1450 /// <summary>
1451 /// Sent when the contents of the clipboard have changed.
1452 /// </summary>
1453 CLIPBOARDUPDATE = 0x031D,
1454  
1455 /// <summary>
1456 /// The system will send a window the WM_DWMCOMPOSITIONCHANGED message to indicate that the availability of desktop
1457 /// composition has changed.
1458 /// </summary>
1459 DWMCOMPOSITIONCHANGED = 0x031E,
1460  
1461 /// <summary>
1462 /// WM_DWMNCRENDERINGCHANGED is called when the non-client area rendering status of a window has changed. Only windows
1463 /// that have set the flag DWM_BLURBEHIND.fTransitionOnMaximized to true will get this message.
1464 /// </summary>
1465 DWMNCRENDERINGCHANGED = 0x031F,
1466  
1467 /// <summary>
1468 /// Sent to all top-level windows when the colorization color has changed.
1469 /// </summary>
1470 DWMCOLORIZATIONCOLORCHANGED = 0x0320,
1471  
1472 /// <summary>
1473 /// WM_DWMWINDOWMAXIMIZEDCHANGE will let you know when a DWM composed window is maximized. You also have to register
1474 /// for this message as well. You'd have other windowd go opaque when this message is sent.
1475 /// </summary>
1476 DWMWINDOWMAXIMIZEDCHANGE = 0x0321,
1477  
1478 /// <summary>
1479 /// Sent to request extended title bar information. A window receives this message through its WindowProc function.
1480 /// </summary>
1481 GETTITLEBARINFOEX = 0x033F,
1482  
1483 HANDHELDFIRST = 0x0358,
1484  
1485 HANDHELDLAST = 0x035F,
1486  
1487 AFXFIRST = 0x0360,
1488  
1489 AFXLAST = 0x037F,
1490  
1491 PENWINFIRST = 0x0380,
1492  
1493 PENWINLAST = 0x038F,
1494  
1495 /// <summary>
1496 /// The WM_APP constant is used by applications to help define private messages, usually of the form WM_APP+X, where X
1497 /// is an integer value.
1498 /// </summary>
1499 APP = 0x8000,
1500  
1501 /// <summary>
1502 /// The WM_USER constant is used by applications to help define private messages for use by private window classes,
1503 /// usually of the form WM_USER+X, where X is an integer value.
1504 /// </summary>
1505 USER = 0x0400,
1506  
1507 /// <summary>
1508 /// An application sends the WM_CPL_LAUNCH message to Windows Control Panel to request that a Control Panel application
1509 /// be started.
1510 /// </summary>
1511 CPL_LAUNCH = USER + 0x1000,
1512  
1513 /// <summary>
1514 /// The WM_CPL_LAUNCHED message is sent when a Control Panel application, started by the WM_CPL_LAUNCH message, has
1515 /// closed. The WM_CPL_LAUNCHED message is sent to the window identified by the wParam parameter of the WM_CPL_LAUNCH
1516 /// message that started the application.
1517 /// </summary>
1518 CPL_LAUNCHED = USER + 0x1001,
1519  
1520 /// <summary>
1521 /// WM_SYSTIMER is a well-known yet still undocumented message. Windows uses WM_SYSTIMER for internal actions like
1522 /// scrolling.
1523 /// </summary>
1524 SYSTIMER = 0x118,
1525  
1526 /// <summary>
1527 /// The accessibility state has changed.
1528 /// </summary>
1529 HSHELL_ACCESSIBILITYSTATE = 11,
1530  
1531 /// <summary>
1532 /// The shell should activate its main window.
1533 /// </summary>
1534 HSHELL_ACTIVATESHELLWINDOW = 3,
1535  
1536 /// <summary>
1537 /// The user completed an input event (for example, pressed an application command button on the mouse or an
1538 /// application command key on the keyboard), and the application did not handle the WM_APPCOMMAND message generated by
1539 /// that input.
1540 /// If the Shell procedure handles the WM_COMMAND message, it should not call CallNextHookEx. See the Return Value
1541 /// section for more information.
1542 /// </summary>
1543 HSHELL_APPCOMMAND = 12,
1544  
1545 /// <summary>
1546 /// A window is being minimized or maximized. The system needs the coordinates of the minimized rectangle for the
1547 /// window.
1548 /// </summary>
1549 HSHELL_GETMINRECT = 5,
1550  
1551 /// <summary>
1552 /// Keyboard language was changed or a new keyboard layout was loaded.
1553 /// </summary>
1554 HSHELL_LANGUAGE = 8,
1555  
1556 /// <summary>
1557 /// The title of a window in the task bar has been redrawn.
1558 /// </summary>
1559 HSHELL_REDRAW = 6,
1560  
1561 /// <summary>
1562 /// The user has selected the task list. A shell application that provides a task list should return TRUE to prevent
1563 /// Windows from starting its task list.
1564 /// </summary>
1565 HSHELL_TASKMAN = 7,
1566  
1567 /// <summary>
1568 /// A top-level, unowned window has been created. The window exists when the system calls this hook.
1569 /// </summary>
1570 HSHELL_WINDOWCREATED = 1,
1571  
1572 /// <summary>
1573 /// A top-level, unowned window is about to be destroyed. The window still exists when the system calls this hook.
1574 /// </summary>
1575 HSHELL_WINDOWDESTROYED = 2,
1576  
1577 /// <summary>
1578 /// The activation has changed to a different top-level, unowned window.
1579 /// </summary>
1580 HSHELL_WINDOWACTIVATED = 4,
1581  
1582 /// <summary>
1583 /// A top-level window is being replaced. The window exists when the system calls this hook.
1584 /// </summary>
1585 HSHELL_WINDOWREPLACED = 13
1586 }
1587  
1588 #endregion
1589  
1590 #region Public Methods
1591  
1592 [DllImport("user32.dll")]
18 office 1593 public static extern IntPtr WindowFromPoint(Point p);
1594  
1595 [DllImport("user32.dll")]
1596 public static extern IntPtr GetForegroundWindow();
1597  
1598 [DllImport("user32.dll", CharSet = CharSet.Auto)]
1599 public static extern int SystemParametersInfo(uint uiAction,
1600 uint uiParam, string pvParam, uint fWinIni);
1601  
1602  
1603 [DllImport("user32.dll")]
1604 public static extern bool SetSystemCursor(IntPtr hcur, uint id);
1605  
1606 [DllImport("user32.dll")]
1607 public static extern IntPtr LoadCursor(IntPtr hInstance, int lpCursorName);
1608  
1609 [DllImport("user32.dll")]
1610 public static extern IntPtr CopyIcon(IntPtr pcur);
1611  
1612 [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
1613 public static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
1614  
1615 [DllImport("user32.dll")]
11 office 1616 public static extern bool EnumWindows(EnumWindowsProc enumProc, IntPtr lParam);
1617  
1618 [DllImport("user32.dll")]
1 office 1619 [return: MarshalAs(UnmanagedType.Bool)]
1620 public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
1621  
1622 [DllImport("user32.dll", EntryPoint = "RegisterWindowMessageW", SetLastError = true)]
1623 public static extern int RegisterWindowMessage(string lpString);
1624  
1625 [DllImport("user32.dll", SetLastError = true)]
1626 public static extern bool RegisterShellHookWindow(IntPtr hWnd);
1627  
1628 [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
1629 public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
1630  
1631 [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
1632 public static extern int GetWindowTextLength(IntPtr hWnd);
1633  
1634 [DllImport("user32.dll", SetLastError = true)]
11 office 1635 public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId);
1 office 1636  
1637 [DllImport("user32.dll", SetLastError = true)]
11 office 1638 public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
1 office 1639  
11 office 1640 [DllImport("user32.dll", SetLastError = true)]
1641 public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
1642  
1 office 1643 #endregion
1644  
1645 #region Nested Types
1646  
1647 [StructLayout(LayoutKind.Sequential)]
1648 public struct RECT
1649 {
1650 public int Left; // x position of upper-left corner
1651  
1652 public int Top; // y position of upper-left corner
1653  
1654 public int Right; // x position of lower-right corner
1655  
1656 public int Bottom; // y position of lower-right corner
1657 }
1658  
1659 #endregion
1660 }
1661 }