wineps: Remove unused resource file.
[wine] / include / winuser.h
1 /*
2  * Copyright (C) the Wine project
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #ifndef _WINUSER_
20 #define _WINUSER_
21
22 #if !defined(_USER32_)
23 #define WINUSERAPI DECLSPEC_IMPORT
24 #else
25 #define WINUSERAPI
26 #endif
27
28 #ifndef RC_INVOKED
29 #include <stdarg.h>
30 #endif
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /* Define a bunch of callback types */
37
38 #if defined(STRICT)
39 typedef INT_PTR (CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
40 typedef BOOL    (CALLBACK *DRAWSTATEPROC)(HDC,LPARAM,WPARAM,int,int);
41 typedef INT     (CALLBACK *EDITWORDBREAKPROCA)(LPSTR,INT,INT,INT);
42 typedef INT     (CALLBACK *EDITWORDBREAKPROCW)(LPWSTR,INT,INT,INT);
43 typedef BOOL    (CALLBACK *GRAYSTRINGPROC)(HDC,LPARAM,INT);
44 typedef LRESULT (CALLBACK *HOOKPROC)(INT,WPARAM,LPARAM);
45 typedef BOOL    (CALLBACK *NAMEENUMPROCA)(LPSTR,LPARAM);
46 typedef BOOL    (CALLBACK *NAMEENUMPROCW)(LPWSTR,LPARAM);
47 typedef BOOL    (CALLBACK *PROPENUMPROCA)(HWND,LPCSTR,HANDLE);
48 typedef BOOL    (CALLBACK *PROPENUMPROCW)(HWND,LPCWSTR,HANDLE);
49 typedef BOOL    (CALLBACK *PROPENUMPROCEXA)(HWND,LPSTR,HANDLE,ULONG_PTR);
50 typedef BOOL    (CALLBACK *PROPENUMPROCEXW)(HWND,LPWSTR,HANDLE,ULONG_PTR);
51 typedef VOID    (CALLBACK *SENDASYNCPROC)(HWND,UINT,ULONG_PTR,LRESULT);
52 typedef VOID    (CALLBACK *TIMERPROC)(HWND,UINT,UINT_PTR,DWORD);
53 typedef VOID    (CALLBACK *WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,
54                                          DWORD,DWORD);
55 typedef BOOL    (CALLBACK *WNDENUMPROC)(HWND,LPARAM);
56
57 #else
58 typedef FARPROC DLGPROC;
59 typedef FARPROC DRAWSTATEPROC;
60 typedef FARPROC EDITWORDBREAKPROCA;
61 typedef FARPROC EDITWORDBREAKPROCW;
62 typedef FARPROC GRAYSTRINGPROC;
63 typedef FARPROC HOOKPROC;
64 typedef FARPROC NAMEENUMPROCA;
65 typedef FARPROC NAMEENUMPROCW;
66 typedef FARPROC PROPENUMPROCA;
67 typedef FARPROC PROPENUMPROCW;
68 typedef FARPROC PROPENUMPROCEXA;
69 typedef FARPROC PROPENUMPROCEXW;
70 typedef FARPROC SENDASYNCPROC;
71 typedef FARPROC TIMERPROC;
72 typedef FARPROC WINEVENTPROC;
73 typedef FARPROC WNDENUMPROC;
74 #endif /* STRICT */
75
76 typedef NAMEENUMPROCA WINSTAENUMPROCA;
77 typedef NAMEENUMPROCA DESKTOPENUMPROCA;
78 typedef NAMEENUMPROCW WINSTAENUMPROCW;
79 typedef NAMEENUMPROCW DESKTOPENUMPROCW;
80
81 typedef LRESULT (CALLBACK *WNDPROC)(HWND,UINT,WPARAM,LPARAM);
82
83 DECL_WINELIB_TYPE_AW(DESKTOPENUMPROC)
84 DECL_WINELIB_TYPE_AW(EDITWORDBREAKPROC)
85 DECL_WINELIB_TYPE_AW(NAMEENUMPROC)
86 DECL_WINELIB_TYPE_AW(PROPENUMPROC)
87 DECL_WINELIB_TYPE_AW(PROPENUMPROCEX)
88 DECL_WINELIB_TYPE_AW(WINSTAENUMPROC)
89
90
91 typedef HANDLE HDWP;
92
93 #define UOI_FLAGS       1
94 #define UOI_NAME        2
95 #define UOI_TYPE        3
96 #define UOI_USER_SID    4
97
98 #define WSF_VISIBLE     1
99 #define DF_ALLOWOTHERACCOUNTHOOK  1
100
101 typedef struct tagUSEROBJECTFLAGS {
102     BOOL fInherit;
103     BOOL fReserved;
104     DWORD dwFlags;
105 } USEROBJECTFLAGS, *PUSEROBJECTFLAGS;
106
107 /* Window stations */
108 #define WINSTA_ENUMDESKTOPS         0x0001
109 #define WINSTA_READATTRIBUTES       0x0002
110 #define WINSTA_ACCESSCLIPBOARD      0x0004
111 #define WINSTA_CREATEDESKTOP        0x0008
112 #define WINSTA_WRITEATTRIBUTES      0x0010
113 #define WINSTA_ACCESSGLOBALATOMS    0x0020
114 #define WINSTA_EXITWINDOWS          0x0040
115 #define WINSTA_ENUMERATE            0x0100
116 #define WINSTA_READSCREEN           0x0200
117 #define WINSTA_ALL_ACCESS           0x037f
118
119 /* Desktops */
120 #define DESKTOP_READOBJECTS         0x0001
121 #define DESKTOP_CREATEWINDOW        0x0002
122 #define DESKTOP_CREATEMENU          0x0004
123 #define DESKTOP_HOOKCONTROL         0x0008
124 #define DESKTOP_JOURNALRECORD       0x0010
125 #define DESKTOP_JOURNALPLAYBACK     0x0020
126 #define DESKTOP_ENUMERATE           0x0040
127 #define DESKTOP_WRITEOBJECTS        0x0080
128 #define DESKTOP_SWITCHDESKTOP       0x0100
129
130
131 /* flags for FILTERKEYS dwFlags field */
132 #define FKF_AVAILABLE       0x00000002
133 #define FKF_CLICKON         0x00000040
134 #define FKF_FILTERKEYSON    0x00000001
135 #define FKF_HOTKEYACTIVE    0x00000004
136 #define FKF_HOTKEYSOUND     0x00000010
137 #define FKF_CONFIRMHOTKEY   0x00000008
138 #define FKF_INDICATOR       0x00000020
139
140 typedef struct tagFILTERKEYS
141 {
142     UINT   cbSize;
143     DWORD  dwFlags;
144     DWORD  iWaitMSec;
145     DWORD  iDelayMSec;
146     DWORD  iRepeatMSec;
147     DWORD  iBounceMSec;
148 } FILTERKEYS, *LPFILTERKEYS;
149
150 /* flags for TOGGLEKEYS dwFlags field */
151 #define TKF_AVAILABLE       0x00000002
152 #define TKF_CONFIRMHOTKEY   0x00000008
153 #define TKF_HOTKEYACTIVE    0x00000004
154 #define TKF_HOTKEYSOUND     0x00000010
155 #define TKF_TOGGLEKEYSON    0x00000001
156
157 typedef struct tagTOGGLEKEYS
158 {
159     DWORD   cbSize;
160     DWORD   dwFlags;
161 } TOGGLEKEYS, *LPTOGGLEKEYS;
162
163 /* flags for MOUSEKEYS dwFlags field */
164 #define MKF_AVAILABLE       0x00000002
165 #define MKF_CONFIRMHOTKEY   0x00000008
166 #define MKF_HOTKEYACTIVE    0x00000004
167 #define MKF_HOTKEYSOUND     0x00000010
168 #define MKF_INDICATOR       0x00000020
169 #define MKF_MOUSEKEYSON     0x00000001
170 #define MKF_MODIFIERS       0x00000040
171 #define MKF_REPLACENUMBERS  0x00000080
172
173 typedef struct tagMOUSEKEYS
174 {
175     UINT    cbSize;
176     DWORD   dwFlags;
177     DWORD   iMaxSpeed;
178     DWORD   iTimeToMaxSpeed;
179     DWORD   iCtrlSpeed;
180     DWORD   dwReserved1;
181     DWORD   dwReserved2;
182 } MOUSEKEYS, *LPMOUSEKEYS;
183
184 /* flags for STICKYKEYS dwFlags field */
185 #define SKF_AUDIBLEFEEDBACK 0x00000040
186 #define SKF_AVAILABLE       0x00000002
187 #define SKF_CONFIRMHOTKEY   0x00000008
188 #define SKF_HOTKEYACTIVE    0x00000004
189 #define SKF_HOTKEYSOUND     0x00000010
190 #define SKF_INDICATOR       0x00000020
191 #define SKF_STICKYKEYSON    0x00000001
192 #define SKF_TRISTATE        0x00000080
193 #define SKF_TWOKEYSOFF      0x00000100
194
195 typedef struct tagSTICKYKEYS
196 {
197     DWORD   cbSize;
198     DWORD   dwFlags;
199 } STICKYKEYS, *LPSTICKYKEYS;
200
201 /* flags for ACCESSTIMEOUT dwFlags field */
202 #define ATF_ONOFFFEEDBACK   0x00000002
203 #define ATF_AVAILABLE       0x00000004
204 #define ATF_TIMEOUTON       0x00000001
205
206 typedef struct tagACCESSTIMEOUT
207 {
208     UINT    cbSize;
209     DWORD   dwFlags;
210     DWORD   iTimeOutMSec;
211 } ACCESSTIMEOUT, *LPACCESSTIMEOUT;
212
213 /* flags for SERIALKEYS dwFlags field */
214 #define SERKF_ACTIVE        0x00000008
215 #define SERKF_AVAILABLE     0x00000002
216 #define SERKF_INDICATOR     0x00000004
217 #define SERKF_SERIALKEYSON  0x00000001
218
219 typedef struct tagSERIALKEYSA
220 {
221     UINT  cbSize;
222     DWORD  dwFlags;
223     LPSTR  lpszActivePort;
224     LPSTR  lpszPort;
225     UINT  iBaudRate;
226     UINT  iPortState;
227     UINT  iActive;
228 } SERIALKEYSA, *LPSERIALKEYSA;
229
230 typedef struct tagSERIALKEYSW {
231     UINT  cbSize;
232     DWORD   dwFlags;
233     LPWSTR  lpszActivePort;
234     LPWSTR  lpszPort;
235     UINT   iBaudRate;
236     UINT   iPortState;
237     UINT   iActive;
238 } SERIALKEYSW,*LPSERIALKEYSW;
239
240 DECL_WINELIB_TYPE_AW(SERIALKEYS)
241 DECL_WINELIB_TYPE_AW(LPSERIALKEYS)
242
243 /* flags for SOUNDSENTRY dwFlags field */
244 #define SSF_AVAILABLE       0x00000002
245 #define SSF_SOUNDSENTRYON   0x00000001
246
247 #define SSTF_BORDER         0x00000002
248 #define SSTF_CHARS          0x00000001
249 #define SSTF_DISPLAY        0x00000003
250 #define SSTF_NONE           0x00000000
251
252 #define SSGF_DISPLAY        0x00000003
253 #define SSGF_NONE           0x00000000
254
255 #define SSWF_DISPLAY        0x00000003
256 #define SSWF_NONE           0x00000000
257 #define SSWF_TITLE          0x00000001
258 #define SSWF_WINDOW         0x00000002
259
260 typedef struct tagSOUNDSENTRYA
261 {
262     UINT  cbSize;
263     DWORD  dwFlags;
264     DWORD  iFSTextEffect;
265     DWORD  iFSTextEffectMSec;
266     DWORD  iFSTextEffectColorBits;
267     DWORD  iFSGrafEffect;
268     DWORD  iFSGrafEffectMSec;
269     DWORD  iFSGrafEffectColor;
270     DWORD  iWindowsEffect;
271     DWORD  iWindowsEffectMSec;
272     LPSTR  lpszWindowsEffectDLL;
273     DWORD  iWindowsEffectOrdinal;
274 } SOUNDSENTRYA, *LPSOUNDSENTRYA;
275
276 typedef struct tagSOUNDSENTRYW
277 {
278     UINT  cbSize;
279     DWORD  dwFlags;
280     DWORD  iFSTextEffect;
281     DWORD  iFSTextEffectMSec;
282     DWORD  iFSTextEffectColorBits;
283     DWORD  iFSGrafEffect;
284     DWORD  iFSGrafEffectMSec;
285     DWORD  iFSGrafEffectColor;
286     DWORD  iWindowsEffect;
287     DWORD  iWindowsEffectMSec;
288     LPWSTR  lpszWindowsEffectDLL;
289     DWORD  iWindowsEffectOrdinal;
290 } SOUNDSENTRYW, *LPSOUNDSENTRYW;
291
292 DECL_WINELIB_TYPE_AW(SOUNDSENTRY)
293 DECL_WINELIB_TYPE_AW(LPSOUNDSENTRY)
294
295 /* flags for HIGHCONTRAST dwFlags field */
296 #define HCF_HIGHCONTRASTON  0x00000001
297 #define HCF_AVAILABLE       0x00000002
298 #define HCF_HOTKEYACTIVE    0x00000004
299 #define HCF_CONFIRMHOTKEY   0x00000008
300 #define HCF_HOTKEYSOUND     0x00000010
301 #define HCF_INDICATOR       0x00000020
302 #define HCF_HOTKEYAVAILABLE 0x00000040
303
304 typedef struct tagHIGHCONTRASTA
305 {
306     UINT  cbSize;
307     DWORD   dwFlags;
308     LPSTR   lpszDefaultScheme;
309 } HIGHCONTRASTA, *LPHIGHCONTRASTA;
310
311 typedef struct tagHIGHCONTRASTW
312 {
313     UINT  cbSize;
314     DWORD   dwFlags;
315     LPWSTR  lpszDefaultScheme;
316 } HIGHCONTRASTW, *LPHIGHCONTRASTW;
317
318 DECL_WINELIB_TYPE_AW(HIGHCONTRAST)
319 DECL_WINELIB_TYPE_AW(LPHIGHCONTRAST)
320
321 typedef struct tagEVENTMSG
322 {
323     UINT  message;
324     UINT  paramL;
325     UINT  paramH;
326     DWORD   time;
327     HWND  hwnd;
328 } EVENTMSG, *PEVENTMSG, *LPEVENTMSG;
329
330 /* WH_KEYBOARD_LL structure */
331 typedef struct tagKBDLLHOOKSTRUCT
332 {
333     DWORD   vkCode;
334     DWORD   scanCode;
335     DWORD   flags;
336     DWORD   time;
337     ULONG_PTR dwExtraInfo;
338 } KBDLLHOOKSTRUCT, *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;
339
340 #define LLKHF_EXTENDED   (KF_EXTENDED >> 8)
341 #define LLKHF_INJECTED   0x00000010
342 #define LLKHF_ALTDOWN    (KF_ALTDOWN >> 8)
343 #define LLKHF_UP         (KF_UP >> 8)
344
345 /* WH_MOUSE_LL structure */
346 typedef struct tagMSLLHOOKSTRUCT
347 {
348     POINT   pt;
349     DWORD   mouseData;
350     DWORD   flags;
351     DWORD   time;
352     ULONG_PTR dwExtraInfo;
353 } MSLLHOOKSTRUCT, *LPMSLLHOOKSTRUCT, *PMSLLHOOKSTRUCT;
354
355 #define LLMHF_INJECTED  0x00000001
356
357     /* Mouse hook structure */
358
359 typedef struct
360 {
361     POINT pt;
362     HWND  hwnd;
363     UINT  wHitTestCode;
364     ULONG_PTR dwExtraInfo;
365 } MOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT, *LPMOUSEHOOKSTRUCT;
366
367
368     /* Hardware hook structure */
369
370 typedef struct
371 {
372     HWND    hwnd;
373     UINT    message;
374     WPARAM  wParam;
375     LPARAM  lParam;
376 } HARDWAREHOOKSTRUCT, *PHARDWAREHOOKSTRUCT, *LPHARDWAREHOOKSTRUCT;
377
378
379   /* Debug hook structure */
380
381 typedef struct tagDEBUGHOOKINFO
382 {
383     DWORD       idThread;
384     DWORD       idThreadInstaller;
385     LPARAM      lParam;
386     WPARAM    wParam;
387     INT       code;
388 } DEBUGHOOKINFO, *PDEBUGHOOKINFO, *LPDEBUGHOOKINFO;
389
390 #define HKL_PREV   0
391 #define HKL_NEXT   1
392
393 #define KLF_ACTIVATE       0x00000001
394 #define KLF_SUBSTITUTE_OK  0x00000002
395 #define KLF_UNLOADPREVIOUS 0x00000004
396 #define KLF_REORDER        0x00000008
397 #define KLF_REPLACELANG    0x00000010
398 #define KLF_NOTELLSHELL    0x00000080
399 #define KLF_SETFORPROCESS  0x00000100
400 #define KLF_SHIFTLOCK      0x00010000
401 #define KLF_RESET          0x40000000
402
403 #define KL_NAMELENGTH      9
404
405 typedef struct tagMOUSEINPUT
406 {
407     LONG    dx;
408     LONG    dy;
409     DWORD   mouseData;
410     DWORD   dwFlags;
411     DWORD   time;
412     ULONG_PTR dwExtraInfo;
413 } MOUSEINPUT, *PMOUSEINPUT, *LPMOUSEINPUT;
414
415 typedef struct tagKEYBDINPUT
416 {
417     WORD    wVk;
418     WORD    wScan;
419     DWORD   dwFlags;
420     DWORD   time;
421     ULONG_PTR dwExtraInfo;
422 } KEYBDINPUT, *PKEYBDINPUT, *LPKEYBDINPUT;
423
424 typedef struct tagHARDWAREINPUT
425 {
426     DWORD   uMsg;
427     WORD    wParamL;
428     WORD    wParamH;
429 } HARDWAREINPUT, *PHARDWAREINPUT, *LPHARDWAREINPUT;
430
431 #define INPUT_MOUSE     0
432 #define INPUT_KEYBOARD  1
433 #define INPUT_HARDWARE  2
434
435 typedef struct tagINPUT
436 {
437     DWORD type;
438     union
439     {
440         MOUSEINPUT      mi;
441         KEYBDINPUT      ki;
442         HARDWAREINPUT   hi;
443     } DUMMYUNIONNAME;
444 } INPUT, *PINPUT, *LPINPUT;
445
446 DECLARE_HANDLE(HRAWINPUT);
447
448 typedef struct tagRAWINPUTDEVICELIST
449 {
450     HANDLE hDevice;
451     DWORD dwType;
452 } RAWINPUTDEVICELIST, *PRAWINPUTDEVICELIST;
453
454 typedef struct tagRAWHID {
455     DWORD dwSizeHid;
456     DWORD dwCount;
457     BYTE bRawData;
458 } RAWHID, *LPRAWHID;
459
460 typedef struct tagRAWKEYBOARD {
461     USHORT MakeCode;
462     USHORT Flags;
463     USHORT Reserved;
464     USHORT VKey;
465     UINT Message;
466     ULONG ExtraInformation;
467 } RAWKEYBOARD, *PRAWKEYBOARD, *LPRAWKEYBOARD;
468
469 typedef struct tagRAWMOUSE {
470     USHORT usFlags;
471     union {
472         ULONG ulButtons;
473         struct {
474             USHORT usButtonFlags;
475             USHORT usButtonData;
476         } DUMMYSTRUCTNAME;
477     } DUMMYUNIONNAME;
478     ULONG ulRawButtons;
479     LONG  lLastX;
480     LONG  lLastY;
481     ULONG ulExtraInformation;
482 } RAWMOUSE, *PRAWMOUSE, *LPRAWMOUSE;
483
484 typedef struct tagRAWINPUTHEADER {
485     DWORD dwType;
486     DWORD dwSize;
487     HANDLE hDevice;
488     WPARAM wParam;
489 } RAWINPUTHEADER, *PRAWINPUTHEADER;
490
491 typedef struct tagRAWINPUT {
492     RAWINPUTHEADER header;
493     union {
494         RAWMOUSE    mouse;
495         RAWKEYBOARD keyboard;
496         RAWHID      hid;
497     } data;
498 } RAWINPUT, *PRAWINPUT, *LPRAWINPUT;
499
500 typedef struct tagRAWINPUTDEVICE {
501     USHORT usUsagePage;
502     USHORT usUsage;
503     DWORD dwFlags;
504     HWND hwndTarget;
505 } RAWINPUTDEVICE, *PRAWINPUTDEVICE, *LPRAWINPUTDEVICE;
506
507 typedef struct tagRID_DEVICE_INFO_MOUSE {
508     DWORD dwId;
509     DWORD dwNumberOfButtons;
510     DWORD dwSampleRate;
511     BOOL fHasHorizontalWheel;
512 } RID_DEVICE_INFO_MOUSE, *PRID_DEVICE_INFO_MOUSE;
513
514 typedef struct tagRID_DEVICE_INFO_KEYBOARD {
515     DWORD dwType;
516     DWORD dwSubType;
517     DWORD dwKeyboardMode;
518     DWORD dwNumberOfFunctionKeys;
519     DWORD dwNumberOfIndicators;
520     DWORD dwNumberOfKeysTotal;
521 } RID_DEVICE_INFO_KEYBOARD, *PRID_DEVICE_INFO_KEYBOARD;
522
523 typedef struct tagRID_DEVICE_INFO_HID {
524     DWORD dwVendorId;
525     DWORD dwProductId;
526     DWORD dwVersionNumber;
527     USHORT usUsagePage;
528     USHORT usUsage;
529 } RID_DEVICE_INFO_HID, *PRID_DEVICE_INFO_HID;
530
531 typedef struct tagRID_DEVICE_INFO {
532     DWORD    cbSize;
533     DWORD    dwType;
534     union {
535         RID_DEVICE_INFO_MOUSE     mouse;
536         RID_DEVICE_INFO_KEYBOARD  keyboard;
537         RID_DEVICE_INFO_HID       hid;
538     } DUMMYUNIONNAME;
539 } RID_DEVICE_INFO, *PRID_DEVICE_INFO, *LPRID_DEVICE_INFO;
540
541
542 typedef struct tagGUITHREADINFO
543 {
544     DWORD   cbSize;
545     DWORD   flags;
546     HWND    hwndActive;
547     HWND    hwndFocus;
548     HWND    hwndCapture;
549     HWND    hwndMenuOwner;
550     HWND    hwndMoveSize;
551     HWND    hwndCaret;
552     RECT    rcCaret;
553 } GUITHREADINFO, *PGUITHREADINFO, *LPGUITHREADINFO;
554
555 #define GUI_CARETBLINKING   0x00000001
556 #define GUI_INMOVESIZE      0x00000002
557 #define GUI_INMENUMODE      0x00000004
558 #define GUI_SYSTEMMENUMODE  0x00000008
559 #define GUI_POPUPMENUMODE   0x00000010
560 #define GUI_16BITTASK       0x00000020
561
562
563 /***** Dialogs *****/
564
565 /* Gcc on Solaris has a version of this that we don't care about */
566 #undef FSHIFT
567
568 #define FVIRTKEY        TRUE          /* Assumed to be == TRUE */
569 #define FNOINVERT       0x02
570 #define FSHIFT          0x04
571 #define FCONTROL        0x08
572 #define FALT            0x10
573
574
575 typedef struct tagANIMATIONINFO
576 {
577        UINT          cbSize;
578        INT           iMinAnimate;
579 } ANIMATIONINFO, *LPANIMATIONINFO;
580
581 typedef struct tagNMHDR
582 {
583     HWND  hwndFrom;
584     UINT_PTR idFrom;
585     UINT  code;
586 } NMHDR, *LPNMHDR;
587
588 typedef struct tagDRAWTEXTPARAMS
589 {
590         UINT    cbSize;
591         INT     iTabLength;
592         INT     iLeftMargin;
593         INT     iRightMargin;
594         UINT    uiLengthDrawn;
595 } DRAWTEXTPARAMS,*LPDRAWTEXTPARAMS;
596
597 #define WM_USER             0x0400
598
599 typedef struct
600 {
601   LPARAM        lParam;
602   WPARAM      wParam;
603   UINT        message;
604   HWND        hwnd;
605 } CWPSTRUCT, *PCWPSTRUCT, *LPCWPSTRUCT;
606
607 typedef struct
608 {
609   LRESULT       lResult;
610   LPARAM        lParam;
611   WPARAM      wParam;
612   DWORD         message;
613   HWND        hwnd;
614 } CWPRETSTRUCT, *PCWPRETSTRUCT, *LPCWPRETSTRUCT;
615
616 typedef struct tagWINDOWPLACEMENT
617 {
618     UINT   length;
619     UINT   flags;
620     UINT   showCmd;
621     POINT  ptMinPosition;
622     POINT  ptMaxPosition;
623     RECT   rcNormalPosition;
624 } WINDOWPLACEMENT, *PWINDOWPLACEMENT, *LPWINDOWPLACEMENT;
625
626
627   /* WINDOWPLACEMENT flags */
628 #define WPF_SETMINPOSITION      0x0001
629 #define WPF_RESTORETOMAXIMIZED  0x0002
630
631 /***** Dialogs *****/
632
633 #define IS_INTRESOURCE(x)   (((ULONG_PTR)(x) >> 16) == 0)
634 #define MAKEINTRESOURCEA(i) (LPSTR)((ULONG_PTR)((WORD)(i)))
635 #define MAKEINTRESOURCEW(i) (LPWSTR)((ULONG_PTR)((WORD)(i)))
636
637 #ifdef __WINESRC__
638 /* force using a cast when inside Wine */
639 #define MAKEINTRESOURCE(i) ((ULONG_PTR)((WORD)(i)))
640 #else
641 #define MAKEINTRESOURCE WINELIB_NAME_AW(MAKEINTRESOURCE)
642 #endif
643
644 /* Predefined resource types */
645 #define RT_CURSOR         MAKEINTRESOURCE(1)
646 #define RT_BITMAP         MAKEINTRESOURCE(2)
647 #define RT_ICON           MAKEINTRESOURCE(3)
648 #define RT_MENU           MAKEINTRESOURCE(4)
649 #define RT_DIALOG         MAKEINTRESOURCE(5)
650 #define RT_STRING         MAKEINTRESOURCE(6)
651 #define RT_FONTDIR        MAKEINTRESOURCE(7)
652 #define RT_FONT           MAKEINTRESOURCE(8)
653 #define RT_ACCELERATOR    MAKEINTRESOURCE(9)
654 #define RT_RCDATA         MAKEINTRESOURCE(10)
655 #define RT_MESSAGETABLE   MAKEINTRESOURCE(11)
656 #define RT_GROUP_CURSOR   MAKEINTRESOURCE(12)
657 #define RT_GROUP_ICON     MAKEINTRESOURCE(14)
658 #define RT_VERSION        MAKEINTRESOURCE(16)
659 #define RT_DLGINCLUDE     MAKEINTRESOURCE(17)
660 #define RT_PLUGPLAY       MAKEINTRESOURCE(19)
661 #define RT_VXD            MAKEINTRESOURCE(20)
662 #define RT_ANICURSOR      MAKEINTRESOURCE(21)
663 #define RT_ANIICON        MAKEINTRESOURCE(22)
664 #define RT_HTML           MAKEINTRESOURCE(23)
665
666 #ifndef RC_INVOKED
667 #define RT_MANIFEST                                        MAKEINTRESOURCE(24)
668 #define CREATEPROCESS_MANIFEST_RESOURCE_ID                 MAKEINTRESOURCE(1)
669 #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID                MAKEINTRESOURCE(2)
670 #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(3)
671 #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID              MAKEINTRESOURCE(1)
672 #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID              MAKEINTRESOURCE(16)
673 #else
674 #define RT_MANIFEST                                        24
675 #define CREATEPROCESS_MANIFEST_RESOURCE_ID                 1
676 #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID                2
677 #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
678 #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID              1
679 #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID              16
680 #endif
681
682   /* cbWndExtra bytes for dialog class */
683 #define DLGWINDOWEXTRA      30
684
685 /* Button control styles */
686 #define BS_PUSHBUTTON          0x00000000L
687 #define BS_DEFPUSHBUTTON       0x00000001L
688 #define BS_CHECKBOX            0x00000002L
689 #define BS_AUTOCHECKBOX        0x00000003L
690 #define BS_RADIOBUTTON         0x00000004L
691 #define BS_3STATE              0x00000005L
692 #define BS_AUTO3STATE          0x00000006L
693 #define BS_GROUPBOX            0x00000007L
694 #define BS_USERBUTTON          0x00000008L
695 #define BS_AUTORADIOBUTTON     0x00000009L
696 #define BS_OWNERDRAW           0x0000000BL
697 #define BS_LEFTTEXT            0x00000020L
698 #define BS_RIGHTBUTTON         BS_LEFTTEXT
699
700 #define BS_TEXT                0x00000000L
701 #define BS_ICON                0x00000040L
702 #define BS_BITMAP              0x00000080L
703 #define BS_LEFT                0x00000100L
704 #define BS_RIGHT               0x00000200L
705 #define BS_CENTER              0x00000300L
706 #define BS_TOP                 0x00000400L
707 #define BS_BOTTOM              0x00000800L
708 #define BS_VCENTER             0x00000C00L
709 #define BS_PUSHLIKE            0x00001000L
710 #define BS_MULTILINE           0x00002000L
711 #define BS_NOTIFY              0x00004000L
712 #define BS_FLAT                0x00008000L
713
714   /* Dialog styles */
715 #define DS_ABSALIGN             0x0001
716 #define DS_SYSMODAL             0x0002
717 #define DS_3DLOOK               0x0004  /* win95 */
718 #define DS_FIXEDSYS             0x0008  /* win95 */
719 #define DS_NOFAILCREATE         0x0010  /* win95 */
720 #define DS_LOCALEDIT            0x0020
721 #define DS_SETFONT              0x0040
722 #define DS_MODALFRAME           0x0080
723 #define DS_NOIDLEMSG            0x0100
724 #define DS_SETFOREGROUND        0x0200  /* win95 */
725 #define DS_CONTROL              0x0400  /* win95 */
726 #define DS_CENTER               0x0800  /* win95 */
727 #define DS_CENTERMOUSE          0x1000  /* win95 */
728 #define DS_CONTEXTHELP          0x2000  /* win95 */
729 #define DS_USEPIXELS            0x8000
730 #define DS_SHELLFONT            (DS_SETFONT | DS_FIXEDSYS)
731
732
733   /* Dialog messages */
734 #define DM_GETDEFID         (WM_USER+0)
735 #define DM_SETDEFID         (WM_USER+1)
736 #define DM_REPOSITION       (WM_USER+2)
737
738 #define DC_HASDEFID         0x534b
739
740 /* Bit flags for DRAWITEMSTRUCT.CtlType */
741 #define ODT_MENU        1
742 #define ODT_LISTBOX     2
743 #define ODT_COMBOBOX    3
744 #define ODT_BUTTON      4
745 #define ODT_STATIC      5
746
747 /* Bit flags for DRAWITEMSTRUCT.itemAction */
748 #define ODA_DRAWENTIRE 0x1
749 #define ODA_SELECT     0x2
750 #define ODA_FOCUS      0x4
751
752 /* Bit flags for DRAWITEMSTRUCT.itemState */
753 #define ODS_SELECTED     0x0001 /* Selected */
754 #define ODS_GRAYED       0x0002 /* Grayed (Menus only) */
755 #define ODS_DISABLED     0x0004 /* Disabled */
756 #define ODS_CHECKED      0x0008 /* Checked (Menus only) */
757 #define ODS_FOCUS        0x0010 /* Has focus */
758 #define ODS_DEFAULT      0x0020 /* Default */
759 #define ODS_HOTLIGHT     0x0040 /* Highlighted when under mouse */
760 #define ODS_INACTIVE     0x0080 /* Inactive */
761 #define ODS_NOACCEL      0x0100 /* No keyboard accelerator */
762 #define ODS_NOFOCUSRECT  0x0200 /* No focus rectangle */
763 #define ODS_COMBOBOXEDIT 0x1000 /* Edit of a combo box */
764
765 /* Edit control styles */
766 #ifndef NOWINSTYLES
767 #define ES_LEFT         0x00000000
768 #define ES_CENTER       0x00000001
769 #define ES_RIGHT        0x00000002
770 #define ES_MULTILINE    0x00000004
771 #define ES_UPPERCASE    0x00000008
772 #define ES_LOWERCASE    0x00000010
773 #define ES_PASSWORD     0x00000020
774 #define ES_AUTOVSCROLL  0x00000040
775 #define ES_AUTOHSCROLL  0x00000080
776 #define ES_NOHIDESEL    0x00000100
777 #define ES_COMBO        0x00000200   /* Undocumented. Parent is a combobox */
778 #define ES_OEMCONVERT   0x00000400
779 #define ES_READONLY     0x00000800
780 #define ES_WANTRETURN   0x00001000
781 #define ES_NUMBER       0x00002000
782 #endif /* NOWINSTYLES */
783
784 /* OEM Resource Ordinal Numbers */
785 #ifdef OEMRESOURCE
786 #define OBM_TRTYPE          32732
787 #define OBM_LFARROWI        32734
788 #define OBM_RGARROWI        32735
789 #define OBM_DNARROWI        32736
790 #define OBM_UPARROWI        32737
791 #define OBM_COMBO           32738
792 #define OBM_MNARROW         32739
793 #define OBM_LFARROWD        32740
794 #define OBM_RGARROWD        32741
795 #define OBM_DNARROWD        32742
796 #define OBM_UPARROWD        32743
797 #define OBM_RESTORED        32744
798 #define OBM_ZOOMD           32745
799 #define OBM_REDUCED         32746
800 #define OBM_RESTORE         32747
801 #define OBM_ZOOM            32748
802 #define OBM_REDUCE          32749
803 #define OBM_LFARROW         32750
804 #define OBM_RGARROW         32751
805 #define OBM_DNARROW         32752
806 #define OBM_UPARROW         32753
807 #define OBM_CLOSE           32754
808 #define OBM_OLD_RESTORE     32755
809 #define OBM_OLD_ZOOM        32756
810 #define OBM_OLD_REDUCE      32757
811 #define OBM_BTNCORNERS      32758
812 #define OBM_CHECKBOXES      32759
813 #define OBM_CHECK           32760
814 #define OBM_BTSIZE          32761
815 #define OBM_OLD_LFARROW     32762
816 #define OBM_OLD_RGARROW     32763
817 #define OBM_OLD_DNARROW     32764
818 #define OBM_OLD_UPARROW     32765
819 #define OBM_SIZE            32766
820 #define OBM_OLD_CLOSE       32767
821
822 #define OCR_NORMAL          32512
823 #define OCR_IBEAM           32513
824 #define OCR_WAIT            32514
825 #define OCR_CROSS           32515
826 #define OCR_UP              32516
827 #define OCR_SIZE            32640
828 #define OCR_ICON            32641
829 #define OCR_SIZENWSE        32642
830 #define OCR_SIZENESW        32643
831 #define OCR_SIZEWE          32644
832 #define OCR_SIZENS          32645
833 #define OCR_SIZEALL         32646
834 #define OCR_ICOCUR          32647
835 #define OCR_NO              32648
836 #define OCR_HAND            32649
837 #define OCR_APPSTARTING     32650
838 #define OCR_HELP            32651
839
840 /* only defined in wine (FIXME) */
841 #define OCR_DRAGOBJECT      32653
842
843 #define OIC_SAMPLE          32512
844 #define OIC_HAND            32513
845 #define OIC_QUES            32514
846 #define OIC_BANG            32515
847 #define OIC_NOTE            32516
848 #define OIC_WINLOGO         32517
849 #define OIC_WARNING         OIC_BANG
850 #define OIC_ERROR           OIC_HAND
851 #define OIC_INFORMATION     OIC_NOTE
852 #endif /* OEMRESOURCE */
853
854 #ifndef NOCOLOR
855
856 #define COLOR_SCROLLBAR             0
857 #define COLOR_BACKGROUND            1
858 #define COLOR_ACTIVECAPTION         2
859 #define COLOR_INACTIVECAPTION       3
860 #define COLOR_MENU                  4
861 #define COLOR_WINDOW                5
862 #define COLOR_WINDOWFRAME           6
863 #define COLOR_MENUTEXT              7
864 #define COLOR_WINDOWTEXT            8
865 #define COLOR_CAPTIONTEXT           9
866 #define COLOR_ACTIVEBORDER         10
867 #define COLOR_INACTIVEBORDER       11
868 #define COLOR_APPWORKSPACE         12
869 #define COLOR_HIGHLIGHT            13
870 #define COLOR_HIGHLIGHTTEXT        14
871 #define COLOR_BTNFACE              15
872 #define COLOR_BTNSHADOW            16
873 #define COLOR_GRAYTEXT             17
874 #define COLOR_BTNTEXT              18
875 #define COLOR_INACTIVECAPTIONTEXT  19
876 #define COLOR_BTNHIGHLIGHT         20
877 /* win95 colors */
878 #define COLOR_3DDKSHADOW           21
879 #define COLOR_3DLIGHT              22
880 #define COLOR_INFOTEXT             23
881 #define COLOR_INFOBK               24
882 #define COLOR_DESKTOP              COLOR_BACKGROUND
883 #define COLOR_3DFACE               COLOR_BTNFACE
884 #define COLOR_3DSHADOW             COLOR_BTNSHADOW
885 #define COLOR_3DHIGHLIGHT          COLOR_BTNHIGHLIGHT
886 #define COLOR_3DHILIGHT            COLOR_BTNHIGHLIGHT
887 #define COLOR_BTNHILIGHT           COLOR_BTNHIGHLIGHT
888 /* win98 colors */
889 #define COLOR_ALTERNATEBTNFACE         25  /* undocumented, constant's name unknown */
890 #define COLOR_HOTLIGHT                 26
891 #define COLOR_GRADIENTACTIVECAPTION    27
892 #define COLOR_GRADIENTINACTIVECAPTION  28
893 /* win2k/xp colors */
894 #define COLOR_MENUHILIGHT              29
895 #define COLOR_MENUBAR                  30
896
897   /* WM_CTLCOLOR values */
898 #define CTLCOLOR_MSGBOX             0
899 #define CTLCOLOR_EDIT               1
900 #define CTLCOLOR_LISTBOX            2
901 #define CTLCOLOR_BTN                3
902 #define CTLCOLOR_DLG                4
903 #define CTLCOLOR_SCROLLBAR          5
904 #define CTLCOLOR_STATIC             6
905
906 COLORREF    WINAPI GetSysColor(INT);
907 BOOL        WINAPI SetSysColors(INT,const INT*,const COLORREF*);
908
909 #endif /* NOCOLOR */
910
911 /* Edit control messages */
912 #define EM_GETSEL                0x00b0
913 #define EM_SETSEL                0x00b1
914 #define EM_GETRECT               0x00b2
915 #define EM_SETRECT               0x00b3
916 #define EM_SETRECTNP             0x00b4
917 #define EM_SCROLL                0x00b5
918 #define EM_LINESCROLL            0x00b6
919 #define EM_SCROLLCARET           0x00b7
920 #define EM_GETMODIFY             0x00b8
921 #define EM_SETMODIFY             0x00b9
922 #define EM_GETLINECOUNT          0x00ba
923 #define EM_LINEINDEX             0x00bb
924 #define EM_SETHANDLE             0x00bc
925 #define EM_GETHANDLE             0x00bd
926 #define EM_GETTHUMB              0x00be
927 /* FIXME : missing from specs 0x00bf and 0x00c0 */
928 #define EM_LINELENGTH            0x00c1
929 #define EM_REPLACESEL            0x00c2
930 /* FIXME : missing from specs 0x00c3 */
931 #define EM_GETLINE               0x00c4
932 #define EM_LIMITTEXT             0x00c5
933 #define EM_CANUNDO               0x00c6
934 #define EM_UNDO                  0x00c7
935 #define EM_FMTLINES              0x00c8
936 #define EM_LINEFROMCHAR          0x00c9
937 /* FIXME : missing from specs 0x00ca */
938 #define EM_SETTABSTOPS           0x00cb
939 #define EM_SETPASSWORDCHAR       0x00cc
940 #define EM_EMPTYUNDOBUFFER       0x00cd
941 #define EM_GETFIRSTVISIBLELINE   0x00ce
942 #define EM_SETREADONLY           0x00cf
943 #define EM_SETWORDBREAKPROC      0x00d0
944 #define EM_GETWORDBREAKPROC      0x00d1
945 #define EM_GETPASSWORDCHAR       0x00d2
946 #define EM_SETMARGINS            0x00d3
947 #define EM_GETMARGINS            0x00d4
948 #define EM_GETLIMITTEXT          0x00d5
949 #define EM_POSFROMCHAR           0x00d6
950 #define EM_CHARFROMPOS           0x00d7
951 /* a name change since win95 */
952 #define EM_SETLIMITTEXT          EM_LIMITTEXT
953
954 /* EDITWORDBREAKPROC code values */
955 #define WB_LEFT         0
956 #define WB_RIGHT        1
957 #define WB_ISDELIMITER  2
958
959 /* Edit control notification codes */
960 #define EN_SETFOCUS     0x0100
961 #define EN_KILLFOCUS    0x0200
962 #define EN_CHANGE       0x0300
963 #define EN_UPDATE       0x0400
964 #define EN_ERRSPACE     0x0500
965 #define EN_MAXTEXT      0x0501
966 #define EN_HSCROLL      0x0601
967 #define EN_VSCROLL      0x0602
968
969 /* New since win95 : EM_SETMARGIN parameters */
970 #define EC_LEFTMARGIN   0x0001
971 #define EC_RIGHTMARGIN  0x0002
972 #define EC_USEFONTINFO  0xffff
973
974
975   /* GetSystemMetrics() codes */
976 #define SM_CXSCREEN            0
977 #define SM_CYSCREEN            1
978 #define SM_CXVSCROLL           2
979 #define SM_CYHSCROLL           3
980 #define SM_CYCAPTION           4
981 #define SM_CXBORDER            5
982 #define SM_CYBORDER            6
983 #define SM_CXDLGFRAME          7
984 #define SM_CYDLGFRAME          8
985 #define SM_CYVTHUMB            9
986 #define SM_CXHTHUMB           10
987 #define SM_CXICON             11
988 #define SM_CYICON             12
989 #define SM_CXCURSOR           13
990 #define SM_CYCURSOR           14
991 #define SM_CYMENU             15
992 #define SM_CXFULLSCREEN       16
993 #define SM_CYFULLSCREEN       17
994 #define SM_CYKANJIWINDOW      18
995 #define SM_MOUSEPRESENT       19
996 #define SM_CYVSCROLL          20
997 #define SM_CXHSCROLL          21
998 #define SM_DEBUG              22
999 #define SM_SWAPBUTTON         23
1000 #define SM_RESERVED1          24
1001 #define SM_RESERVED2          25
1002 #define SM_RESERVED3          26
1003 #define SM_RESERVED4          27
1004 #define SM_CXMIN              28
1005 #define SM_CYMIN              29
1006 #define SM_CXSIZE             30
1007 #define SM_CYSIZE             31
1008 #define SM_CXFRAME            32
1009 #define SM_CYFRAME            33
1010 #define SM_CXMINTRACK         34
1011 #define SM_CYMINTRACK         35
1012 #define SM_CXDOUBLECLK        36
1013 #define SM_CYDOUBLECLK        37
1014 #define SM_CXICONSPACING      38
1015 #define SM_CYICONSPACING      39
1016 #define SM_MENUDROPALIGNMENT  40
1017 #define SM_PENWINDOWS         41
1018 #define SM_DBCSENABLED        42
1019 #define SM_CMOUSEBUTTONS      43
1020 #define SM_CXFIXEDFRAME       SM_CXDLGFRAME
1021 #define SM_CYFIXEDFRAME       SM_CYDLGFRAME
1022 #define SM_CXSIZEFRAME        SM_CXFRAME
1023 #define SM_CYSIZEFRAME        SM_CYFRAME
1024 #define SM_SECURE             44
1025 #define SM_CXEDGE             45
1026 #define SM_CYEDGE             46
1027 #define SM_CXMINSPACING       47
1028 #define SM_CYMINSPACING       48
1029 #define SM_CXSMICON           49
1030 #define SM_CYSMICON           50
1031 #define SM_CYSMCAPTION        51
1032 #define SM_CXSMSIZE           52
1033 #define SM_CYSMSIZE           53
1034 #define SM_CXMENUSIZE         54
1035 #define SM_CYMENUSIZE         55
1036 #define SM_ARRANGE            56
1037 #define SM_CXMINIMIZED        57
1038 #define SM_CYMINIMIZED        58
1039 #define SM_CXMAXTRACK         59
1040 #define SM_CYMAXTRACK         60
1041 #define SM_CXMAXIMIZED        61
1042 #define SM_CYMAXIMIZED        62
1043 #define SM_NETWORK            63
1044 #define SM_CLEANBOOT          67
1045 #define SM_CXDRAG             68
1046 #define SM_CYDRAG             69
1047 #define SM_SHOWSOUNDS         70
1048 #define SM_CXMENUCHECK        71
1049 #define SM_CYMENUCHECK        72
1050 #define SM_SLOWMACHINE        73
1051 #define SM_MIDEASTENABLED     74
1052 #define SM_MOUSEWHEELPRESENT  75
1053 #define SM_XVIRTUALSCREEN     76
1054 #define SM_YVIRTUALSCREEN     77
1055 #define SM_CXVIRTUALSCREEN    78
1056 #define SM_CYVIRTUALSCREEN    79
1057 #define SM_CMONITORS          80
1058 #define SM_SAMEDISPLAYFORMAT  81
1059 #define SM_IMMENABLED         82
1060 #define SM_CXFOCUSBORDER      83
1061 #define SM_CYFOCUSBORDER      84
1062 #define SM_TABLETPC           86
1063 #define SM_MEDIACENTER        87
1064 #define SM_STARTER            88
1065 #define SM_SERVERR2           89
1066 #define SM_CMETRICS           90
1067 #define SM_MOUSEHORIZONTALWHEELPRESENT 91
1068
1069 #define SM_REMOTESESSION        0x1000
1070 #define SM_SHUTTINGDOWN         0x2000
1071 #define SM_REMOTECONTROL        0x2001
1072 #define SM_CARETBLINKINGENABLED 0x2002
1073
1074 #define PMB_ACTIVE      0x00000001
1075
1076 /* Messages */
1077 #define WM_NULL                 0x0000
1078 #define WM_CREATE               0x0001
1079 #define WM_DESTROY              0x0002
1080 #define WM_MOVE                 0x0003
1081 #define WM_SIZEWAIT             0x0004
1082 #define WM_SIZE                 0x0005
1083 #define WM_ACTIVATE             0x0006
1084 #define WM_SETFOCUS             0x0007
1085 #define WM_KILLFOCUS            0x0008
1086 #define WM_SETVISIBLE           0x0009
1087 #define WM_ENABLE               0x000a
1088 #define WM_SETREDRAW            0x000b
1089 #define WM_SETTEXT              0x000c
1090 #define WM_GETTEXT              0x000d
1091 #define WM_GETTEXTLENGTH        0x000e
1092 #define WM_PAINT                0x000f
1093 #define WM_CLOSE                0x0010
1094 #define WM_QUERYENDSESSION      0x0011
1095 #define WM_QUIT                 0x0012
1096 #define WM_QUERYOPEN            0x0013
1097 #define WM_ERASEBKGND           0x0014
1098 #define WM_SYSCOLORCHANGE       0x0015
1099 #define WM_ENDSESSION           0x0016
1100 #define WM_SYSTEMERROR          0x0017
1101 #define WM_SHOWWINDOW           0x0018
1102 #define WM_CTLCOLOR             0x0019
1103 #define WM_WININICHANGE         0x001a
1104 #define WM_SETTINGCHANGE        WM_WININICHANGE
1105 #define WM_DEVMODECHANGE        0x001b
1106 #define WM_ACTIVATEAPP          0x001c
1107 #define WM_FONTCHANGE           0x001d
1108 #define WM_TIMECHANGE           0x001e
1109 #define WM_CANCELMODE           0x001f
1110 #define WM_SETCURSOR            0x0020
1111 #define WM_MOUSEACTIVATE        0x0021
1112 #define WM_CHILDACTIVATE        0x0022
1113 #define WM_QUEUESYNC            0x0023
1114 #define WM_GETMINMAXINFO        0x0024
1115
1116 #define WM_PAINTICON            0x0026
1117 #define WM_ICONERASEBKGND       0x0027
1118 #define WM_NEXTDLGCTL           0x0028
1119 #define WM_ALTTABACTIVE         0x0029
1120 #define WM_SPOOLERSTATUS        0x002a
1121 #define WM_DRAWITEM             0x002b
1122 #define WM_MEASUREITEM          0x002c
1123 #define WM_DELETEITEM           0x002d
1124 #define WM_VKEYTOITEM           0x002e
1125 #define WM_CHARTOITEM           0x002f
1126 #define WM_SETFONT              0x0030
1127 #define WM_GETFONT              0x0031
1128 #define WM_SETHOTKEY            0x0032
1129 #define WM_GETHOTKEY            0x0033
1130 #define WM_FILESYSCHANGE        0x0034
1131 #define WM_ISACTIVEICON         0x0035
1132 #define WM_QUERYPARKICON        0x0036
1133 #define WM_QUERYDRAGICON        0x0037
1134 #define WM_QUERYSAVESTATE       0x0038
1135 #define WM_COMPAREITEM          0x0039
1136 #define WM_TESTING              0x003a
1137
1138 #define WM_GETOBJECT            0x003d
1139
1140 #define WM_ACTIVATESHELLWINDOW  0x003e
1141
1142 #define WM_COMPACTING           0x0041
1143
1144 #define WM_COMMNOTIFY           0x0044
1145 #define WM_WINDOWPOSCHANGING    0x0046
1146 #define WM_WINDOWPOSCHANGED     0x0047
1147 #define WM_POWER                0x0048
1148
1149   /* Win32 4.0 messages */
1150 #define WM_COPYDATA             0x004a
1151 #define WM_CANCELJOURNAL        0x004b
1152 #define WM_NOTIFY               0x004e
1153 #define WM_INPUTLANGCHANGEREQUEST       0x0050
1154 #define WM_INPUTLANGCHANGE              0x0051
1155 #define WM_TCARD                0x0052
1156 #define WM_HELP                 0x0053
1157 #define WM_USERCHANGED          0x0054
1158 #define WM_NOTIFYFORMAT         0x0055
1159
1160 #define WM_CONTEXTMENU          0x007b
1161 #define WM_STYLECHANGING        0x007c
1162 #define WM_STYLECHANGED         0x007d
1163 #define WM_DISPLAYCHANGE        0x007e
1164 #define WM_GETICON              0x007f
1165 #define WM_SETICON              0x0080
1166
1167   /* Non-client system messages */
1168 #define WM_NCCREATE         0x0081
1169 #define WM_NCDESTROY        0x0082
1170 #define WM_NCCALCSIZE       0x0083
1171 #define WM_NCHITTEST        0x0084
1172 #define WM_NCPAINT          0x0085
1173 #define WM_NCACTIVATE       0x0086
1174
1175 #define WM_GETDLGCODE       0x0087
1176 #define WM_SYNCPAINT        0x0088
1177 #define WM_SYNCTASK         0x0089
1178
1179   /* Non-client mouse messages */
1180 #define WM_NCMOUSEMOVE      0x00a0
1181 #define WM_NCLBUTTONDOWN    0x00a1
1182 #define WM_NCLBUTTONUP      0x00a2
1183 #define WM_NCLBUTTONDBLCLK  0x00a3
1184 #define WM_NCRBUTTONDOWN    0x00a4
1185 #define WM_NCRBUTTONUP      0x00a5
1186 #define WM_NCRBUTTONDBLCLK  0x00a6
1187 #define WM_NCMBUTTONDOWN    0x00a7
1188 #define WM_NCMBUTTONUP      0x00a8
1189 #define WM_NCMBUTTONDBLCLK  0x00a9
1190
1191 #define WM_NCXBUTTONDOWN    0x00ab
1192 #define WM_NCXBUTTONUP      0x00ac
1193 #define WM_NCXBUTTONDBLCLK  0x00ad
1194
1195   /* Raw input */
1196 #define WM_INPUT            0x00ff
1197
1198   /* Keyboard messages */
1199 #define WM_KEYDOWN          0x0100
1200 #define WM_KEYUP            0x0101
1201 #define WM_CHAR             0x0102
1202 #define WM_DEADCHAR         0x0103
1203 #define WM_SYSKEYDOWN       0x0104
1204 #define WM_SYSKEYUP         0x0105
1205 #define WM_SYSCHAR          0x0106
1206 #define WM_SYSDEADCHAR      0x0107
1207 #define WM_KEYFIRST         WM_KEYDOWN
1208 #define WM_KEYLAST          0x0108
1209
1210 /* Win32 4.0 messages for IME */
1211 #define WM_IME_STARTCOMPOSITION     0x010d
1212 #define WM_IME_ENDCOMPOSITION       0x010e
1213 #define WM_IME_COMPOSITION          0x010f
1214 #define WM_IME_KEYLAST              0x010f
1215
1216 #define WM_INITDIALOG       0x0110
1217 #define WM_COMMAND          0x0111
1218 #define WM_SYSCOMMAND       0x0112
1219 #define WM_TIMER            0x0113
1220
1221   /* scroll messages */
1222 #define WM_HSCROLL          0x0114
1223 #define WM_VSCROLL          0x0115
1224
1225 /* Menu messages */
1226 #define WM_INITMENU         0x0116
1227 #define WM_INITMENUPOPUP    0x0117
1228
1229 #define WM_MENUSELECT       0x011F
1230 #define WM_MENUCHAR         0x0120
1231 #define WM_ENTERIDLE        0x0121
1232
1233 #define WM_MENURBUTTONUP    0x0122
1234 #define WM_MENUDRAG         0x0123
1235 #define WM_MENUGETOBJECT    0x0124
1236 #define WM_UNINITMENUPOPUP  0x0125
1237 #define WM_MENUCOMMAND      0x0126
1238
1239 #define WM_CHANGEUISTATE    0x0127
1240 #define WM_UPDATEUISTATE    0x0128
1241 #define WM_QUERYUISTATE     0x0129
1242
1243 /* UI flags for WM_*UISTATE */
1244 /* for low-order word of wparam */
1245 #define UIS_SET                         1
1246 #define UIS_CLEAR                       2
1247 #define UIS_INITIALIZE                  3
1248 /* for hi-order word of wparam */
1249 #define UISF_HIDEFOCUS                  0x1
1250 #define UISF_HIDEACCEL                  0x2
1251 #define UISF_ACTIVE                     0x4
1252
1253 #define WM_LBTRACKPOINT     0x0131
1254
1255   /* Win32 CTLCOLOR messages */
1256 #define WM_CTLCOLORMSGBOX    0x0132
1257 #define WM_CTLCOLOREDIT      0x0133
1258 #define WM_CTLCOLORLISTBOX   0x0134
1259 #define WM_CTLCOLORBTN       0x0135
1260 #define WM_CTLCOLORDLG       0x0136
1261 #define WM_CTLCOLORSCROLLBAR 0x0137
1262 #define WM_CTLCOLORSTATIC    0x0138
1263
1264 #define MN_GETHMENU          0x01E1
1265
1266   /* Mouse messages */
1267 #define WM_MOUSEMOVE        0x0200
1268 #define WM_LBUTTONDOWN      0x0201
1269 #define WM_LBUTTONUP        0x0202
1270 #define WM_LBUTTONDBLCLK    0x0203
1271 #define WM_RBUTTONDOWN      0x0204
1272 #define WM_RBUTTONUP        0x0205
1273 #define WM_RBUTTONDBLCLK    0x0206
1274 #define WM_MBUTTONDOWN      0x0207
1275 #define WM_MBUTTONUP        0x0208
1276 #define WM_MBUTTONDBLCLK    0x0209
1277 #define WM_MOUSEWHEEL       0x020A
1278 #define WM_XBUTTONDOWN      0x020B
1279 #define WM_XBUTTONUP        0x020C
1280 #define WM_XBUTTONDBLCLK    0x020D
1281
1282 #define XBUTTON1            0x0001
1283 #define XBUTTON2            0x0002
1284
1285 #define WM_MOUSEFIRST       0x0200
1286 #define WM_MOUSELAST        0x020D
1287
1288 #define WHEEL_DELTA      120
1289 #define WHEEL_PAGESCROLL  (UINT_MAX)
1290 #define GET_WHEEL_DELTA_WPARAM(wParam)  ((short)HIWORD(wParam))
1291
1292 #define WM_PARENTNOTIFY     0x0210
1293 #define WM_ENTERMENULOOP    0x0211
1294 #define WM_EXITMENULOOP     0x0212
1295 #define WM_NEXTMENU         0x0213
1296
1297   /* Win32 4.0 messages */
1298 #define WM_SIZING           0x0214
1299 #define WM_CAPTURECHANGED   0x0215
1300 #define WM_MOVING           0x0216
1301 #define WM_POWERBROADCAST   0x0218
1302 #define WM_DEVICECHANGE     0x0219
1303
1304 /* wParam for WM_SIZING message */
1305 #define WMSZ_LEFT           1
1306 #define WMSZ_RIGHT          2
1307 #define WMSZ_TOP            3
1308 #define WMSZ_TOPLEFT        4
1309 #define WMSZ_TOPRIGHT       5
1310 #define WMSZ_BOTTOM         6
1311 #define WMSZ_BOTTOMLEFT     7
1312 #define WMSZ_BOTTOMRIGHT    8
1313
1314 /* wParam for WM_POWERBROADCAST */
1315 #define PBT_APMQUERYSUSPEND       0x0000
1316 #define PBT_APMQUERYSTANDBY       0x0001
1317 #define PBT_APMQUERYSUSPENDFAILED 0x0002
1318 #define PBT_APMQUERYSTANDBYFAILED 0x0003
1319 #define PBT_APMSUSPEND            0x0004
1320 #define PBT_APMSTANDBY            0x0005
1321 #define PBT_APMRESUMECRITICAL     0x0006
1322 #define PBT_APMRESUMESUSPEND      0x0007
1323 #define PBT_APMRESUMESTANDBY      0x0008
1324 #define PBT_APMBATTERYLOW         0x0009
1325 #define PBT_APMPOWERSTATUSCHANGE  0x000A
1326 #define PBT_APMOEMEVENT           0x000B
1327 #define PBT_APMRESUMEAUTOMATIC    0x0012
1328
1329 #define PBTF_APMRESUMEFROMFAILURE       0x00000001
1330
1331   /* MDI messages */
1332 #define WM_MDICREATE        0x0220
1333 #define WM_MDIDESTROY       0x0221
1334 #define WM_MDIACTIVATE      0x0222
1335 #define WM_MDIRESTORE       0x0223
1336 #define WM_MDINEXT          0x0224
1337 #define WM_MDIMAXIMIZE      0x0225
1338 #define WM_MDITILE          0x0226
1339 #define WM_MDICASCADE       0x0227
1340 #define WM_MDIICONARRANGE   0x0228
1341 #define WM_MDIGETACTIVE     0x0229
1342 #define WM_MDIREFRESHMENU   0x0234
1343
1344   /* D&D messages */
1345 #define WM_DROPOBJECT       0x022A
1346 #define WM_QUERYDROPOBJECT  0x022B
1347 #define WM_BEGINDRAG        0x022C
1348 #define WM_DRAGLOOP         0x022D
1349 #define WM_DRAGSELECT       0x022E
1350 #define WM_DRAGMOVE         0x022F
1351 #define WM_MDISETMENU       0x0230
1352
1353 #define WM_ENTERSIZEMOVE    0x0231
1354 #define WM_EXITSIZEMOVE     0x0232
1355 #define WM_DROPFILES        0x0233
1356
1357
1358 /* Win32 4.0 messages for IME */
1359 #define WM_IME_SETCONTEXT           0x0281
1360 #define WM_IME_NOTIFY               0x0282
1361 #define WM_IME_CONTROL              0x0283
1362 #define WM_IME_COMPOSITIONFULL      0x0284
1363 #define WM_IME_SELECT               0x0285
1364 #define WM_IME_CHAR                 0x0286
1365 /* Win32 5.0 messages for IME */
1366 #define WM_IME_REQUEST              0x0288
1367
1368 /* Win32 4.0 messages for IME */
1369 #define WM_IME_KEYDOWN              0x0290
1370 #define WM_IME_KEYUP                0x0291
1371
1372 #define WM_WTSSESSION_CHANGE        0x02B1
1373
1374 #define WM_TABLET_FIRST             0x02c0
1375 #define WM_TABLET_LAST              0x02df
1376
1377 /* Clipboard command messages */
1378 #define WM_CUT               0x0300
1379 #define WM_COPY              0x0301
1380 #define WM_PASTE             0x0302
1381 #define WM_CLEAR             0x0303
1382 #define WM_UNDO              0x0304
1383
1384 /* Clipboard owner messages */
1385 #define WM_RENDERFORMAT      0x0305
1386 #define WM_RENDERALLFORMATS  0x0306
1387 #define WM_DESTROYCLIPBOARD  0x0307
1388
1389 /* Clipboard viewer messages */
1390 #define WM_DRAWCLIPBOARD     0x0308
1391 #define WM_PAINTCLIPBOARD    0x0309
1392 #define WM_VSCROLLCLIPBOARD  0x030A
1393 #define WM_SIZECLIPBOARD     0x030B
1394 #define WM_ASKCBFORMATNAME   0x030C
1395 #define WM_CHANGECBCHAIN     0x030D
1396 #define WM_HSCROLLCLIPBOARD  0x030E
1397
1398 #define WM_QUERYNEWPALETTE   0x030F
1399 #define WM_PALETTEISCHANGING 0x0310
1400 #define WM_PALETTECHANGED    0x0311
1401 #define WM_HOTKEY            0x0312
1402
1403 #define WM_PRINT             0x0317
1404 #define WM_PRINTCLIENT       0x0318
1405 #define WM_APPCOMMAND        0x0319
1406 #define WM_THEMECHANGED      0x031A
1407
1408 #define WM_HANDHELDFIRST     0x0358
1409 #define WM_HANDHELDLAST      0x035F
1410
1411 #define WM_AFXFIRST          0x0360
1412 #define WM_AFXLAST           0x037F
1413
1414 #define WM_PENWINFIRST      0x0380
1415 #define WM_PENWINLAST       0x038F
1416
1417 #define WM_APP               0x8000
1418
1419 /* MsgWaitForMultipleObjectsEx flags */
1420 #define MWMO_WAITALL         0x0001
1421 #define MWMO_ALERTABLE       0x0002
1422 #define MWMO_INPUTAVAILABLE  0x0004
1423
1424 /* WM_GETDLGCODE values */
1425 #define DLGC_WANTARROWS      0x0001
1426 #define DLGC_WANTTAB         0x0002
1427 #define DLGC_WANTALLKEYS     0x0004
1428 #define DLGC_WANTMESSAGE     0x0004
1429 #define DLGC_HASSETSEL       0x0008
1430 #define DLGC_DEFPUSHBUTTON   0x0010
1431 #define DLGC_UNDEFPUSHBUTTON 0x0020
1432 #define DLGC_RADIOBUTTON     0x0040
1433 #define DLGC_WANTCHARS       0x0080
1434 #define DLGC_STATIC          0x0100
1435 #define DLGC_BUTTON          0x2000
1436
1437 /* Standard dialog button IDs */
1438 #define IDOK                1
1439 #define IDCANCEL            2
1440 #define IDABORT             3
1441 #define IDRETRY             4
1442 #define IDIGNORE            5
1443 #define IDYES               6
1444 #define IDNO                7
1445 #define IDCLOSE             8
1446 #define IDHELP              9
1447 #define IDTRYAGAIN         10
1448 #define IDCONTINUE         11
1449
1450 #ifndef IDTIMEOUT
1451 #define IDTIMEOUT       32000
1452 #endif
1453
1454 /* Used for EnumDisplaySettingsEx */
1455 #define ENUM_CURRENT_SETTINGS  ((DWORD) -1)
1456 #define ENUM_REGISTRY_SETTINGS ((DWORD) -2)
1457
1458 /****** Window classes ******/
1459
1460 typedef struct tagCREATESTRUCTA
1461 {
1462     LPVOID      lpCreateParams;
1463     HINSTANCE hInstance;
1464     HMENU     hMenu;
1465     HWND      hwndParent;
1466     INT       cy;
1467     INT       cx;
1468     INT       y;
1469     INT       x;
1470     LONG        style;
1471     LPCSTR      lpszName;
1472     LPCSTR      lpszClass;
1473     DWORD       dwExStyle;
1474 } CREATESTRUCTA, *LPCREATESTRUCTA;
1475
1476 typedef struct tagCREATESTRUCTW
1477 {
1478     LPVOID      lpCreateParams;
1479     HINSTANCE hInstance;
1480     HMENU     hMenu;
1481     HWND      hwndParent;
1482     INT       cy;
1483     INT       cx;
1484     INT       y;
1485     INT       x;
1486     LONG        style;
1487     LPCWSTR     lpszName;
1488     LPCWSTR     lpszClass;
1489     DWORD       dwExStyle;
1490 } CREATESTRUCTW, *LPCREATESTRUCTW;
1491
1492 DECL_WINELIB_TYPE_AW(CREATESTRUCT)
1493 DECL_WINELIB_TYPE_AW(LPCREATESTRUCT)
1494
1495 typedef struct tagPAINTSTRUCT
1496 {
1497     HDC   hdc;
1498     BOOL  fErase;
1499     RECT  rcPaint;
1500     BOOL  fRestore;
1501     BOOL  fIncUpdate;
1502     BYTE  rgbReserved[32];
1503 } PAINTSTRUCT, *PPAINTSTRUCT, *LPPAINTSTRUCT;
1504
1505 typedef struct tagCLIENTCREATESTRUCT
1506 {
1507     HMENU   hWindowMenu;
1508     UINT    idFirstChild;
1509 } CLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
1510
1511
1512 typedef struct tagMDICREATESTRUCTA
1513 {
1514     LPCSTR       szClass;
1515     LPCSTR       szTitle;
1516     HINSTANCE  hOwner;
1517     INT        x;
1518     INT        y;
1519     INT        cx;
1520     INT        cy;
1521     DWORD        style;
1522     LPARAM       lParam;
1523 } MDICREATESTRUCTA, *LPMDICREATESTRUCTA;
1524
1525 typedef struct tagMDICREATESTRUCTW
1526 {
1527     LPCWSTR      szClass;
1528     LPCWSTR      szTitle;
1529     HINSTANCE  hOwner;
1530     INT        x;
1531     INT        y;
1532     INT        cx;
1533     INT        cy;
1534     DWORD        style;
1535     LPARAM       lParam;
1536 } MDICREATESTRUCTW, *LPMDICREATESTRUCTW;
1537
1538 DECL_WINELIB_TYPE_AW(MDICREATESTRUCT)
1539 DECL_WINELIB_TYPE_AW(LPMDICREATESTRUCT)
1540
1541 #define MDITILE_VERTICAL     0x0000
1542 #define MDITILE_HORIZONTAL   0x0001
1543 #define MDITILE_SKIPDISABLED 0x0002
1544 #define MDITILE_ZORDER       0x0004
1545
1546 #define MDIS_ALLCHILDSTYLES  0x0001
1547
1548 typedef struct tagSTYLESTRUCT {
1549     DWORD   styleOld;
1550     DWORD   styleNew;
1551 } STYLESTRUCT, *LPSTYLESTRUCT;
1552
1553 #define WC_DIALOG  MAKEINTATOM(0x8002)
1554
1555   /* Offsets for GetWindowLong() and GetWindowWord() */
1556 #define GWL_EXSTYLE         (-20)
1557 #define GWL_STYLE           (-16)
1558 #if !defined _WIN64 && !defined __WINESRC__
1559 # define GWL_USERDATA        (-21)
1560 # define GWL_ID              (-12)
1561 # define GWL_HWNDPARENT      (-8)
1562 # define GWL_HINSTANCE       (-6)
1563 # define GWL_WNDPROC         (-4)
1564 # define DWL_MSGRESULT       0
1565 # define DWL_DLGPROC         4
1566 # define DWL_USER            8
1567 #endif /* _WIN64 && __WINESRC__ */
1568
1569   /* Offsets for GetWindowLongPtr() and SetWindowLongPtr() */
1570 #define GWLP_USERDATA        (-21)
1571 #define GWLP_ID              (-12)
1572 #define GWLP_HWNDPARENT      (-8)
1573 #define GWLP_HINSTANCE       (-6)
1574 #define GWLP_WNDPROC         (-4)
1575 #define DWLP_MSGRESULT       0
1576 #define DWLP_DLGPROC         DWLP_MSGRESULT + sizeof(LRESULT)
1577 #define DWLP_USER            DWLP_DLGPROC + sizeof(DLGPROC)
1578
1579   /* GetWindow() constants */
1580 #define GW_HWNDFIRST    0
1581 #define GW_HWNDLAST     1
1582 #define GW_HWNDNEXT     2
1583 #define GW_HWNDPREV     3
1584 #define GW_OWNER        4
1585 #define GW_CHILD        5
1586
1587 /* GetAncestor() constants */
1588 #define GA_PARENT       1
1589 #define GA_ROOT         2
1590 #define GA_ROOTOWNER    3
1591
1592   /* WM_GETMINMAXINFO struct */
1593 typedef struct tagMINMAXINFO
1594 {
1595     POINT   ptReserved;
1596     POINT   ptMaxSize;
1597     POINT   ptMaxPosition;
1598     POINT   ptMinTrackSize;
1599     POINT   ptMaxTrackSize;
1600 } MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
1601
1602
1603   /* RedrawWindow() flags */
1604 #define RDW_INVALIDATE       0x0001
1605 #define RDW_INTERNALPAINT    0x0002
1606 #define RDW_ERASE            0x0004
1607 #define RDW_VALIDATE         0x0008
1608 #define RDW_NOINTERNALPAINT  0x0010
1609 #define RDW_NOERASE          0x0020
1610 #define RDW_NOCHILDREN       0x0040
1611 #define RDW_ALLCHILDREN      0x0080
1612 #define RDW_UPDATENOW        0x0100
1613 #define RDW_ERASENOW         0x0200
1614 #define RDW_FRAME            0x0400
1615 #define RDW_NOFRAME          0x0800
1616
1617 /* debug flags */
1618 #define DBGFILL_ALLOC  0xfd
1619 #define DBGFILL_FREE   0xfb
1620 #define DBGFILL_BUFFER 0xf9
1621 #define DBGFILL_STACK  0xf7
1622
1623   /* WM_WINDOWPOSCHANGING/CHANGED struct */
1624 typedef struct tagWINDOWPOS
1625 {
1626     HWND  hwnd;
1627     HWND  hwndInsertAfter;
1628     INT   x;
1629     INT   y;
1630     INT   cx;
1631     INT   cy;
1632     UINT  flags;
1633 } WINDOWPOS, *PWINDOWPOS, *LPWINDOWPOS;
1634
1635
1636   /* WM_MOUSEACTIVATE return values */
1637 #define MA_ACTIVATE             1
1638 #define MA_ACTIVATEANDEAT       2
1639 #define MA_NOACTIVATE           3
1640 #define MA_NOACTIVATEANDEAT     4
1641
1642   /* WM_ACTIVATE wParam values */
1643 #define WA_INACTIVE             0
1644 #define WA_ACTIVE               1
1645 #define WA_CLICKACTIVE          2
1646
1647 /* WM_GETICON/WM_SETICON params values */
1648 #define ICON_SMALL              0
1649 #define ICON_BIG                1
1650 #define ICON_SMALL2             2
1651
1652   /* WM_NCCALCSIZE parameter structure */
1653 typedef struct
1654 {
1655     RECT       rgrc[3];
1656     WINDOWPOS *lppos;
1657 } NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
1658
1659
1660   /* WM_NCCALCSIZE return flags */
1661 #define WVR_ALIGNTOP        0x0010
1662 #define WVR_ALIGNLEFT       0x0020
1663 #define WVR_ALIGNBOTTOM     0x0040
1664 #define WVR_ALIGNRIGHT      0x0080
1665 #define WVR_HREDRAW         0x0100
1666 #define WVR_VREDRAW         0x0200
1667 #define WVR_REDRAW          (WVR_HREDRAW | WVR_VREDRAW)
1668 #define WVR_VALIDRECTS      0x0400
1669
1670   /* WM_NCHITTEST return codes */
1671 #define HTERROR             (-2)
1672 #define HTTRANSPARENT       (-1)
1673 #define HTNOWHERE           0
1674 #define HTCLIENT            1
1675 #define HTCAPTION           2
1676 #define HTSYSMENU           3
1677 #define HTSIZE              4
1678 #define HTMENU              5
1679 #define HTHSCROLL           6
1680 #define HTVSCROLL           7
1681 #define HTMINBUTTON         8
1682 #define HTMAXBUTTON         9
1683 #define HTLEFT              10
1684 #define HTRIGHT             11
1685 #define HTTOP               12
1686 #define HTTOPLEFT           13
1687 #define HTTOPRIGHT          14
1688 #define HTBOTTOM            15
1689 #define HTBOTTOMLEFT        16
1690 #define HTBOTTOMRIGHT       17
1691 #define HTBORDER            18
1692 #define HTGROWBOX           HTSIZE
1693 #define HTREDUCE            HTMINBUTTON
1694 #define HTZOOM              HTMAXBUTTON
1695 #define HTOBJECT            19
1696 #define HTCLOSE             20
1697 #define HTHELP              21
1698 #define HTSIZEFIRST         HTLEFT
1699 #define HTSIZELAST          HTBOTTOMRIGHT
1700
1701 /* SendMessageTimeout flags */
1702 #define SMTO_NORMAL              0x0000
1703 #define SMTO_BLOCK               0x0001
1704 #define SMTO_ABORTIFHUNG         0x0002
1705 #define SMTO_NOTIMEOUTIFNOTHUNG  0x0008
1706
1707   /* WM_SYSCOMMAND parameters */
1708 #ifdef SC_SIZE /* at least HP-UX: already defined in /usr/include/sys/signal.h */
1709 #undef SC_SIZE
1710 #endif
1711 #define SC_SIZE         0xf000
1712 #define SC_MOVE         0xf010
1713 #define SC_MINIMIZE     0xf020
1714 #define SC_MAXIMIZE     0xf030
1715 #define SC_NEXTWINDOW   0xf040
1716 #define SC_PREVWINDOW   0xf050
1717 #define SC_CLOSE        0xf060
1718 #define SC_VSCROLL      0xf070
1719 #define SC_HSCROLL      0xf080
1720 #define SC_MOUSEMENU    0xf090
1721 #define SC_KEYMENU      0xf100
1722 #define SC_ARRANGE      0xf110
1723 #define SC_RESTORE      0xf120
1724 #define SC_TASKLIST     0xf130
1725 #define SC_SCREENSAVE   0xf140
1726 #define SC_HOTKEY       0xf150
1727   /* Win32 4.0 */
1728 #define SC_DEFAULT      0xf160
1729 #define SC_MONITORPOWER 0xf170
1730 #define SC_CONTEXTHELP  0xf180
1731 #define SC_SEPARATOR    0xf00f
1732
1733 /* obsolete names(SC_ICON and SC_ZOOM) */
1734 #define SC_ICON   SC_MINIMIZE
1735 #define SC_ZOOM   SC_MAXIMIZE
1736
1737 #ifndef NOWINSTYLES
1738 #define CS_VREDRAW          0x00000001
1739 #define CS_HREDRAW          0x00000002
1740 #define CS_KEYCVTWINDOW     0x00000004
1741 #define CS_DBLCLKS          0x00000008
1742 #define CS_OWNDC            0x00000020
1743 #define CS_CLASSDC          0x00000040
1744 #define CS_PARENTDC         0x00000080
1745 #define CS_NOKEYCVT         0x00000100
1746 #define CS_NOCLOSE          0x00000200
1747 #define CS_SAVEBITS         0x00000800
1748 #define CS_BYTEALIGNCLIENT  0x00001000
1749 #define CS_BYTEALIGNWINDOW  0x00002000
1750 #define CS_GLOBALCLASS      0x00004000
1751 #define CS_IME              0x00010000
1752 #define CS_DROPSHADOW       0x00020000
1753 #endif /* NOWINSTYLES */
1754
1755 #define PRF_CHECKVISIBLE    0x00000001L
1756 #define PRF_NONCLIENT       0x00000002L
1757 #define PRF_CLIENT          0x00000004L
1758 #define PRF_ERASEBKGND      0x00000008L
1759 #define PRF_CHILDREN        0x00000010L
1760 #define PRF_OWNED           0x00000020L
1761
1762   /* Offsets for GetClassLong() and GetClassWord() */
1763 #if !defined _WIN64 && !defined __WINESRC__
1764 # define GCL_MENUNAME       (-8)
1765 # define GCL_HBRBACKGROUND  (-10)
1766 # define GCL_HCURSOR        (-12)
1767 # define GCL_HICON          (-14)
1768 # define GCL_HMODULE        (-16)
1769 # define GCL_WNDPROC        (-24)
1770 # define GCL_HICONSM        (-34)
1771 #endif /* _WIN64 && __WINESRC__ */
1772
1773 #define GCL_CBWNDEXTRA      (-18)
1774 #define GCL_CBCLSEXTRA      (-20)
1775 #define GCL_STYLE           (-26)
1776 #define GCW_ATOM            (-32)
1777
1778 #define GCLP_MENUNAME       (-8)
1779 #define GCLP_HBRBACKGROUND  (-10)
1780 #define GCLP_HCURSOR        (-12)
1781 #define GCLP_HICON          (-14)
1782 #define GCLP_HMODULE        (-16)
1783 #define GCLP_WNDPROC        (-24)
1784 #define GCLP_HICONSM        (-34)
1785
1786 /* BroadcastSystemMessage flags */
1787 #define BSM_ALLCOMPONENTS        0x00000000
1788 #define BSM_VXDS                 0x00000001
1789 #define BSM_NETDRIVER            0x00000002
1790 #define BSM_INSTALLABLEDRIVERS   0x00000004
1791 #define BSM_APPLICATIONS         0x00000008
1792
1793 #define BSF_QUERY                0x00000001
1794 #define BSF_IGNORECURRENTTASK    0x00000002
1795 #define BSF_FLUSHDISK            0x00000004
1796 #define BSF_NOHANG               0x00000008
1797 #define BSF_POSTMESSAGE          0x00000010
1798 #define BSF_FORCEIFHUNG          0x00000020
1799 #define BSF_NOTIMEOUTIFNOTHUNG   0x00000040
1800 #define BSF_ALLOWSFW             0x00000080
1801 #define BSF_SENDNOTIFYMESSAGE    0x00000100
1802 #define BSF_RETURNHDESK          0x00000200
1803 #define BSF_LUID                 0x00000400
1804
1805
1806 /***** Window hooks *****/
1807
1808   /* Hook values */
1809 #define WH_MIN              (-1)
1810 #define WH_MSGFILTER        (-1)
1811 #define WH_JOURNALRECORD    0
1812 #define WH_JOURNALPLAYBACK  1
1813 #define WH_KEYBOARD         2
1814 #define WH_GETMESSAGE       3
1815 #define WH_CALLWNDPROC      4
1816 #define WH_CBT              5
1817 #define WH_SYSMSGFILTER     6
1818 #define WH_MOUSE            7
1819 #define WH_HARDWARE         8
1820 #define WH_DEBUG            9
1821 #define WH_SHELL            10
1822 #define WH_FOREGROUNDIDLE   11
1823 #define WH_CALLWNDPROCRET   12
1824 #define WH_KEYBOARD_LL      13
1825 #define WH_MOUSE_LL         14
1826 #define WH_MAX              14
1827
1828 #define WH_MINHOOK          WH_MIN
1829 #define WH_MAXHOOK          WH_MAX
1830
1831   /* Hook action codes */
1832 #define HC_ACTION           0
1833 #define HC_GETNEXT          1
1834 #define HC_SKIP             2
1835 #define HC_NOREMOVE         3
1836 #define HC_NOREM            HC_NOREMOVE
1837 #define HC_SYSMODALON       4
1838 #define HC_SYSMODALOFF      5
1839
1840   /* CallMsgFilter() values */
1841 #define MSGF_DIALOGBOX      0
1842 #define MSGF_MESSAGEBOX     1
1843 #define MSGF_MENU           2
1844 #define MSGF_MOVE           3
1845 #define MSGF_SIZE           4
1846 #define MSGF_SCROLLBAR      5
1847 #define MSGF_NEXTWINDOW     6
1848 #define MSGF_MAX            8
1849 #define MSGF_USER           0x1000
1850 #define MSGF_DDEMGR         0x8001
1851
1852 typedef struct tagWNDCLASSA
1853 {
1854     UINT      style;
1855     WNDPROC   lpfnWndProc;
1856     INT       cbClsExtra;
1857     INT       cbWndExtra;
1858     HINSTANCE hInstance;
1859     HICON     hIcon;
1860     HCURSOR   hCursor;
1861     HBRUSH    hbrBackground;
1862     LPCSTR      lpszMenuName;
1863     LPCSTR      lpszClassName;
1864 } WNDCLASSA, *PWNDCLASSA, *LPWNDCLASSA;
1865
1866 typedef struct tagWNDCLASSW
1867 {
1868     UINT      style;
1869     WNDPROC   lpfnWndProc;
1870     INT       cbClsExtra;
1871     INT       cbWndExtra;
1872     HINSTANCE hInstance;
1873     HICON     hIcon;
1874     HCURSOR   hCursor;
1875     HBRUSH    hbrBackground;
1876     LPCWSTR     lpszMenuName;
1877     LPCWSTR     lpszClassName;
1878 } WNDCLASSW, *PWNDCLASSW, *LPWNDCLASSW;
1879
1880 DECL_WINELIB_TYPE_AW(WNDCLASS)
1881 DECL_WINELIB_TYPE_AW(PWNDCLASS)
1882 DECL_WINELIB_TYPE_AW(LPWNDCLASS)
1883
1884 typedef struct tagCOPYDATASTRUCT {
1885     ULONG_PTR dwData;
1886     DWORD cbData;
1887     PVOID lpData;
1888 } COPYDATASTRUCT, *PCOPYDATASTRUCT;
1889
1890 typedef struct tagMDINEXTMENU {
1891     HMENU hmenuIn;
1892     HMENU hmenuNext;
1893     HWND  hwndNext;
1894 } MDINEXTMENU, *PMDINEXTMENU, *LPMDINEXTMENU;
1895
1896 typedef struct tagMULTIKEYHELPA
1897 {
1898     DWORD   mkSize;
1899     CHAR    mkKeylist;
1900     CHAR    szKeyphrase[1];
1901 } MULTIKEYHELPA, *PMULTIKEYHELPA, *LPMULTIKEYHELPA;
1902
1903 typedef struct tagMULTIKEYHELPW
1904 {
1905     DWORD   mkSize;
1906     WCHAR   mkKeylist;
1907     WCHAR   szKeyphrase[1];
1908 } MULTIKEYHELPW, *PMULTIKEYHELPW, *LPMULTIKEYHELPW;
1909
1910 DECL_WINELIB_TYPE_AW(MULTIKEYHELP)
1911 DECL_WINELIB_TYPE_AW(PMULTIKEYHELP)
1912 DECL_WINELIB_TYPE_AW(LPMULTIKEYHELP)
1913
1914 typedef struct tagHELPWININFOA {
1915         int wStructSize;
1916         int x;
1917         int y;
1918         int dx;
1919         int dy;
1920         int wMax;
1921         CHAR rgchMember[2];
1922 } HELPWININFOA, *PHELPWININFOA, *LPHELPWININFOA;
1923
1924 typedef struct tagHELPWININFOW {
1925         int wStructSize;
1926         int x;
1927         int y;
1928         int dx;
1929         int dy;
1930         int wMax;
1931         WCHAR rgchMember[2];
1932 } HELPWININFOW, *PHELPWININFOW, *LPHELPWININFOW;
1933
1934 DECL_WINELIB_TYPE_AW(HELPWININFO)
1935 DECL_WINELIB_TYPE_AW(PHELPWININFO)
1936 DECL_WINELIB_TYPE_AW(LPHELPWININFO)
1937
1938 #define HELP_CONTEXT        0x0001
1939 #define HELP_QUIT           0x0002
1940 #define HELP_INDEX          0x0003
1941 #define HELP_CONTENTS       0x0003
1942 #define HELP_HELPONHELP     0x0004
1943 #define HELP_SETINDEX       0x0005
1944 #define HELP_SETCONTENTS    0x0005
1945 #define HELP_CONTEXTPOPUP   0x0008
1946 #define HELP_FORCEFILE      0x0009
1947 #define HELP_KEY            0x0101
1948 #define HELP_COMMAND        0x0102
1949 #define HELP_PARTIALKEY     0x0105
1950 #define HELP_MULTIKEY       0x0201
1951 #define HELP_SETWINPOS      0x0203
1952 #define HELP_CONTEXTMENU    0x000a
1953 #define HELP_FINDER         0x000b
1954 #define HELP_WM_HELP        0x000c
1955 #define HELP_SETPOPUP_POS   0x000d
1956
1957 #define HELP_TCARD          0x8000
1958 #define HELP_TCARD_DATA     0x0010
1959 #define HELP_TCARD_OTHER_CALLER 0x0011
1960
1961
1962 #define IDH_NO_HELP             28440
1963 #define IDH_MISSING_CONTEXT     28441
1964 #define IDH_GENERIC_HELP_BUTTON 28442
1965 #define IDH_OK                  28443
1966 #define IDH_CANCEL              28444
1967 #define IDH_HELP                28445
1968
1969
1970      /* ChangeDisplaySettings return codes */
1971
1972 #define DISP_CHANGE_SUCCESSFUL 0
1973 #define DISP_CHANGE_RESTART    1
1974 #define DISP_CHANGE_FAILED     (-1)
1975 #define DISP_CHANGE_BADMODE    (-2)
1976 #define DISP_CHANGE_NOTUPDATED (-3)
1977 #define DISP_CHANGE_BADFLAGS   (-4)
1978 #define DISP_CHANGE_BADPARAM   (-5)
1979 #define DISP_CHANGE_BADDUALVIEW (-6)
1980
1981 /* ChangeDisplaySettings.dwFlags */
1982 #define CDS_UPDATEREGISTRY      0x00000001
1983 #define CDS_TEST                0x00000002
1984 #define CDS_FULLSCREEN          0x00000004
1985 #define CDS_GLOBAL              0x00000008
1986 #define CDS_SET_PRIMARY         0x00000010
1987 #define CDS_VIDEOPARAMETERS     0x00000020
1988 #define CDS_NORESET             0x10000000
1989 #define CDS_SETRECT             0x20000000
1990 #define CDS_RESET               0x40000000
1991
1992 typedef struct tagWNDCLASSEXA
1993 {
1994     UINT      cbSize;
1995     UINT      style;
1996     WNDPROC   lpfnWndProc;
1997     INT       cbClsExtra;
1998     INT       cbWndExtra;
1999     HINSTANCE hInstance;
2000     HICON     hIcon;
2001     HCURSOR   hCursor;
2002     HBRUSH    hbrBackground;
2003     LPCSTR      lpszMenuName;
2004     LPCSTR      lpszClassName;
2005     HICON     hIconSm;
2006 } WNDCLASSEXA, *PWNDCLASSEXA, *LPWNDCLASSEXA;
2007
2008 typedef struct tagWNDCLASSEXW
2009 {
2010     UINT      cbSize;
2011     UINT      style;
2012     WNDPROC   lpfnWndProc;
2013     INT       cbClsExtra;
2014     INT       cbWndExtra;
2015     HINSTANCE hInstance;
2016     HICON     hIcon;
2017     HCURSOR   hCursor;
2018     HBRUSH    hbrBackground;
2019     LPCWSTR     lpszMenuName;
2020     LPCWSTR     lpszClassName;
2021     HICON     hIconSm;
2022 } WNDCLASSEXW, *PWNDCLASSEXW, *LPWNDCLASSEXW;
2023
2024 DECL_WINELIB_TYPE_AW(WNDCLASSEX)
2025 DECL_WINELIB_TYPE_AW(PWNDCLASSEX)
2026 DECL_WINELIB_TYPE_AW(LPWNDCLASSEX)
2027
2028 typedef struct tagMSG
2029 {
2030     HWND    hwnd;
2031     UINT    message;
2032     WPARAM  wParam;
2033     LPARAM    lParam;
2034     DWORD     time;
2035     POINT   pt;
2036 } MSG, *PMSG, *LPMSG;
2037
2038 #define POINTSTOPOINT(pt, pts) { (pt).x = (pts).x; (pt).y = (pts).y; }
2039 #define POINTTOPOINTS(pt)      (MAKELONG((short)((pt).x), (short)((pt).y)))
2040
2041 #define MAKELPARAM(low,high)   ((LPARAM)MAKELONG(low,high))
2042 #define MAKEWPARAM(low,high)   ((WPARAM)MAKELONG(low,high))
2043 #define MAKELRESULT(low,high)  ((LRESULT)MAKELONG(low,high))
2044
2045 /* Cursors / Icons */
2046
2047 typedef struct _ICONINFO {
2048         BOOL            fIcon;
2049         DWORD           xHotspot;
2050         DWORD           yHotspot;
2051         HBITMAP hbmMask;
2052         HBITMAP hbmColor;
2053 } ICONINFO, *PICONINFO;
2054
2055
2056 typedef struct tagCURSORINFO
2057 {
2058     DWORD cbSize;
2059     DWORD flags;
2060     HCURSOR hCursor;
2061     POINT ptScreenPos;
2062 } CURSORINFO, *PCURSORINFO, *LPCURSORINFO;
2063
2064 #define CURSOR_SHOWING 0x00000001
2065
2066 /* this is the 6 byte accel struct used in Win32 when presented to the user */
2067 typedef struct tagACCEL
2068 {
2069 #ifdef WORDS_BIGENDIAN
2070     WORD   fVirt;
2071     WORD   key;
2072     DWORD  cmd;
2073 #else
2074     BYTE   fVirt;
2075     WORD   key;
2076     WORD   cmd;
2077 #endif
2078 } ACCEL, *LPACCEL;
2079
2080
2081 /* Flags for TrackPopupMenu */
2082 #define TPM_LEFTBUTTON    0x0000
2083 #define TPM_RECURSE       0x0001
2084 #define TPM_RIGHTBUTTON   0x0002
2085 #define TPM_LEFTALIGN     0x0000
2086 #define TPM_CENTERALIGN   0x0004
2087 #define TPM_RIGHTALIGN    0x0008
2088 #define TPM_TOPALIGN      0x0000
2089 #define TPM_VCENTERALIGN  0x0010
2090 #define TPM_BOTTOMALIGN   0x0020
2091 #define TPM_HORIZONTAL    0x0000
2092 #define TPM_VERTICAL      0x0040
2093 #define TPM_NONOTIFY      0x0080
2094 #define TPM_RETURNCMD     0x0100
2095 #define TPM_HORPOSANIMATION 0x0400
2096 #define TPM_HORNEGANIMATION 0x0800
2097 #define TPM_VERPOSANIMATION 0x1000
2098 #define TPM_VERNEGANIMATION 0x2000
2099 #define TPM_NOANIMATION     0x4000
2100 #define TPM_LAYOUTRTL       0x8000
2101
2102 typedef struct tagTPMPARAMS
2103 {
2104     UINT   cbSize;
2105     RECT   rcExclude;
2106 } TPMPARAMS, *LPTPMPARAMS;
2107
2108
2109 /*
2110  * Combobox information
2111  */
2112 typedef struct tagCOMBOBOXINFO
2113 {
2114     DWORD cbSize;
2115     RECT  rcItem;
2116     RECT  rcButton;
2117     DWORD stateButton;
2118     HWND  hwndCombo;
2119     HWND  hwndItem;
2120     HWND  hwndList;
2121 } COMBOBOXINFO, *PCOMBOBOXINFO, *LPCOMBOBOXINFO;
2122
2123 typedef struct tagMENUITEMINFOA {
2124   UINT    cbSize;
2125   UINT    fMask;
2126   UINT    fType;
2127   UINT    fState;
2128   UINT    wID;
2129   HMENU   hSubMenu;
2130   HBITMAP hbmpChecked;
2131   HBITMAP hbmpUnchecked;
2132   ULONG_PTR dwItemData;
2133   LPSTR   dwTypeData;
2134   UINT    cch;
2135   HBITMAP hbmpItem;
2136 } MENUITEMINFOA, *LPMENUITEMINFOA;
2137
2138 typedef struct tagMENUITEMINFOW {
2139   UINT    cbSize;
2140   UINT    fMask;
2141   UINT    fType;
2142   UINT    fState;
2143   UINT    wID;
2144   HMENU   hSubMenu;
2145   HBITMAP hbmpChecked;
2146   HBITMAP hbmpUnchecked;
2147   ULONG_PTR dwItemData;
2148   LPWSTR  dwTypeData;
2149   UINT    cch;
2150   HBITMAP hbmpItem;
2151 } MENUITEMINFOW, *LPMENUITEMINFOW;
2152
2153 DECL_WINELIB_TYPE_AW(MENUITEMINFO)
2154 DECL_WINELIB_TYPE_AW(LPMENUITEMINFO)
2155 typedef const MENUITEMINFOA *LPCMENUITEMINFOA;
2156 typedef const MENUITEMINFOW *LPCMENUITEMINFOW;
2157 DECL_WINELIB_TYPE_AW(LPCMENUITEMINFO)
2158
2159 typedef struct tagMENUBARINFO {
2160   DWORD cbSize;
2161   RECT  rcBar;
2162   HMENU hMenu;
2163   HWND  hwndMenu;
2164   BOOL  fBarFocused:1;
2165   BOOL  fFocused:1;
2166 } MENUBARINFO, *PMENUBARINFO, *LPMENUBARINFO;
2167
2168 typedef struct tagMENUINFO {
2169   DWORD   cbSize;
2170   DWORD   fMask;
2171   DWORD   dwStyle;
2172   UINT    cyMax;
2173   HBRUSH  hbrBack;
2174   DWORD   dwContextHelpID;
2175   ULONG_PTR dwMenuData;
2176 } MENUINFO, *LPMENUINFO;
2177
2178 typedef const MENUINFO *LPCMENUINFO;
2179
2180 #define MIM_MAXHEIGHT           0x00000001
2181 #define MIM_BACKGROUND          0x00000002
2182 #define MIM_HELPID              0x00000004
2183 #define MIM_MENUDATA            0x00000008
2184 #define MIM_STYLE               0x00000010
2185 #define MIM_APPLYTOSUBMENUS     0x80000000
2186
2187 #define MNS_NOCHECK             0x80000000
2188 #define MNS_MODELESS            0x40000000
2189 #define MNS_DRAGDROP            0x20000000
2190 #define MNS_AUTODISMISS         0x10000000
2191 #define MNS_NOTIFYBYPOS         0x08000000
2192 #define MNS_CHECKORBMP          0x04000000
2193
2194 typedef struct {
2195   WORD versionNumber;
2196   WORD offset;
2197 } MENUITEMTEMPLATEHEADER, *PMENUITEMTEMPLATEHEADER;
2198
2199
2200 typedef struct {
2201   WORD mtOption;
2202   WORD mtID;
2203   WCHAR mtString[1];
2204 } MENUITEMTEMPLATE, *PMENUITEMTEMPLATE;
2205
2206
2207 typedef VOID   MENUTEMPLATE;
2208 typedef PVOID *LPMENUTEMPLATE;
2209
2210 /* Field specifiers for MENUITEMINFO[AW] type.  */
2211 #define MIIM_STATE       0x00000001
2212 #define MIIM_ID          0x00000002
2213 #define MIIM_SUBMENU     0x00000004
2214 #define MIIM_CHECKMARKS  0x00000008
2215 #define MIIM_TYPE        0x00000010
2216 #define MIIM_DATA        0x00000020
2217 #define MIIM_STRING      0x00000040
2218 #define MIIM_BITMAP      0x00000080
2219 #define MIIM_FTYPE       0x00000100
2220
2221 #define HBMMENU_CALLBACK        ((HBITMAP) -1)
2222 #define HBMMENU_SYSTEM          ((HBITMAP)  1)
2223 #define HBMMENU_MBAR_RESTORE    ((HBITMAP)  2)
2224 #define HBMMENU_MBAR_MINIMIZE   ((HBITMAP)  3)
2225 #define HBMMENU_MBAR_CLOSE      ((HBITMAP)  5)
2226 #define HBMMENU_MBAR_CLOSE_D    ((HBITMAP)  6)
2227 #define HBMMENU_MBAR_MINIMIZE_D ((HBITMAP)  7)
2228 #define HBMMENU_POPUP_CLOSE     ((HBITMAP)  8)
2229 #define HBMMENU_POPUP_RESTORE   ((HBITMAP)  9)
2230 #define HBMMENU_POPUP_MAXIMIZE  ((HBITMAP) 10)
2231 #define HBMMENU_POPUP_MINIMIZE  ((HBITMAP) 11)
2232
2233 /* WM_H/VSCROLL commands */
2234 #define SB_LINEUP           0
2235 #define SB_LINELEFT         0
2236 #define SB_LINEDOWN         1
2237 #define SB_LINERIGHT        1
2238 #define SB_PAGEUP           2
2239 #define SB_PAGELEFT         2
2240 #define SB_PAGEDOWN         3
2241 #define SB_PAGERIGHT        3
2242 #define SB_THUMBPOSITION    4
2243 #define SB_THUMBTRACK       5
2244 #define SB_TOP              6
2245 #define SB_LEFT             6
2246 #define SB_BOTTOM           7
2247 #define SB_RIGHT            7
2248 #define SB_ENDSCROLL        8
2249
2250 /* Scroll bar selection constants */
2251 #define SB_HORZ             0
2252 #define SB_VERT             1
2253 #define SB_CTL              2
2254 #define SB_BOTH             3
2255
2256 /* Scrollbar styles */
2257 #ifndef NOWINSTYLES
2258 #define SBS_HORZ                    0x0000L
2259 #define SBS_VERT                    0x0001L
2260 #define SBS_TOPALIGN                0x0002L
2261 #define SBS_LEFTALIGN               0x0002L
2262 #define SBS_BOTTOMALIGN             0x0004L
2263 #define SBS_RIGHTALIGN              0x0004L
2264 #define SBS_SIZEBOXTOPLEFTALIGN     0x0002L
2265 #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
2266 #define SBS_SIZEBOX                 0x0008L
2267 #define SBS_SIZEGRIP                0x0010L
2268 #endif /* NOWINSTYLES */
2269
2270 /* EnableScrollBar() flags */
2271 #define ESB_ENABLE_BOTH     0x0000
2272 #define ESB_DISABLE_BOTH    0x0003
2273
2274 #define ESB_DISABLE_LEFT    0x0001
2275 #define ESB_DISABLE_RIGHT   0x0002
2276
2277 #define ESB_DISABLE_UP      0x0001
2278 #define ESB_DISABLE_DOWN    0x0002
2279
2280 #define ESB_DISABLE_LTUP    ESB_DISABLE_LEFT
2281 #define ESB_DISABLE_RTDN    ESB_DISABLE_RIGHT
2282
2283 /* Win32 button control messages */
2284 #define BM_GETCHECK          0x00f0
2285 #define BM_SETCHECK          0x00f1
2286 #define BM_GETSTATE          0x00f2
2287 #define BM_SETSTATE          0x00f3
2288 #define BM_SETSTYLE          0x00f4
2289 #define BM_CLICK             0x00f5
2290 #define BM_GETIMAGE          0x00f6
2291 #define BM_SETIMAGE          0x00f7
2292 /* Winelib button control messages */
2293
2294 /* Button notification codes */
2295 #define BN_CLICKED             0
2296 #define BN_PAINT               1
2297 #define BN_HILITE              2
2298 #define BN_PUSHED              BN_HILITE
2299 #define BN_UNHILITE            3
2300 #define BN_UNPUSHED            BN_UNHILITE
2301 #define BN_DISABLE             4
2302 #define BN_DOUBLECLICKED       5
2303 #define BN_DBLCLK              BN_DOUBLECLICKED
2304 #define BN_SETFOCUS            6
2305 #define BN_KILLFOCUS           7
2306
2307 /* Button states */
2308 #define BST_UNCHECKED        0x0000
2309 #define BST_CHECKED          0x0001
2310 #define BST_INDETERMINATE    0x0002
2311 #define BST_PUSHED           0x0004
2312 #define BST_FOCUS            0x0008
2313
2314 /* Static Control Styles */
2315 #define SS_LEFT             0x00000000L
2316 #define SS_CENTER           0x00000001L
2317 #define SS_RIGHT            0x00000002L
2318 #define SS_ICON             0x00000003L
2319 #define SS_BLACKRECT        0x00000004L
2320 #define SS_GRAYRECT         0x00000005L
2321 #define SS_WHITERECT        0x00000006L
2322 #define SS_BLACKFRAME       0x00000007L
2323 #define SS_GRAYFRAME        0x00000008L
2324 #define SS_WHITEFRAME       0x00000009L
2325 #define SS_USERITEM         0x0000000AL
2326 #define SS_SIMPLE           0x0000000BL
2327 #define SS_LEFTNOWORDWRAP   0x0000000CL
2328 #define SS_OWNERDRAW        0x0000000DL
2329 #define SS_BITMAP           0x0000000EL
2330 #define SS_ENHMETAFILE      0x0000000FL
2331 #define SS_ETCHEDHORZ       0x00000010L
2332 #define SS_ETCHEDVERT       0x00000011L
2333 #define SS_ETCHEDFRAME      0x00000012L
2334 #define SS_TYPEMASK         0x0000001FL
2335
2336 #define SS_REALSIZECONTROL  0x00000040L
2337 #define SS_NOPREFIX         0x00000080L
2338 #define SS_NOTIFY           0x00000100L
2339 #define SS_CENTERIMAGE      0x00000200L
2340 #define SS_RIGHTJUST        0x00000400L
2341 #define SS_REALSIZEIMAGE    0x00000800L
2342 #define SS_SUNKEN           0x00001000L
2343 #define SS_EDITCONTROL      0x00002000L
2344 #define SS_ENDELLIPSIS      0x00004000L
2345 #define SS_PATHELLIPSIS     0x00008000L
2346 #define SS_WORDELLIPSIS     0x0000C000L
2347 #define SS_ELLIPSISMASK     0x0000C000L
2348
2349 /* Static Control Messages */
2350 #define STM_SETICON       0x0170
2351 #define STM_GETICON       0x0171
2352 #define STM_SETIMAGE        0x0172
2353 #define STM_GETIMAGE        0x0173
2354 #define STM_MSGMAX          0x0174
2355
2356 #define STN_CLICKED         0
2357 #define STN_DBLCLK          1
2358 #define STN_ENABLE          2
2359 #define STN_DISABLE         3
2360
2361 /* Scrollbar messages */
2362 #define SBM_SETPOS             0x00e0
2363 #define SBM_GETPOS             0x00e1
2364 #define SBM_SETRANGE           0x00e2
2365 #define SBM_GETRANGE           0x00e3
2366 #define SBM_ENABLE_ARROWS      0x00e4
2367 #define SBM_SETRANGEREDRAW     0x00e6
2368 #define SBM_SETSCROLLINFO      0x00e9
2369 #define SBM_GETSCROLLINFO      0x00ea
2370 #define SBM_GETSCROLLBARINFO   0x00eb
2371
2372 /* Scrollbar info */
2373 typedef struct tagSCROLLINFO
2374 {
2375     UINT    cbSize;
2376     UINT    fMask;
2377     INT     nMin;
2378     INT     nMax;
2379     UINT    nPage;
2380     INT     nPos;
2381     INT     nTrackPos;
2382 } SCROLLINFO, *LPSCROLLINFO;
2383
2384 typedef const SCROLLINFO *LPCSCROLLINFO;
2385
2386 #define CCHILDREN_SCROLLBAR 5
2387
2388 typedef struct tagSCROLLBARINFO
2389 {
2390     DWORD   cbSize;             /* Size of SCROLLBARINFO struct */
2391     RECT    rcScrollBar;        /* Coordinates of the scroll bar */
2392     INT     dxyLineButton;      /* Height or width */
2393     INT     xyThumbTop;         /* Position of the top or the left */
2394     INT     xyThumbBottom;      /* Position of the bottom or the right */
2395     INT     reserved;
2396     DWORD   rgstate[CCHILDREN_SCROLLBAR+1];
2397 } SCROLLBARINFO, *PSCROLLBARINFO, *LPSCROLLBARINFO;
2398
2399 /* GetScrollInfo() flags */
2400 #define SIF_RANGE           0x0001
2401 #define SIF_PAGE            0x0002
2402 #define SIF_POS             0x0004
2403 #define SIF_DISABLENOSCROLL 0x0008
2404 #define SIF_TRACKPOS        0x0010
2405 #define SIF_ALL             (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
2406
2407 /* Listbox styles */
2408 #ifndef NOWINSTYLES
2409 #define LBS_NOTIFY               0x0001
2410 #define LBS_SORT                 0x0002
2411 #define LBS_NOREDRAW             0x0004
2412 #define LBS_MULTIPLESEL          0x0008
2413 #define LBS_OWNERDRAWFIXED       0x0010
2414 #define LBS_OWNERDRAWVARIABLE    0x0020
2415 #define LBS_HASSTRINGS           0x0040
2416 #define LBS_USETABSTOPS          0x0080
2417 #define LBS_NOINTEGRALHEIGHT     0x0100
2418 #define LBS_MULTICOLUMN          0x0200
2419 #define LBS_WANTKEYBOARDINPUT    0x0400
2420 #define LBS_EXTENDEDSEL          0x0800
2421 #define LBS_DISABLENOSCROLL      0x1000
2422 #define LBS_NODATA               0x2000
2423 #define LBS_NOSEL                0x4000
2424 #define LBS_COMBOBOX             0x8000
2425 #define LBS_STANDARD  (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
2426 #endif /* NOWINSTYLES */
2427
2428 /* Listbox messages */
2429 #define LB_ADDSTRING           0x0180
2430 #define LB_INSERTSTRING        0x0181
2431 #define LB_DELETESTRING        0x0182
2432 #define LB_SELITEMRANGEEX      0x0183
2433 #define LB_RESETCONTENT        0x0184
2434 #define LB_SETSEL              0x0185
2435 #define LB_SETCURSEL           0x0186
2436 #define LB_GETSEL              0x0187
2437 #define LB_GETCURSEL           0x0188
2438 #define LB_GETTEXT             0x0189
2439 #define LB_GETTEXTLEN          0x018a
2440 #define LB_GETCOUNT            0x018b
2441 #define LB_SELECTSTRING        0x018c
2442 #define LB_DIR                 0x018d
2443 #define LB_GETTOPINDEX         0x018e
2444 #define LB_FINDSTRING          0x018f
2445 #define LB_GETSELCOUNT         0x0190
2446 #define LB_GETSELITEMS         0x0191
2447 #define LB_SETTABSTOPS         0x0192
2448 #define LB_GETHORIZONTALEXTENT 0x0193
2449 #define LB_SETHORIZONTALEXTENT 0x0194
2450 #define LB_SETCOLUMNWIDTH      0x0195
2451 #define LB_ADDFILE             0x0196
2452 #define LB_SETTOPINDEX         0x0197
2453 #define LB_GETITEMRECT         0x0198
2454 #define LB_GETITEMDATA         0x0199
2455 #define LB_SETITEMDATA         0x019a
2456 #define LB_SELITEMRANGE        0x019b
2457 #define LB_SETANCHORINDEX      0x019c
2458 #define LB_GETANCHORINDEX      0x019d
2459 #define LB_SETCARETINDEX       0x019e
2460 #define LB_GETCARETINDEX       0x019f
2461 #define LB_SETITEMHEIGHT       0x01a0
2462 #define LB_GETITEMHEIGHT       0x01a1
2463 #define LB_FINDSTRINGEXACT     0x01a2
2464 #define LB_CARETON             0x01a3
2465 #define LB_CARETOFF            0x01a4
2466 #define LB_SETLOCALE           0x01a5
2467 #define LB_GETLOCALE           0x01a6
2468 #define LB_SETCOUNT            0x01a7
2469 #define LB_INITSTORAGE         0x01a8
2470 #define LB_ITEMFROMPOINT       0x01a9
2471 #define LB_GETLISTBOXINFO      0x01b2
2472 #define LB_MSGMAX              0x01b3
2473
2474 /* Listbox notification codes */
2475 #define LBN_ERRSPACE        (-2)
2476 #define LBN_SELCHANGE       1
2477 #define LBN_DBLCLK          2
2478 #define LBN_SELCANCEL       3
2479 #define LBN_SETFOCUS        4
2480 #define LBN_KILLFOCUS       5
2481
2482 /* Listbox message return values */
2483 #define LB_OKAY             0
2484 #define LB_ERR              (-1)
2485 #define LB_ERRSPACE         (-2)
2486
2487 #define LB_CTLCODE          0L
2488
2489 /* Combo box styles */
2490 #ifndef NOWINSTYLES
2491 #define CBS_SIMPLE            0x0001L
2492 #define CBS_DROPDOWN          0x0002L
2493 #define CBS_DROPDOWNLIST      0x0003L
2494 #define CBS_OWNERDRAWFIXED    0x0010L
2495 #define CBS_OWNERDRAWVARIABLE 0x0020L
2496 #define CBS_AUTOHSCROLL       0x0040L
2497 #define CBS_OEMCONVERT        0x0080L
2498 #define CBS_SORT              0x0100L
2499 #define CBS_HASSTRINGS        0x0200L
2500 #define CBS_NOINTEGRALHEIGHT  0x0400L
2501 #define CBS_DISABLENOSCROLL   0x0800L
2502
2503 #define CBS_UPPERCASE         0x2000L
2504 #define CBS_LOWERCASE         0x4000L
2505 #endif /* NOWINSTYLES */
2506
2507 /* Combo box messages */
2508 #define CB_GETEDITSEL            0x0140
2509 #define CB_LIMITTEXT             0x0141
2510 #define CB_SETEDITSEL            0x0142
2511 #define CB_ADDSTRING             0x0143
2512 #define CB_DELETESTRING          0x0144
2513 #define CB_DIR                   0x0145
2514 #define CB_GETCOUNT              0x0146
2515 #define CB_GETCURSEL             0x0147
2516 #define CB_GETLBTEXT             0x0148
2517 #define CB_GETLBTEXTLEN          0x0149
2518 #define CB_INSERTSTRING          0x014a
2519 #define CB_RESETCONTENT          0x014b
2520 #define CB_FINDSTRING            0x014c
2521 #define CB_SELECTSTRING          0x014d
2522 #define CB_SETCURSEL             0x014e
2523 #define CB_SHOWDROPDOWN          0x014f
2524 #define CB_GETITEMDATA           0x0150
2525 #define CB_SETITEMDATA           0x0151
2526 #define CB_GETDROPPEDCONTROLRECT 0x0152
2527 #define CB_SETITEMHEIGHT         0x0153
2528 #define CB_GETITEMHEIGHT         0x0154
2529 #define CB_SETEXTENDEDUI         0x0155
2530 #define CB_GETEXTENDEDUI         0x0156
2531 #define CB_GETDROPPEDSTATE       0x0157
2532 #define CB_FINDSTRINGEXACT       0x0158
2533 #define CB_SETLOCALE             0x0159
2534 #define CB_GETLOCALE             0x015a
2535 #define CB_GETTOPINDEX           0x015b
2536 #define CB_SETTOPINDEX           0x015c
2537 #define CB_GETHORIZONTALEXTENT   0x015d
2538 #define CB_SETHORIZONTALEXTENT   0x015e
2539 #define CB_GETDROPPEDWIDTH       0x015f
2540 #define CB_SETDROPPEDWIDTH       0x0160
2541 #define CB_INITSTORAGE           0x0161
2542 #define CB_MULTIPLEADDSTRING     0x0163
2543 #define CB_GETCOMBOBOXINFO       0x0164
2544 #define CB_MSGMAX                0x0165
2545
2546 /* Combo box notification codes */
2547 #define CBN_ERRSPACE        (-1)
2548 #define CBN_SELCHANGE       1
2549 #define CBN_DBLCLK          2
2550 #define CBN_SETFOCUS        3
2551 #define CBN_KILLFOCUS       4
2552 #define CBN_EDITCHANGE      5
2553 #define CBN_EDITUPDATE      6
2554 #define CBN_DROPDOWN        7
2555 #define CBN_CLOSEUP         8
2556 #define CBN_SELENDOK        9
2557 #define CBN_SELENDCANCEL    10
2558
2559 /* Combo box message return values */
2560 #define CB_OKAY             0
2561 #define CB_ERR              (-1)
2562 #define CB_ERRSPACE         (-2)
2563
2564 #define MB_OK                   0x00000000
2565 #define MB_OKCANCEL             0x00000001
2566 #define MB_ABORTRETRYIGNORE     0x00000002
2567 #define MB_YESNOCANCEL          0x00000003
2568 #define MB_YESNO                0x00000004
2569 #define MB_RETRYCANCEL          0x00000005
2570 #define MB_TYPEMASK             0x0000000F
2571
2572 #define MB_ICONHAND             0x00000010
2573 #define MB_ICONQUESTION         0x00000020
2574 #define MB_ICONEXCLAMATION      0x00000030
2575 #define MB_ICONASTERISK         0x00000040
2576 #define MB_USERICON             0x00000080
2577 #define MB_ICONMASK             0x000000F0
2578
2579 #define MB_ICONINFORMATION      MB_ICONASTERISK
2580 #define MB_ICONSTOP             MB_ICONHAND
2581 #define MB_ICONWARNING          MB_ICONEXCLAMATION
2582 #define MB_ICONERROR            MB_ICONHAND
2583
2584 #define MB_DEFBUTTON1           0x00000000
2585 #define MB_DEFBUTTON2           0x00000100
2586 #define MB_DEFBUTTON3           0x00000200
2587 #define MB_DEFBUTTON4           0x00000300
2588 #define MB_DEFMASK              0x00000F00
2589
2590 #define MB_APPLMODAL            0x00000000
2591 #define MB_SYSTEMMODAL          0x00001000
2592 #define MB_TASKMODAL            0x00002000
2593 #define MB_MODEMASK             0x00003000
2594
2595 #define MB_HELP                 0x00004000
2596 #define MB_NOFOCUS              0x00008000
2597 #define MB_MISCMASK             0x0000C000
2598
2599 #define MB_SETFOREGROUND        0x00010000
2600 #define MB_DEFAULT_DESKTOP_ONLY 0x00020000
2601 #define MB_SERVICE_NOTIFICATION 0x00040000
2602 #define MB_TOPMOST              0x00040000
2603 #define MB_RIGHT                0x00080000
2604 #define MB_RTLREADING           0x00100000
2605
2606 #define HELPINFO_WINDOW         0x0001
2607 #define HELPINFO_MENUITEM       0x0002
2608
2609 /* Structure pointed to by lParam of WM_HELP */
2610 typedef struct tagHELPINFO
2611 {
2612     UINT        cbSize;         /* Size in bytes of this struct  */
2613     INT iContextType;   /* Either HELPINFO_WINDOW or HELPINFO_MENUITEM */
2614     INT iCtrlId;        /* Control Id or a Menu item Id. */
2615     HANDLE      hItemHandle;    /* hWnd of control or hMenu.     */
2616     DWORD_PTR   dwContextId;    /* Context Id associated with this item */
2617     POINT       MousePos;       /* Mouse Position in screen co-ordinates */
2618 }  HELPINFO,*LPHELPINFO;
2619
2620 typedef void (CALLBACK *MSGBOXCALLBACK)(LPHELPINFO lpHelpInfo);
2621
2622 typedef struct tagMSGBOXPARAMSA
2623 {
2624     UINT        cbSize;
2625     HWND        hwndOwner;
2626     HINSTANCE   hInstance;
2627     LPCSTR      lpszText;
2628     LPCSTR      lpszCaption;
2629     DWORD       dwStyle;
2630     LPCSTR      lpszIcon;
2631     DWORD_PTR   dwContextHelpId;
2632     MSGBOXCALLBACK      lpfnMsgBoxCallback;
2633     DWORD       dwLanguageId;
2634 } MSGBOXPARAMSA, *PMSGBOXPARAMSA, *LPMSGBOXPARAMSA;
2635
2636 typedef struct tagMSGBOXPARAMSW
2637 {
2638     UINT        cbSize;
2639     HWND        hwndOwner;
2640     HINSTANCE   hInstance;
2641     LPCWSTR     lpszText;
2642     LPCWSTR     lpszCaption;
2643     DWORD       dwStyle;
2644     LPCWSTR     lpszIcon;
2645     DWORD_PTR   dwContextHelpId;
2646     MSGBOXCALLBACK      lpfnMsgBoxCallback;
2647     DWORD       dwLanguageId;
2648 } MSGBOXPARAMSW, *PMSGBOXPARAMSW, *LPMSGBOXPARAMSW;
2649
2650 DECL_WINELIB_TYPE_AW(MSGBOXPARAMS)
2651 DECL_WINELIB_TYPE_AW(PMSGBOXPARAMS)
2652 DECL_WINELIB_TYPE_AW(LPMSGBOXPARAMS)
2653
2654 #define MONITOR_DEFAULTTONULL       0x00000000
2655 #define MONITOR_DEFAULTTOPRIMARY    0x00000001
2656 #define MONITOR_DEFAULTTONEAREST    0x00000002
2657
2658 #define MONITORINFOF_PRIMARY        0x00000001
2659
2660 #ifndef CCHDEVICENAME
2661 #define CCHDEVICENAME 32
2662 #endif
2663
2664 typedef struct tagMONITORINFO
2665 {
2666     DWORD cbSize;
2667     RECT  rcMonitor;
2668     RECT  rcWork;
2669     DWORD dwFlags;
2670 } MONITORINFO, *LPMONITORINFO;
2671
2672 typedef struct tagMONITORINFOEXA
2673 {   /* the 4 first entries are the same as MONITORINFO */
2674     DWORD       cbSize; 
2675     RECT        rcMonitor;
2676     RECT        rcWork;
2677     DWORD       dwFlags;
2678     CHAR        szDevice[CCHDEVICENAME];
2679 } MONITORINFOEXA, *LPMONITORINFOEXA;
2680
2681 typedef struct tagMONITORINFOEXW
2682 {   /* the 4 first entries are the same as MONITORINFO */
2683     DWORD       cbSize;
2684     RECT        rcMonitor;
2685     RECT        rcWork;
2686     DWORD       dwFlags;
2687     WCHAR       szDevice[CCHDEVICENAME];
2688 } MONITORINFOEXW, *LPMONITORINFOEXW;
2689
2690 DECL_WINELIB_TYPE_AW(MONITORINFOEX)
2691 DECL_WINELIB_TYPE_AW(LPMONITORINFOEX)
2692
2693 typedef BOOL  (CALLBACK *MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM);
2694
2695 #include <pshpack2.h>
2696
2697 typedef struct tagDLGTEMPLATE
2698 {
2699     DWORD style;
2700     DWORD dwExtendedStyle;
2701     WORD cdit;
2702     short x;
2703     short y;
2704     short cx;
2705     short cy;
2706 } DLGTEMPLATE;
2707
2708 typedef DLGTEMPLATE *LPDLGTEMPLATEA;
2709 typedef DLGTEMPLATE *LPDLGTEMPLATEW;
2710 DECL_WINELIB_TYPE_AW(LPDLGTEMPLATE)
2711 typedef const DLGTEMPLATE *LPCDLGTEMPLATEA;
2712 typedef const DLGTEMPLATE *LPCDLGTEMPLATEW;
2713 DECL_WINELIB_TYPE_AW(LPCDLGTEMPLATE)
2714
2715 typedef struct tagDLGITEMTEMPLATE
2716 {
2717     DWORD style;
2718     DWORD dwExtendedStyle;
2719     short x;
2720     short y;
2721     short cx;
2722     short cy;
2723     WORD id;
2724 } DLGITEMTEMPLATE;
2725
2726 typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
2727 typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
2728 DECL_WINELIB_TYPE_AW(PDLGITEMTEMPLATE)
2729 typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
2730 typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
2731 DECL_WINELIB_TYPE_AW(LPDLGITEMTEMPLATE)
2732
2733 #include <poppack.h>
2734
2735   /* CBT hook values */
2736 #define HCBT_MOVESIZE       0
2737 #define HCBT_MINMAX         1
2738 #define HCBT_QS             2
2739 #define HCBT_CREATEWND      3
2740 #define HCBT_DESTROYWND     4
2741 #define HCBT_ACTIVATE       5
2742 #define HCBT_CLICKSKIPPED   6
2743 #define HCBT_KEYSKIPPED     7
2744 #define HCBT_SYSCOMMAND     8
2745 #define HCBT_SETFOCUS       9
2746
2747   /* CBT hook structures */
2748
2749 typedef struct tagCBT_CREATEWNDA
2750 {
2751     CREATESTRUCTA *lpcs;
2752     HWND           hwndInsertAfter;
2753 } CBT_CREATEWNDA, *LPCBT_CREATEWNDA;
2754
2755 typedef struct tagCBT_CREATEWNDW
2756 {
2757     CREATESTRUCTW *lpcs;
2758     HWND           hwndInsertAfter;
2759 } CBT_CREATEWNDW, *LPCBT_CREATEWNDW;
2760
2761 DECL_WINELIB_TYPE_AW(CBT_CREATEWND)
2762 DECL_WINELIB_TYPE_AW(LPCBT_CREATEWND)
2763
2764 typedef struct tagCBTACTIVATESTRUCT
2765 {
2766     BOOL    fMouse;
2767     HWND    hWndActive;
2768 } CBTACTIVATESTRUCT, *LPCBTACTIVATESTRUCT;
2769
2770
2771 /* modifiers for RegisterHotKey */
2772 #define MOD_ALT         0x0001
2773 #define MOD_CONTROL     0x0002
2774 #define MOD_SHIFT       0x0004
2775 #define MOD_WIN         0x0008
2776
2777 /* ids for RegisterHotKey */
2778 #define IDHOT_SNAPWINDOW        (-1)    /* SHIFT-PRINTSCRN  */
2779 #define IDHOT_SNAPDESKTOP       (-2)    /* PRINTSCRN        */
2780
2781   /* keybd_event flags */
2782 #define KEYEVENTF_EXTENDEDKEY        0x0001
2783 #define KEYEVENTF_KEYUP              0x0002
2784
2785   /* mouse_event flags */
2786 #define MOUSEEVENTF_MOVE        0x0001
2787 #define MOUSEEVENTF_LEFTDOWN    0x0002
2788 #define MOUSEEVENTF_LEFTUP      0x0004
2789 #define MOUSEEVENTF_RIGHTDOWN   0x0008
2790 #define MOUSEEVENTF_RIGHTUP     0x0010
2791 #define MOUSEEVENTF_MIDDLEDOWN  0x0020
2792 #define MOUSEEVENTF_MIDDLEUP    0x0040
2793 #define MOUSEEVENTF_XDOWN       0x0080
2794 #define MOUSEEVENTF_XUP         0x0100
2795 #define MOUSEEVENTF_WHEEL       0x0800
2796 #define MOUSEEVENTF_HWHEEL      0x1000
2797 #define MOUSEEVENTF_ABSOLUTE    0x8000
2798
2799 /* ExitWindows() flags */
2800 #define EW_RESTARTWINDOWS   0x0042
2801 #define EW_REBOOTSYSTEM     0x0043
2802 #define EW_EXITANDEXECAPP   0x0044
2803
2804 /* ExitWindowsEx() flags */
2805 #define EWX_LOGOFF           0
2806 #define EWX_SHUTDOWN         1
2807 #define EWX_REBOOT           2
2808 #define EWX_FORCE            4
2809 #define EWX_POWEROFF         8
2810 #define EWX_FORCEIFHUNG     16
2811
2812 /* SetLastErrorEx types */
2813 #define SLE_ERROR       0x00000001
2814 #define SLE_MINORERROR  0x00000002
2815 #define SLE_WARNING     0x00000003
2816
2817 /* Predefined resources */
2818 #define IDI_APPLICATION    MAKEINTRESOURCE(32512)
2819 #define IDI_HAND           MAKEINTRESOURCE(32513)
2820 #define IDI_QUESTION       MAKEINTRESOURCE(32514)
2821 #define IDI_EXCLAMATION    MAKEINTRESOURCE(32515)
2822 #define IDI_ASTERISK       MAKEINTRESOURCE(32516)
2823 #define IDI_WINLOGO        MAKEINTRESOURCE(32517)
2824
2825 #define IDI_WARNING        IDI_EXCLAMATION
2826 #define IDI_ERROR          IDI_HAND
2827 #define IDI_INFORMATION    IDI_ASTERISK
2828
2829 #define IDC_ARROW          MAKEINTRESOURCE(32512)
2830 #define IDC_IBEAM          MAKEINTRESOURCE(32513)
2831 #define IDC_WAIT           MAKEINTRESOURCE(32514)
2832 #define IDC_CROSS          MAKEINTRESOURCE(32515)
2833 #define IDC_UPARROW        MAKEINTRESOURCE(32516)
2834 #define IDC_SIZE           MAKEINTRESOURCE(32640)
2835 #define IDC_ICON           MAKEINTRESOURCE(32641)
2836 #define IDC_SIZENWSE       MAKEINTRESOURCE(32642)
2837 #define IDC_SIZENESW       MAKEINTRESOURCE(32643)
2838 #define IDC_SIZEWE         MAKEINTRESOURCE(32644)
2839 #define IDC_SIZENS         MAKEINTRESOURCE(32645)
2840 #define IDC_SIZEALL        MAKEINTRESOURCE(32646)
2841 #define IDC_NO             MAKEINTRESOURCE(32648)
2842 #define IDC_HAND           MAKEINTRESOURCE(32649)
2843 #define IDC_APPSTARTING    MAKEINTRESOURCE(32650)
2844 #define IDC_HELP           MAKEINTRESOURCE(32651)
2845
2846 #define MNC_IGNORE 0
2847 #define MNC_CLOSE 1
2848 #define MNC_EXECUTE 2
2849 #define MNC_SELECT 3
2850
2851 /* SystemParametersInfo */
2852 #define SPI_GETBEEP               1
2853 #define SPI_SETBEEP               2
2854 #define SPI_GETMOUSE              3
2855 #define SPI_SETMOUSE              4
2856 #define SPI_GETBORDER             5
2857 #define SPI_SETBORDER             6
2858 #define SPI_GETKEYBOARDSPEED      10
2859 #define SPI_SETKEYBOARDSPEED      11
2860 #define SPI_LANGDRIVER            12
2861 #define SPI_ICONHORIZONTALSPACING 13
2862 #define SPI_GETSCREENSAVETIMEOUT  14
2863 #define SPI_SETSCREENSAVETIMEOUT  15
2864 #define SPI_GETSCREENSAVEACTIVE   16
2865 #define SPI_SETSCREENSAVEACTIVE   17
2866 #define SPI_GETGRIDGRANULARITY    18
2867 #define SPI_SETGRIDGRANULARITY    19
2868 #define SPI_SETDESKWALLPAPER      20
2869 #define SPI_SETDESKPATTERN        21
2870 #define SPI_GETKEYBOARDDELAY      22
2871 #define SPI_SETKEYBOARDDELAY      23
2872 #define SPI_ICONVERTICALSPACING   24
2873 #define SPI_GETICONTITLEWRAP      25
2874 #define SPI_SETICONTITLEWRAP      26
2875 #define SPI_GETMENUDROPALIGNMENT  27
2876 #define SPI_SETMENUDROPALIGNMENT  28
2877 #define SPI_SETDOUBLECLKWIDTH     29
2878 #define SPI_SETDOUBLECLKHEIGHT    30
2879 #define SPI_GETICONTITLELOGFONT   31
2880 #define SPI_SETDOUBLECLICKTIME    32
2881 #define SPI_SETMOUSEBUTTONSWAP    33
2882 #define SPI_SETICONTITLELOGFONT   34
2883 #define SPI_GETFASTTASKSWITCH     35
2884 #define SPI_SETFASTTASKSWITCH     36
2885 #define SPI_SETDRAGFULLWINDOWS    37
2886 #define SPI_GETDRAGFULLWINDOWS    38
2887 #define SPI_GETNONCLIENTMETRICS   41
2888 #define SPI_SETNONCLIENTMETRICS   42
2889 #define SPI_GETMINIMIZEDMETRICS   43
2890 #define SPI_SETMINIMIZEDMETRICS   44
2891 #define SPI_GETICONMETRICS        45
2892 #define SPI_SETICONMETRICS        46
2893 #define SPI_SETWORKAREA           47
2894 #define SPI_GETWORKAREA           48
2895 #define SPI_SETPENWINDOWS         49
2896 #define SPI_GETFILTERKEYS         50
2897 #define SPI_SETFILTERKEYS         51
2898 #define SPI_GETTOGGLEKEYS         52
2899 #define SPI_SETTOGGLEKEYS         53
2900 #define SPI_GETMOUSEKEYS          54
2901 #define SPI_SETMOUSEKEYS          55
2902 #define SPI_GETSHOWSOUNDS         56
2903 #define SPI_SETSHOWSOUNDS         57
2904 #define SPI_GETSTICKYKEYS         58
2905 #define SPI_SETSTICKYKEYS         59
2906 #define SPI_GETACCESSTIMEOUT      60
2907 #define SPI_SETACCESSTIMEOUT      61
2908 #define SPI_GETSERIALKEYS         62
2909 #define SPI_SETSERIALKEYS         63
2910 #define SPI_GETSOUNDSENTRY        64
2911 #define SPI_SETSOUNDSENTRY        65
2912 #define SPI_GETHIGHCONTRAST       66
2913 #define SPI_SETHIGHCONTRAST       67
2914 #define SPI_GETKEYBOARDPREF       68
2915 #define SPI_SETKEYBOARDPREF       69
2916 #define SPI_GETSCREENREADER       70
2917 #define SPI_SETSCREENREADER       71
2918 #define SPI_GETANIMATION          72
2919 #define SPI_SETANIMATION          73
2920 #define SPI_GETFONTSMOOTHING      74
2921 #define SPI_SETFONTSMOOTHING      75
2922 #define SPI_SETDRAGWIDTH          76
2923 #define SPI_SETDRAGHEIGHT         77
2924 #define SPI_SETHANDHELD           78
2925 #define SPI_GETLOWPOWERTIMEOUT    79
2926 #define SPI_GETPOWEROFFTIMEOUT    80
2927 #define SPI_SETLOWPOWERTIMEOUT    81
2928 #define SPI_SETPOWEROFFTIMEOUT    82
2929 #define SPI_GETLOWPOWERACTIVE     83
2930 #define SPI_GETPOWEROFFACTIVE     84
2931 #define SPI_SETLOWPOWERACTIVE     85
2932 #define SPI_SETPOWEROFFACTIVE     86
2933 #define SPI_SETCURSORS            87
2934 #define SPI_SETICONS              88
2935 #define SPI_GETDEFAULTINPUTLANG   89
2936 #define SPI_SETDEFAULTINPUTLANG   90
2937 #define SPI_SETLANGTOGGLE         91
2938 #define SPI_GETWINDOWSEXTENSION   92
2939 #define SPI_SETMOUSETRAILS        93
2940 #define SPI_GETMOUSETRAILS        94
2941 #define SPI_GETSNAPTODEFBUTTON    95
2942 #define SPI_SETSNAPTODEFBUTTON    96
2943 #define SPI_SETSCREENSAVERRUNNING 97
2944 #define SPI_SCREENSAVERRUNNING    SPI_SETSCREENSAVERRUNNING
2945 #define SPI_GETMOUSEHOVERWIDTH    98
2946 #define SPI_SETMOUSEHOVERWIDTH    99
2947 #define SPI_GETMOUSEHOVERHEIGHT   100
2948 #define SPI_SETMOUSEHOVERHEIGHT   101
2949 #define SPI_GETMOUSEHOVERTIME     102
2950 #define SPI_SETMOUSEHOVERTIME     103
2951 #define SPI_GETWHEELSCROLLLINES   104
2952 #define SPI_SETWHEELSCROLLLINES   105
2953 #define SPI_GETMENUSHOWDELAY      106
2954 #define SPI_SETMENUSHOWDELAY      107
2955 #define SPI_GETWHEELSCROLLCHARS   108
2956 #define SPI_SETWHEELSCROLLCHARS   109
2957 #define SPI_GETSHOWIMEUI          110
2958 #define SPI_SETSHOWIMEUI          111
2959 #define SPI_GETMOUSESPEED         112
2960 #define SPI_SETMOUSESPEED         113
2961 #define SPI_GETSCREENSAVERRUNNING 114
2962 #define SPI_GETDESKWALLPAPER      115
2963
2964 #define SPI_GETACTIVEWINDOWTRACKING    0x1000
2965 #define SPI_SETACTIVEWINDOWTRACKING    0x1001
2966 #define SPI_GETMENUANIMATION           0x1002
2967 #define SPI_SETMENUANIMATION           0x1003
2968 #define SPI_GETCOMBOBOXANIMATION       0x1004
2969 #define SPI_SETCOMBOBOXANIMATION       0x1005
2970 #define SPI_GETLISTBOXSMOOTHSCROLLING  0x1006
2971 #define SPI_SETLISTBOXSMOOTHSCROLLING  0x1007
2972 #define SPI_GETGRADIENTCAPTIONS        0x1008
2973 #define SPI_SETGRADIENTCAPTIONS        0x1009
2974 #define SPI_GETKEYBOARDCUES            0x100A
2975 #define SPI_SETKEYBOARDCUES            0x100B
2976 #define SPI_GETMENUUNDERLINES          SPI_GETKEYBOARDCUES
2977 #define SPI_SETMENUUNDERLINES          SPI_SETKEYBOARDCUES
2978 #define SPI_GETACTIVEWNDTRKZORDER      0x100C
2979 #define SPI_SETACTIVEWNDTRKZORDER      0x100D
2980 #define SPI_GETHOTTRACKING             0x100E
2981 #define SPI_SETHOTTRACKING             0x100F
2982 #define SPI_GETMENUFADE                0x1012
2983 #define SPI_SETMENUFADE                0x1013
2984 #define SPI_GETSELECTIONFADE           0x1014
2985 #define SPI_SETSELECTIONFADE           0x1015
2986 #define SPI_GETTOOLTIPANIMATION        0x1016
2987 #define SPI_SETTOOLTIPANIMATION        0x1017
2988 #define SPI_GETTOOLTIPFADE             0x1018
2989 #define SPI_SETTOOLTIPFADE             0x1019
2990 #define SPI_GETCURSORSHADOW            0x101A
2991 #define SPI_SETCURSORSHADOW            0x101B
2992 #define SPI_GETMOUSESONAR              0x101C
2993 #define SPI_SETMOUSESONAR              0x101D
2994 #define SPI_GETMOUSECLICKLOCK          0x101E
2995 #define SPI_SETMOUSECLICKLOCK          0x101F
2996 #define SPI_GETMOUSEVANISH             0x1020
2997 #define SPI_SETMOUSEVANISH             0x1021
2998 #define SPI_GETFLATMENU                0x1022
2999 #define SPI_SETFLATMENU                0x1023
3000 #define SPI_GETDROPSHADOW              0x1024
3001 #define SPI_SETDROPSHADOW              0x1025
3002 #define SPI_GETBLOCKSENDINPUTRESETS    0x1026
3003 #define SPI_SETBLOCKSENDINPUTRESETS    0x1027
3004 #define SPI_GETUIEFFECTS               0x103E
3005 #define SPI_SETUIEFFECTS               0x103F
3006 #define SPI_GETFOREGROUNDLOCKTIMEOUT   0x2000
3007 #define SPI_SETFOREGROUNDLOCKTIMEOUT   0x2001
3008 #define SPI_GETACTIVEWNDTRKTIMEOUT     0x2002
3009 #define SPI_SETACTIVEWNDTRKTIMEOUT     0x2003
3010 #define SPI_GETFOREGROUNDFLASHCOUNT    0x2004
3011 #define SPI_SETFOREGROUNDFLASHCOUNT    0x2005
3012 #define SPI_GETCARETWIDTH              0x2006
3013 #define SPI_SETCARETWIDTH              0x2007
3014 #define SPI_GETMOUSECLICKLOCKTIME      0x2008
3015 #define SPI_SETMOUSECLICKLOCKTIME      0x2009
3016 #define SPI_GETFONTSMOOTHINGTYPE       0x200A
3017 #define SPI_SETFONTSMOOTHINGTYPE       0x200B
3018 #define SPI_GETFONTSMOOTHINGCONTRAST   0x200C
3019 #define SPI_SETFONTSMOOTHINGCONTRAST   0x200D
3020 #define SPI_GETFOCUSBORDERWIDTH        0x200E
3021 #define SPI_SETFOCUSBORDERWIDTH        0x200F
3022 #define SPI_GETFOCUSBORDERHEIGHT       0x2010
3023 #define SPI_SETFOCUSBORDERHEIGHT       0x2011
3024 #define SPI_GETFONTSMOOTHINGORIENTATION 0x2012
3025 #define SPI_SETFONTSMOOTHINGORIENTATION 0x2013
3026
3027 #define FE_FONTSMOOTHINGSTANDARD       0x0001
3028 #define FE_FONTSMOOTHINGCLEARTYPE      0x0002
3029 #define FE_FONTSMOOTHINGDOCKING        0x8000
3030
3031 #define FE_FONTSMOOTHINGORIENTATIONBGR 0x0000
3032 #define FE_FONTSMOOTHINGORIENTATIONRGB 0x0001
3033
3034 #define SETWALLPAPER_DEFAULT           ((LPWSTR)-1)
3035
3036 /* SystemParametersInfo flags */
3037
3038 #define SPIF_UPDATEINIFILE              1
3039 #define SPIF_SENDWININICHANGE           2
3040 #define SPIF_SENDCHANGE                 SPIF_SENDWININICHANGE
3041
3042 #if defined(_WINGDI_) && !defined(NOGDI)
3043 typedef struct tagNONCLIENTMETRICSA {
3044         UINT            cbSize;
3045         INT             iBorderWidth;
3046         INT             iScrollWidth;
3047         INT             iScrollHeight;
3048         INT             iCaptionWidth;
3049         INT             iCaptionHeight;
3050         LOGFONTA        lfCaptionFont;
3051         INT             iSmCaptionWidth;
3052         INT             iSmCaptionHeight;
3053         LOGFONTA        lfSmCaptionFont;
3054         INT             iMenuWidth;
3055         INT             iMenuHeight;
3056         LOGFONTA        lfMenuFont;
3057         LOGFONTA        lfStatusFont;
3058         LOGFONTA        lfMessageFont;
3059 } NONCLIENTMETRICSA, *PNONCLIENTMETRICSA, *LPNONCLIENTMETRICSA;
3060
3061 typedef struct tagNONCLIENTMETRICSW {
3062         UINT            cbSize;
3063         INT             iBorderWidth;
3064         INT             iScrollWidth;
3065         INT             iScrollHeight;
3066         INT             iCaptionWidth;
3067         INT             iCaptionHeight;
3068         LOGFONTW        lfCaptionFont;
3069         INT             iSmCaptionWidth;
3070         INT             iSmCaptionHeight;
3071         LOGFONTW        lfSmCaptionFont;
3072         INT             iMenuWidth;
3073         INT             iMenuHeight;
3074         LOGFONTW        lfMenuFont;
3075         LOGFONTW        lfStatusFont;
3076         LOGFONTW        lfMessageFont;
3077 } NONCLIENTMETRICSW, *PNONCLIENTMETRICSW, *LPNONCLIENTMETRICSW;
3078
3079 DECL_WINELIB_TYPE_AW(NONCLIENTMETRICS)
3080 DECL_WINELIB_TYPE_AW(PNONCLIENTMETRICS)
3081 DECL_WINELIB_TYPE_AW(LPNONCLIENTMETRICS)
3082
3083 typedef struct tagICONMETRICSA {
3084     UINT cbSize;
3085     int iHorzSpacing;
3086     int iVertSpacing;
3087     int iTitleWrap;
3088     LOGFONTA lfFont;
3089 } ICONMETRICSA, *PICONMETRICSA, *LPICONMETRICSA;
3090
3091 typedef struct tagICONMETRICSW {
3092     UINT cbSize;
3093     int iHorzSpacing;
3094     int iVertSpacing;
3095     int iTitleWrap;
3096     LOGFONTW lfFont;
3097 } ICONMETRICSW, *PICONMETRICSW, *LPICONMETRICSW;
3098
3099 DECL_WINELIB_TYPE_AW(ICONMETRICS)
3100 DECL_WINELIB_TYPE_AW(PICONMETRICS)
3101 DECL_WINELIB_TYPE_AW(LPICONMETRICS)
3102
3103 typedef struct tagUPDATELAYEREDWINDOWINFO
3104 {
3105     DWORD                cbSize;
3106     HDC                  hdcDst;
3107     POINT CONST*         pptDst;
3108     SIZE CONST*          psize;
3109     HDC                  hdcSrc;
3110     POINT CONST*         pptSrc;
3111     COLORREF             crKey;
3112     BLENDFUNCTION CONST* pblend;
3113     DWORD                dwFlags;
3114     RECT CONST*          prcDirty;
3115 } UPDATELAYEREDWINDOWINFO, *PUPDATELAYEREDWINDOWINFO;
3116
3117 #endif /* defined(_WINGDI_) && !defined(NOGDI) */
3118
3119 #define ARW_BOTTOMLEFT              0x0000L
3120 #define ARW_BOTTOMRIGHT             0x0001L
3121 #define ARW_TOPLEFT                 0x0002L
3122 #define ARW_TOPRIGHT                0x0003L
3123 #define ARW_STARTMASK               0x0003L
3124 #define ARW_STARTRIGHT              0x0001L
3125 #define ARW_STARTTOP                0x0002L
3126
3127 #define ARW_LEFT                    0x0000L
3128 #define ARW_RIGHT                   0x0000L
3129 #define ARW_UP                      0x0004L
3130 #define ARW_DOWN                    0x0004L
3131 #define ARW_HIDE                    0x0008L
3132
3133 typedef struct tagMINIMIZEDMETRICS {
3134     UINT cbSize;
3135     int iWidth;
3136     int iHorzGap;
3137     int iVertGap;
3138     int iArrange;
3139 } MINIMIZEDMETRICS, *PMINIMIZEDMETRICS, *LPMINIMIZEDMETRICS;
3140
3141 #ifndef NOWINSTYLES
3142
3143 /* Window Styles */
3144 #define WS_OVERLAPPED    0x00000000L
3145 #define WS_POPUP         0x80000000L
3146 #define WS_CHILD         0x40000000L
3147 #define WS_MINIMIZE      0x20000000L
3148 #define WS_VISIBLE       0x10000000L
3149 #define WS_DISABLED      0x08000000L
3150 #define WS_CLIPSIBLINGS  0x04000000L
3151 #define WS_CLIPCHILDREN  0x02000000L
3152 #define WS_MAXIMIZE      0x01000000L
3153 #define WS_CAPTION       0x00C00000L
3154 #define WS_BORDER        0x00800000L
3155 #define WS_DLGFRAME      0x00400000L
3156 #define WS_VSCROLL       0x00200000L
3157 #define WS_HSCROLL       0x00100000L
3158 #define WS_SYSMENU       0x00080000L
3159 #define WS_THICKFRAME    0x00040000L
3160 #define WS_GROUP         0x00020000L
3161 #define WS_TABSTOP       0x00010000L
3162 #define WS_MINIMIZEBOX   0x00020000L
3163 #define WS_MAXIMIZEBOX   0x00010000L
3164 #define WS_TILED         WS_OVERLAPPED
3165 #define WS_ICONIC        WS_MINIMIZE
3166 #define WS_SIZEBOX       WS_THICKFRAME
3167 #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME| WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
3168 #define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU)
3169 #define WS_CHILDWINDOW (WS_CHILD)
3170 #define WS_TILEDWINDOW (WS_OVERLAPPEDWINDOW)
3171
3172 /* Window extended styles */
3173 #define WS_EX_DLGMODALFRAME    0x00000001L
3174 #define WS_EX_DRAGDETECT       0x00000002L
3175 #define WS_EX_NOPARENTNOTIFY   0x00000004L
3176 #define WS_EX_TOPMOST          0x00000008L
3177 #define WS_EX_ACCEPTFILES      0x00000010L
3178 #define WS_EX_TRANSPARENT      0x00000020L
3179 #define WS_EX_MDICHILD         0x00000040L
3180 #define WS_EX_TOOLWINDOW       0x00000080L
3181 #define WS_EX_WINDOWEDGE       0x00000100L
3182 #define WS_EX_CLIENTEDGE       0x00000200L
3183 #define WS_EX_CONTEXTHELP      0x00000400L
3184 #define WS_EX_RIGHT            0x00001000L
3185 #define WS_EX_LEFT             0x00000000L
3186 #define WS_EX_RTLREADING       0x00002000L
3187 #define WS_EX_LTRREADING       0x00000000L
3188 #define WS_EX_LEFTSCROLLBAR    0x00004000L
3189 #define WS_EX_RIGHTSCROLLBAR   0x00000000L
3190 #define WS_EX_CONTROLPARENT    0x00010000L
3191 #define WS_EX_STATICEDGE       0x00020000L
3192 #define WS_EX_APPWINDOW        0x00040000L
3193 #define WS_EX_LAYERED          0x00080000L
3194 #define WS_EX_NOINHERITLAYOUT  0x00100000L
3195 #define WS_EX_LAYOUTRTL        0x00400000L
3196 #define WS_EX_COMPOSITED       0x02000000L
3197 #define WS_EX_NOACTIVATE       0x08000000L
3198
3199 #define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE|WS_EX_CLIENTEDGE)
3200 #define WS_EX_PALETTEWINDOW    (WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST)
3201
3202 /* WINE internal... */
3203 #define WS_EX_TRAYWINDOW        0x80000000L
3204
3205 #endif /* NOWINSTYLES */
3206
3207 /* Window scrolling */
3208 #define SW_SCROLLCHILDREN      0x0001
3209 #define SW_INVALIDATE          0x0002
3210 #define SW_ERASE               0x0004
3211
3212 /* CreateWindow() coordinates */
3213 #define CW_USEDEFAULT ((INT)0x80000000)
3214
3215 /* ChildWindowFromPointEx Flags */
3216 #define CWP_ALL                0x0000
3217 #define CWP_SKIPINVISIBLE      0x0001
3218 #define CWP_SKIPDISABLED       0x0002
3219 #define CWP_SKIPTRANSPARENT    0x0004
3220
3221   /* PeekMessage() options */
3222 #define PM_NOREMOVE       0x0000
3223 #define PM_REMOVE         0x0001
3224 #define PM_NOYIELD        0x0002
3225 #define PM_QS_INPUT       (QS_INPUT << 16)
3226 #define PM_QS_POSTMESSAGE ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16)
3227 #define PM_QS_PAINT       (QS_PAINT << 16)
3228 #define PM_QS_SENDMESSAGE (QS_SENDMESSAGE << 16)
3229
3230 /* AnimateWindow() flags */
3231 #define AW_SLIDE        0x00040000
3232 #define AW_ACTIVATE     0x00020000
3233 #define AW_BLEND        0x00080000
3234 #define AW_HIDE         0x00010000
3235 #define AW_CENTER       0x00000010
3236 #define AW_HOR_POSITIVE 0x00000001
3237 #define AW_HOR_NEGATIVE 0x00000002
3238 #define AW_VER_POSITIVE 0x00000004
3239 #define AW_VER_NEGATIVE 0x00000008
3240
3241 /* FlashWindowEx() flags */
3242 #define FLASHW_STOP      0x00000000
3243 #define FLASHW_CAPTION   0x00000001
3244 #define FLASHW_TRAY      0x00000002
3245 #define FLASHW_ALL       (FLASHW_CAPTION|FLASHW_TRAY)
3246 #define FLASHW_TIMER     0x00000004
3247 #define FLASHW_TIMERNOFG 0x0000000C
3248
3249 typedef struct {
3250     UINT cbSize;
3251     HWND hwnd;
3252     DWORD dwFlags;
3253     UINT uCount;
3254     DWORD dwTimeout;
3255 } FLASHWINFO, *PFLASHWINFO;
3256
3257 /* WM_SHOWWINDOW lParam codes */
3258 #define SW_PARENTCLOSING    1
3259 #define SW_OTHERZOOM        2
3260 #define SW_PARENTOPENING    3
3261 #define SW_OTHERUNZOOM      4
3262
3263 /* SetLayeredWindowAttributes() flags */
3264 #define LWA_COLORKEY        0x00000001
3265 #define LWA_ALPHA           0x00000002
3266
3267   /* ShowWindow() codes */
3268 #define SW_HIDE             0
3269 #define SW_SHOWNORMAL       1
3270 #define SW_NORMAL           1
3271 #define SW_SHOWMINIMIZED    2
3272 #define SW_SHOWMAXIMIZED    3
3273 #define SW_MAXIMIZE         3
3274 #define SW_SHOWNOACTIVATE   4
3275 #define SW_SHOW             5
3276 #define SW_MINIMIZE         6
3277 #define SW_SHOWMINNOACTIVE  7
3278 #define SW_SHOWNA           8
3279 #define SW_RESTORE          9
3280 #define SW_SHOWDEFAULT      10
3281 #define SW_FORCEMINIMIZE    11
3282 #define SW_MAX              11
3283 #define SW_NORMALNA         0xCC        /* undoc. flag in MinMaximize */
3284
3285   /* WM_SIZE message wParam values */
3286 #define SIZE_RESTORED        0
3287 #define SIZE_MINIMIZED       1
3288 #define SIZE_MAXIMIZED       2
3289 #define SIZE_MAXSHOW         3
3290 #define SIZE_MAXHIDE         4
3291 #define SIZENORMAL           SIZE_RESTORED
3292 #define SIZEICONIC           SIZE_MINIMIZED
3293 #define SIZEFULLSCREEN       SIZE_MAXIMIZED
3294 #define SIZEZOOMSHOW         SIZE_MAXSHOW
3295 #define SIZEZOOMHIDE         SIZE_MAXHIDE
3296
3297 /* SetWindowPos() and WINDOWPOS flags */
3298 #define SWP_NOSIZE          0x0001
3299 #define SWP_NOMOVE          0x0002
3300 #define SWP_NOZORDER        0x0004
3301 #define SWP_NOREDRAW        0x0008
3302 #define SWP_NOACTIVATE      0x0010
3303 #define SWP_FRAMECHANGED    0x0020  /* The frame changed: send WM_NCCALCSIZE */
3304 #define SWP_SHOWWINDOW      0x0040
3305 #define SWP_HIDEWINDOW      0x0080
3306 #define SWP_NOCOPYBITS      0x0100
3307 #define SWP_NOOWNERZORDER   0x0200  /* Don't do owner Z ordering */
3308
3309 #define SWP_DRAWFRAME       SWP_FRAMECHANGED
3310 #define SWP_NOREPOSITION    SWP_NOOWNERZORDER
3311
3312 #define SWP_NOSENDCHANGING  0x0400
3313 #define SWP_DEFERERASE      0x2000
3314 #define SWP_ASYNCWINDOWPOS  0x4000
3315
3316 /* undocumented SWP flags - from SDK 3.1 */
3317 #define SWP_NOCLIENTSIZE    0x0800
3318 #define SWP_NOCLIENTMOVE    0x1000
3319 #define SWP_STATECHANGED    0x8000
3320
3321 #define HWND_DESKTOP        ((HWND)0)
3322 #define HWND_BROADCAST      ((HWND)0xffff)
3323
3324 /* SetWindowPos() hwndInsertAfter field values */
3325 #define HWND_TOP            ((HWND)0)
3326 #define HWND_BOTTOM         ((HWND)1)
3327 #define HWND_TOPMOST        ((HWND)-1)
3328 #define HWND_NOTOPMOST      ((HWND)-2)
3329 #define HWND_MESSAGE        ((HWND)-3)
3330
3331 /* GetDCEx flags */
3332 #define DCX_WINDOW           0x00000001
3333 #define DCX_CACHE            0x00000002
3334 #define DCX_NORESETATTRS     0x00000004
3335 #define DCX_CLIPCHILDREN     0x00000008
3336 #define DCX_CLIPSIBLINGS     0x00000010
3337 #define DCX_PARENTCLIP       0x00000020
3338 #define DCX_EXCLUDERGN       0x00000040
3339 #define DCX_INTERSECTRGN     0x00000080
3340 #define DCX_EXCLUDEUPDATE    0x00000100
3341 #define DCX_INTERSECTUPDATE  0x00000200
3342 #define DCX_LOCKWINDOWUPDATE 0x00000400
3343 #define DCX_USESTYLE         0x00010000
3344 #define DCX_NORECOMPUTE      0x00100000
3345 #define DCX_VALIDATE         0x00200000
3346
3347 #define MF_INSERT          0x0000
3348 #define MF_CHANGE          0x0080
3349 #define MF_APPEND          0x0100
3350 #define MF_DELETE          0x0200
3351 #define MF_REMOVE          0x1000
3352 #define MF_END             0x0080
3353
3354 #define MF_ENABLED         0x0000
3355 #define MF_GRAYED          0x0001
3356 #define MF_DISABLED        0x0002
3357 #define MF_STRING          0x0000
3358 #define MF_BITMAP          0x0004
3359 #define MF_UNCHECKED       0x0000
3360 #define MF_CHECKED         0x0008
3361 #define MF_POPUP           0x0010
3362 #define MF_MENUBARBREAK    0x0020
3363 #define MF_MENUBREAK       0x0040
3364 #define MF_UNHILITE        0x0000
3365 #define MF_HILITE          0x0080
3366 #define MF_OWNERDRAW       0x0100
3367 #define MF_USECHECKBITMAPS 0x0200
3368 #define MF_BYCOMMAND       0x0000
3369 #define MF_BYPOSITION      0x0400
3370 #define MF_SEPARATOR       0x0800
3371 #define MF_DEFAULT         0x1000
3372 #define MF_SYSMENU         0x2000
3373 #define MF_HELP            0x4000
3374 #define MF_RIGHTJUSTIFY    0x4000
3375 #define MF_MOUSESELECT     0x8000
3376
3377 /* Flags for extended menu item types.  */
3378 #define MFT_STRING         MF_STRING
3379 #define MFT_BITMAP         MF_BITMAP
3380 #define MFT_MENUBARBREAK   MF_MENUBARBREAK
3381 #define MFT_MENUBREAK      MF_MENUBREAK
3382 #define MFT_OWNERDRAW      MF_OWNERDRAW
3383 #define MFT_RADIOCHECK     0x00000200L
3384 #define MFT_SEPARATOR      MF_SEPARATOR
3385 #define MFT_RIGHTORDER     0x00002000L
3386 #define MFT_RIGHTJUSTIFY   MF_RIGHTJUSTIFY
3387
3388 /* Flags for extended menu item states.  */
3389 #define MFS_GRAYED          0x00000003L
3390 #define MFS_DISABLED        MFS_GRAYED
3391 #define MFS_CHECKED         MF_CHECKED
3392 #define MFS_HILITE          MF_HILITE
3393 #define MFS_ENABLED         MF_ENABLED
3394 #define MFS_UNCHECKED       MF_UNCHECKED
3395 #define MFS_UNHILITE        MF_UNHILITE
3396 #define MFS_DEFAULT         MF_DEFAULT
3397 #define MFS_MASK            0x0000108BL
3398 #define MFS_HOTTRACKDRAWN   0x10000000L
3399 #define MFS_CACHEDBMP       0x20000000L
3400 #define MFS_BOTTOMGAPDROP   0x40000000L
3401 #define MFS_TOPGAPDROP      0x80000000L
3402 #define MFS_GAPDROP         0xC0000000L
3403
3404 /* for GetMenuDefaultItem */
3405 #define GMDI_USEDISABLED    0x0001L
3406 #define GMDI_GOINTOPOPUPS   0x0002L
3407
3408 /* DrawText() flags */
3409 #define DT_TOP                  0x00000000
3410 #define DT_LEFT                 0x00000000
3411 #define DT_CENTER               0x00000001
3412 #define DT_RIGHT                0x00000002
3413 #define DT_VCENTER              0x00000004
3414 #define DT_BOTTOM               0x00000008
3415 #define DT_WORDBREAK            0x00000010
3416 #define DT_SINGLELINE           0x00000020
3417 #define DT_EXPANDTABS           0x00000040
3418 #define DT_TABSTOP              0x00000080
3419 #define DT_NOCLIP               0x00000100
3420 #define DT_EXTERNALLEADING      0x00000200
3421 #define DT_CALCRECT             0x00000400
3422 #define DT_NOPREFIX             0x00000800
3423 #define DT_INTERNAL             0x00001000
3424 #define DT_EDITCONTROL          0x00002000
3425 #define DT_PATH_ELLIPSIS        0x00004000
3426 #define DT_END_ELLIPSIS         0x00008000
3427 #define DT_MODIFYSTRING         0x00010000
3428 #define DT_RTLREADING           0x00020000
3429 #define DT_WORD_ELLIPSIS        0x00040000
3430 #define DT_NOFULLWIDTHCHARBREAK 0x00080000
3431 #define DT_HIDEPREFIX           0x00100000
3432 #define DT_PREFIXONLY           0x00200000
3433
3434 /* DrawCaption()/DrawCaptionTemp() flags */
3435 #define DC_ACTIVE               0x0001
3436 #define DC_SMALLCAP             0x0002
3437 #define DC_ICON                 0x0004
3438 #define DC_TEXT                 0x0008
3439 #define DC_INBUTTON             0x0010
3440 #define DC_GRADIENT             0x0020
3441 #define DC_BUTTONS              0x1000
3442
3443 /* DrawEdge() flags */
3444 #define BDR_RAISEDOUTER    0x0001
3445 #define BDR_SUNKENOUTER    0x0002
3446 #define BDR_RAISEDINNER    0x0004
3447 #define BDR_SUNKENINNER    0x0008
3448
3449 #define BDR_OUTER          0x0003
3450 #define BDR_INNER          0x000c
3451 #define BDR_RAISED         0x0005
3452 #define BDR_SUNKEN         0x000a
3453
3454 #define EDGE_RAISED        (BDR_RAISEDOUTER | BDR_RAISEDINNER)
3455 #define EDGE_SUNKEN        (BDR_SUNKENOUTER | BDR_SUNKENINNER)
3456 #define EDGE_ETCHED        (BDR_SUNKENOUTER | BDR_RAISEDINNER)
3457 #define EDGE_BUMP          (BDR_RAISEDOUTER | BDR_SUNKENINNER)
3458
3459 /* border flags */
3460 #define BF_LEFT            0x0001
3461 #define BF_TOP             0x0002
3462 #define BF_RIGHT           0x0004
3463 #define BF_BOTTOM          0x0008
3464 #define BF_DIAGONAL        0x0010
3465 #define BF_MIDDLE          0x0800  /* Fill in the middle */
3466 #define BF_SOFT            0x1000  /* For softer buttons */
3467 #define BF_ADJUST          0x2000  /* Calculate the space left over */
3468 #define BF_FLAT            0x4000  /* For flat rather than 3D borders */
3469 #define BF_MONO            0x8000  /* For monochrome borders */
3470 #define BF_TOPLEFT         (BF_TOP | BF_LEFT)
3471 #define BF_TOPRIGHT        (BF_TOP | BF_RIGHT)
3472 #define BF_BOTTOMLEFT      (BF_BOTTOM | BF_LEFT)
3473 #define BF_BOTTOMRIGHT     (BF_BOTTOM | BF_RIGHT)
3474 #define BF_RECT            (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM)
3475 #define BF_DIAGONAL_ENDTOPRIGHT     (BF_DIAGONAL | BF_TOP | BF_RIGHT)
3476 #define BF_DIAGONAL_ENDTOPLEFT      (BF_DIAGONAL | BF_TOP | BF_LEFT)
3477 #define BF_DIAGONAL_ENDBOTTOMLEFT   (BF_DIAGONAL | BF_BOTTOM | BF_LEFT)
3478 #define BF_DIAGONAL_ENDBOTTOMRIGHT  (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT)
3479
3480 /* DrawFrameControl() uType's */
3481
3482 #define DFC_CAPTION             1
3483 #define DFC_MENU                2
3484 #define DFC_SCROLL              3
3485 #define DFC_BUTTON              4
3486 #define DFC_POPUPMENU           5
3487
3488 /* uState's */
3489
3490 #define DFCS_CAPTIONCLOSE       0x0000
3491 #define DFCS_CAPTIONMIN         0x0001
3492 #define DFCS_CAPTIONMAX         0x0002
3493 #define DFCS_CAPTIONRESTORE     0x0003
3494 #define DFCS_CAPTIONHELP        0x0004          /* Windows 95 only */
3495
3496 #define DFCS_MENUARROW          0x0000
3497 #define DFCS_MENUCHECK          0x0001
3498 #define DFCS_MENUBULLET         0x0002
3499 #define DFCS_MENUARROWRIGHT     0x0004
3500
3501 #define DFCS_SCROLLUP            0x0000
3502 #define DFCS_SCROLLDOWN          0x0001
3503 #define DFCS_SCROLLLEFT          0x0002
3504 #define DFCS_SCROLLRIGHT         0x0003
3505 #define DFCS_SCROLLCOMBOBOX      0x0005
3506 #define DFCS_SCROLLSIZEGRIP      0x0008
3507 #define DFCS_SCROLLSIZEGRIPRIGHT 0x0010
3508
3509 #define DFCS_BUTTONCHECK        0x0000
3510 #define DFCS_BUTTONRADIOIMAGE   0x0001
3511 #define DFCS_BUTTONRADIOMASK    0x0002          /* to draw nonsquare button */
3512 #define DFCS_BUTTONRADIO        0x0004
3513 #define DFCS_BUTTON3STATE       0x0008
3514 #define DFCS_BUTTONPUSH         0x0010
3515
3516 /* additional state of the control */
3517
3518 #define DFCS_INACTIVE           0x0100
3519 #define DFCS_PUSHED             0x0200
3520 #define DFCS_CHECKED            0x0400
3521 #define DFCS_TRANSPARENT        0x0800
3522 #define DFCS_HOT                0x1000
3523 #define DFCS_ADJUSTRECT         0x2000          /* exclude surrounding edge */
3524 #define DFCS_FLAT               0x4000
3525 #define DFCS_MONO               0x8000
3526
3527
3528 /* Image type */
3529 #define DST_COMPLEX     0x0000
3530 #define DST_TEXT        0x0001
3531 #define DST_PREFIXTEXT  0x0002
3532 #define DST_ICON        0x0003
3533 #define DST_BITMAP      0x0004
3534
3535 /* State type */
3536 #define DSS_NORMAL      0x0000
3537 #define DSS_UNION       0x0010  /* Gray string appearance */
3538 #define DSS_DISABLED    0x0020
3539 #define DSS_DEFAULT     0x0040  /* Make it bold */
3540 #define DSS_MONO        0x0080
3541 #define DSS_HIDEPREFIX  0x0200
3542 #define DSS_PREFIXONLY  0x0400
3543 #define DSS_RIGHT       0x8000
3544
3545 /* UserObjectInformation classes */
3546 #define UOI_FLAGS 1
3547 #define UOI_NAME 2
3548 #define UOI_TYPE 3
3549 #define UOI_USER_SID 4
3550
3551
3552 /* Sent as the lParam of a WM_DRAWITEM message to instruct how an
3553  * owner drawn control is to be drawn */
3554 typedef struct tagDRAWITEMSTRUCT
3555 {
3556     UINT      CtlType;    /* Type of control (ODT_* flags from "winuser.h") */
3557     UINT      CtlID;      /* Control ID */
3558     UINT      itemID;     /* Menu item ID */
3559     UINT      itemAction; /* Action to perform (ODA_* flags from "winuser.h") */
3560     UINT      itemState;  /* Item state (ODS_* flags from "winuser.h") */
3561     HWND      hwndItem;   /* Control window */
3562     HDC       hDC;        /* Device context to draw to */
3563     RECT      rcItem;     /* Position of the control in hDC */
3564     ULONG_PTR itemData;   /* Extra data added by the application, if any */
3565 } DRAWITEMSTRUCT, *PDRAWITEMSTRUCT, *LPDRAWITEMSTRUCT;
3566
3567
3568 typedef struct tagMEASUREITEMSTRUCT
3569 {
3570     UINT      CtlType;
3571     UINT      CtlID;
3572     UINT      itemID;
3573     UINT      itemWidth;
3574     UINT      itemHeight;
3575     ULONG_PTR itemData;
3576 } MEASUREITEMSTRUCT, *PMEASUREITEMSTRUCT, *LPMEASUREITEMSTRUCT;
3577
3578
3579 typedef struct tagDELETEITEMSTRUCT
3580 {
3581     UINT     CtlType;
3582     UINT     CtlID;
3583     UINT     itemID;
3584     HWND     hwndItem;
3585     ULONG_PTR itemData;
3586 } DELETEITEMSTRUCT, *PDELETEITEMSTRUCT, *LPDELETEITEMSTRUCT;
3587
3588
3589 typedef struct tagCOMPAREITEMSTRUCT
3590 {
3591     UINT      CtlType;
3592     UINT      CtlID;
3593     HWND      hwndItem;
3594     UINT      itemID1;
3595     ULONG_PTR itemData1;
3596     UINT      itemID2;
3597     ULONG_PTR itemData2;
3598     DWORD     dwLocaleId;
3599 } COMPAREITEMSTRUCT, *PCOMPAREITEMSTRUCT, *LPCOMPAREITEMSTRUCT;
3600
3601
3602 /* WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags */
3603 #define KF_EXTENDED         0x0100
3604 #define KF_DLGMODE          0x0800
3605 #define KF_MENUMODE         0x1000
3606 #define KF_ALTDOWN          0x2000
3607 #define KF_REPEAT           0x4000
3608 #define KF_UP               0x8000
3609
3610 /* Virtual key codes */
3611 #define VK_LBUTTON          0x01
3612 #define VK_RBUTTON          0x02
3613 #define VK_CANCEL           0x03
3614 #define VK_MBUTTON          0x04
3615 #define VK_XBUTTON1         0x05
3616 #define VK_XBUTTON2         0x06
3617 /*                          0x07  Undefined */
3618 #define VK_BACK             0x08
3619 #define VK_TAB              0x09
3620 /*                          0x0A-0x0B  Undefined */
3621 #define VK_CLEAR            0x0C
3622 #define VK_RETURN           0x0D
3623 /*                          0x0E-0x0F  Undefined */
3624 #define VK_SHIFT            0x10
3625 #define VK_CONTROL          0x11
3626 #define VK_MENU             0x12
3627 #define VK_PAUSE            0x13
3628 #define VK_CAPITAL          0x14
3629
3630 #define VK_KANA             0x15
3631 #define VK_HANGEUL          0x15
3632 #define VK_HANGUL           0x15
3633 #define VK_JUNJA            0x17
3634 #define VK_FINAL            0x18
3635 #define VK_HANJA            0x19
3636 #define VK_KANJI            0x19
3637
3638 /*                          0x1A       Undefined */
3639 #define VK_ESCAPE           0x1B
3640
3641 #define VK_CONVERT          0x1C
3642 #define VK_NONCONVERT       0x1D
3643 #define VK_ACCEPT           0x1E
3644 #define VK_MODECHANGE       0x1F
3645
3646 #define VK_SPACE            0x20
3647 #define VK_PRIOR            0x21
3648 #define VK_NEXT             0x22
3649 #define VK_END              0x23
3650 #define VK_HOME             0x24
3651 #define VK_LEFT             0x25
3652 #define VK_UP               0x26
3653 #define VK_RIGHT            0x27
3654 #define VK_DOWN             0x28
3655 #define VK_SELECT           0x29
3656 #define VK_PRINT            0x2A /* OEM specific in Windows 3.1 SDK */
3657 #define VK_EXECUTE          0x2B
3658 #define VK_SNAPSHOT         0x2C
3659 #define VK_INSERT           0x2D
3660 #define VK_DELETE           0x2E
3661 #define VK_HELP             0x2F
3662 /* VK_0 - VK-9              0x30-0x39  Use ASCII instead */
3663 /*                          0x3A-0x40  Undefined */
3664 /* VK_A - VK_Z              0x41-0x5A  Use ASCII instead */
3665 #define VK_LWIN             0x5B
3666 #define VK_RWIN             0x5C
3667 #define VK_APPS             0x5D
3668 /*                          0x5E Unassigned */
3669 #define VK_SLEEP            0x5F
3670 #define VK_NUMPAD0          0x60
3671 #define VK_NUMPAD1          0x61
3672 #define VK_NUMPAD2          0x62
3673 #define VK_NUMPAD3          0x63
3674 #define VK_NUMPAD4          0x64
3675 #define VK_NUMPAD5          0x65
3676 #define VK_NUMPAD6          0x66
3677 #define VK_NUMPAD7          0x67
3678 #define VK_NUMPAD8          0x68
3679 #define VK_NUMPAD9          0x69
3680 #define VK_MULTIPLY         0x6A
3681 #define VK_ADD              0x6B
3682 #define VK_SEPARATOR        0x6C
3683 #define VK_SUBTRACT         0x6D
3684 #define VK_DECIMAL          0x6E
3685 #define VK_DIVIDE           0x6F
3686 #define VK_F1               0x70
3687 #define VK_F2               0x71
3688 #define VK_F3               0x72
3689 #define VK_F4               0x73
3690 #define VK_F5               0x74
3691 #define VK_F6               0x75
3692 #define VK_F7               0x76
3693 #define VK_F8               0x77
3694 #define VK_F9               0x78
3695 #define VK_F10              0x79
3696 #define VK_F11              0x7A
3697 #define VK_F12              0x7B
3698 #define VK_F13              0x7C
3699 #define VK_F14              0x7D
3700 #define VK_F15              0x7E
3701 #define VK_F16              0x7F
3702 #define VK_F17              0x80
3703 #define VK_F18              0x81
3704 #define VK_F19              0x82
3705 #define VK_F20              0x83
3706 #define VK_F21              0x84
3707 #define VK_F22              0x85
3708 #define VK_F23              0x86
3709 #define VK_F24              0x87
3710 /*                          0x88-0x8F  Unassigned */
3711 #define VK_NUMLOCK          0x90
3712 #define VK_SCROLL           0x91
3713 #define VK_OEM_NEC_EQUAL    0x92
3714 #define VK_OEM_FJ_JISHO     0x92
3715 #define VK_OEM_FJ_MASSHOU   0x93
3716 #define VK_OEM_FJ_TOUROKU   0x94
3717 #define VK_OEM_FJ_LOYA      0x95
3718 #define VK_OEM_FJ_ROYA      0x96
3719 /*                          0x97-0x9F  Unassigned */
3720 /*
3721  * differencing between right and left shift/control/alt key.
3722  * Used only by GetAsyncKeyState() and GetKeyState().
3723  */
3724 #define VK_LSHIFT           0xA0
3725 #define VK_RSHIFT           0xA1
3726 #define VK_LCONTROL         0xA2
3727 #define VK_RCONTROL         0xA3
3728 #define VK_LMENU            0xA4
3729 #define VK_RMENU            0xA5
3730
3731 #define VK_BROWSER_BACK        0xA6
3732 #define VK_BROWSER_FORWARD     0xA7
3733 #define VK_BROWSER_REFRESH     0xA8
3734 #define VK_BROWSER_STOP        0xA9
3735 #define VK_BROWSER_SEARCH      0xAA
3736 #define VK_BROWSER_FAVORITES   0xAB
3737 #define VK_BROWSER_HOME        0xAC
3738 #define VK_VOLUME_MUTE         0xAD
3739 #define VK_VOLUME_DOWN         0xAE
3740 #define VK_VOLUME_UP           0xAF
3741 #define VK_MEDIA_NEXT_TRACK    0xB0
3742 #define VK_MEDIA_PREV_TRACK    0xB1
3743 #define VK_MEDIA_STOP          0xB2
3744 #define VK_MEDIA_PLAY_PAUSE    0xB3
3745 #define VK_LAUNCH_MAIL         0xB4
3746 #define VK_LAUNCH_MEDIA_SELECT 0xB5
3747 #define VK_LAUNCH_APP1         0xB6
3748 #define VK_LAUNCH_APP2         0xB7
3749
3750 /*                          0xB8-0xB9  Unassigned */
3751 #define VK_OEM_1            0xBA
3752 #define VK_OEM_PLUS         0xBB
3753 #define VK_OEM_COMMA        0xBC
3754 #define VK_OEM_MINUS        0xBD
3755 #define VK_OEM_PERIOD       0xBE
3756 #define VK_OEM_2            0xBF
3757 #define VK_OEM_3            0xC0
3758 /*                          0xC1-0xDA  Unassigned */
3759 #define VK_OEM_4            0xDB
3760 #define VK_OEM_5            0xDC
3761 #define VK_OEM_6            0xDD
3762 #define VK_OEM_7            0xDE
3763 #define VK_OEM_8            0xDF
3764 /*                          0xE0       OEM specific */
3765 #define VK_OEM_AX           0xE1  /* "AX" key on Japanese AX keyboard */
3766 #define VK_OEM_102          0xE2  /* "<>" or "\|" on RT 102-key keyboard */
3767 #define VK_ICO_HELP         0xE3  /* Help key on ICO */
3768 #define VK_ICO_00           0xE4  /* 00 key on ICO */
3769 #define VK_PROCESSKEY       0xE5
3770
3771 /*                          0xE6       OEM specific */
3772 /*                          0xE7-0xE8  Unassigned */
3773 /*                          0xE9-0xF5  OEM specific */
3774
3775 #define VK_ATTN             0xF6
3776 #define VK_CRSEL            0xF7
3777 #define VK_EXSEL            0xF8
3778 #define VK_EREOF            0xF9
3779 #define VK_PLAY             0xFA
3780 #define VK_ZOOM             0xFB
3781 #define VK_NONAME           0xFC
3782 #define VK_PA1              0xFD
3783 #define VK_OEM_CLEAR        0xFE
3784
3785 /* MapVirtualKey translation types */
3786 #define MAPVK_VK_TO_VSC     0
3787 #define MAPVK_VSC_TO_VK     1
3788 #define MAPVK_VK_TO_CHAR    2
3789 #define MAPVK_VSC_TO_VK_EX  3
3790 #define MAPVK_VK_TO_VSC_EX  4
3791
3792   /* Key status flags for mouse events */
3793 #define MK_LBUTTON          0x0001
3794 #define MK_RBUTTON          0x0002
3795 #define MK_SHIFT            0x0004
3796 #define MK_CONTROL          0x0008
3797 #define MK_MBUTTON          0x0010
3798 #define MK_XBUTTON1         0x0020
3799 #define MK_XBUTTON2         0x0040
3800
3801
3802 #define WM_MOUSEHOVER       0x02A1
3803 #define WM_MOUSELEAVE       0x02A3
3804 #define WM_NCMOUSEHOVER     0x02A0
3805 #define WM_NCMOUSELEAVE     0x02A2
3806
3807
3808 #define TME_HOVER       0x00000001
3809 #define TME_LEAVE       0x00000002
3810 #define TME_NONCLIENT   0x00000010
3811 #define TME_QUERY       0x40000000
3812 #define TME_CANCEL      0x80000000
3813
3814 #define HOVER_DEFAULT   0xFFFFFFFF
3815
3816 typedef struct tagTRACKMOUSEEVENT {
3817     DWORD cbSize;
3818     DWORD dwFlags;
3819     HWND  hwndTrack;
3820     DWORD dwHoverTime;
3821 } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
3822
3823   /* Queue status flags */
3824 #define QS_KEY          0x0001
3825 #define QS_MOUSEMOVE    0x0002
3826 #define QS_MOUSEBUTTON  0x0004
3827 #define QS_MOUSE        (QS_MOUSEMOVE | QS_MOUSEBUTTON)
3828 #define QS_POSTMESSAGE  0x0008
3829 #define QS_TIMER        0x0010
3830 #define QS_PAINT        0x0020
3831 #define QS_SENDMESSAGE  0x0040
3832 #define QS_HOTKEY       0x0080
3833 #define QS_ALLPOSTMESSAGE 0x0100
3834 #define QS_RAWINPUT       0x0400
3835 #define QS_INPUT        (QS_MOUSE | QS_KEY | QS_RAWINPUT)
3836 #define QS_ALLEVENTS    (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY)
3837 #define QS_ALLINPUT     (QS_ALLEVENTS | QS_SENDMESSAGE)
3838
3839 /* Extra (undocumented) queue wake bits - see "Undoc. Windows" */
3840 #define QS_SMRESULT      0x8000
3841
3842 /* InSendMessageEx flags */
3843 #define ISMEX_NOSEND      0x00000000
3844 #define ISMEX_SEND        0x00000001
3845 #define ISMEX_NOTIFY      0x00000002
3846 #define ISMEX_CALLBACK    0x00000004
3847 #define ISMEX_REPLIED     0x00000008
3848
3849 #define DDL_READWRITE   0x0000
3850 #define DDL_READONLY    0x0001
3851 #define DDL_HIDDEN      0x0002
3852 #define DDL_SYSTEM      0x0004
3853 #define DDL_DIRECTORY   0x0010
3854 #define DDL_ARCHIVE     0x0020
3855
3856 #define DDL_POSTMSGS    0x2000
3857 #define DDL_DRIVES      0x4000
3858 #define DDL_EXCLUSIVE   0x8000
3859
3860   /* Shell hook values */
3861 #define HSHELL_WINDOWCREATED       1
3862 #define HSHELL_WINDOWDESTROYED     2
3863 #define HSHELL_ACTIVATESHELLWINDOW 3
3864 #define HSHELL_WINDOWACTIVATED     4
3865 #define HSHELL_GETMINRECT          5
3866 #define HSHELL_REDRAW              6
3867 #define HSHELL_TASKMAN             7
3868 #define HSHELL_LANGUAGE            8
3869 #define HSHELL_SYSMENU             9
3870 #define HSHELL_ENDTASK             10
3871 #define HSHELL_ACCESSIBILITYSTATE  11
3872 #define HSHELL_APPCOMMAND          12
3873 #define HSHELL_WINDOWREPLACED      13
3874 #define HSHELL_WINDOWREPLACING     14
3875
3876 #define HSHELL_HIGHBIT             0x8000
3877 #define HSHELL_FLASH               (HSHELL_REDRAW|HSHELL_HIGHBIT)
3878 #define HSHELL_RUDEAPPACTIVATED    (HSHELL_WINDOWACTIVATED|HSHELL_HIGHBIT)
3879
3880 /* App commands */
3881 #define APPCOMMAND_BROWSER_BACKWARD                  1
3882 #define APPCOMMAND_BROWSER_FORWARD                   2
3883 #define APPCOMMAND_BROWSER_REFRESH                   3
3884 #define APPCOMMAND_BROWSER_STOP                      4
3885 #define APPCOMMAND_BROWSER_SEARCH                    5
3886 #define APPCOMMAND_BROWSER_FAVORITES                 6
3887 #define APPCOMMAND_BROWSER_HOME                      7
3888 #define APPCOMMAND_VOLUME_MUTE                       8
3889 #define APPCOMMAND_VOLUME_DOWN                       9
3890 #define APPCOMMAND_VOLUME_UP                         10
3891 #define APPCOMMAND_MEDIA_NEXTTRACK                   11
3892 #define APPCOMMAND_MEDIA_PREVIOUSTRACK               12
3893 #define APPCOMMAND_MEDIA_STOP                        13
3894 #define APPCOMMAND_MEDIA_PLAY_PAUSE                  14
3895 #define APPCOMMAND_LAUNCH_MAIL                       15
3896 #define APPCOMMAND_LAUNCH_MEDIA_SELECT               16
3897 #define APPCOMMAND_LAUNCH_APP1                       17
3898 #define APPCOMMAND_LAUNCH_APP2                       18
3899 #define APPCOMMAND_BASS_DOWN                         19
3900 #define APPCOMMAND_BASS_BOOST                        20
3901 #define APPCOMMAND_BASS_UP                           21
3902 #define APPCOMMAND_TREBLE_DOWN                       22
3903 #define APPCOMMAND_TREBLE_UP                         23
3904 #define APPCOMMAND_MICROPHONE_VOLUME_MUTE            24
3905 #define APPCOMMAND_MICROPHONE_VOLUME_DOWN            25
3906 #define APPCOMMAND_MICROPHONE_VOLUME_UP              26
3907 #define APPCOMMAND_HELP                              27
3908 #define APPCOMMAND_FIND                              28
3909 #define APPCOMMAND_NEW                               29
3910 #define APPCOMMAND_OPEN                              30
3911 #define APPCOMMAND_CLOSE                             31
3912 #define APPCOMMAND_SAVE                              32
3913 #define APPCOMMAND_PRINT                             33
3914 #define APPCOMMAND_UNDO                              34
3915 #define APPCOMMAND_REDO                              35
3916 #define APPCOMMAND_COPY                              36
3917 #define APPCOMMAND_CUT                               37
3918 #define APPCOMMAND_PASTE                             38
3919 #define APPCOMMAND_REPLY_TO_MAIL                     39
3920 #define APPCOMMAND_FORWARD_MAIL                      40
3921 #define APPCOMMAND_SEND_MAIL                         41
3922 #define APPCOMMAND_SPELL_CHECK                       42
3923 #define APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE 43
3924 #define APPCOMMAND_MIC_ON_OFF_TOGGLE                 44
3925 #define APPCOMMAND_CORRECTION_LIST                   45
3926 #define APPCOMMAND_MEDIA_PLAY                        46
3927 #define APPCOMMAND_MEDIA_PAUSE                       47
3928 #define APPCOMMAND_MEDIA_RECORD                      48
3929 #define APPCOMMAND_MEDIA_FAST_FORWARD                49
3930 #define APPCOMMAND_MEDIA_REWIND                      50
3931 #define APPCOMMAND_MEDIA_CHANNEL_UP                  51
3932 #define APPCOMMAND_MEDIA_CHANNEL_DOWN                52
3933 #define APPCOMMAND_DELETE                            53
3934 #define APPCOMMAND_DWM_FLIP3D                        54
3935
3936 #define FAPPCOMMAND_MOUSE 0x8000
3937 #define FAPPCOMMAND_KEY   0
3938 #define FAPPCOMMAND_OEM   0x1000
3939 #define FAPPCOMMAND_MASK  0xF000
3940
3941 #define GET_APPCOMMAND_LPARAM(lParam) ((short)(HIWORD(lParam) & ~FAPPCOMMAND_MASK))
3942 #define GET_DEVICE_LPARAM(lParam)     ((WORD)(HIWORD(lParam) & FAPPCOMMAND_MASK))
3943 #define GET_MOUSEORKEY_LPARAM         GET_DEVICE_LPARAM
3944 #define GET_FLAGS_LPARAM(lParam)      (LOWORD(lParam))
3945 #define GET_KEYSTATE_LPARAM(lParam)   GET_FLAGS_LPARAM(lParam)
3946
3947 /* Predefined Clipboard Formats */
3948 #define CF_TEXT              1
3949 #define CF_BITMAP            2
3950 #define CF_METAFILEPICT      3
3951 #define CF_SYLK              4
3952 #define CF_DIF               5
3953 #define CF_TIFF              6
3954 #define CF_OEMTEXT           7
3955 #define CF_DIB               8
3956 #define CF_PALETTE           9
3957 #define CF_PENDATA          10
3958 #define CF_RIFF             11
3959 #define CF_WAVE             12
3960 #define CF_UNICODETEXT      13
3961 #define CF_ENHMETAFILE      14
3962 #define CF_HDROP            15
3963 #define CF_LOCALE           16
3964 #define CF_DIBV5            17
3965 #define CF_MAX              18
3966
3967 #define CF_OWNERDISPLAY     0x0080
3968 #define CF_DSPTEXT          0x0081
3969 #define CF_DSPBITMAP        0x0082
3970 #define CF_DSPMETAFILEPICT  0x0083
3971 #define CF_DSPENHMETAFILE   0x008E
3972
3973 /* "Private" formats don't get GlobalFree()'d */
3974 #define CF_PRIVATEFIRST     0x0200
3975 #define CF_PRIVATELAST      0x02FF
3976
3977 /* "GDIOBJ" formats do get DeleteObject()'d */
3978 #define CF_GDIOBJFIRST      0x0300
3979 #define CF_GDIOBJLAST       0x03FF
3980
3981
3982 /* types of LoadImage */
3983 #define IMAGE_BITMAP    0
3984 #define IMAGE_ICON      1
3985 #define IMAGE_CURSOR    2
3986 #define IMAGE_ENHMETAFILE       3
3987
3988 /* loadflags to LoadImage */
3989 #define LR_DEFAULTCOLOR         0x0000
3990 #define LR_MONOCHROME           0x0001
3991 #define LR_COLOR                0x0002
3992 #define LR_COPYRETURNORG        0x0004
3993 #define LR_COPYDELETEORG        0x0008
3994 #define LR_LOADFROMFILE         0x0010
3995 #define LR_LOADTRANSPARENT      0x0020
3996 #define LR_DEFAULTSIZE          0x0040
3997 #define LR_VGA_COLOR            0x0080
3998 #define LR_LOADMAP3DCOLORS      0x1000
3999 #define LR_CREATEDIBSECTION     0x2000
4000 #define LR_COPYFROMRESOURCE     0x4000
4001 #define LR_SHARED               0x8000
4002
4003 /* Flags for DrawIconEx.  */
4004 #define DI_MASK                 0x0001
4005 #define DI_IMAGE                0x0002
4006 #define DI_NORMAL               (DI_MASK | DI_IMAGE)
4007 #define DI_COMPAT               0x0004
4008 #define DI_DEFAULTSIZE          0x0008
4009 #define DI_NOMIRROR             0x0010
4010
4011 /* WM_NOTIFYFORMAT commands and return values */
4012 #define NFR_ANSI            1
4013 #define NFR_UNICODE         2
4014 #define NF_QUERY            3
4015 #define NF_REQUERY          4
4016
4017 /* RegisterDeviceNotification stuff */
4018 typedef  PVOID           HDEVNOTIFY;
4019 typedef  HDEVNOTIFY     *PHDEVNOTIFY;
4020
4021 #define DEVICE_NOTIFY_WINDOW_HANDLE     0x00000000
4022
4023 /* used for GetWindowInfo() */
4024
4025 #define WS_ACTIVECAPTION    0x0001
4026
4027 typedef struct tagWINDOWINFO {
4028     DWORD cbSize;
4029     RECT  rcWindow;
4030     RECT  rcClient;
4031     DWORD dwStyle;
4032     DWORD dwExStyle;
4033     DWORD dwWindowStatus;
4034     UINT  cxWindowBorders;
4035     UINT  cyWindowBorders;
4036     ATOM  atomWindowType;
4037     WORD  wCreatorVersion;
4038 } WINDOWINFO, *PWINDOWINFO, *LPWINDOWINFO;
4039
4040 /* used for GetTitleBarInfo() */
4041
4042 #define CCHILDREN_TITLEBAR      5
4043
4044 typedef struct tagTITLEBARINFO {
4045     DWORD cbSize;
4046     RECT  rcTitleBar;
4047     DWORD rgstate[CCHILDREN_TITLEBAR+1];
4048 } TITLEBARINFO, *PTITLEBARINFO, *LPTITLEBARINFO;
4049
4050 /* used by GetLastInputInfo */
4051 typedef struct tagLASTINPUTINFO {
4052     UINT cbSize;
4053     DWORD dwTime;
4054 } LASTINPUTINFO, *PLASTINPUTINFO;
4055
4056 /* used by GetAltTabInfo */
4057 typedef struct
4058 {
4059     DWORD cbSize;
4060     INT cItems;
4061     INT cColumns;
4062     INT cRows;
4063     INT iColFocus;
4064     INT iRowFocus;
4065     INT cxItem;
4066     INT cyItem;
4067     POINT ptStart;
4068 } ALTTABINFO, *PALTTABINFO, *LPALTTABINFO;
4069
4070 /* SetWinEventHook() flags */
4071 #define WINEVENT_OUTOFCONTEXT   0x0
4072 #define WINEVENT_SKIPOWNTHREAD  0x1
4073 #define WINEVENT_SKIPOWNPROCESS 0x2
4074 #define WINEVENT_INCONTEXT      0x4
4075
4076 #define ENDSESSION_LOGOFF    0x80000000
4077
4078 /* Object Id's */
4079 #define CHILDID_SELF      0
4080 #define INDEXID_OBJECT    0
4081 #define INDEXID_CONTAINER 0
4082
4083 /* System object Id's */
4084 #define OBJID_WINDOW            0
4085 #define OBJID_SYSMENU           -1
4086 #define OBJID_TITLEBAR          -2
4087 #define OBJID_MENU              -3
4088 #define OBJID_CLIENT            -4
4089 #define OBJID_VSCROLL           -5
4090 #define OBJID_HSCROLL           -6
4091 #define OBJID_SIZEGRIP          -7
4092 #define OBJID_CARET             -8
4093 #define OBJID_CURSOR            -9
4094 #define OBJID_ALERT             -10
4095 #define OBJID_SOUND             -11
4096 #define OBJID_QUERYCLASSNAMEIDX -12
4097 #define OBJID_NATIVEOM          -16
4098
4099 /* User event Id limits */
4100 #define EVENT_MIN 0x00000001
4101 #define EVENT_MAX 0x7FFFFFFF
4102
4103 /* System events */
4104 #define EVENT_SYSTEM_SOUND            0x01
4105 #define EVENT_SYSTEM_ALERT            0x02
4106 #define EVENT_SYSTEM_FOREGROUND       0x03
4107 #define EVENT_SYSTEM_MENUSTART        0x04
4108 #define EVENT_SYSTEM_MENUEND          0x05
4109 #define EVENT_SYSTEM_MENUPOPUPSTART   0x06
4110 #define EVENT_SYSTEM_MENUPOPUPEND     0x07
4111 #define EVENT_SYSTEM_CAPTURESTART     0x08
4112 #define EVENT_SYSTEM_CAPTUREEND       0x09
4113 #define EVENT_SYSTEM_MOVESIZESTART    0x0A
4114 #define EVENT_SYSTEM_MOVESIZEEND      0x0B
4115 #define EVENT_SYSTEM_CONTEXTHELPSTART 0x0C
4116 #define EVENT_SYSTEM_CONTEXTHELPEND   0x0D
4117 #define EVENT_SYSTEM_DRAGDROPSTART    0x0E
4118 #define EVENT_SYSTEM_DRAGDROPEND      0x0F
4119 #define EVENT_SYSTEM_DIALOGSTART      0x10
4120 #define EVENT_SYSTEM_DIALOGEND        0x11
4121 #define EVENT_SYSTEM_SCROLLINGSTART   0x12
4122 #define EVENT_SYSTEM_SCROLLINGEND     0x13
4123 #define EVENT_SYSTEM_SWITCHSTART      0x14
4124 #define EVENT_SYSTEM_SWITCHEND        0x15
4125 #define EVENT_SYSTEM_MINIMIZESTART    0x16
4126 #define EVENT_SYSTEM_MINIMIZEEND      0x17
4127
4128 /* Console events */
4129 #define EVENT_CONSOLE_CARET             0x4001
4130 #define EVENT_CONSOLE_UPDATE_REGION     0x4002
4131 #define EVENT_CONSOLE_UPDATE_SIMPLE     0x4003
4132 #define EVENT_CONSOLE_UPDATE_SCROLL     0x4004
4133 #define EVENT_CONSOLE_LAYOUT            0x4005
4134 #define EVENT_CONSOLE_START_APPLICATION 0x4006
4135 #define EVENT_CONSOLE_END_APPLICATION   0x4007
4136
4137 #define CONSOLE_APPLICATION_16BIT 0x1
4138 #define CONSOLE_CARET_SELECTION   0x1
4139 #define CONSOLE_CARET_VISIBLE     0x2
4140
4141 /* Object events */
4142 #define EVENT_OBJECT_CREATE            0x8000
4143 #define EVENT_OBJECT_DESTROY           0x8001
4144 #define EVENT_OBJECT_SHOW              0x8002
4145 #define EVENT_OBJECT_HIDE              0x8003
4146 #define EVENT_OBJECT_REORDER           0x8004
4147 #define EVENT_OBJECT_FOCUS             0x8005
4148 #define EVENT_OBJECT_SELECTION         0x8006
4149 #define EVENT_OBJECT_SELECTIONADD      0x8007
4150 #define EVENT_OBJECT_SELECTIONREMOVE   0x8008
4151 #define EVENT_OBJECT_SELECTIONWITHIN   0x8009
4152 #define EVENT_OBJECT_STATECHANGE       0x800A
4153 #define EVENT_OBJECT_LOCATIONCHANGE    0x800B
4154 #define EVENT_OBJECT_NAMECHANGE        0x800C
4155 #define EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D
4156 #define EVENT_OBJECT_VALUECHANGE       0x800E
4157 #define EVENT_OBJECT_PARENTCHANGE      0x800F
4158 #define EVENT_OBJECT_HELPCHANGE        0x8010
4159 #define EVENT_OBJECT_DEFACTIONCHANGE   0x8011
4160 #define EVENT_OBJECT_ACCELERATORCHANGE 0x8012
4161
4162 /* Sound events */
4163 #define SOUND_SYSTEM_STARTUP      1
4164 #define SOUND_SYSTEM_SHUTDOWN     2
4165 #define SOUND_SYSTEM_BEEP         3
4166 #define SOUND_SYSTEM_ERROR        4
4167 #define SOUND_SYSTEM_QUESTION     5
4168 #define SOUND_SYSTEM_WARNING      6
4169 #define SOUND_SYSTEM_INFORMATION  7
4170 #define SOUND_SYSTEM_MAXIMIZE     8
4171 #define SOUND_SYSTEM_MINIMIZE     9
4172 #define SOUND_SYSTEM_RESTOREUP   10
4173 #define SOUND_SYSTEM_RESTOREDOWN 11
4174 #define SOUND_SYSTEM_APPSTART    12
4175 #define SOUND_SYSTEM_FAULT       13
4176 #define SOUND_SYSTEM_APPEND      14
4177 #define SOUND_SYSTEM_MENUCOMMAND 15
4178 #define SOUND_SYSTEM_MENUPOPUP   16
4179 #define CSOUND_SYSTEM            16
4180
4181 /* Alert events */
4182 #define ALERT_SYSTEM_INFORMATIONAL 1
4183 #define ALERT_SYSTEM_WARNING       2
4184 #define ALERT_SYSTEM_ERROR         3
4185 #define ALERT_SYSTEM_QUERY         4
4186 #define ALERT_SYSTEM_CRITICAL      5
4187 #define CALERT_SYSTEM              6
4188
4189 /* System state flags */
4190 #define STATE_SYSTEM_UNAVAILABLE     0x00000001
4191 #define STATE_SYSTEM_SELECTED        0x00000002
4192 #define STATE_SYSTEM_FOCUSED         0x00000004
4193 #define STATE_SYSTEM_PRESSED         0x00000008
4194 #define STATE_SYSTEM_CHECKED         0x00000010
4195 #define STATE_SYSTEM_MIXED           0x00000020
4196 #define STATE_SYSTEM_INDETERMINATE   STATE_SYSTEM_MIXED
4197 #define STATE_SYSTEM_READONLY        0x00000040
4198 #define STATE_SYSTEM_HOTTRACKED      0x00000080
4199 #define STATE_SYSTEM_DEFAULT         0x00000100
4200 #define STATE_SYSTEM_EXPANDED        0x00000200
4201 #define STATE_SYSTEM_COLLAPSED       0x00000400
4202 #define STATE_SYSTEM_BUSY            0x00000800
4203 #define STATE_SYSTEM_FLOATING        0x00001000
4204 #define STATE_SYSTEM_MARQUEED        0x00002000
4205 #define STATE_SYSTEM_ANIMATED        0x00004000
4206 #define STATE_SYSTEM_INVISIBLE       0x00008000
4207 #define STATE_SYSTEM_OFFSCREEN       0x00010000
4208 #define STATE_SYSTEM_SIZEABLE        0x00020000
4209 #define STATE_SYSTEM_MOVEABLE        0x00040000
4210 #define STATE_SYSTEM_SELFVOICING     0x00080000
4211 #define STATE_SYSTEM_FOCUSABLE       0x00100000
4212 #define STATE_SYSTEM_SELECTABLE      0x00200000
4213 #define STATE_SYSTEM_LINKED          0x00400000
4214 #define STATE_SYSTEM_TRAVERSED       0x00800000
4215 #define STATE_SYSTEM_MULTISELECTABLE 0x01000000
4216 #define STATE_SYSTEM_EXTSELECTABLE   0x02000000
4217 #define STATE_SYSTEM_ALERT_LOW       0x04000000
4218 #define STATE_SYSTEM_ALERT_MEDIUM    0x08000000
4219 #define STATE_SYSTEM_ALERT_HIGH      0x10000000
4220 #define STATE_SYSTEM_PROTECTED       0x20000000
4221 #define STATE_SYSTEM_VALID           0x3FFFFFFF
4222
4223 #define     EnumTaskWindows(handle,proc,lparam) \
4224             EnumThreadWindows(handle,proc,lparam)
4225 #define     OemToAnsiA OemToCharA
4226 #define     OemToAnsiW OemToCharW
4227 #define     OemToAnsi WINELIB_NAME_AW(OemToAnsi)
4228 #define     OemToAnsiBuffA OemToCharBuffA
4229 #define     OemToAnsiBuffW OemToCharBuffW
4230 #define     OemToAnsiBuff WINELIB_NAME_AW(OemToAnsiBuff)
4231 #define     AnsiToOemA CharToOemA
4232 #define     AnsiToOemW CharToOemW
4233 #define     AnsiToOem WINELIB_NAME_AW(AnsiToOem)
4234 #define     AnsiToOemBuffA CharToOemBuffA
4235 #define     AnsiToOemBuffW CharToOemBuffW
4236 #define     AnsiToOemBuff WINELIB_NAME_AW(AnsiToOemBuff)
4237
4238 #if defined(_WINGDI_) && !defined(NOGDI)
4239 LONG        WINAPI ChangeDisplaySettingsA(LPDEVMODEA,DWORD);
4240 LONG        WINAPI ChangeDisplaySettingsW(LPDEVMODEW,DWORD);
4241 #define     ChangeDisplaySettings WINELIB_NAME_AW(ChangeDisplaySettings)
4242 LONG        WINAPI ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID);
4243 LONG        WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
4244 #define     ChangeDisplaySettingsEx WINELIB_NAME_AW(ChangeDisplaySettingsEx)
4245 HDESK       WINAPI CreateDesktopA(LPCSTR,LPCSTR,LPDEVMODEA,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
4246 HDESK       WINAPI CreateDesktopW(LPCWSTR,LPCWSTR,LPDEVMODEW,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
4247 #define     CreateDesktop WINELIB_NAME_AW(CreateDesktop)
4248 BOOL        WINAPI EnumDisplayDevicesA(LPCSTR,DWORD,LPDISPLAY_DEVICEA,DWORD);
4249 BOOL        WINAPI EnumDisplayDevicesW(LPCWSTR,DWORD,LPDISPLAY_DEVICEW,DWORD);
4250 #define     EnumDisplayDevices WINELIB_NAME_AW(EnumDisplayDevices)
4251 BOOL        WINAPI EnumDisplaySettingsA(LPCSTR,DWORD,LPDEVMODEA);
4252 BOOL        WINAPI EnumDisplaySettingsW(LPCWSTR,DWORD,LPDEVMODEW);
4253 #define     EnumDisplaySettings WINELIB_NAME_AW(EnumDisplaySettings)
4254 BOOL        WINAPI EnumDisplaySettingsExA(LPCSTR,DWORD,LPDEVMODEA,DWORD);
4255 BOOL        WINAPI EnumDisplaySettingsExW(LPCWSTR,DWORD,LPDEVMODEW,DWORD);
4256 #define     EnumDisplaySettingsEx WINELIB_NAME_AW(EnumDisplaySettingsEx)
4257 BOOL        WINAPI UpdateLayeredWindow(HWND,HDC,POINT*,SIZE*,HDC,POINT*,COLORREF,BLENDFUNCTION*,DWORD);
4258 BOOL        WINAPI UpdateLayeredWindowIndirect(HWND,UPDATELAYEREDWINDOWINFO CONST*);
4259 #endif /* defined(_WINGDI_) && !defined(NOGDI) */
4260
4261 HKL         WINAPI ActivateKeyboardLayout(HKL,UINT);
4262 WORD        WINAPI CascadeWindows(HWND, UINT, const RECT *, UINT, const HWND *);
4263 INT       WINAPI CopyAcceleratorTableA(HACCEL,LPACCEL,INT);
4264 INT       WINAPI CopyAcceleratorTableW(HACCEL,LPACCEL,INT);
4265 #define     CopyAcceleratorTable WINELIB_NAME_AW(CopyAcceleratorTable)
4266 HACCEL      WINAPI CreateAcceleratorTableA(LPACCEL,INT);
4267 HACCEL      WINAPI CreateAcceleratorTableW(LPACCEL,INT);
4268 #define     CreateAcceleratorTable WINELIB_NAME_AW(CreateAcceleratorTable)
4269 HICON     WINAPI CreateIconIndirect(PICONINFO);
4270 BOOL      WINAPI DestroyAcceleratorTable(HACCEL);
4271 BOOL        WINAPI EnumDesktopsA(HWINSTA,DESKTOPENUMPROCA,LPARAM);
4272 BOOL        WINAPI EnumDesktopsW(HWINSTA,DESKTOPENUMPROCW,LPARAM);
4273 #define     EnumDesktops WINELIB_NAME_AW(EnumDesktops)
4274 BOOL      WINAPI EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM);
4275 INT       WINAPI EnumPropsExA(HWND,PROPENUMPROCEXA,LPARAM);
4276 INT       WINAPI EnumPropsExW(HWND,PROPENUMPROCEXW,LPARAM);
4277 #define     EnumPropsEx WINELIB_NAME_AW(EnumPropsEx)
4278 BOOL        WINAPI EnumThreadWindows(DWORD,WNDENUMPROC,LPARAM);
4279 BOOL        WINAPI ExitWindowsEx(UINT,DWORD);
4280 BOOL        WINAPI GetAltTabInfoA(HWND,INT,PALTTABINFO,LPSTR,UINT);
4281 BOOL        WINAPI GetAltTabInfoW(HWND,INT,PALTTABINFO,LPWSTR,UINT);
4282 #define     GetAltTabInfo WINELIB_NAME_AW(GetAltTabInfo)
4283 BOOL      WINAPI GetIconInfo(HICON,PICONINFO);
4284 HKL       WINAPI GetKeyboardLayout(DWORD);
4285 UINT      WINAPI GetKeyboardLayoutList(INT,HKL *);
4286 BOOL      WINAPI GetComboBoxInfo(HWND,PCOMBOBOXINFO);
4287 BOOL      WINAPI GetMenuBarInfo(HWND,LONG,LONG,PMENUBARINFO);
4288 DWORD     WINAPI GetMenuContextHelpId(HMENU);
4289 UINT      WINAPI GetMenuDefaultItem(HMENU,UINT,UINT);
4290 BOOL      WINAPI GetMenuInfo(HMENU,LPMENUINFO);
4291 BOOL      WINAPI GetMenuItemInfoA(HMENU,UINT,BOOL,MENUITEMINFOA*);
4292 BOOL      WINAPI GetMenuItemInfoW(HMENU,UINT,BOOL,MENUITEMINFOW*);
4293 #define     GetMenuItemInfo WINELIB_NAME_AW(GetMenuItemInfo)
4294 BOOL      WINAPI GetMonitorInfoA(HMONITOR,LPMONITORINFO);
4295 BOOL      WINAPI GetMonitorInfoW(HMONITOR,LPMONITORINFO);
4296 #define     GetMonitorInfo WINELIB_NAME_AW(GetMonitorInfo)
4297 DWORD       WINAPI GetWindowContextHelpId(HWND);
4298 DWORD       WINAPI GetWindowThreadProcessId(HWND,LPDWORD);
4299 BOOL        WINAPI IsWinEventHookInstalled(DWORD);
4300 BOOL        WINAPI IsWindowUnicode(HWND);
4301 HKL         WINAPI LoadKeyboardLayoutA(LPCSTR,UINT);
4302 HKL         WINAPI LoadKeyboardLayoutW(LPCWSTR,UINT);
4303 #define     LoadKeyboardLayout WINELIB_NAME_AW(LoadKeyboardLayout)
4304 INT         WINAPI MessageBoxExA(HWND,LPCSTR,LPCSTR,UINT,WORD);
4305 INT         WINAPI MessageBoxExW(HWND,LPCWSTR,LPCWSTR,UINT,WORD);
4306 #define     MessageBoxEx WINELIB_NAME_AW(MessageBoxEx)
4307 HMONITOR    WINAPI MonitorFromPoint(POINT,DWORD);
4308 HMONITOR    WINAPI MonitorFromRect(LPRECT,DWORD);
4309 HMONITOR    WINAPI MonitorFromWindow(HWND,DWORD);
4310 DWORD       WINAPI MsgWaitForMultipleObjects(DWORD,CONST HANDLE*,BOOL,DWORD,DWORD);
4311 DWORD       WINAPI MsgWaitForMultipleObjectsEx(DWORD,CONST HANDLE*,DWORD,DWORD,DWORD);
4312 VOID        WINAPI NotifyWinEvent(DWORD,HWND,LONG,LONG);
4313 BOOL        WINAPI PaintDesktop(HDC);
4314 BOOL        WINAPI PostThreadMessageA(DWORD,UINT,WPARAM,LPARAM);
4315 BOOL        WINAPI PostThreadMessageW(DWORD,UINT,WPARAM,LPARAM);
4316 #define     PostThreadMessage WINELIB_NAME_AW(PostThreadMessage)
4317 BOOL        WINAPI RegisterHotKey(HWND,INT,UINT,UINT);
4318 HDEVNOTIFY  WINAPI RegisterDeviceNotificationA(HANDLE,LPVOID,DWORD);
4319 HDEVNOTIFY  WINAPI RegisterDeviceNotificationW(HANDLE,LPVOID,DWORD);
4320 #define     RegisterDeviceNotification WINELIB_NAME_AW(RegisterDeviceNotification)
4321 BOOL        WINAPI SendMessageCallbackA(HWND,UINT,WPARAM,LPARAM,SENDASYNCPROC,ULONG_PTR);
4322 BOOL        WINAPI SendMessageCallbackW(HWND,UINT,WPARAM,LPARAM,SENDASYNCPROC,ULONG_PTR);
4323 #define      SendMessageCallback WINELIB_NAME_AW(SendMessageCallback)
4324 BOOL        WINAPI SendNotifyMessageA(HWND,UINT,WPARAM,LPARAM);
4325 BOOL        WINAPI SendNotifyMessageW(HWND,UINT,WPARAM,LPARAM);
4326 #define     SendNotifyMessage WINELIB_NAME_AW(SendNotifyMessage)
4327 VOID        WINAPI SetDebugErrorLevel(DWORD);
4328 VOID        WINAPI SetLastErrorEx(DWORD,DWORD);
4329 BOOL      WINAPI SetMenuDefaultItem(HMENU,UINT,UINT);
4330 BOOL      WINAPI SetMenuInfo(HMENU,LPCMENUINFO);
4331 BOOL      WINAPI SetMenuItemInfoA(HMENU,UINT,BOOL,const MENUITEMINFOA*);
4332 BOOL      WINAPI SetMenuItemInfoW(HMENU,UINT,BOOL,const MENUITEMINFOW*);
4333 #define     SetMenuItemInfo WINELIB_NAME_AW(SetMenuItemInfo)
4334 BOOL      WINAPI SetWindowContextHelpId(HWND,DWORD);
4335 HWINEVENTHOOK WINAPI SetWinEventHook(DWORD,DWORD,HMODULE,WINEVENTPROC,DWORD,DWORD,DWORD);
4336 WORD        WINAPI TileWindows (HWND, UINT, const RECT *,
4337                                 UINT, const HWND *);
4338 INT         WINAPI ToUnicode(UINT,UINT,PBYTE,LPWSTR,int,UINT);
4339 INT         WINAPI ToUnicodeEx(UINT,UINT,LPBYTE,LPWSTR,int,UINT,HKL);
4340 BOOL      WINAPI TrackPopupMenuEx(HMENU,UINT,INT,INT,HWND,
4341                                     LPTPMPARAMS);
4342 BOOL        WINAPI UnhookWinEvent(HWINEVENTHOOK);
4343 BOOL        WINAPI UnloadKeyboardLayout(HKL);
4344 BOOL        WINAPI UnregisterDeviceNotification(HDEVNOTIFY);
4345 BOOL        WINAPI UnregisterHotKey(HWND,INT);
4346 DWORD       WINAPI WaitForInputIdle(HANDLE,DWORD);
4347 VOID        WINAPI keybd_event(BYTE,BYTE,DWORD,ULONG_PTR);
4348 VOID        WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,ULONG_PTR);
4349
4350 /* Declarations for functions that are the same in Win16 and Win32 */
4351 VOID        WINAPI EndMenu(void);
4352 DWORD       WINAPI GetDialogBaseUnits(void);
4353 BOOL        WINAPI GetKeyboardState(LPBYTE);
4354 DWORD       WINAPI GetMenuCheckMarkDimensions(void);
4355 LPARAM      WINAPI GetMessageExtraInfo(void);
4356 DWORD       WINAPI GetMessagePos(void);
4357 LONG        WINAPI GetMessageTime(void);
4358 DWORD       WINAPI OemKeyScan(WORD);
4359 BOOL        WINAPI ReleaseCapture(void);
4360 BOOL        WINAPI SetKeyboardState(LPBYTE);
4361
4362 /* Declarations for functions that change between Win16 and Win32 */
4363
4364 BOOL        WINAPI AdjustWindowRect(LPRECT,DWORD,BOOL);
4365 BOOL        WINAPI AdjustWindowRectEx(LPRECT,DWORD,BOOL,DWORD);
4366 BOOL        WINAPI AllowSetForegroundWindow(DWORD);
4367 BOOL        WINAPI AnimateWindow(HWND,DWORD,DWORD);
4368 #define     AnsiLowerA CharLowerA
4369 #define     AnsiLowerW CharLowerW
4370 #define     AnsiLower WINELIB_NAME_AW(AnsiLower)
4371 #define     AnsiLowerBuffA CharLowerBuffA
4372 #define     AnsiLowerBuffW CharLowerBuffW
4373 #define     AnsiLowerBuff WINELIB_NAME_AW(AnsiLowerBuff)
4374 #define     AnsiNextA CharNextA
4375 #define     AnsiNextW CharNextW
4376 #define     AnsiNext WINELIB_NAME_AW(AnsiNext)
4377 #define     AnsiPrevA CharPrevA
4378 #define     AnsiPrevW CharPrevW
4379 #define     AnsiPrev WINELIB_NAME_AW(AnsiPrev)
4380 #define     AnsiUpperA CharUpperA
4381 #define     AnsiUpperW CharUpperW
4382 #define     AnsiUpper WINELIB_NAME_AW(AnsiUpper)
4383 #define     AnsiUpperBuffA CharUpperBuffA
4384 #define     AnsiUpperBuffW CharUpperBuffW
4385 #define     AnsiUpperBuff WINELIB_NAME_AW(AnsiUpperBuff)
4386 BOOL      WINAPI AnyPopup(void);
4387 BOOL      WINAPI AppendMenuA(HMENU,UINT,UINT_PTR,LPCSTR);
4388 BOOL      WINAPI AppendMenuW(HMENU,UINT,UINT_PTR,LPCWSTR);
4389 #define     AppendMenu WINELIB_NAME_AW(AppendMenu)
4390 UINT        WINAPI ArrangeIconicWindows(HWND);
4391 HDWP        WINAPI BeginDeferWindowPos(INT);
4392 HDC         WINAPI BeginPaint(HWND,LPPAINTSTRUCT);
4393 BOOL        WINAPI BringWindowToTop(HWND);
4394 LONG        WINAPI BroadcastSystemMessageA(DWORD,LPDWORD,UINT,WPARAM,LPARAM);
4395 LONG        WINAPI BroadcastSystemMessageW(DWORD,LPDWORD,UINT,WPARAM,LPARAM);
4396 #define     BroadcastSystemMessage WINELIB_NAME_AW(BroadcastSystemMessage)
4397 void        WINAPI CalcChildScroll(HWND, INT);
4398 BOOL        WINAPI CallMsgFilterA(LPMSG,INT);
4399 BOOL        WINAPI CallMsgFilterW(LPMSG,INT);
4400 #define     CallMsgFilter WINELIB_NAME_AW(CallMsgFilter)
4401 LRESULT     WINAPI CallNextHookEx(HHOOK,INT,WPARAM,LPARAM);
4402 LRESULT     WINAPI CallWindowProcA(WNDPROC,HWND,UINT,WPARAM,LPARAM);
4403 LRESULT     WINAPI CallWindowProcW(WNDPROC,HWND,UINT,WPARAM,LPARAM);
4404 #define     CallWindowProc WINELIB_NAME_AW(CallWindowProc)
4405 BOOL      WINAPI ChangeClipboardChain(HWND,HWND);
4406 BOOL      WINAPI ChangeMenuA(HMENU,UINT,LPCSTR,UINT,UINT);
4407 BOOL      WINAPI ChangeMenuW(HMENU,UINT,LPCWSTR,UINT,UINT);
4408 #define     ChangeMenu WINELIB_NAME_AW(ChangeMenu)
4409 LPSTR       WINAPI CharLowerA(LPSTR);
4410 LPWSTR      WINAPI CharLowerW(LPWSTR);
4411 #define     CharLower WINELIB_NAME_AW(CharLower)
4412 DWORD       WINAPI CharLowerBuffA(LPSTR,DWORD);
4413 DWORD       WINAPI CharLowerBuffW(LPWSTR,DWORD);
4414 #define     CharLowerBuff WINELIB_NAME_AW(CharLowerBuff)
4415 LPSTR       WINAPI CharNextA(LPCSTR);
4416 LPWSTR      WINAPI CharNextW(LPCWSTR);
4417 #define     CharNext WINELIB_NAME_AW(CharNext)
4418 LPSTR       WINAPI CharNextExA(WORD,LPCSTR,DWORD);
4419 /* no CharNextExW (doesn't make sense) */
4420 LPSTR       WINAPI CharPrevA(LPCSTR,LPCSTR);
4421 LPWSTR      WINAPI CharPrevW(LPCWSTR,LPCWSTR);
4422 #define     CharPrev WINELIB_NAME_AW(CharPrev)
4423 LPSTR       WINAPI CharPrevExA(WORD,LPCSTR,LPCSTR,DWORD);
4424 /* no CharPrevExW (doesn't make sense) */
4425 LPSTR       WINAPI CharUpperA(LPSTR);
4426 LPWSTR      WINAPI CharUpperW(LPWSTR);
4427 #define     CharUpper WINELIB_NAME_AW(CharUpper)
4428 DWORD       WINAPI CharUpperBuffA(LPSTR,DWORD);
4429 DWORD       WINAPI CharUpperBuffW(LPWSTR,DWORD);
4430 #define     CharUpperBuff WINELIB_NAME_AW(CharUpperBuff)
4431 BOOL      WINAPI CharToOemA(LPCSTR,LPSTR);
4432 BOOL      WINAPI CharToOemW(LPCWSTR,LPSTR);
4433 #define     CharToOem WINELIB_NAME_AW(CharToOem)
4434 BOOL      WINAPI CharToOemBuffA(LPCSTR,LPSTR,DWORD);
4435 BOOL      WINAPI CharToOemBuffW(LPCWSTR,LPSTR,DWORD);
4436 #define     CharToOemBuff WINELIB_NAME_AW(CharToOemBuff)
4437 BOOL      WINAPI CheckDlgButton(HWND,INT,UINT);
4438 DWORD       WINAPI CheckMenuItem(HMENU,UINT,UINT);
4439 BOOL      WINAPI CheckMenuRadioItem(HMENU,UINT,UINT,UINT,UINT);
4440 BOOL      WINAPI CheckRadioButton(HWND,int,int,int);
4441 HWND      WINAPI ChildWindowFromPoint(HWND,POINT);
4442 HWND      WINAPI ChildWindowFromPointEx(HWND,POINT,UINT);
4443 BOOL      WINAPI ClientToScreen(HWND,LPPOINT);
4444 BOOL      WINAPI ClipCursor(const RECT*);
4445 BOOL      WINAPI CloseClipboard(void);
4446 BOOL      WINAPI CloseDesktop(HDESK);
4447 BOOL      WINAPI CloseWindow(HWND);
4448 BOOL      WINAPI CloseWindowStation(HWINSTA);
4449 #define     CopyCursor(cur) ((HCURSOR)CopyIcon((HICON)(cur)))
4450 HICON     WINAPI CopyIcon(HICON);
4451 HANDLE    WINAPI CopyImage(HANDLE,UINT,INT,INT,UINT);
4452 BOOL      WINAPI CopyRect(RECT*,const RECT*);
4453 INT       WINAPI CountClipboardFormats(void);
4454 BOOL      WINAPI CreateCaret(HWND,HBITMAP,INT,INT);
4455 HCURSOR   WINAPI CreateCursor(HINSTANCE,INT,INT,INT,INT,LPCVOID,LPCVOID);
4456 #define     CreateDialogA(inst,ptr,hwnd,dlg) \
4457            CreateDialogParamA(inst,ptr,hwnd,dlg,0)
4458 #define     CreateDialogW(inst,ptr,hwnd,dlg) \
4459            CreateDialogParamW(inst,ptr,hwnd,dlg,0)
4460 #define     CreateDialog WINELIB_NAME_AW(CreateDialog)
4461 #define     CreateDialogIndirectA(inst,ptr,hwnd,dlg) \
4462            CreateDialogIndirectParamA(inst,ptr,hwnd,dlg,0)
4463 #define     CreateDialogIndirectW(inst,ptr,hwnd,dlg) \
4464            CreateDialogIndirectParamW(inst,ptr,hwnd,dlg,0)
4465 #define     CreateDialogIndirect WINELIB_NAME_AW(CreateDialogIndirect)
4466 HWND      WINAPI CreateDialogIndirectParamA(HINSTANCE,LPCDLGTEMPLATEA,HWND,
4467                                                 DLGPROC,LPARAM);
4468 HWND      WINAPI CreateDialogIndirectParamW(HINSTANCE,LPCDLGTEMPLATEW,HWND,
4469                                                 DLGPROC,LPARAM);
4470 #define     CreateDialogIndirectParam WINELIB_NAME_AW(CreateDialogIndirectParam)
4471 HWND      WINAPI CreateDialogParamA(HINSTANCE,LPCSTR,HWND,DLGPROC,LPARAM);
4472 HWND      WINAPI CreateDialogParamW(HINSTANCE,LPCWSTR,HWND,DLGPROC,LPARAM);
4473 #define     CreateDialogParam WINELIB_NAME_AW(CreateDialogParam)
4474 HICON     WINAPI CreateIcon(HINSTANCE,INT,INT,BYTE,BYTE,LPCVOID,LPCVOID);
4475 HICON     WINAPI CreateIconFromResource(LPBYTE,UINT,BOOL,DWORD);
4476 HICON     WINAPI CreateIconFromResourceEx(LPBYTE,UINT,BOOL,DWORD,INT,INT,UINT);
4477 HMENU     WINAPI CreateMenu(void);
4478 HMENU     WINAPI CreatePopupMenu(void);
4479 #define     CreateWindowA(className,titleName,style,x,y,width,height,\
4480                             parent,menu,instance,param) \
4481             CreateWindowExA(0,className,titleName,style,x,y,width,height,\
4482                               parent,menu,instance,param)
4483 #define     CreateWindowW(className,titleName,style,x,y,width,height,\
4484                             parent,menu,instance,param) \
4485             CreateWindowExW(0,className,titleName,style,x,y,width,height,\
4486                               parent,menu,instance,param)
4487 #define     CreateWindow WINELIB_NAME_AW(CreateWindow)
4488 HWND      WINAPI CreateWindowExA(DWORD,LPCSTR,LPCSTR,DWORD,INT,INT,
4489                                 INT,INT,HWND,HMENU,HINSTANCE,LPVOID);
4490 HWND      WINAPI CreateWindowExW(DWORD,LPCWSTR,LPCWSTR,DWORD,INT,INT,
4491                                 INT,INT,HWND,HMENU,HINSTANCE,LPVOID);
4492 #define     CreateWindowEx WINELIB_NAME_AW(CreateWindowEx)
4493 HWINSTA     WINAPI CreateWindowStationA(LPCSTR,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
4494 HWINSTA     WINAPI CreateWindowStationW(LPCWSTR,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
4495 #define     CreateWindowStation WINELIB_NAME_AW(CreateWindowStation)
4496 HWND      WINAPI CreateMDIWindowA(LPCSTR,LPCSTR,DWORD,INT,INT,
4497                                 INT,INT,HWND,HINSTANCE,LPARAM);
4498 HWND      WINAPI CreateMDIWindowW(LPCWSTR,LPCWSTR,DWORD,INT,INT,
4499                                 INT,INT,HWND,HINSTANCE,LPARAM);
4500 #define     CreateMDIWindow WINELIB_NAME_AW(CreateMDIWindow)
4501 LRESULT     WINAPI DefDlgProcA(HWND,UINT,WPARAM,LPARAM);
4502 LRESULT     WINAPI DefDlgProcW(HWND,UINT,WPARAM,LPARAM);
4503 #define     DefDlgProc WINELIB_NAME_AW(DefDlgProc)
4504 HDWP      WINAPI DeferWindowPos(HDWP,HWND,HWND,INT,INT,INT,INT,UINT);
4505 LRESULT     WINAPI DefFrameProcA(HWND,HWND,UINT,WPARAM,LPARAM);
4506 LRESULT     WINAPI DefFrameProcW(HWND,HWND,UINT,WPARAM,LPARAM);
4507 #define     DefFrameProc WINELIB_NAME_AW(DefFrameProc)
4508 #define     DefHookProc(code,wparam,lparam,phhook) \
4509             CallNextHookEx(*(phhook),code,wparam,lparam)
4510 LRESULT     WINAPI DefMDIChildProcA(HWND,UINT,WPARAM,LPARAM);
4511 LRESULT     WINAPI DefMDIChildProcW(HWND,UINT,WPARAM,LPARAM);
4512 #define     DefMDIChildProc WINELIB_NAME_AW(DefMDIChildProc)
4513 LRESULT     WINAPI DefRawInputProc(PRAWINPUT*,INT,UINT);
4514 LRESULT     WINAPI DefWindowProcA(HWND,UINT,WPARAM,LPARAM);
4515 LRESULT     WINAPI DefWindowProcW(HWND,UINT,WPARAM,LPARAM);
4516 #define     DefWindowProc WINELIB_NAME_AW(DefWindowProc)
4517 BOOL      WINAPI DeleteMenu(HMENU,UINT,UINT);
4518 BOOL      WINAPI DestroyCaret(void);
4519 BOOL      WINAPI DestroyCursor(HCURSOR);
4520 BOOL      WINAPI DestroyIcon(HICON);
4521 BOOL      WINAPI DestroyMenu(HMENU);
4522 BOOL      WINAPI DestroyWindow(HWND);
4523 #define     DialogBoxA(inst,template,owner,func) \
4524             DialogBoxParamA(inst,template,owner,func,0)
4525 #define     DialogBoxW(inst,template,owner,func) \
4526             DialogBoxParamW(inst,template,owner,func,0)
4527 #define     DialogBox WINELIB_NAME_AW(DialogBox)
4528 #define     DialogBoxIndirectA(inst,template,owner,func) \
4529             DialogBoxIndirectParamA(inst,template,owner,func,0)
4530 #define     DialogBoxIndirectW(inst,template,owner,func) \
4531             DialogBoxIndirectParamW(inst,template,owner,func,0)
4532 #define     DialogBoxIndirect WINELIB_NAME_AW(DialogBoxIndirect)
4533 INT_PTR   WINAPI DialogBoxIndirectParamA(HINSTANCE,LPCDLGTEMPLATEA,HWND,DLGPROC,LPARAM);
4534 INT_PTR   WINAPI DialogBoxIndirectParamW(HINSTANCE,LPCDLGTEMPLATEW,HWND,DLGPROC,LPARAM);
4535 #define     DialogBoxIndirectParam WINELIB_NAME_AW(DialogBoxIndirectParam)
4536 INT_PTR   WINAPI DialogBoxParamA(HINSTANCE,LPCSTR,HWND,DLGPROC,LPARAM);
4537 INT_PTR   WINAPI DialogBoxParamW(HINSTANCE,LPCWSTR,HWND,DLGPROC,LPARAM);
4538 #define     DialogBoxParam WINELIB_NAME_AW(DialogBoxParam)
4539 LRESULT     WINAPI DispatchMessageA(const MSG*);
4540 LRESULT     WINAPI DispatchMessageW(const MSG*);
4541 #define     DispatchMessage WINELIB_NAME_AW(DispatchMessage)
4542 INT       WINAPI DlgDirListA(HWND,LPSTR,INT,INT,UINT);
4543 INT       WINAPI DlgDirListW(HWND,LPWSTR,INT,INT,UINT);
4544 #define     DlgDirList WINELIB_NAME_AW(DlgDirList)
4545 INT       WINAPI DlgDirListComboBoxA(HWND,LPSTR,INT,INT,UINT);
4546 INT       WINAPI DlgDirListComboBoxW(HWND,LPWSTR,INT,INT,UINT);
4547 #define     DlgDirListComboBox WINELIB_NAME_AW(DlgDirListComboBox)
4548 BOOL      WINAPI DlgDirSelectComboBoxExA(HWND,LPSTR,INT,INT);
4549 BOOL      WINAPI DlgDirSelectComboBoxExW(HWND,LPWSTR,INT,INT);
4550 #define     DlgDirSelectComboBoxEx WINELIB_NAME_AW(DlgDirSelectComboBoxEx)
4551 BOOL      WINAPI DlgDirSelectExA(HWND,LPSTR,INT,INT);
4552 BOOL      WINAPI DlgDirSelectExW(HWND,LPWSTR,INT,INT);
4553 #define     DlgDirSelectEx WINELIB_NAME_AW(DlgDirSelectEx)
4554 BOOL      WINAPI DragDetect(HWND,POINT);
4555 DWORD     WINAPI DragObject(HWND,HWND,UINT,ULONG_PTR,HCURSOR);
4556 BOOL      WINAPI DrawAnimatedRects(HWND,int,const RECT*,const RECT*);
4557 BOOL      WINAPI DrawCaption(HWND,HDC,const RECT*,UINT);
4558 BOOL      WINAPI DrawCaptionTempA(HWND,HDC,const RECT*,HFONT,HICON,LPCSTR,UINT);
4559 BOOL      WINAPI DrawCaptionTempW(HWND,HDC,const RECT*,HFONT,HICON,LPCWSTR,UINT);
4560 #define     DrawCaptionTemp WINELIB_NAME_AW(DrawCaptionTemp)
4561 BOOL        WINAPI DrawEdge(HDC,LPRECT,UINT,UINT);
4562 BOOL        WINAPI DrawFocusRect(HDC,const RECT*);
4563 BOOL        WINAPI DrawFrameControl(HDC,LPRECT,UINT,UINT);
4564 BOOL        WINAPI DrawIcon(HDC,INT,INT,HICON);
4565 BOOL        WINAPI DrawIconEx(HDC,INT,INT,HICON,INT,INT,UINT,HBRUSH,UINT);
4566 BOOL        WINAPI DrawMenuBar(HWND);
4567 BOOL        WINAPI DrawStateA(HDC,HBRUSH,DRAWSTATEPROC,LPARAM,WPARAM,INT,INT,INT,INT,UINT);
4568 BOOL        WINAPI DrawStateW(HDC,HBRUSH,DRAWSTATEPROC,LPARAM,WPARAM,INT,INT,INT,INT,UINT);
4569 #define     DrawState WINELIB_NAME_AW(DrawState)
4570 INT         WINAPI DrawTextA(HDC,LPCSTR,INT,LPRECT,UINT);
4571 INT         WINAPI DrawTextW(HDC,LPCWSTR,INT,LPRECT,UINT);
4572 #define     DrawText WINELIB_NAME_AW(DrawText)
4573 INT         WINAPI DrawTextExA(HDC,LPSTR,INT,LPRECT,UINT,LPDRAWTEXTPARAMS);
4574 INT         WINAPI DrawTextExW(HDC,LPWSTR,INT,LPRECT,UINT,LPDRAWTEXTPARAMS);
4575 #define     DrawTextEx WINELIB_NAME_AW(DrawTextEx)
4576 BOOL        WINAPI EmptyClipboard(void);
4577 BOOL        WINAPI EnableMenuItem(HMENU,UINT,UINT);
4578 BOOL        WINAPI EnableScrollBar(HWND,UINT,UINT);
4579 BOOL        WINAPI EnableWindow(HWND,BOOL);
4580 BOOL        WINAPI EndDeferWindowPos(HDWP);
4581 BOOL        WINAPI EndDialog(HWND,INT_PTR);
4582 BOOL        WINAPI EndPaint(HWND,const PAINTSTRUCT*);
4583 BOOL        WINAPI EnumChildWindows(HWND,WNDENUMPROC,LPARAM);
4584 UINT        WINAPI EnumClipboardFormats(UINT);
4585 BOOL        WINAPI EnumDesktopWindows(HDESK,WNDENUMPROC,LPARAM);
4586 INT         WINAPI EnumPropsA(HWND,PROPENUMPROCA);
4587 INT         WINAPI EnumPropsW(HWND,PROPENUMPROCW);
4588 #define     EnumProps WINELIB_NAME_AW(EnumProps)
4589 BOOL      WINAPI EnumWindows(WNDENUMPROC,LPARAM);
4590 BOOL        WINAPI EnumWindowStationsA(WINSTAENUMPROCA,LPARAM);
4591 BOOL        WINAPI EnumWindowStationsW(WINSTAENUMPROCW,LPARAM);
4592 #define     EnumWindowStations WINELIB_NAME_AW(EnumWindowStations)
4593 BOOL      WINAPI EqualRect(const RECT*,const RECT*);
4594 INT       WINAPI ExcludeUpdateRgn(HDC,HWND);
4595 #define     ExitWindows(a,b) ExitWindowsEx(EWX_LOGOFF,0xffffffff)
4596 INT       WINAPI FillRect(HDC,const RECT*,HBRUSH);
4597 HWND      WINAPI FindWindowA(LPCSTR,LPCSTR);
4598 HWND      WINAPI FindWindowW(LPCWSTR,LPCWSTR);
4599 #define     FindWindow WINELIB_NAME_AW(FindWindow)
4600 HWND      WINAPI FindWindowExA(HWND,HWND,LPCSTR,LPCSTR);
4601 HWND      WINAPI FindWindowExW(HWND,HWND,LPCWSTR,LPCWSTR);
4602 #define     FindWindowEx WINELIB_NAME_AW(FindWindowEx)
4603 BOOL        WINAPI FlashWindow(HWND,BOOL);
4604 BOOL        WINAPI FlashWindowEx(PFLASHWINFO);
4605 INT         WINAPI FrameRect(HDC,const RECT*,HBRUSH);
4606 HWND        WINAPI GetActiveWindow(void);
4607 HWND        WINAPI GetAncestor(HWND,UINT);
4608 DWORD       WINAPI GetAppCompatFlags(HTASK);
4609 SHORT       WINAPI GetAsyncKeyState(INT);
4610 HWND        WINAPI GetCapture(void);
4611 UINT        WINAPI GetCaretBlinkTime(void);
4612 BOOL        WINAPI GetCaretPos(LPPOINT);
4613 BOOL        WINAPI GetClassInfoA(HINSTANCE,LPCSTR,WNDCLASSA *);
4614 BOOL        WINAPI GetClassInfoW(HINSTANCE,LPCWSTR,WNDCLASSW *);
4615 #define     GetClassInfo WINELIB_NAME_AW(GetClassInfo)
4616 BOOL      WINAPI GetClassInfoExA(HINSTANCE,LPCSTR,WNDCLASSEXA *);
4617 BOOL      WINAPI GetClassInfoExW(HINSTANCE,LPCWSTR,WNDCLASSEXW *);
4618 #define     GetClassInfoEx WINELIB_NAME_AW(GetClassInfoEx)
4619 DWORD       WINAPI GetClassLongA(HWND,INT);
4620 DWORD       WINAPI GetClassLongW(HWND,INT);
4621 #define     GetClassLong WINELIB_NAME_AW(GetClassLong)
4622 #ifdef _WIN64
4623 ULONG_PTR   WINAPI GetClassLongPtrA(HWND,INT);
4624 ULONG_PTR   WINAPI GetClassLongPtrW(HWND,INT);
4625 #else
4626 #define     GetClassLongPtrA GetClassLongA
4627 #define     GetClassLongPtrW GetClassLongW
4628 #endif
4629 #define     GetClassLongPtr WINELIB_NAME_AW(GetClassLongPtr)
4630 INT         WINAPI GetClassNameA(HWND,LPSTR,INT);
4631 INT         WINAPI GetClassNameW(HWND,LPWSTR,INT);
4632 #define     GetClassName WINELIB_NAME_AW(GetClassName)
4633 WORD        WINAPI GetClassWord(HWND,INT);
4634 BOOL        WINAPI GetClientRect(HWND,LPRECT);
4635 HANDLE      WINAPI GetClipboardData(UINT);
4636 INT         WINAPI GetClipboardFormatNameA(UINT,LPSTR,INT);
4637 INT         WINAPI GetClipboardFormatNameW(UINT,LPWSTR,INT);
4638 #define     GetClipboardFormatName WINELIB_NAME_AW(GetClipboardFormatName)
4639 HWND        WINAPI GetClipboardOwner(void);
4640 DWORD       WINAPI GetClipboardSequenceNumber(VOID);
4641 HWND        WINAPI GetClipboardViewer(void);
4642 BOOL        WINAPI GetClipCursor(LPRECT);
4643 HCURSOR     WINAPI GetCursor(void);
4644 BOOL        WINAPI GetCursorInfo(PCURSORINFO);
4645 BOOL        WINAPI GetCursorPos(LPPOINT);
4646 HDC         WINAPI GetDC(HWND);
4647 HDC         WINAPI GetDCEx(HWND,HRGN,DWORD);
4648 HWND        WINAPI GetDesktopWindow(void);
4649 INT         WINAPI GetDlgCtrlID(HWND);
4650 HWND        WINAPI GetDlgItem(HWND,INT);
4651 UINT        WINAPI GetDlgItemInt(HWND,INT,BOOL*,BOOL);
4652 UINT        WINAPI GetDlgItemTextA(HWND,INT,LPSTR,INT);
4653 UINT        WINAPI GetDlgItemTextW(HWND,INT,LPWSTR,INT);
4654 #define     GetDlgItemText WINELIB_NAME_AW(GetDlgItemText)
4655 UINT        WINAPI GetDoubleClickTime(void);
4656 HWND        WINAPI GetFocus(void);
4657 HWND        WINAPI GetForegroundWindow(void);
4658 BOOL        WINAPI GetGUIThreadInfo(DWORD,GUITHREADINFO*);
4659 BOOL        WINAPI GetInputState(void);
4660 UINT        WINAPI GetInternalWindowPos(HWND,LPRECT,LPPOINT);
4661 UINT        WINAPI GetKBCodePage(void);
4662 INT         WINAPI GetKeyboardType(INT);
4663 INT         WINAPI GetKeyNameTextA(LONG,LPSTR,INT);
4664 INT         WINAPI GetKeyNameTextW(LONG,LPWSTR,INT);
4665 #define     GetKeyNameText WINELIB_NAME_AW(GetKeyNameText)
4666 BOOL        WINAPI GetKeyboardLayoutNameA(LPSTR);
4667 BOOL        WINAPI GetKeyboardLayoutNameW(LPWSTR);
4668 #define     GetKeyboardLayoutName WINELIB_NAME_AW(GetKeyboardLayoutName)
4669 SHORT       WINAPI GetKeyState(INT);
4670 HWND        WINAPI GetLastActivePopup(HWND);
4671 BOOL        WINAPI GetLastInputInfo(PLASTINPUTINFO);
4672 UINT        WINAPI GetRawInputBuffer(PRAWINPUT,PUINT,UINT);
4673 UINT        WINAPI GetRawInputData(HRAWINPUT,UINT,LPVOID,PUINT,UINT);
4674 UINT        WINAPI GetRawInputDeviceInfoA(HANDLE,UINT,LPVOID,PUINT);
4675 UINT        WINAPI GetRawInputDeviceInfoW(HANDLE,UINT,LPVOID,PUINT);
4676 #define            GetRawInputDeviceInfo WINELIB_NAME_AW(GetRawInputDeviceInfo)
4677 UINT        WINAPI GetRawInputDeviceList(PRAWINPUTDEVICELIST,PUINT,UINT);
4678 BOOL        WINAPI GetLayeredWindowAttributes(HWND,COLORREF*,BYTE*,DWORD*);
4679 HMENU     WINAPI GetMenu(HWND);
4680 INT       WINAPI GetMenuItemCount(HMENU);
4681 UINT      WINAPI GetMenuItemID(HMENU,INT);
4682 BOOL      WINAPI GetMenuItemRect(HWND,HMENU,UINT,LPRECT);
4683 UINT      WINAPI GetMenuState(HMENU,UINT,UINT);
4684 INT       WINAPI GetMenuStringA(HMENU,UINT,LPSTR,INT,UINT);
4685 INT       WINAPI GetMenuStringW(HMENU,UINT,LPWSTR,INT,UINT);
4686 #define     GetMenuString WINELIB_NAME_AW(GetMenuString)
4687 BOOL      WINAPI GetMessageA(LPMSG,HWND,UINT,UINT);
4688 BOOL      WINAPI GetMessageW(LPMSG,HWND,UINT,UINT);
4689 #define     GetMessage WINELIB_NAME_AW(GetMessage)
4690 HWND      WINAPI GetNextDlgGroupItem(HWND,HWND,BOOL);
4691 HWND      WINAPI GetNextDlgTabItem(HWND,HWND,BOOL);
4692 #define     GetNextWindow GetWindow
4693 HWND      WINAPI GetOpenClipboardWindow(void);
4694 HWND      WINAPI GetParent(HWND);
4695 INT       WINAPI GetPriorityClipboardFormat(UINT*,INT);
4696 BOOL      WINAPI GetProcessDefaultLayout(DWORD*);
4697 HANDLE    WINAPI GetPropA(HWND,LPCSTR);
4698 HANDLE    WINAPI GetPropW(HWND,LPCWSTR);
4699 #define     GetProp WINELIB_NAME_AW(GetProp)
4700 DWORD       WINAPI GetQueueStatus(UINT);
4701 BOOL      WINAPI GetScrollInfo(HWND,INT,LPSCROLLINFO);
4702 BOOL      WINAPI GetScrollBarInfo(HWND,LONG,LPSCROLLBARINFO);
4703 INT       WINAPI GetScrollPos(HWND,INT);
4704 BOOL      WINAPI GetScrollRange(HWND,INT,LPINT,LPINT);
4705 HWND      WINAPI GetShellWindow(void);
4706 HMENU     WINAPI GetSubMenu(HMENU,INT);
4707 HBRUSH    WINAPI GetSysColorBrush(INT);
4708 #define     GetSysModalWindow() ((HWND)0)
4709 HMENU     WINAPI GetSystemMenu(HWND,BOOL);
4710 INT       WINAPI GetSystemMetrics(INT);
4711 DWORD       WINAPI GetTabbedTextExtentA(HDC,LPCSTR,INT,INT,const INT*);
4712 DWORD       WINAPI GetTabbedTextExtentW(HDC,LPCWSTR,INT,INT,const INT*);
4713 #define     GetTabbedTextExtent WINELIB_NAME_AW(GetTabbedTextExtent)
4714 BOOL        WINAPI GetTitleBarInfo(HWND,PTITLEBARINFO);
4715 HDESK       WINAPI GetThreadDesktop(DWORD);
4716 HWND        WINAPI GetTopWindow(HWND);
4717 BOOL        WINAPI GetUpdateRect(HWND,LPRECT,BOOL);
4718 INT         WINAPI GetUpdateRgn(HWND,HRGN,BOOL);
4719 BOOL        WINAPI GetUserObjectInformationA(HANDLE,INT,LPVOID,DWORD,LPDWORD);
4720 BOOL        WINAPI GetUserObjectInformationW(HANDLE,INT,LPVOID,DWORD,LPDWORD);
4721 #define     GetUserObjectInformation WINELIB_NAME_AW(GetUserObjectInformation)
4722 BOOL        WINAPI GetUserObjectSecurity(HANDLE,PSECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
4723 HWND        WINAPI GetWindow(HWND,UINT);
4724 HDC         WINAPI GetWindowDC(HWND);
4725 BOOL        WINAPI GetWindowInfo(HWND, PWINDOWINFO);
4726 LONG        WINAPI GetWindowLongA(HWND,INT);
4727 LONG        WINAPI GetWindowLongW(HWND,INT);
4728 #define     GetWindowLong WINELIB_NAME_AW(GetWindowLong)
4729 #ifdef _WIN64
4730 LONG_PTR    WINAPI GetWindowLongPtrA(HWND,INT);
4731 LONG_PTR    WINAPI GetWindowLongPtrW(HWND,INT);
4732 #else
4733 #define     GetWindowLongPtrA GetWindowLongA
4734 #define     GetWindowLongPtrW GetWindowLongW
4735 #endif
4736 #define     GetWindowLongPtr WINELIB_NAME_AW(GetWindowLongPtr)
4737 UINT        WINAPI GetWindowModuleFileNameA(HWND,LPSTR,UINT);
4738 UINT        WINAPI GetWindowModuleFileNameW(HWND,LPWSTR,UINT);
4739 #define     GetWindowModuleFileName WINELIB_NAME_AW(GetWindowModuleFileName)
4740 BOOL        WINAPI GetWindowPlacement(HWND,LPWINDOWPLACEMENT);
4741 BOOL        WINAPI GetWindowRect(HWND,LPRECT);
4742 INT         WINAPI GetWindowRgn(HWND,HRGN);
4743 HWINSTA     WINAPI GetProcessWindowStation(void);
4744 #define     GetWindowTask(hwnd) ((HTASK)GetWindowThreadProcessId(hwnd,NULL))
4745 INT         WINAPI GetWindowTextA(HWND,LPSTR,INT);
4746 INT         WINAPI GetWindowTextW(HWND,LPWSTR,INT);
4747 #define     GetWindowText WINELIB_NAME_AW(GetWindowText)
4748 INT         WINAPI GetWindowTextLengthA(HWND);
4749 INT         WINAPI GetWindowTextLengthW(HWND);
4750 #define     GetWindowTextLength WINELIB_NAME_AW(GetWindowTextLength)
4751 WORD        WINAPI GetWindowWord(HWND,INT);
4752 BOOL        WINAPI GrayStringA(HDC,HBRUSH,GRAYSTRINGPROC,LPARAM,INT,INT,INT,INT,INT);
4753 BOOL        WINAPI GrayStringW(HDC,HBRUSH,GRAYSTRINGPROC,LPARAM,INT,INT,INT,INT,INT);
4754 #define     GrayString WINELIB_NAME_AW(GrayString)
4755 BOOL        WINAPI HideCaret(HWND);
4756 BOOL        WINAPI HiliteMenuItem(HWND,HMENU,UINT,UINT);
4757 BOOL        WINAPI InflateRect(LPRECT,INT,INT);
4758 BOOL        WINAPI InSendMessage(void);
4759 DWORD       WINAPI InSendMessageEx(LPVOID);
4760 BOOL        WINAPI InsertMenuA(HMENU,UINT,UINT,UINT_PTR,LPCSTR);
4761 BOOL        WINAPI InsertMenuW(HMENU,UINT,UINT,UINT_PTR,LPCWSTR);
4762 #define     InsertMenu WINELIB_NAME_AW(InsertMenu)
4763 BOOL        WINAPI InsertMenuItemA(HMENU,UINT,BOOL,const MENUITEMINFOA*);
4764 BOOL        WINAPI InsertMenuItemW(HMENU,UINT,BOOL,const MENUITEMINFOW*);
4765 #define     InsertMenuItem WINELIB_NAME_AW(InsertMenuItem)
4766 INT         WINAPI InternalGetWindowText(HWND,LPWSTR,INT);
4767 BOOL        WINAPI IntersectRect(LPRECT,const RECT*,const RECT*);
4768 BOOL        WINAPI InvalidateRect(HWND,const RECT*,BOOL);
4769 BOOL        WINAPI InvalidateRgn(HWND,HRGN,BOOL);
4770 BOOL        WINAPI InvertRect(HDC,const RECT*);
4771 BOOL        WINAPI IsCharAlphaA(CHAR);
4772 BOOL        WINAPI IsCharAlphaW(WCHAR);
4773 #define     IsCharAlpha WINELIB_NAME_AW(IsCharAlpha)
4774 BOOL      WINAPI IsCharAlphaNumericA(CHAR);
4775 BOOL      WINAPI IsCharAlphaNumericW(WCHAR);
4776 #define     IsCharAlphaNumeric WINELIB_NAME_AW(IsCharAlphaNumeric)
4777 BOOL      WINAPI IsCharLowerA(CHAR);
4778 BOOL      WINAPI IsCharLowerW(WCHAR);
4779 #define     IsCharLower WINELIB_NAME_AW(IsCharLower)
4780 BOOL      WINAPI IsCharUpperA(CHAR);
4781 BOOL      WINAPI IsCharUpperW(WCHAR);
4782 #define     IsCharUpper WINELIB_NAME_AW(IsCharUpper)
4783 BOOL      WINAPI IsChild(HWND,HWND);
4784 BOOL      WINAPI IsClipboardFormatAvailable(UINT);
4785 BOOL      WINAPI IsDialogMessageA(HWND,LPMSG);
4786 BOOL      WINAPI IsDialogMessageW(HWND,LPMSG);
4787 #define     IsDialogMessage WINELIB_NAME_AW(IsDialogMessage)
4788 UINT      WINAPI IsDlgButtonChecked(HWND,int);
4789 BOOL      WINAPI IsHungAppWindow(HWND);
4790 BOOL      WINAPI IsIconic(HWND);
4791 BOOL      WINAPI IsMenu(HMENU);
4792 BOOL      WINAPI IsRectEmpty(const RECT*);
4793 BOOL      WINAPI IsWindow(HWND);
4794 BOOL      WINAPI IsWindowEnabled(HWND);
4795 BOOL      WINAPI IsWindowVisible(HWND);
4796 BOOL      WINAPI IsZoomed(HWND);
4797 BOOL      WINAPI KillSystemTimer(HWND,UINT_PTR);
4798 BOOL      WINAPI KillTimer(HWND,UINT_PTR);
4799 HACCEL    WINAPI LoadAcceleratorsA(HINSTANCE,LPCSTR);
4800 HACCEL    WINAPI LoadAcceleratorsW(HINSTANCE,LPCWSTR);
4801 #define     LoadAccelerators WINELIB_NAME_AW(LoadAccelerators)
4802 HBITMAP     WINAPI LoadBitmapA(HINSTANCE,LPCSTR);
4803 HBITMAP     WINAPI LoadBitmapW(HINSTANCE,LPCWSTR);
4804 #define     LoadBitmap WINELIB_NAME_AW(LoadBitmap)
4805 HCURSOR   WINAPI LoadCursorA(HINSTANCE,LPCSTR);
4806 HCURSOR   WINAPI LoadCursorW(HINSTANCE,LPCWSTR);
4807 #define     LoadCursor WINELIB_NAME_AW(LoadCursor)
4808 HCURSOR   WINAPI LoadCursorFromFileA(LPCSTR);
4809 HCURSOR   WINAPI LoadCursorFromFileW(LPCWSTR);
4810 #define     LoadCursorFromFile WINELIB_NAME_AW(LoadCursorFromFile)
4811 HICON     WINAPI LoadIconA(HINSTANCE,LPCSTR);
4812 HICON     WINAPI LoadIconW(HINSTANCE,LPCWSTR);
4813 #define     LoadIcon WINELIB_NAME_AW(LoadIcon)
4814 HANDLE    WINAPI LoadImageA(HINSTANCE,LPCSTR,UINT,INT,INT,UINT);
4815 HANDLE    WINAPI LoadImageW(HINSTANCE,LPCWSTR,UINT,INT,INT,UINT);
4816 #define     LoadImage WINELIB_NAME_AW(LoadImage)
4817 HMENU     WINAPI LoadMenuA(HINSTANCE,LPCSTR);
4818 HMENU     WINAPI LoadMenuW(HINSTANCE,LPCWSTR);
4819 #define     LoadMenu WINELIB_NAME_AW(LoadMenu)
4820 HMENU     WINAPI LoadMenuIndirectA(LPCVOID);
4821 HMENU     WINAPI LoadMenuIndirectW(LPCVOID);
4822 #define     LoadMenuIndirect WINELIB_NAME_AW(LoadMenuIndirect)
4823 INT       WINAPI LoadStringA(HINSTANCE,UINT,LPSTR,INT);
4824 INT       WINAPI LoadStringW(HINSTANCE,UINT,LPWSTR,INT);
4825 #define     LoadString WINELIB_NAME_AW(LoadString)
4826 BOOL      WINAPI LockSetForegroundWindow(UINT);
4827 BOOL      WINAPI LockWindowUpdate(HWND);
4828 INT       WINAPI LookupIconIdFromDirectory(LPBYTE,BOOL);
4829 INT       WINAPI LookupIconIdFromDirectoryEx(LPBYTE,BOOL,INT,INT,UINT);
4830 UINT      WINAPI MapVirtualKeyA(UINT,UINT);
4831 UINT      WINAPI MapVirtualKeyW(UINT,UINT);
4832 #define     MapVirtualKey WINELIB_NAME_AW(MapVirtualKey)
4833 UINT        WINAPI MapVirtualKeyExA(UINT,UINT,HKL);
4834 UINT        WINAPI MapVirtualKeyExW(UINT,UINT,HKL);
4835 #define     MapVirtualKeyEx WINELIB_NAME_AW(MapVirtualKeyEx)
4836 BOOL        WINAPI MapDialogRect(HWND,LPRECT);
4837 INT         WINAPI MapWindowPoints(HWND,HWND,LPPOINT,UINT);
4838 INT         WINAPI MenuItemFromPoint(HWND,HMENU,POINT);
4839 BOOL        WINAPI MessageBeep(UINT);
4840 INT         WINAPI MessageBoxA(HWND,LPCSTR,LPCSTR,UINT);
4841 INT         WINAPI MessageBoxW(HWND,LPCWSTR,LPCWSTR,UINT);
4842 #define     MessageBox WINELIB_NAME_AW(MessageBox)
4843 INT       WINAPI MessageBoxIndirectA(LPMSGBOXPARAMSA);
4844 INT       WINAPI MessageBoxIndirectW(LPMSGBOXPARAMSW);
4845 #define     MessageBoxIndirect WINELIB_NAME_AW(MessageBoxIndirect)
4846 BOOL      WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT_PTR,LPCSTR);
4847 BOOL      WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT_PTR,LPCWSTR);
4848 #define     ModifyMenu WINELIB_NAME_AW(ModifyMenu)
4849 BOOL      WINAPI MoveWindow(HWND,INT,INT,INT,INT,BOOL);
4850 BOOL      WINAPI OemToCharA(LPCSTR,LPSTR);
4851 BOOL      WINAPI OemToCharW(LPCSTR,LPWSTR);
4852 #define     OemToChar WINELIB_NAME_AW(OemToChar)
4853 BOOL      WINAPI OemToCharBuffA(LPCSTR,LPSTR,DWORD);
4854 BOOL      WINAPI OemToCharBuffW(LPCSTR,LPWSTR,DWORD);
4855 #define     OemToCharBuff WINELIB_NAME_AW(OemToCharBuff)
4856 BOOL      WINAPI OffsetRect(LPRECT,INT,INT);
4857 BOOL      WINAPI OpenClipboard(HWND);
4858 HDESK       WINAPI OpenDesktopA(LPCSTR,DWORD,BOOL,ACCESS_MASK);
4859 HDESK       WINAPI OpenDesktopW(LPCWSTR,DWORD,BOOL,ACCESS_MASK);
4860 #define     OpenDesktop WINELIB_NAME_AW(OpenDesktop)
4861 BOOL        WINAPI OpenIcon(HWND);
4862 HDESK       WINAPI OpenInputDesktop(DWORD,BOOL,ACCESS_MASK);
4863 HWINSTA     WINAPI OpenWindowStationA(LPCSTR,BOOL,ACCESS_MASK);
4864 HWINSTA     WINAPI OpenWindowStationW(LPCWSTR,BOOL,ACCESS_MASK);
4865 #define     OpenWindowStation WINELIB_NAME_AW(OpenWindowStation)
4866 BOOL      WINAPI PeekMessageA(LPMSG,HWND,UINT,UINT,UINT);
4867 BOOL      WINAPI PeekMessageW(LPMSG,HWND,UINT,UINT,UINT);
4868 #define     PeekMessage WINELIB_NAME_AW(PeekMessage)
4869 #define     PostAppMessageA(thread,msg,wparam,lparam) \
4870             PostThreadMessageA((DWORD)(thread),msg,wparam,lparam)
4871 #define     PostAppMessageW(thread,msg,wparam,lparam) \
4872             PostThreadMessageW((DWORD)(thread),msg,wparam,lparam)
4873 #define     PostAppMessage WINELIB_NAME_AW(PostAppMessage)
4874 BOOL      WINAPI PostMessageA(HWND,UINT,WPARAM,LPARAM);
4875 BOOL      WINAPI PostMessageW(HWND,UINT,WPARAM,LPARAM);
4876 #define     PostMessage WINELIB_NAME_AW(PostMessage)
4877 void        WINAPI PostQuitMessage(INT);
4878 UINT        WINAPI PrivateExtractIconExA(LPCSTR,int,HICON*,HICON*,UINT);
4879 UINT        WINAPI PrivateExtractIconExW(LPCWSTR,int,HICON*,HICON*,UINT);
4880 UINT        WINAPI PrivateExtractIconsA(LPCSTR,int,int,int,HICON*,UINT*,UINT,UINT);
4881 UINT        WINAPI PrivateExtractIconsW(LPCWSTR,int,int,int,HICON*,UINT*,UINT,UINT);
4882 BOOL        WINAPI PtInRect(const RECT*,POINT);
4883 HWND        WINAPI RealChildWindowFromPoint(HWND,POINT);
4884 UINT        WINAPI RealGetWindowClassA(HWND,LPSTR,UINT);
4885 UINT        WINAPI RealGetWindowClassW(HWND,LPWSTR,UINT);
4886 #define     RealGetWindowClass WINELIB_NAME_AW(RealGetWindowClass)
4887 BOOL        WINAPI RedrawWindow(HWND,const RECT*,HRGN,UINT);
4888 ATOM        WINAPI RegisterClassA(const WNDCLASSA *);
4889 ATOM        WINAPI RegisterClassW(const WNDCLASSW *);
4890 #define     RegisterClass WINELIB_NAME_AW(RegisterClass)
4891 ATOM        WINAPI RegisterClassExA(const WNDCLASSEXA *);
4892 ATOM        WINAPI RegisterClassExW(const WNDCLASSEXW *);
4893 #define     RegisterClassEx WINELIB_NAME_AW(RegisterClassEx)
4894 UINT        WINAPI RegisterClipboardFormatA(LPCSTR);
4895 UINT        WINAPI RegisterClipboardFormatW(LPCWSTR);
4896 #define     RegisterClipboardFormat WINELIB_NAME_AW(RegisterClipboardFormat)
4897 BOOL        WINAPI RegisterRawInputDevices(PRAWINPUTDEVICE,UINT,UINT);
4898 UINT        WINAPI RegisterWindowMessageA(LPCSTR);
4899 UINT        WINAPI RegisterWindowMessageW(LPCWSTR);
4900 #define     RegisterWindowMessage WINELIB_NAME_AW(RegisterWindowMessage)
4901 INT       WINAPI ReleaseDC(HWND,HDC);
4902 BOOL      WINAPI RemoveMenu(HMENU,UINT,UINT);
4903 HANDLE    WINAPI RemovePropA(HWND,LPCSTR);
4904 HANDLE    WINAPI RemovePropW(HWND,LPCWSTR);
4905 #define     RemoveProp WINELIB_NAME_AW(RemoveProp)
4906 BOOL        WINAPI ReplyMessage(LRESULT);
4907 BOOL        WINAPI ScreenToClient(HWND,LPPOINT);
4908 VOID        WINAPI ScrollChildren(HWND,UINT,WPARAM,LPARAM);
4909 BOOL        WINAPI ScrollDC(HDC,INT,INT,const RECT*,const RECT*,HRGN,LPRECT);
4910 BOOL        WINAPI ScrollWindow(HWND,INT,INT,const RECT*,const RECT*);
4911 INT         WINAPI ScrollWindowEx(HWND,INT,INT,const RECT*,const RECT*,HRGN,LPRECT,UINT);
4912 LRESULT     WINAPI SendDlgItemMessageA(HWND,INT,UINT,WPARAM,LPARAM);
4913 LRESULT     WINAPI SendDlgItemMessageW(HWND,INT,UINT,WPARAM,LPARAM);
4914 #define     SendDlgItemMessage WINELIB_NAME_AW(SendDlgItemMessage)
4915 UINT        WINAPI SendInput(UINT,LPINPUT,int);
4916 LRESULT     WINAPI SendMessageA(HWND,UINT,WPARAM,LPARAM);
4917 LRESULT     WINAPI SendMessageW(HWND,UINT,WPARAM,LPARAM);
4918 #define     SendMessage WINELIB_NAME_AW(SendMessage)
4919 LRESULT     WINAPI SendMessageTimeoutA(HWND,UINT,WPARAM,LPARAM,UINT,UINT,PDWORD_PTR);
4920 LRESULT     WINAPI SendMessageTimeoutW(HWND,UINT,WPARAM,LPARAM,UINT,UINT,PDWORD_PTR);
4921 #define     SendMessageTimeout WINELIB_NAME_AW(SendMessageTimeout)
4922 HWND        WINAPI SetActiveWindow(HWND);
4923 HWND        WINAPI SetCapture(HWND);
4924 BOOL        WINAPI SetCaretBlinkTime(UINT);
4925 BOOL        WINAPI SetCaretPos(INT,INT);
4926 DWORD       WINAPI SetClassLongA(HWND,INT,LONG);
4927 DWORD       WINAPI SetClassLongW(HWND,INT,LONG);
4928 #define     SetClassLong WINELIB_NAME_AW(SetClassLong)
4929 #ifdef _WIN64
4930 ULONG_PTR   WINAPI SetClassLongPtrA(HWND,INT,LONG_PTR);
4931 ULONG_PTR   WINAPI SetClassLongPtrW(HWND,INT,LONG_PTR);
4932 #else
4933 #define     SetClassLongPtrA SetClassLongA
4934 #define     SetClassLongPtrW SetClassLongW
4935 #endif
4936 #define     SetClassLongPtr WINELIB_NAME_AW(SetClassLongPtr)
4937 WORD        WINAPI SetClassWord(HWND,INT,WORD);
4938 HANDLE    WINAPI SetClipboardData(UINT,HANDLE);
4939 HWND      WINAPI SetClipboardViewer(HWND);
4940 HCURSOR   WINAPI SetCursor(HCURSOR);
4941 BOOL      WINAPI SetCursorPos(INT,INT);
4942 BOOL      WINAPI SetDeskWallPaper(LPCSTR);
4943 BOOL      WINAPI SetDlgItemInt(HWND,INT,UINT,BOOL);
4944 BOOL      WINAPI SetDlgItemTextA(HWND,INT,LPCSTR);
4945 BOOL      WINAPI SetDlgItemTextW(HWND,INT,LPCWSTR);
4946 #define     SetDlgItemText WINELIB_NAME_AW(SetDlgItemText)
4947 BOOL      WINAPI SetDoubleClickTime(UINT);
4948 HWND      WINAPI SetFocus(HWND);
4949 BOOL      WINAPI SetForegroundWindow(HWND);
4950 void        WINAPI SetInternalWindowPos(HWND,UINT,LPRECT,LPPOINT);
4951 BOOL        WINAPI SetLayeredWindowAttributes(HWND,COLORREF,BYTE,DWORD);
4952 BOOL        WINAPI SetMenu(HWND,HMENU);
4953 BOOL        WINAPI SetMenuContextHelpId(HMENU,DWORD);
4954 BOOL        WINAPI SetMenuItemBitmaps(HMENU,UINT,UINT,HBITMAP,HBITMAP);
4955 LPARAM      WINAPI SetMessageExtraInfo(LPARAM);
4956 BOOL        WINAPI SetMessageQueue(INT);
4957 BOOL        WINAPI SetProcessDefaultLayout(DWORD);
4958 BOOL        WINAPI SetProcessWindowStation(HWINSTA);
4959 HWND        WINAPI SetParent(HWND,HWND);
4960 BOOL        WINAPI SetPropA(HWND,LPCSTR,HANDLE);
4961 BOOL        WINAPI SetPropW(HWND,LPCWSTR,HANDLE);
4962 #define     SetProp WINELIB_NAME_AW(SetProp)
4963 BOOL        WINAPI SetRect(LPRECT,INT,INT,INT,INT);
4964 BOOL        WINAPI SetRectEmpty(LPRECT);
4965 INT         WINAPI SetScrollInfo(HWND,INT,const SCROLLINFO*,BOOL);
4966 INT         WINAPI SetScrollPos(HWND,INT,INT,BOOL);
4967 BOOL        WINAPI SetScrollRange(HWND,INT,INT,INT,BOOL);
4968 #define     SetSysModalWindow(hwnd) ((HWND)0)
4969 BOOL        WINAPI SetSystemCursor(HCURSOR,DWORD);
4970 BOOL        WINAPI SetSystemMenu(HWND,HMENU);
4971 UINT_PTR    WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
4972 BOOL        WINAPI SetThreadDesktop(HDESK);
4973 UINT_PTR    WINAPI SetTimer(HWND,UINT_PTR,UINT,TIMERPROC);
4974 BOOL        WINAPI SetUserObjectInformationA(HANDLE,INT,LPVOID,DWORD);
4975 BOOL        WINAPI SetUserObjectInformationW(HANDLE,INT,LPVOID,DWORD);
4976 #define     SetUserObjectInformation WINELIB_NAME_AW(SetUserObjectInformation)
4977 BOOL        WINAPI SetUserObjectSecurity(HANDLE,PSECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
4978 LONG        WINAPI SetWindowLongA(HWND,INT,LONG);
4979 LONG        WINAPI SetWindowLongW(HWND,INT,LONG);
4980 #define     SetWindowLong WINELIB_NAME_AW(SetWindowLong)
4981 #ifdef _WIN64
4982 LONG_PTR    WINAPI SetWindowLongPtrA(HWND,INT,LONG_PTR);
4983 LONG_PTR    WINAPI SetWindowLongPtrW(HWND,INT,LONG_PTR);
4984 #else
4985 #define     SetWindowLongPtrA SetWindowLongA
4986 #define     SetWindowLongPtrW SetWindowLongW
4987 #endif
4988 #define     SetWindowLongPtr WINELIB_NAME_AW(SetWindowLongPtr)
4989 BOOL        WINAPI SetWindowPlacement(HWND,const WINDOWPLACEMENT*);
4990 HHOOK       WINAPI SetWindowsHookA(INT,HOOKPROC);
4991 HHOOK       WINAPI SetWindowsHookW(INT,HOOKPROC);
4992 #define     SetWindowsHook WINELIB_NAME_AW(SetWindowsHook)
4993 HHOOK       WINAPI SetWindowsHookExA(INT,HOOKPROC,HINSTANCE,DWORD);
4994 HHOOK       WINAPI SetWindowsHookExW(INT,HOOKPROC,HINSTANCE,DWORD);
4995 #define     SetWindowsHookEx WINELIB_NAME_AW(SetWindowsHookEx)
4996 BOOL      WINAPI SetWindowPos(HWND,HWND,INT,INT,INT,INT,UINT);
4997 INT       WINAPI SetWindowRgn(HWND,HRGN,BOOL);
4998 BOOL      WINAPI SetWindowTextA(HWND,LPCSTR);
4999 BOOL      WINAPI SetWindowTextW(HWND,LPCWSTR);
5000 #define     SetWindowText WINELIB_NAME_AW(SetWindowText)
5001 WORD        WINAPI SetWindowWord(HWND,INT,WORD);
5002 BOOL      WINAPI ShowCaret(HWND);
5003 INT       WINAPI ShowCursor(BOOL);
5004 BOOL      WINAPI ShowScrollBar(HWND,INT,BOOL);
5005 BOOL      WINAPI ShowOwnedPopups(HWND,BOOL);
5006 BOOL      WINAPI ShowWindow(HWND,INT);
5007 BOOL      WINAPI ShowWindowAsync(HWND,INT);
5008 BOOL      WINAPI SubtractRect(LPRECT,const RECT*,const RECT*);
5009 BOOL      WINAPI SwapMouseButton(BOOL);
5010 BOOL      WINAPI SwitchDesktop(HDESK);
5011 VOID        WINAPI SwitchToThisWindow(HWND,BOOL);
5012 BOOL      WINAPI SystemParametersInfoA(UINT,UINT,LPVOID,UINT);
5013 BOOL      WINAPI SystemParametersInfoW(UINT,UINT,LPVOID,UINT);
5014 #define     SystemParametersInfo WINELIB_NAME_AW(SystemParametersInfo)
5015 LONG        WINAPI TabbedTextOutA(HDC,INT,INT,LPCSTR,INT,INT,const INT*,INT);
5016 LONG        WINAPI TabbedTextOutW(HDC,INT,INT,LPCWSTR,INT,INT,const INT*,INT);
5017 #define     TabbedTextOut WINELIB_NAME_AW(TabbedTextOut)
5018 INT         WINAPI ToAscii(UINT,UINT,LPBYTE,LPWORD,UINT);
5019 INT         WINAPI ToAsciiEx(UINT,UINT,LPBYTE,LPWORD,UINT,HKL);
5020 BOOL        WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT);
5021 BOOL        WINAPI TrackPopupMenu(HMENU,UINT,INT,INT,INT,HWND,const RECT*);
5022 INT         WINAPI TranslateAcceleratorA(HWND,HACCEL,LPMSG);
5023 INT         WINAPI TranslateAcceleratorW(HWND,HACCEL,LPMSG);
5024 #define     TranslateAccelerator WINELIB_NAME_AW(TranslateAccelerator)
5025 BOOL        WINAPI TranslateMDISysAccel(HWND,LPMSG);
5026 BOOL        WINAPI TranslateMessage(const MSG*);
5027 BOOL        WINAPI UnhookWindowsHook(INT,HOOKPROC);
5028 BOOL        WINAPI UnhookWindowsHookEx(HHOOK);
5029 BOOL        WINAPI UnionRect(LPRECT,const RECT*,const RECT*);
5030 BOOL        WINAPI UnregisterClassA(LPCSTR,HINSTANCE);
5031 BOOL        WINAPI UnregisterClassW(LPCWSTR,HINSTANCE);
5032 #define     UnregisterClass WINELIB_NAME_AW(UnregisterClass)
5033 BOOL        WINAPI UpdateWindow(HWND);
5034 UINT        WINAPI UserRealizePalette(HDC);
5035 BOOL        WINAPI ValidateRect(HWND,const RECT*);
5036 BOOL        WINAPI ValidateRgn(HWND,HRGN);
5037 SHORT       WINAPI VkKeyScanA(CHAR);
5038 SHORT       WINAPI VkKeyScanW(WCHAR);
5039 #define     VkKeyScan WINELIB_NAME_AW(VkKeyScan)
5040 WORD        WINAPI VkKeyScanExA(CHAR, HKL);
5041 WORD        WINAPI VkKeyScanExW(WCHAR, HKL);
5042 #define     VkKeyScanEx WINELIB_NAME_AW(VkKeyScanEx)
5043 BOOL        WINAPI WaitMessage(void);
5044 HWND      WINAPI WindowFromDC(HDC);
5045 HWND      WINAPI WindowFromPoint(POINT);
5046 BOOL      WINAPI WinHelpA(HWND,LPCSTR,UINT,ULONG_PTR);
5047 BOOL      WINAPI WinHelpW(HWND,LPCWSTR,UINT,ULONG_PTR);
5048 #define     WinHelp WINELIB_NAME_AW(WinHelp)
5049 INT       WINAPIV wsprintfA(LPSTR,LPCSTR,...);
5050 INT       WINAPIV wsprintfW(LPWSTR,LPCWSTR,...);
5051 #define     wsprintf WINELIB_NAME_AW(wsprintf)
5052 INT       WINAPI wvsprintfA(LPSTR,LPCSTR,va_list);
5053 INT       WINAPI wvsprintfW(LPWSTR,LPCWSTR,va_list);
5054 #define     wvsprintf WINELIB_NAME_AW(wvsprintf)
5055
5056 /* Undocumented functions */
5057
5058 /* NOTE: This is SYSTEM.3, not USER.182, which is also named KillSystemTimer */
5059 WORD        WINAPI SYSTEM_KillSystemTimer( WORD );
5060
5061 #ifdef __cplusplus
5062 }
5063 #endif
5064
5065 #endif /* _WINUSER_ */