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