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