1 /***********************************************************************\
2 *                               winuser.d                               *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module win32.winuser;
11 pragma(lib, "user32.lib");
12 
13 // Conversion Notes:
14 // The following macros were for win16 only, and are not included in this file:
15 //#define EnumTaskWindows(h, f, p) EnumThreadWindows((DWORD)h, f, p)
16 //#define PostAppMessageA(t, m, w, l) PostThreadMessageA((DWORD)t, m, w, l)
17 //#define PostAppMessageW(t, m, w, l) PostThreadMessageW((DWORD)t, m, w, l)
18 //#define GetSysModalWindow() (NULL)
19 //#define SetSysModalWindow(h) (NULL)
20 //#define GetWindowTask(hWnd) ((HANDLE)GetWindowThreadProcessId(hWnd, NULL))
21 //#define DefHookProc(c, p, lp, h) CallNextHookEx((HHOOK)*h, c, p, lp)
22 
23 private import win32.w32api, win32.winbase, win32.wingdi;
24 private import win32.windef; // for HMONITOR
25 
26 // FIXME: clean up Windows version support
27 
28 template MAKEINTATOM_T(int i) {
29 	const LPTSTR MAKEINTATOM_T = cast(LPTSTR) i;
30 }
31 
32 const WC_DIALOG = MAKEINTATOM_T!(0x8002);
33 
34 const FVIRTKEY  = 1;
35 const FNOINVERT = 2;
36 const FSHIFT    = 4;
37 const FCONTROL  = 8;
38 const FALT      = 16;
39 
40 const ATF_TIMEOUTON     = 1;
41 const ATF_ONOFFFEEDBACK = 2;
42 const ATF_AVAILABLE     = 4; // May be obsolete. Not in recent MS docs.
43 
44 const WH_MIN             = -1;
45 const WH_MSGFILTER       =  -1;
46 const WH_JOURNALRECORD   = 0;
47 const WH_JOURNALPLAYBACK = 1;
48 const WH_KEYBOARD        = 2;
49 const WH_GETMESSAGE      = 3;
50 const WH_CALLWNDPROC     = 4;
51 const WH_CBT             = 5;
52 const WH_SYSMSGFILTER    = 6;
53 const WH_MOUSE           = 7;
54 const WH_HARDWARE        = 8;
55 const WH_DEBUG           = 9;
56 const WH_SHELL           = 10;
57 const WH_FOREGROUNDIDLE  = 11;
58 const WH_CALLWNDPROCRET  = 12;
59 const WH_KEYBOARD_LL     = 13;
60 const WH_MOUSE_LL        = 14;
61 const WH_MAX             = 14;
62 const WH_MINHOOK         = WH_MIN;
63 const WH_MAXHOOK         = WH_MAX;
64 
65 enum {
66 	HC_ACTION = 0,
67 	HC_GETNEXT,
68 	HC_SKIP,
69 	HC_NOREMOVE, // = 3
70 	HC_NOREM = HC_NOREMOVE,
71 	HC_SYSMODALON,
72 	HC_SYSMODALOFF
73 }
74 
75 enum {
76 	HCBT_MOVESIZE = 0,
77 	HCBT_MINMAX,
78 	HCBT_QS,
79 	HCBT_CREATEWND,
80 	HCBT_DESTROYWND,
81 	HCBT_ACTIVATE,
82 	HCBT_CLICKSKIPPED,
83 	HCBT_KEYSKIPPED,
84 	HCBT_SYSCOMMAND,
85 	HCBT_SETFOCUS // = 9
86 }
87 
88 enum {
89 	CF_TEXT = 1,
90 	CF_BITMAP,
91 	CF_METAFILEPICT,
92 	CF_SYLK,
93 	CF_DIF,
94 	CF_TIFF,
95 	CF_OEMTEXT,
96 	CF_DIB,
97 	CF_PALETTE,
98 	CF_PENDATA,
99 	CF_RIFF,
100 	CF_WAVE,
101 	CF_UNICODETEXT,
102 	CF_ENHMETAFILE,
103 	CF_HDROP,
104 	CF_LOCALE,
105 	CF_MAX, // = 17
106 	CF_OWNERDISPLAY   = 128,
107 	CF_DSPTEXT,
108 	CF_DSPBITMAP,
109 	CF_DSPMETAFILEPICT, // = 131
110 	CF_DSPENHMETAFILE = 142,
111 	CF_PRIVATEFIRST   = 512,
112 	CF_PRIVATELAST    = 767,
113 	CF_GDIOBJFIRST    = 768,
114 	CF_GDIOBJLAST     = 1023
115 }
116 
117 const HKL_PREV = 0;
118 const HKL_NEXT = 1;
119 
120 const KLF_ACTIVATE       = 1;
121 const KLF_SUBSTITUTE_OK  = 2;
122 const KLF_UNLOADPREVIOUS = 4;
123 const KLF_REORDER        = 8;
124 const KLF_REPLACELANG    = 16;
125 const KLF_NOTELLSHELL    = 128;
126 const KLF_SETFORPROCESS  = 256;
127 const KL_NAMELENGTH      = 9;
128 
129 const MF_ENABLED = 0;
130 const MF_GRAYED = 1;
131 const MF_DISABLED = 2;
132 const MF_BITMAP = 4;
133 const MF_CHECKED = 8;
134 const MF_MENUBARBREAK = 32;
135 const MF_MENUBREAK = 64;
136 const MF_OWNERDRAW = 256;
137 const MF_POPUP = 16;
138 const MF_SEPARATOR = 0x800;
139 const MF_STRING = 0;
140 const MF_UNCHECKED = 0;
141 const MF_DEFAULT = 4096;
142 const MF_SYSMENU = 0x2000;
143 const MF_HELP = 0x4000;
144 const MF_END = 128;
145 const MF_RIGHTJUSTIFY = 0x4000;
146 const MF_MOUSESELECT = 0x8000;
147 const MF_INSERT = 0;
148 const MF_CHANGE = 128;
149 const MF_APPEND = 256;
150 const MF_DELETE = 512;
151 const MF_REMOVE = 4096;
152 const MF_USECHECKBITMAPS = 512;
153 const MF_UNHILITE = 0;
154 const MF_HILITE = 128;
155 
156 // Also defined in dbt.h
157 const BSM_ALLCOMPONENTS      = 0;
158 const BSM_VXDS               = 1;
159 const BSM_NETDRIVER          = 2;
160 const BSM_INSTALLABLEDRIVERS = 4;
161 const BSM_APPLICATIONS       = 8;
162 const BSM_ALLDESKTOPS        = 16;
163 
164 const BSF_QUERY              = 0x00000001;
165 const BSF_IGNORECURRENTTASK  = 0x00000002;
166 const BSF_FLUSHDISK          = 0x00000004;
167 const BSF_NOHANG             = 0x00000008;
168 const BSF_POSTMESSAGE        = 0x00000010;
169 const BSF_FORCEIFHUNG        = 0x00000020;
170 const BSF_NOTIMEOUTIFNOTHUNG = 0x00000040;
171 
172 static if (_WIN32_WINNT >= 0x500) {
173 	const BSF_ALLOWSFW          = 0x00000080;
174 	const BSF_SENDNOTIFYMESSAGE = 0x00000100;
175 }
176 static if (_WIN32_WINNT >= 0x501) {
177 	const BSF_RETURNHDESK       = 0x00000200;
178 	const BSF_LUID              = 0x00000400;
179 }
180 
181 const BROADCAST_QUERY_DENY = 1112363332;
182 const DWORD ENUM_CURRENT_SETTINGS  = -1;
183 const DWORD ENUM_REGISTRY_SETTINGS = -2;
184 
185 const CDS_UPDATEREGISTRY = 1;
186 const CDS_TEST           = 2;
187 const CDS_FULLSCREEN     = 4;
188 const CDS_GLOBAL         = 8;
189 const CDS_SET_PRIMARY    = 16;
190 const CDS_NORESET        = 0x10000000;
191 const CDS_SETRECT        = 0x20000000;
192 const CDS_RESET          = 0x40000000;
193 
194 const DISP_CHANGE_RESTART    = 1;
195 const DISP_CHANGE_SUCCESSFUL = 0;
196 const DISP_CHANGE_FAILED     = -1;
197 const DISP_CHANGE_BADMODE    = -2;
198 const DISP_CHANGE_NOTUPDATED = -3;
199 const DISP_CHANGE_BADFLAGS   = -4;
200 const DISP_CHANGE_BADPARAM   = -5;
201 
202 const BST_UNCHECKED     = 0;
203 const BST_CHECKED       = 1;
204 const BST_INDETERMINATE = 2;
205 const BST_PUSHED        = 4;
206 const BST_FOCUS         = 8;
207 
208 const MF_BYCOMMAND  = 0;
209 const MF_BYPOSITION = 1024;
210 // [Redefined] MF_UNCHECKED=0
211 // [Redefined] MF_HILITE=128
212 // [Redefined] MF_UNHILITE=0
213 
214 const CWP_ALL             = 0;
215 const CWP_SKIPINVISIBLE   = 1;
216 const CWP_SKIPDISABLED    = 2;
217 const CWP_SKIPTRANSPARENT = 4;
218 
219 const IMAGE_BITMAP=0;
220 const IMAGE_ICON=1;
221 const IMAGE_CURSOR=2;
222 const IMAGE_ENHMETAFILE=3;
223 
224 const DF_ALLOWOTHERACCOUNTHOOK = 1;
225 
226 const DESKTOP_READOBJECTS     = 1;
227 const DESKTOP_CREATEWINDOW    = 2;
228 const DESKTOP_CREATEMENU      = 4;
229 const DESKTOP_HOOKCONTROL     = 8;
230 const DESKTOP_JOURNALRECORD   = 16;
231 const DESKTOP_JOURNALPLAYBACK = 32;
232 const DESKTOP_ENUMERATE       = 64;
233 const DESKTOP_WRITEOBJECTS    = 128;
234 const DESKTOP_SWITCHDESKTOP   = 256;
235 
236 const CW_USEDEFAULT       = 0x80000000;
237 
238 enum {
239 	WS_OVERLAPPED       = 0,
240 	WS_TILED            = WS_OVERLAPPED,
241 	WS_MAXIMIZEBOX      = 0x00010000,
242 	WS_MINIMIZEBOX      = 0x00020000,
243 	WS_TABSTOP          = 0x00010000,
244 	WS_GROUP            = 0x00020000,
245 	WS_THICKFRAME       = 0x00040000,
246 	WS_SIZEBOX          = WS_THICKFRAME,
247 	WS_SYSMENU          = 0x00080000,
248 	WS_HSCROLL          = 0x00100000,
249 	WS_VSCROLL          = 0x00200000,
250 	WS_DLGFRAME         = 0x00400000,
251 	WS_BORDER           = 0x00800000,
252 	WS_CAPTION          = 0x00c00000,
253 	WS_OVERLAPPEDWINDOW = WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX,
254 	WS_TILEDWINDOW      = WS_OVERLAPPEDWINDOW,
255 	WS_MAXIMIZE         = 0x01000000,
256 	WS_CLIPCHILDREN     = 0x02000000,
257 	WS_CLIPSIBLINGS     = 0x04000000,
258 	WS_DISABLED         = 0x08000000,
259 	WS_VISIBLE          = 0x10000000,
260 	WS_MINIMIZE         = 0x20000000,
261 	WS_ICONIC           = WS_MINIMIZE,
262 	WS_CHILD            = 0x40000000,
263 	WS_CHILDWINDOW      = 0x40000000,
264 	WS_POPUP            = 0x80000000,
265 	WS_POPUPWINDOW      = WS_POPUP|WS_BORDER|WS_SYSMENU,
266 }
267 
268 const MDIS_ALLCHILDSTYLES = 1;
269 
270 const BS_3STATE = 5;
271 const BS_AUTO3STATE = 6;
272 const BS_AUTOCHECKBOX = 3;
273 const BS_AUTORADIOBUTTON = 9;
274 const BS_BITMAP = 128;
275 const BS_BOTTOM = 0x800;
276 const BS_CENTER = 0x300;
277 const BS_CHECKBOX = 2;
278 const BS_DEFPUSHBUTTON = 1;
279 const BS_GROUPBOX = 7;
280 const BS_ICON = 64;
281 const BS_LEFT = 256;
282 const BS_LEFTTEXT = 32;
283 const BS_MULTILINE = 0x2000;
284 const BS_NOTIFY = 0x4000;
285 const BS_OWNERDRAW = 0xb;
286 const BS_PUSHBUTTON = 0;
287 const BS_PUSHLIKE = 4096;
288 const BS_RADIOBUTTON = 4;
289 const BS_RIGHT = 512;
290 const BS_RIGHTBUTTON = 32;
291 const BS_TEXT = 0;
292 const BS_TOP = 0x400;
293 const BS_USERBUTTON = 8;
294 const BS_VCENTER = 0xc00;
295 const BS_FLAT = 0x8000;
296 
297 const CBS_AUTOHSCROLL = 64;
298 const CBS_DISABLENOSCROLL = 0x800;
299 const CBS_DROPDOWN = 2;
300 const CBS_DROPDOWNLIST = 3;
301 const CBS_HASSTRINGS = 512;
302 const CBS_LOWERCASE = 0x4000;
303 const CBS_NOINTEGRALHEIGHT = 0x400;
304 const CBS_OEMCONVERT = 128;
305 const CBS_OWNERDRAWFIXED = 16;
306 const CBS_OWNERDRAWVARIABLE = 32;
307 const CBS_SIMPLE = 1;
308 const CBS_SORT = 256;
309 const CBS_UPPERCASE = 0x2000;
310 
311 const ES_AUTOHSCROLL = 128;
312 const ES_AUTOVSCROLL = 64;
313 const ES_CENTER = 1;
314 const ES_LEFT = 0;
315 const ES_LOWERCASE = 16;
316 const ES_MULTILINE = 4;
317 const ES_NOHIDESEL = 256;
318 const ES_NUMBER = 0x2000;
319 const ES_OEMCONVERT = 0x400;
320 const ES_PASSWORD = 32;
321 const ES_READONLY = 0x800;
322 const ES_RIGHT = 2;
323 const ES_UPPERCASE = 8;
324 const ES_WANTRETURN = 4096;
325 
326 const LBS_DISABLENOSCROLL = 4096;
327 const LBS_EXTENDEDSEL = 0x800;
328 const LBS_HASSTRINGS = 64;
329 const LBS_MULTICOLUMN = 512;
330 const LBS_MULTIPLESEL = 8;
331 const LBS_NODATA = 0x2000;
332 const LBS_NOINTEGRALHEIGHT = 256;
333 const LBS_NOREDRAW = 4;
334 const LBS_NOSEL = 0x4000;
335 const LBS_NOTIFY = 1;
336 const LBS_OWNERDRAWFIXED = 16;
337 const LBS_OWNERDRAWVARIABLE = 32;
338 const LBS_SORT = 2;
339 const LBS_STANDARD = 0xa00003;
340 const LBS_USETABSTOPS = 128;
341 const LBS_WANTKEYBOARDINPUT = 0x400;
342 
343 const SBS_BOTTOMALIGN = 4;
344 const SBS_HORZ = 0;
345 const SBS_LEFTALIGN = 2;
346 const SBS_RIGHTALIGN = 4;
347 const SBS_SIZEBOX = 8;
348 const SBS_SIZEBOXBOTTOMRIGHTALIGN = 4;
349 const SBS_SIZEBOXTOPLEFTALIGN = 2;
350 const SBS_SIZEGRIP = 16;
351 const SBS_TOPALIGN = 2;
352 const SBS_VERT = 1;
353 
354 const SS_BITMAP = 14;
355 const SS_BLACKFRAME = 7;
356 const SS_BLACKRECT = 4;
357 const SS_CENTER = 1;
358 const SS_CENTERIMAGE = 512;
359 const SS_ENHMETAFILE = 15;
360 const SS_ETCHEDFRAME = 18;
361 const SS_ETCHEDHORZ = 16;
362 const SS_ETCHEDVERT = 17;
363 const SS_GRAYFRAME = 8;
364 const SS_GRAYRECT = 5;
365 const SS_ICON = 3;
366 const SS_LEFT = 0;
367 const SS_LEFTNOWORDWRAP = 0xc;
368 const SS_NOPREFIX = 128;
369 const SS_NOTIFY = 256;
370 const SS_OWNERDRAW = 0xd;
371 const SS_REALSIZEIMAGE = 0x800;
372 const SS_RIGHT = 2;
373 const SS_RIGHTJUST = 0x400;
374 const SS_SIMPLE = 11;
375 const SS_SUNKEN = 4096;
376 const SS_WHITEFRAME = 9;
377 const SS_WHITERECT = 6;
378 const SS_USERITEM = 10;
379 const SS_TYPEMASK = 0x0000001FL;
380 const SS_ENDELLIPSIS = 0x00004000L;
381 const SS_PATHELLIPSIS = 0x00008000L;
382 const SS_WORDELLIPSIS = 0x0000C000L;
383 const SS_ELLIPSISMASK = 0x0000C000L;
384 
385 const DS_ABSALIGN      = 0x0001;
386 const DS_3DLOOK        = 0x0004;
387 const DS_SYSMODAL      = 0x0002;
388 const DS_FIXEDSYS      = 0x0008;
389 const DS_NOFAILCREATE  = 0x0010;
390 const DS_LOCALEDIT     = 0x0020;
391 const DS_SETFONT       = 0x0040;
392 const DS_MODALFRAME    = 0x0080;
393 const DS_NOIDLEMSG     = 0x0100;
394 const DS_SETFOREGROUND = 0x0200;
395 const DS_CONTROL       = 0x0400;
396 const DS_CENTER        = 0x0800;
397 const DS_CENTERMOUSE   = 0x1000;
398 const DS_CONTEXTHELP   = 0x2000;
399 const DS_SHELLFONT     = DS_SETFONT | DS_FIXEDSYS;
400 
401 const WS_EX_ACCEPTFILES = 16;
402 const WS_EX_APPWINDOW = 0x40000;
403 const WS_EX_CLIENTEDGE = 512;
404 const WS_EX_COMPOSITED = 0x2000000;  // XP
405 const WS_EX_CONTEXTHELP = 0x400;
406 const WS_EX_CONTROLPARENT = 0x10000;
407 const WS_EX_DLGMODALFRAME = 1;
408 const WS_EX_LAYERED = 0x80000;  // w2k
409 const WS_EX_LAYOUTRTL = 0x400000;  // w98, w2k
410 const WS_EX_LEFT = 0;
411 const WS_EX_LEFTSCROLLBAR = 0x4000;
412 const WS_EX_LTRREADING = 0;
413 const WS_EX_MDICHILD = 64;
414 const WS_EX_NOACTIVATE = 0x8000000;  // w2k
415 const WS_EX_NOINHERITLAYOUT = 0x100000;  // w2k
416 const WS_EX_NOPARENTNOTIFY = 4;
417 const WS_EX_OVERLAPPEDWINDOW = 0x300;
418 const WS_EX_PALETTEWINDOW = 0x188;
419 const WS_EX_RIGHT = 0x1000;
420 const WS_EX_RIGHTSCROLLBAR = 0;
421 const WS_EX_RTLREADING = 0x2000;
422 const WS_EX_STATICEDGE = 0x20000;
423 const WS_EX_TOOLWINDOW = 128;
424 const WS_EX_TOPMOST = 8;
425 const WS_EX_TRANSPARENT = 32;
426 const WS_EX_WINDOWEDGE = 256;
427 
428 const WINSTA_ENUMDESKTOPS      = 1;
429 const WINSTA_READATTRIBUTES    = 2;
430 const WINSTA_ACCESSCLIPBOARD   = 4;
431 const WINSTA_CREATEDESKTOP     = 8;
432 const WINSTA_WRITEATTRIBUTES   = 16;
433 const WINSTA_ACCESSGLOBALATOMS = 32;
434 const WINSTA_EXITWINDOWS       = 64;
435 const WINSTA_ENUMERATE         = 256;
436 const WINSTA_READSCREEN        = 512;
437 
438 const DDL_READWRITE = 0;
439 const DDL_READONLY  = 1;
440 const DDL_HIDDEN    = 2;
441 const DDL_SYSTEM    = 4;
442 const DDL_DIRECTORY = 16;
443 const DDL_ARCHIVE   = 32;
444 const DDL_POSTMSGS  = 8192;
445 const DDL_DRIVES    = 16384;
446 const DDL_EXCLUSIVE = 32768;
447 
448 const DC_ACTIVE   = 0x00000001;
449 const DC_SMALLCAP = 0x00000002;
450 const DC_ICON     = 0x00000004;
451 const DC_TEXT     = 0x00000008;
452 const DC_INBUTTON = 0x00000010;
453 
454 static if (WINVER >= 0x500) {
455 const DC_GRADIENT=0x00000020;
456 }
457 static if (_WIN32_WINNT >= 0x501) {
458 const DC_BUTTONS=0x00001000;
459 }
460 
461 // Where are these documented?
462 //const DC_CAPTION = DC_ICON|DC_TEXT|DC_BUTTONS;
463 //const DC_NC      = DC_CAPTION|DC_FRAME;
464 
465 const BDR_RAISEDOUTER = 1;
466 const BDR_SUNKENOUTER = 2;
467 const BDR_RAISEDINNER = 4;
468 const BDR_SUNKENINNER = 8;
469 const BDR_OUTER       = 3;
470 const BDR_INNER       = 0xc;
471 const BDR_RAISED      = 5;
472 const BDR_SUNKEN      = 10;
473 
474 const EDGE_RAISED = BDR_RAISEDOUTER|BDR_RAISEDINNER;
475 const EDGE_SUNKEN = BDR_SUNKENOUTER|BDR_SUNKENINNER;
476 const EDGE_ETCHED = BDR_SUNKENOUTER|BDR_RAISEDINNER;
477 const EDGE_BUMP   = BDR_RAISEDOUTER|BDR_SUNKENINNER;
478 
479 const BF_LEFT                    = 1;
480 const BF_TOP                     = 2;
481 const BF_RIGHT                   = 4;
482 const BF_BOTTOM                  = 8;
483 const BF_TOPLEFT                 = BF_TOP|BF_LEFT;
484 const BF_TOPRIGHT                = BF_TOP|BF_RIGHT;
485 const BF_BOTTOMLEFT              = BF_BOTTOM|BF_LEFT;
486 const BF_BOTTOMRIGHT             = BF_BOTTOM|BF_RIGHT;
487 const BF_RECT                    = BF_LEFT|BF_TOP|BF_RIGHT|BF_BOTTOM ;
488 const BF_DIAGONAL                = 16;
489 const BF_DIAGONAL_ENDTOPRIGHT    = BF_DIAGONAL|BF_TOP|BF_RIGHT;
490 const BF_DIAGONAL_ENDTOPLEFT     = BF_DIAGONAL|BF_TOP|BF_LEFT;
491 const BF_DIAGONAL_ENDBOTTOMLEFT  = BF_DIAGONAL|BF_BOTTOM|BF_LEFT;
492 const BF_DIAGONAL_ENDBOTTOMRIGHT = BF_DIAGONAL|BF_BOTTOM|BF_RIGHT;
493 const BF_MIDDLE                  = 0x800;
494 const BF_SOFT                    = 0x1000;
495 const BF_ADJUST                  = 0x2000;
496 const BF_FLAT                    = 0x4000;
497 const BF_MONO                    = 0x8000;
498 
499 const DFC_CAPTION=1;
500 const DFC_MENU=2;
501 const DFC_SCROLL=3;
502 const DFC_BUTTON=4;
503 static if (WINVER >= 0x500) {
504 const DFC_POPUPMENU=5;
505 }// WINVER >= 0x500
506 
507 const DFCS_CAPTIONCLOSE   = 0;
508 const DFCS_CAPTIONMIN     = 1;
509 const DFCS_CAPTIONMAX     = 2;
510 const DFCS_CAPTIONRESTORE = 3;
511 const DFCS_CAPTIONHELP    = 4;
512 
513 const DFCS_MENUARROW      = 0;
514 const DFCS_MENUCHECK      = 1;
515 const DFCS_MENUBULLET     = 2;
516 const DFCS_MENUARROWRIGHT = 4;
517 
518 const DFCS_SCROLLUP            = 0;
519 const DFCS_SCROLLDOWN          = 1;
520 const DFCS_SCROLLLEFT          = 2;
521 const DFCS_SCROLLRIGHT         = 3;
522 const DFCS_SCROLLCOMBOBOX      = 5;
523 const DFCS_SCROLLSIZEGRIP      = 8;
524 const DFCS_SCROLLSIZEGRIPRIGHT = 16;
525 
526 const DFCS_BUTTONCHECK         = 0;
527 const DFCS_BUTTONRADIOIMAGE    = 1;
528 const DFCS_BUTTONRADIOMASK     = 2;
529 const DFCS_BUTTONRADIO         = 4;
530 const DFCS_BUTTON3STATE        = 8;
531 const DFCS_BUTTONPUSH          = 16;
532 const DFCS_INACTIVE            = 256;
533 const DFCS_PUSHED              = 512;
534 const DFCS_CHECKED             = 1024;
535 static if (WINVER >= 0x500) {
536 const DFCS_TRANSPARENT         = 0x800;
537 const DFCS_HOT                 = 0x1000;
538 }
539 const DFCS_ADJUSTRECT          = 0x2000;
540 const DFCS_FLAT                = 0x4000;
541 const DFCS_MONO                = 0x8000;
542 
543 enum {
544 	DST_COMPLEX = 0,
545 	DST_TEXT,
546 	DST_PREFIXTEXT,
547 	DST_ICON,
548 	DST_BITMAP // = 4
549 }
550 
551 const DSS_NORMAL = 0;
552 const DSS_UNION = 16;
553 const DSS_DISABLED = 32;
554 const DSS_MONO = 128;
555 const DSS_RIGHT = 0x8000;
556 
557 const DT_BOTTOM = 8;
558 const DT_CALCRECT = 1024;
559 const DT_CENTER = 1;
560 const DT_EDITCONTROL = 8192;
561 const DT_END_ELLIPSIS = 32768;
562 const DT_PATH_ELLIPSIS = 16384;
563 const DT_WORD_ELLIPSIS = 0x40000;
564 const DT_EXPANDTABS = 64;
565 const DT_EXTERNALLEADING = 512;
566 const DT_LEFT = 0;
567 const DT_MODIFYSTRING = 65536;
568 const DT_NOCLIP = 256;
569 const DT_NOPREFIX = 2048;
570 const DT_RIGHT = 2;
571 const DT_RTLREADING = 131072;
572 const DT_SINGLELINE = 32;
573 const DT_TABSTOP = 128;
574 const DT_TOP = 0;
575 const DT_VCENTER = 4;
576 const DT_WORDBREAK = 16;
577 const DT_INTERNAL = 4096;
578 
579 const WB_ISDELIMITER = 2;
580 const WB_LEFT = 0;
581 const WB_RIGHT = 1;
582 
583 const SB_HORZ = 0;
584 const SB_VERT = 1;
585 const SB_CTL = 2;
586 const SB_BOTH = 3;
587 
588 const ESB_DISABLE_BOTH = 3;
589 const ESB_DISABLE_DOWN = 2;
590 const ESB_DISABLE_LEFT = 1;
591 const ESB_DISABLE_LTUP = 1;
592 const ESB_DISABLE_RIGHT = 2;
593 const ESB_DISABLE_RTDN = 2;
594 const ESB_DISABLE_UP = 1;
595 const ESB_ENABLE_BOTH = 0;
596 
597 const SB_LINEUP = 0;
598 const SB_LINEDOWN = 1;
599 const SB_LINELEFT = 0;
600 const SB_LINERIGHT = 1;
601 const SB_PAGEUP = 2;
602 const SB_PAGEDOWN = 3;
603 const SB_PAGELEFT = 2;
604 const SB_PAGERIGHT = 3;
605 const SB_THUMBPOSITION = 4;
606 const SB_THUMBTRACK = 5;
607 const SB_ENDSCROLL = 8;
608 const SB_LEFT = 6;
609 const SB_RIGHT = 7;
610 const SB_BOTTOM = 7;
611 const SB_TOP = 6;
612 
613 //MACRO #define IS_INTRESOURCE(i) (((ULONG_PTR)(i) >> 16) == 0)
614 
615 template MAKEINTRESOURCE_T (WORD i)
616 {
617 	const LPTSTR MAKEINTRESOURCE_T = cast(LPTSTR)(i);
618 }
619 
620 LPSTR MAKEINTRESOURCEA(WORD i)
621 {
622 	return cast(LPSTR)(i);
623 }
624 
625 LPWSTR MAKEINTRESOURCEW(WORD i)
626 {
627 	return cast(LPWSTR)(i);
628 }
629 
630 const RT_CURSOR       = MAKEINTRESOURCE_T!(1);
631 const RT_BITMAP       = MAKEINTRESOURCE_T!(2);
632 const RT_ICON         = MAKEINTRESOURCE_T!(3);
633 const RT_MENU         = MAKEINTRESOURCE_T!(4);
634 const RT_DIALOG       = MAKEINTRESOURCE_T!(5);
635 const RT_STRING       = MAKEINTRESOURCE_T!(6);
636 const RT_FONTDIR      = MAKEINTRESOURCE_T!(7);
637 const RT_FONT         = MAKEINTRESOURCE_T!(8);
638 const RT_ACCELERATOR  = MAKEINTRESOURCE_T!(9);
639 const RT_RCDATA       = MAKEINTRESOURCE_T!(10);
640 const RT_MESSAGETABLE = MAKEINTRESOURCE_T!(11);
641 
642 const RT_GROUP_CURSOR = MAKEINTRESOURCE_T!(12);
643 const RT_GROUP_ICON   = MAKEINTRESOURCE_T!(14);
644 const RT_VERSION      = MAKEINTRESOURCE_T!(16);
645 const RT_DLGINCLUDE   = MAKEINTRESOURCE_T!(17);
646 const RT_PLUGPLAY     = MAKEINTRESOURCE_T!(19);
647 const RT_VXD          = MAKEINTRESOURCE_T!(20);
648 const RT_ANICURSOR    = MAKEINTRESOURCE_T!(21);
649 const RT_ANIICON      = MAKEINTRESOURCE_T!(22);
650 const RT_HTML         = MAKEINTRESOURCE_T!(23);
651 const RT_MANIFEST     = MAKEINTRESOURCE_T!(24);
652 
653 const CREATEPROCESS_MANIFEST_RESOURCE_ID                 = MAKEINTRESOURCE_T!(1);
654 const ISOLATIONAWARE_MANIFEST_RESOURCE_ID                = MAKEINTRESOURCE_T!(2);
655 const ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE_T!(3);
656 
657 const EWX_LOGOFF   = 0;
658 const EWX_SHUTDOWN = 1;
659 const EWX_REBOOT   = 2;
660 const EWX_FORCE    = 4;
661 const EWX_POWEROFF = 8;
662 static if (_WIN32_WINNT >= 0x500) {
663 const EWX_FORCEIFHUNG = 16;
664 }
665 
666 const CS_BYTEALIGNCLIENT = 4096;
667 const CS_BYTEALIGNWINDOW = 8192;
668 const CS_KEYCVTWINDOW = 4;
669 const CS_NOKEYCVT = 256;
670 const CS_CLASSDC = 64;
671 const CS_DBLCLKS = 8;
672 const CS_GLOBALCLASS = 16384;
673 const CS_HREDRAW = 2;
674 const CS_NOCLOSE = 512;
675 const CS_OWNDC = 32;
676 const CS_PARENTDC = 128;
677 const CS_SAVEBITS = 2048;
678 const CS_VREDRAW = 1;
679 const CS_IME = 0x10000;
680 
681 const GCW_ATOM = -32;
682 const GCL_CBCLSEXTRA = -20;
683 const GCL_CBWNDEXTRA = -18;
684 const GCL_HBRBACKGROUND = -10;
685 const GCL_HCURSOR = -12;
686 const GCL_HICON = -14;
687 const GCL_HICONSM = -34;
688 const GCL_HMODULE = -16;
689 const GCL_MENUNAME = -8;
690 const GCL_STYLE = -26;
691 const GCL_WNDPROC = -24;
692 
693 alias GCL_HICONSM GCLP_HICONSM;
694 alias GCL_HICON GCLP_HICON;
695 alias GCL_HCURSOR GCLP_HCURSOR;
696 alias GCL_HBRBACKGROUND GCLP_HBRBACKGROUND;
697 alias GCL_HMODULE  GCLP_HMODULE;
698 alias GCL_MENUNAME GCLP_MENUNAME;
699 alias GCL_WNDPROC  GCLP_WNDPROC;
700 
701 const IDC_ARROW       = MAKEINTRESOURCE_T!(32512);
702 const IDC_IBEAM       = MAKEINTRESOURCE_T!(32513);
703 const IDC_WAIT        = MAKEINTRESOURCE_T!(32514);
704 const IDC_CROSS       = MAKEINTRESOURCE_T!(32515);
705 const IDC_UPARROW     = MAKEINTRESOURCE_T!(32516);
706 const IDC_SIZENWSE    = MAKEINTRESOURCE_T!(32642);
707 const IDC_SIZENESW    = MAKEINTRESOURCE_T!(32643);
708 const IDC_SIZEWE      = MAKEINTRESOURCE_T!(32644);
709 const IDC_SIZENS      = MAKEINTRESOURCE_T!(32645);
710 const IDC_SIZEALL     = MAKEINTRESOURCE_T!(32646);
711 const IDC_NO          = MAKEINTRESOURCE_T!(32648);
712 const IDC_HAND        = MAKEINTRESOURCE_T!(32649);
713 const IDC_APPSTARTING = MAKEINTRESOURCE_T!(32650);
714 const IDC_HELP        = MAKEINTRESOURCE_T!(32651);
715 const IDC_ICON        = MAKEINTRESOURCE_T!(32641);
716 const IDC_SIZE        = MAKEINTRESOURCE_T!(32640);
717 const IDI_APPLICATION = MAKEINTRESOURCE_T!(32512);
718 const IDI_HAND        = MAKEINTRESOURCE_T!(32513);
719 const IDI_QUESTION    = MAKEINTRESOURCE_T!(32514);
720 const IDI_EXCLAMATION = MAKEINTRESOURCE_T!(32515);
721 const IDI_ASTERISK    = MAKEINTRESOURCE_T!(32516);
722 const IDI_WINLOGO     = MAKEINTRESOURCE_T!(32517);
723 const IDI_WARNING     = IDI_EXCLAMATION;
724 const IDI_ERROR       = IDI_HAND;
725 const IDI_INFORMATION = IDI_ASTERISK;
726 
727 const MIIM_STATE = 1;
728 const MIIM_ID = 2;
729 const MIIM_SUBMENU = 4;
730 const MIIM_CHECKMARKS = 8;
731 const MIIM_TYPE = 16;
732 const MIIM_DATA = 32;
733 const MIIM_STRING = 64;
734 const MIIM_BITMAP = 128;
735 const MIIM_FTYPE = 256;
736 
737 static if (WINVER >= 0x500) {
738 
739 const MIM_MAXHEIGHT = 1;
740 const MIM_BACKGROUND = 2;
741 const MIM_HELPID = 4;
742 const MIM_MENUDATA = 8;
743 const MIM_STYLE = 16;
744 const MIM_APPLYTOSUBMENUS = 0x80000000L;
745 
746 const MNS_NOCHECK = 0x80000000;
747 const MNS_MODELESS = 0x40000000;
748 const MNS_DRAGDROP = 0x20000000;
749 const MNS_AUTODISMISS = 0x10000000;
750 const MNS_NOTIFYBYPOS = 0x08000000;
751 const MNS_CHECKORBMP = 0x04000000;
752 
753 }
754 
755 const MFT_BITMAP = 4;
756 const MFT_MENUBARBREAK = 32;
757 const MFT_MENUBREAK = 64;
758 const MFT_OWNERDRAW = 256;
759 const MFT_RADIOCHECK = 512;
760 const MFT_RIGHTJUSTIFY = 0x4000;
761 const MFT_SEPARATOR = 0x800;
762 const MFT_RIGHTORDER = 0x2000L;
763 const MFT_STRING = 0;
764 
765 const MFS_CHECKED = 8;
766 const MFS_DEFAULT = 4096;
767 const MFS_DISABLED = 3;
768 const MFS_ENABLED = 0;
769 const MFS_GRAYED = 3;
770 const MFS_HILITE = 128;
771 const MFS_UNCHECKED = 0;
772 const MFS_UNHILITE = 0;
773 
774 const GW_HWNDNEXT = 2;
775 const GW_HWNDPREV = 3;
776 const GW_CHILD = 5;
777 const GW_HWNDFIRST = 0;
778 const GW_HWNDLAST = 1;
779 const GW_OWNER = 4;
780 
781 const SW_HIDE = 0;
782 const SW_NORMAL = 1;
783 const SW_SHOWNORMAL = 1;
784 const SW_SHOWMINIMIZED = 2;
785 const SW_MAXIMIZE = 3;
786 const SW_SHOWMAXIMIZED = 3;
787 const SW_SHOWNOACTIVATE = 4;
788 const SW_SHOW = 5;
789 const SW_MINIMIZE = 6;
790 const SW_SHOWMINNOACTIVE = 7;
791 const SW_SHOWNA = 8;
792 const SW_RESTORE = 9;
793 const SW_SHOWDEFAULT = 10;
794 const SW_FORCEMINIMIZE = 11;
795 const SW_MAX = 11;
796 
797 const MB_USERICON = 128;
798 const MB_ICONASTERISK = 64;
799 const MB_ICONEXCLAMATION = 0x30;
800 const MB_ICONWARNING = 0x30;
801 const MB_ICONERROR = 16;
802 const MB_ICONHAND = 16;
803 const MB_ICONQUESTION = 32;
804 const MB_OK = 0;
805 const MB_ABORTRETRYIGNORE = 2;
806 const MB_APPLMODAL = 0;
807 const MB_DEFAULT_DESKTOP_ONLY = 0x20000;
808 const MB_HELP = 0x4000;
809 const MB_RIGHT = 0x80000;
810 const MB_RTLREADING = 0x100000;
811 const MB_TOPMOST = 0x40000;
812 const MB_DEFBUTTON1 = 0;
813 const MB_DEFBUTTON2 = 256;
814 const MB_DEFBUTTON3 = 512;
815 const MB_DEFBUTTON4 = 0x300;
816 const MB_ICONINFORMATION = 64;
817 const MB_ICONSTOP = 16;
818 const MB_OKCANCEL = 1;
819 const MB_RETRYCANCEL = 5;
820 
821 static if (_WIN32_WINNT_ONLY) {
822 	static if (_WIN32_WINNT >= 0x400) {
823 		const MB_SERVICE_NOTIFICATION = 0x00200000;
824 	} else {
825 		const MB_SERVICE_NOTIFICATION = 0x00040000;
826 	}
827 	const MB_SERVICE_NOTIFICATION_NT3X = 0x00040000;
828 }
829 
830 const MB_SETFOREGROUND = 0x10000;
831 const MB_SYSTEMMODAL = 4096;
832 const MB_TASKMODAL = 0x2000;
833 const MB_YESNO = 4;
834 const MB_YESNOCANCEL = 3;
835 const MB_ICONMASK = 240;
836 const MB_DEFMASK = 3840;
837 const MB_MODEMASK = 0x00003000;
838 const MB_MISCMASK = 0x0000C000;
839 const MB_NOFOCUS = 0x00008000;
840 const MB_TYPEMASK = 15;
841 // [Redefined] MB_TOPMOST=0x40000
842 static if (WINVER >= 0x500) {
843 	const MB_CANCELTRYCONTINUE=6;
844 }
845 
846 const IDOK       = 1;
847 const IDCANCEL   = 2;
848 const IDABORT    = 3;
849 const IDRETRY    = 4;
850 const IDIGNORE   = 5;
851 const IDYES      = 6;
852 const IDNO       = 7;
853 static if (WINVER >= 0x400) {
854 const IDCLOSE    = 8;
855 const IDHELP     = 9;
856 }
857 static if (WINVER >= 0x500) {
858 const IDTRYAGAIN = 10;
859 const IDCONTINUE = 11;
860 }
861 
862 const GWL_EXSTYLE = -20;
863 const GWL_STYLE = -16;
864 const GWL_WNDPROC = -4;
865 const GWLP_WNDPROC = -4;
866 const GWL_HINSTANCE = -6;
867 const GWLP_HINSTANCE = -6;
868 const GWL_HWNDPARENT = -8;
869 const GWLP_HWNDPARENT = -8;
870 const GWL_ID = -12;
871 const GWLP_ID = -12;
872 const GWL_USERDATA = -21;
873 const GWLP_USERDATA = -21;
874 
875 const DWL_DLGPROC = 4;
876 const DWLP_DLGPROC = 4;
877 const DWL_MSGRESULT = 0;
878 const DWLP_MSGRESULT = 0;
879 const DWL_USER = 8;
880 const DWLP_USER = 8;
881 
882 const QS_KEY            = 1;
883 const QS_MOUSEMOVE      = 2;
884 const QS_MOUSEBUTTON    = 4;
885 const QS_MOUSE          = 6;
886 const QS_POSTMESSAGE    = 8;
887 const QS_TIMER          = 16;
888 const QS_PAINT          = 32;
889 const QS_SENDMESSAGE    = 64;
890 const QS_HOTKEY         = 128;
891 const QS_ALLPOSTMESSAGE = 256;
892 static if (_WIN32_WINNT >= 0x501) {
893 const QS_RAWINPUT       = 1024;
894 const QS_INPUT          = 1031;
895 const QS_ALLEVENTS      = 1215;
896 const QS_ALLINPUT       = 1279;
897 } else {
898 const QS_INPUT          = 7;
899 const QS_ALLEVENTS      = 191;
900 const QS_ALLINPUT       = 255;
901 }
902 
903 const MWMO_WAITALL        = 1;
904 const MWMO_ALERTABLE      = 2;
905 const MWMO_INPUTAVAILABLE = 4;
906 
907 const COLOR_3DDKSHADOW=21;
908 const COLOR_3DFACE=15;
909 const COLOR_3DHILIGHT=20;
910 const COLOR_3DHIGHLIGHT=20;
911 const COLOR_3DLIGHT=22;
912 const COLOR_BTNHILIGHT=20;
913 const COLOR_3DSHADOW=16;
914 const COLOR_ACTIVEBORDER=10;
915 const COLOR_ACTIVECAPTION=2;
916 const COLOR_APPWORKSPACE=12;
917 const COLOR_BACKGROUND=1;
918 const COLOR_DESKTOP=1;
919 const COLOR_BTNFACE=15;
920 const COLOR_BTNHIGHLIGHT=20;
921 const COLOR_BTNSHADOW=16;
922 const COLOR_BTNTEXT=18;
923 const COLOR_CAPTIONTEXT=9;
924 const COLOR_GRAYTEXT=17;
925 const COLOR_HIGHLIGHT=13;
926 const COLOR_HIGHLIGHTTEXT=14;
927 const COLOR_INACTIVEBORDER=11;
928 const COLOR_INACTIVECAPTION=3;
929 const COLOR_INACTIVECAPTIONTEXT=19;
930 const COLOR_INFOBK=24;
931 const COLOR_INFOTEXT=23;
932 const COLOR_MENU=4;
933 const COLOR_MENUTEXT=7;
934 const COLOR_SCROLLBAR=0;
935 const COLOR_WINDOW=5;
936 const COLOR_WINDOWFRAME=6;
937 const COLOR_WINDOWTEXT=8;
938 const COLOR_HOTLIGHT=26;
939 const COLOR_GRADIENTACTIVECAPTION=27;
940 const COLOR_GRADIENTINACTIVECAPTION=28;
941 
942 const CTLCOLOR_MSGBOX=0;
943 const CTLCOLOR_EDIT=1;
944 const CTLCOLOR_LISTBOX=2;
945 const CTLCOLOR_BTN=3;
946 const CTLCOLOR_DLG=4;
947 const CTLCOLOR_SCROLLBAR=5;
948 const CTLCOLOR_STATIC=6;
949 const CTLCOLOR_MAX=7;
950 
951 // For GetSystemMetrics()
952 enum : int {
953 	SM_CXSCREEN = 0,
954 	SM_CYSCREEN,
955 	SM_CXVSCROLL,
956 	SM_CYHSCROLL,
957 	SM_CYCAPTION,
958 	SM_CXBORDER,
959 	SM_CYBORDER,
960 	SM_CXDLGFRAME, // = 7,
961 	SM_CXFIXEDFRAME = SM_CXDLGFRAME,
962 	SM_CYDLGFRAME, // =8,
963 	SM_CYFIXEDFRAME = SM_CYDLGFRAME,
964 	SM_CYVTHUMB = 9,
965 	SM_CXHTHUMB,
966 	SM_CXICON,
967 	SM_CYICON,
968 	SM_CXCURSOR,
969 	SM_CYCURSOR,
970 	SM_CYMENU,
971 	SM_CXFULLSCREEN,
972 	SM_CYFULLSCREEN,
973 	SM_CYKANJIWINDOW,
974 	SM_MOUSEPRESENT,
975 	SM_CYVSCROLL,
976 	SM_CXHSCROLL,
977 	SM_DEBUG,
978 	SM_SWAPBUTTON,
979 	SM_RESERVED1,
980 	SM_RESERVED2,
981 	SM_RESERVED3,
982 	SM_RESERVED4,
983 	SM_CXMIN,
984 	SM_CYMIN,
985 	SM_CXSIZE,
986 	SM_CYSIZE,
987 	SM_CXSIZEFRAME, // = 32,
988 	SM_CXFRAME = SM_CXSIZEFRAME,
989 	SM_CYSIZEFRAME, // = 33
990 	SM_CYFRAME = SM_CYSIZEFRAME,
991 	SM_CXMINTRACK,
992 	SM_CYMINTRACK,
993 	SM_CXDOUBLECLK,
994 	SM_CYDOUBLECLK,
995 	SM_CXICONSPACING,
996 	SM_CYICONSPACING,
997 	SM_MENUDROPALIGNMENT,
998 	SM_PENWINDOWS,
999 	SM_DBCSENABLED,
1000 	SM_CMOUSEBUTTONS,
1001 	SM_SECURE,
1002 	SM_CXEDGE,
1003 	SM_CYEDGE,
1004 	SM_CXMINSPACING,
1005 	SM_CYMINSPACING,
1006 	SM_CXSMICON,
1007 	SM_CYSMICON,
1008 	SM_CYSMCAPTION,
1009 	SM_CXSMSIZE,
1010 	SM_CYSMSIZE,
1011 	SM_CXMENUSIZE,
1012 	SM_CYMENUSIZE,
1013 	SM_ARRANGE,
1014 	SM_CXMINIMIZED,
1015 	SM_CYMINIMIZED,
1016 	SM_CXMAXTRACK,
1017 	SM_CYMAXTRACK,
1018 	SM_CXMAXIMIZED,
1019 	SM_CYMAXIMIZED,
1020 	SM_NETWORK, // = 63
1021 	SM_CLEANBOOT = 67,
1022 	SM_CXDRAG,
1023 	SM_CYDRAG,
1024 	SM_SHOWSOUNDS,
1025 	SM_CXMENUCHECK,
1026 	SM_CYMENUCHECK,
1027 	SM_SLOWMACHINE,
1028 	SM_MIDEASTENABLED,
1029 	// The next values aren't supported in Win95.
1030 	SM_MOUSEWHEELPRESENT,
1031 	SM_XVIRTUALSCREEN,
1032 	SM_YVIRTUALSCREEN,
1033 	SM_CXVIRTUALSCREEN,
1034 	SM_CYVIRTUALSCREEN,
1035 	SM_CMONITORS,
1036 	SM_SAMEDISPLAYFORMAT,
1037 	SM_IMMENABLED,
1038 	SM_CXFOCUSBORDER,
1039 	SM_CYFOCUSBORDER, // = 84
1040 	SM_TABLETPC = 86,
1041 	SM_MEDIACENTER = 87,
1042 	SM_REMOTESESSION = 0x1000,
1043 	// These are only for WinXP and later
1044 	SM_SHUTTINGDOWN = 0x2000,
1045 	SM_REMOTECONTROL = 0x2001
1046 }
1047 
1048 const ARW_BOTTOMLEFT=0;
1049 const ARW_BOTTOMRIGHT=1;
1050 const ARW_HIDE=8;
1051 const ARW_TOPLEFT=2;
1052 const ARW_TOPRIGHT=3;
1053 const ARW_DOWN=4;
1054 const ARW_LEFT=0;
1055 const ARW_RIGHT=0;
1056 const ARW_UP=4;
1057 
1058 const UOI_FLAGS=1;
1059 const UOI_NAME=2;
1060 const UOI_TYPE=3;
1061 const UOI_USER_SID=4;
1062 
1063 // For the fuLoad parameter of LoadImage()
1064 enum : UINT {
1065 	LR_DEFAULTCOLOR     = 0,
1066 	LR_MONOCHROME       = 1,
1067 	LR_COLOR            = 2,
1068 	LR_COPYRETURNORG    = 4,
1069 	LR_COPYDELETEORG    = 8,
1070 	LR_LOADFROMFILE     = 16,
1071 	LR_LOADTRANSPARENT  = 32,
1072 	LR_DEFAULTSIZE      = 64,
1073 	LR_LOADREALSIZE     = 128,
1074 	LR_LOADMAP3DCOLORS  = 4096,
1075 	LR_CREATEDIBSECTION = 8192,
1076 	LR_COPYFROMRESOURCE = 16384,
1077 	LR_SHARED           = 32768
1078 }
1079 
1080 const KEYEVENTF_EXTENDEDKEY = 0x00000001;
1081 const KEYEVENTF_KEYUP       = 00000002;
1082 static if (_WIN32_WINNT >= 0x500) {
1083 const KEYEVENTF_UNICODE     = 0x00000004;
1084 const KEYEVENTF_SCANCODE    = 0x00000008;
1085 }
1086 
1087 const OBM_BTNCORNERS = 32758;
1088 const OBM_BTSIZE = 32761;
1089 const OBM_CHECK = 32760;
1090 const OBM_CHECKBOXES = 32759;
1091 const OBM_CLOSE = 32754;
1092 const OBM_COMBO = 32738;
1093 const OBM_DNARROW = 32752;
1094 const OBM_DNARROWD = 32742;
1095 const OBM_DNARROWI = 32736;
1096 const OBM_LFARROW = 32750;
1097 const OBM_LFARROWI = 32734;
1098 const OBM_LFARROWD = 32740;
1099 const OBM_MNARROW = 32739;
1100 const OBM_OLD_CLOSE = 32767;
1101 const OBM_OLD_DNARROW = 32764;
1102 const OBM_OLD_LFARROW = 32762;
1103 const OBM_OLD_REDUCE = 32757;
1104 const OBM_OLD_RESTORE = 32755;
1105 const OBM_OLD_RGARROW = 32763;
1106 const OBM_OLD_UPARROW = 32765;
1107 const OBM_OLD_ZOOM = 32756;
1108 const OBM_REDUCE = 32749;
1109 const OBM_REDUCED = 32746;
1110 const OBM_RESTORE = 32747;
1111 const OBM_RESTORED = 32744;
1112 const OBM_RGARROW = 32751;
1113 const OBM_RGARROWD = 32741;
1114 const OBM_RGARROWI = 32735;
1115 const OBM_SIZE = 32766;
1116 const OBM_UPARROW = 32753;
1117 const OBM_UPARROWD = 32743;
1118 const OBM_UPARROWI = 32737;
1119 const OBM_ZOOM = 32748;
1120 const OBM_ZOOMD = 32745;
1121 
1122 const OCR_NORMAL = 32512;
1123 const OCR_IBEAM = 32513;
1124 const OCR_WAIT = 32514;
1125 const OCR_CROSS = 32515;
1126 const OCR_UP = 32516;
1127 const OCR_SIZE = 32640;
1128 const OCR_ICON = 32641;
1129 const OCR_SIZENWSE = 32642;
1130 const OCR_SIZENESW = 32643;
1131 const OCR_SIZEWE = 32644;
1132 const OCR_SIZENS = 32645;
1133 const OCR_SIZEALL = 32646;
1134 const OCR_NO = 32648;
1135 const OCR_APPSTARTING = 32650;
1136 
1137 const OIC_SAMPLE = 32512;
1138 const OIC_HAND = 32513;
1139 const OIC_QUES = 32514;
1140 const OIC_BANG = 32515;
1141 const OIC_NOTE = 32516;
1142 const OIC_WINLOGO = 32517;
1143 const OIC_WARNING = OIC_BANG;
1144 const OIC_ERROR = OIC_HAND;
1145 const OIC_INFORMATION = OIC_NOTE;
1146 
1147 const HELPINFO_MENUITEM = 2;
1148 const HELPINFO_WINDOW = 1;
1149 
1150 const MSGF_DIALOGBOX = 0;
1151 const MSGF_MESSAGEBOX = 1;
1152 const MSGF_MENU = 2;
1153 const MSGF_MOVE = 3;
1154 const MSGF_SIZE = 4;
1155 const MSGF_SCROLLBAR = 5;
1156 const MSGF_NEXTWINDOW = 6;
1157 const MSGF_MAINLOOP = 8;
1158 const MSGF_USER = 4096;
1159 
1160 const MOUSEEVENTF_MOVE = 1;
1161 const MOUSEEVENTF_LEFTDOWN = 2;
1162 const MOUSEEVENTF_LEFTUP = 4;
1163 const MOUSEEVENTF_RIGHTDOWN = 8;
1164 const MOUSEEVENTF_RIGHTUP = 16;
1165 const MOUSEEVENTF_MIDDLEDOWN = 32;
1166 const MOUSEEVENTF_MIDDLEUP = 64;
1167 const MOUSEEVENTF_WHEEL = 0x0800;
1168 const MOUSEEVENTF_ABSOLUTE = 32768;
1169 
1170 const PM_NOREMOVE = 0;
1171 const PM_REMOVE = 1;
1172 const PM_NOYIELD = 2;
1173 
1174 static if (WINVER >= 0x500) {
1175 const PM_QS_INPUT = (QS_INPUT << 16);
1176 const PM_QS_POSTMESSAGE = ((QS_POSTMESSAGE|QS_HOTKEY|QS_TIMER) << 16);
1177 const PM_QS_PAINT = (QS_PAINT << 16);
1178 const PM_QS_SENDMESSAGE = (QS_SENDMESSAGE << 16);
1179 }
1180 const HWND
1181 	HWND_BROADCAST = cast(HWND)0xffff,
1182 	HWND_BOTTOM    = cast(HWND)1,
1183 	HWND_NOTOPMOST = cast(HWND)(-2),
1184 	HWND_TOP       = cast(HWND)0,
1185 	HWND_TOPMOST   = cast(HWND)(-1),
1186 	HWND_DESKTOP   = cast(HWND)0,
1187 	HWND_MESSAGE   = cast(HWND)(-3);// w2k
1188 
1189 const RDW_INVALIDATE      = 1;
1190 const RDW_INTERNALPAINT   = 2;
1191 const RDW_ERASE           = 4;
1192 const RDW_VALIDATE        = 8;
1193 const RDW_NOINTERNALPAINT = 16;
1194 const RDW_NOERASE         = 32;
1195 const RDW_NOCHILDREN      = 64;
1196 const RDW_ALLCHILDREN     = 128;
1197 const RDW_UPDATENOW       = 256;
1198 const RDW_ERASENOW        = 512;
1199 const RDW_FRAME           = 1024;
1200 const RDW_NOFRAME         = 2048;
1201 
1202 const SMTO_NORMAL      = 0;
1203 const SMTO_BLOCK       = 1;
1204 const SMTO_ABORTIFHUNG = 2;
1205 
1206 const SIF_ALL = 23;
1207 const SIF_PAGE = 2;
1208 const SIF_POS = 4;
1209 const SIF_RANGE = 1;
1210 const SIF_DISABLENOSCROLL = 8;
1211 const SIF_TRACKPOS = 16;
1212 
1213 const SWP_DRAWFRAME = 32;
1214 const SWP_FRAMECHANGED = 32;
1215 const SWP_HIDEWINDOW = 128;
1216 const SWP_NOACTIVATE = 16;
1217 const SWP_NOCOPYBITS = 256;
1218 const SWP_NOMOVE = 2;
1219 const SWP_NOSIZE = 1;
1220 const SWP_NOREDRAW = 8;
1221 const SWP_NOZORDER = 4;
1222 const SWP_SHOWWINDOW = 64;
1223 const SWP_NOOWNERZORDER = 512;
1224 const SWP_NOREPOSITION = 512;
1225 const SWP_NOSENDCHANGING = 1024;
1226 const SWP_DEFERERASE = 8192;
1227 const SWP_ASYNCWINDOWPOS = 16384;
1228 
1229 const HSHELL_ACTIVATESHELLWINDOW = 3;
1230 const HSHELL_GETMINRECT = 5;
1231 const HSHELL_LANGUAGE = 8;
1232 const HSHELL_REDRAW = 6;
1233 const HSHELL_TASKMAN = 7;
1234 const HSHELL_WINDOWACTIVATED = 4;
1235 const HSHELL_WINDOWCREATED = 1;
1236 const HSHELL_WINDOWDESTROYED = 2;
1237 const HSHELL_FLASH = 32774;
1238 
1239 static if (WINVER >= 0x500) {
1240 const SPI_SETFOREGROUNDLOCKTIMEOUT=0x2001;
1241 const SPI_GETFOREGROUNDLOCKTIMEOUT=0x2000;
1242 }
1243 
1244 const SPI_GETACCESSTIMEOUT=60;
1245 const SPI_GETACTIVEWNDTRKTIMEOUT=8194;
1246 const SPI_GETANIMATION=72;
1247 const SPI_GETBEEP=1;
1248 const SPI_GETBORDER=5;
1249 const SPI_GETDEFAULTINPUTLANG=89;
1250 const SPI_GETDRAGFULLWINDOWS=38;
1251 const SPI_GETFASTTASKSWITCH=35;
1252 const SPI_GETFILTERKEYS=50;
1253 const SPI_GETFONTSMOOTHING=74;
1254 const SPI_GETGRIDGRANULARITY=18;
1255 const SPI_GETHIGHCONTRAST=66;
1256 const SPI_GETICONMETRICS=45;
1257 const SPI_GETICONTITLELOGFONT=31;
1258 const SPI_GETICONTITLEWRAP=25;
1259 const SPI_GETKEYBOARDDELAY=22;
1260 const SPI_GETKEYBOARDPREF=68;
1261 const SPI_GETKEYBOARDSPEED=10;
1262 const SPI_GETLOWPOWERACTIVE=83;
1263 const SPI_GETLOWPOWERTIMEOUT=79;
1264 const SPI_GETMENUDROPALIGNMENT=27;
1265 const SPI_GETMINIMIZEDMETRICS=43;
1266 const SPI_GETMOUSE=3;
1267 const SPI_GETMOUSEKEYS=54;
1268 const SPI_GETMOUSETRAILS=94;
1269 const SPI_GETNONCLIENTMETRICS=41;
1270 const SPI_GETPOWEROFFACTIVE=84;
1271 const SPI_GETPOWEROFFTIMEOUT=80;
1272 const SPI_GETSCREENREADER=70;
1273 const SPI_GETSCREENSAVEACTIVE=16;
1274 const SPI_GETSCREENSAVETIMEOUT=14;
1275 const SPI_GETSERIALKEYS=62;
1276 const SPI_GETSHOWSOUNDS=56;
1277 const SPI_GETSOUNDSENTRY=64;
1278 const SPI_GETSTICKYKEYS=58;
1279 const SPI_GETTOGGLEKEYS=52;
1280 const SPI_GETWHEELSCROLLLINES=104;
1281 const SPI_GETWINDOWSEXTENSION=92;
1282 const SPI_GETWORKAREA=48;
1283 const SPI_ICONHORIZONTALSPACING=13;
1284 const SPI_ICONVERTICALSPACING=24;
1285 const SPI_LANGDRIVER=12;
1286 const SPI_SCREENSAVERRUNNING=97;
1287 const SPI_SETACCESSTIMEOUT=61;
1288 const SPI_SETACTIVEWNDTRKTIMEOUT=8195;
1289 const SPI_SETANIMATION=73;
1290 const SPI_SETBEEP=2;
1291 const SPI_SETBORDER=6;
1292 const SPI_SETDEFAULTINPUTLANG=90;
1293 const SPI_SETDESKPATTERN=21;
1294 const SPI_SETDESKWALLPAPER=20;
1295 const SPI_SETDOUBLECLICKTIME=32;
1296 const SPI_SETDOUBLECLKHEIGHT=30;
1297 const SPI_SETDOUBLECLKWIDTH=29;
1298 const SPI_SETDRAGFULLWINDOWS=37;
1299 const SPI_SETDRAGHEIGHT=77;
1300 const SPI_SETDRAGWIDTH=76;
1301 const SPI_SETFASTTASKSWITCH=36;
1302 const SPI_SETFILTERKEYS=51;
1303 const SPI_SETFONTSMOOTHING=75;
1304 const SPI_SETGRIDGRANULARITY=19;
1305 const SPI_SETHANDHELD=78;
1306 const SPI_SETHIGHCONTRAST=67;
1307 const SPI_SETICONMETRICS=46;
1308 const SPI_SETICONTITLELOGFONT=34;
1309 const SPI_SETICONTITLEWRAP=26;
1310 const SPI_SETKEYBOARDDELAY=23;
1311 const SPI_SETKEYBOARDPREF=69;
1312 const SPI_SETKEYBOARDSPEED=11;
1313 const SPI_SETLANGTOGGLE=91;
1314 const SPI_SETLOWPOWERACTIVE=85;
1315 const SPI_SETLOWPOWERTIMEOUT=81;
1316 const SPI_SETMENUDROPALIGNMENT=28;
1317 const SPI_SETMINIMIZEDMETRICS=44;
1318 const SPI_SETMOUSE=4;
1319 const SPI_SETMOUSEBUTTONSWAP=33;
1320 const SPI_SETMOUSEKEYS=55;
1321 const SPI_SETMOUSETRAILS=93;
1322 const SPI_SETNONCLIENTMETRICS=42;
1323 const SPI_SETPENWINDOWS=49;
1324 const SPI_SETPOWEROFFACTIVE=86;
1325 const SPI_SETPOWEROFFTIMEOUT=82;
1326 const SPI_SETSCREENREADER=71;
1327 const SPI_SETSCREENSAVEACTIVE=17;
1328 const SPI_SETSCREENSAVERRUNNING=97;
1329 const SPI_SETSCREENSAVETIMEOUT=15;
1330 const SPI_SETSERIALKEYS=63;
1331 const SPI_SETSHOWSOUNDS=57;
1332 const SPI_SETSOUNDSENTRY=65;
1333 const SPI_SETSTICKYKEYS=59;
1334 const SPI_SETTOGGLEKEYS=53;
1335 const SPI_SETWHEELSCROLLLINES=105;
1336 const SPI_SETWORKAREA=47;
1337 
1338 static if (WINVER >= 0x500) {
1339 const SPI_GETDESKWALLPAPER=115;
1340 const SPI_GETMOUSESPEED=112;
1341 const SPI_GETSCREENSAVERRUNNING=114;
1342 const SPI_GETACTIVEWINDOWTRACKING=0x1000;
1343 const SPI_GETACTIVEWNDTRKZORDER=0x100C;
1344 const SPI_GETCOMBOBOXANIMATION=0x1004;
1345 const SPI_GETCURSORSHADOW=0x101A;
1346 const SPI_GETGRADIENTCAPTIONS=0x1008;
1347 const SPI_GETHOTTRACKING=0x100E;
1348 const SPI_GETKEYBOARDCUES=0x100A;
1349 const SPI_GETLISTBOXSMOOTHSCROLLING=0x1006;
1350 const SPI_GETMENUANIMATION=0x1002;
1351 const SPI_GETMENUFADE=0x1012;
1352 const SPI_GETMENUUNDERLINES=0x100A;
1353 const SPI_GETSELECTIONFADE=0x1014;
1354 const SPI_GETTOOLTIPANIMATION=0x1016;
1355 const SPI_GETTOOLTIPFADE=0x1018;
1356 const SPI_SETACTIVEWINDOWTRACKING=0x1001;
1357 const SPI_SETACTIVEWNDTRKZORDER=0x100D;
1358 const SPI_SETCOMBOBOXANIMATION=0x1005;
1359 const SPI_SETCURSORSHADOW=0x101B;
1360 const SPI_SETGRADIENTCAPTIONS=0x1009;
1361 const SPI_SETHOTTRACKING=0x100F;
1362 const SPI_SETKEYBOARDCUES=0x100B;
1363 const SPI_SETLISTBOXSMOOTHSCROLLING=0x1007;
1364 const SPI_SETMENUANIMATION=0x1003;
1365 const SPI_SETMENUFADE=0x1013;
1366 const SPI_SETMENUUNDERLINES=0x100B;
1367 const SPI_SETMOUSESPEED=113;
1368 const SPI_SETSELECTIONFADE=0x1015;
1369 const SPI_SETTOOLTIPANIMATION=0x1017;
1370 const SPI_SETTOOLTIPFADE=0x1019;
1371 }
1372 
1373 const SPIF_UPDATEINIFILE=1;
1374 const SPIF_SENDWININICHANGE=2;
1375 const SPIF_SENDCHANGE=2;
1376 // [Redefined] ATF_ONOFFFEEDBACK=2
1377 // [Redefined] ATF_TIMEOUTON=1
1378 const WM_APP=32768;
1379 const WM_ACTIVATE=6;
1380 const WM_ACTIVATEAPP=28;
1381 // FIXME/CHECK: Are WM_AFX {FIRST, LAST} valid for WINVER < 0x400?
1382 const WM_AFXFIRST=864;
1383 const WM_AFXLAST=895;
1384 const WM_ASKCBFORMATNAME=780;
1385 const WM_CANCELJOURNAL=75;
1386 const WM_CANCELMODE=31;
1387 const WM_CAPTURECHANGED=533;
1388 const WM_CHANGECBCHAIN=781;
1389 const WM_CHAR=258;
1390 const WM_CHARTOITEM=47;
1391 const WM_CHILDACTIVATE=34;
1392 const WM_CLEAR=771;
1393 const WM_CLOSE=16;
1394 const WM_COMMAND=273;
1395 const WM_COMMNOTIFY=68; // obsolete
1396 const WM_COMPACTING=65;
1397 const WM_COMPAREITEM=57;
1398 const WM_CONTEXTMENU=123;
1399 const WM_COPY=769;
1400 const WM_COPYDATA=74;
1401 const WM_CREATE=1;
1402 const WM_CTLCOLORBTN=309;
1403 const WM_CTLCOLORDLG=310;
1404 const WM_CTLCOLOREDIT=307;
1405 const WM_CTLCOLORLISTBOX=308;
1406 const WM_CTLCOLORMSGBOX=306;
1407 const WM_CTLCOLORSCROLLBAR=311;
1408 const WM_CTLCOLORSTATIC=312;
1409 const WM_CUT=768;
1410 const WM_DEADCHAR=259;
1411 const WM_DELETEITEM=45;
1412 const WM_DESTROY=2;
1413 const WM_DESTROYCLIPBOARD=775;
1414 const WM_DEVICECHANGE=537;
1415 const WM_DEVMODECHANGE=27;
1416 const WM_DISPLAYCHANGE=126;
1417 const WM_DRAWCLIPBOARD=776;
1418 const WM_DRAWITEM=43;
1419 const WM_DROPFILES=563;
1420 const WM_ENABLE=10;
1421 const WM_ENDSESSION=22;
1422 const WM_ENTERIDLE=289;
1423 const WM_ENTERMENULOOP=529;
1424 const WM_ENTERSIZEMOVE=561;
1425 const WM_ERASEBKGND=20;
1426 const WM_EXITMENULOOP=530;
1427 const WM_EXITSIZEMOVE=562;
1428 const WM_FONTCHANGE=29;
1429 const WM_GETDLGCODE=135;
1430 const WM_GETFONT=49;
1431 const WM_GETHOTKEY=51;
1432 const WM_GETICON=127;
1433 const WM_GETMINMAXINFO=36;
1434 const WM_GETTEXT=13;
1435 const WM_GETTEXTLENGTH=14;
1436 const WM_HANDHELDFIRST=856;
1437 const WM_HANDHELDLAST=863;
1438 const WM_HELP=83;
1439 const WM_HOTKEY=786;
1440 const WM_HSCROLL=276;
1441 const WM_HSCROLLCLIPBOARD=782;
1442 const WM_ICONERASEBKGND=39;
1443 const WM_INITDIALOG=272;
1444 const WM_INITMENU=278;
1445 const WM_INITMENUPOPUP=279;
1446 const WM_INPUTLANGCHANGE=81;
1447 const WM_INPUTLANGCHANGEREQUEST=80;
1448 const WM_KEYDOWN=256;
1449 const WM_KEYUP=257;
1450 const WM_KILLFOCUS=8;
1451 const WM_MDIACTIVATE=546;
1452 const WM_MDICASCADE=551;
1453 const WM_MDICREATE=544;
1454 const WM_MDIDESTROY=545;
1455 const WM_MDIGETACTIVE=553;
1456 const WM_MDIICONARRANGE=552;
1457 const WM_MDIMAXIMIZE=549;
1458 const WM_MDINEXT=548;
1459 const WM_MDIREFRESHMENU=564;
1460 const WM_MDIRESTORE=547;
1461 const WM_MDISETMENU=560;
1462 const WM_MDITILE=550;
1463 const WM_MEASUREITEM=44;
1464 static if (WINVER >= 0x500) {
1465 const WM_UNINITMENUPOPUP=0x0125;
1466 const WM_MENURBUTTONUP=290;
1467 const WM_MENUCOMMAND=0x0126;
1468 const WM_MENUGETOBJECT=0x0124;
1469 const WM_MENUDRAG=0x0123;
1470 }
1471 
1472 static if (_WIN32_WINNT >= 0x500) {
1473 
1474 	enum {
1475 		WM_CHANGEUISTATE	=	0x0127,
1476 		WM_UPDATEUISTATE	=	0x0128,
1477 		WM_QUERYUISTATE		=	0x0129
1478 	}
1479 
1480 	// LOWORD(wParam) values in WM_*UISTATE*
1481 	enum {
1482 		UIS_SET			=	1,
1483 		UIS_CLEAR		=	2,
1484 		UIS_INITIALIZE	=	3
1485 	}
1486 
1487 	// HIWORD(wParam) values in WM_*UISTATE*
1488 	enum {
1489 		UISF_HIDEFOCUS	=	0x1,
1490 		UISF_HIDEACCEL	=	0x2
1491 	}
1492 
1493 }
1494 
1495 static if (_WIN32_WINNT >= 0x501) {
1496 
1497 	// HIWORD(wParam) values in WM_*UISTATE*
1498 	enum {
1499 		UISF_ACTIVE		=	0x4
1500 	}
1501 
1502 }
1503 
1504 const WM_MENUCHAR=288;
1505 const WM_MENUSELECT=287;
1506 const WM_MOVE=3;
1507 const WM_MOVING=534;
1508 const WM_NCACTIVATE=134;
1509 const WM_NCCALCSIZE=131;
1510 const WM_NCCREATE=129;
1511 const WM_NCDESTROY=130;
1512 const WM_NCHITTEST=132;
1513 const WM_NCLBUTTONDBLCLK=163;
1514 const WM_NCLBUTTONDOWN=161;
1515 const WM_NCLBUTTONUP=162;
1516 const WM_NCMBUTTONDBLCLK=169;
1517 const WM_NCMBUTTONDOWN=167;
1518 const WM_NCMBUTTONUP=168;
1519 static if (_WIN32_WINNT >= 0x500) {
1520 const WM_NCXBUTTONDOWN=171;
1521 const WM_NCXBUTTONUP=172;
1522 const WM_NCXBUTTONDBLCLK=173;
1523 const WM_NCMOUSEHOVER=0x02A0;
1524 const WM_NCMOUSELEAVE=0x02A2;
1525 }
1526 const WM_NCMOUSEMOVE=160;
1527 const WM_NCPAINT=133;
1528 const WM_NCRBUTTONDBLCLK=166;
1529 const WM_NCRBUTTONDOWN=164;
1530 const WM_NCRBUTTONUP=165;
1531 const WM_NEXTDLGCTL=40;
1532 const WM_NEXTMENU=531;
1533 const WM_NOTIFY=78;
1534 const WM_NOTIFYFORMAT=85;
1535 const WM_NULL=0;
1536 const WM_PAINT=15;
1537 const WM_PAINTCLIPBOARD=777;
1538 const WM_PAINTICON=38;
1539 const WM_PALETTECHANGED=785;
1540 const WM_PALETTEISCHANGING=784;
1541 const WM_PARENTNOTIFY=528;
1542 const WM_PASTE=770;
1543 const WM_PENWINFIRST=896;
1544 const WM_PENWINLAST=911;
1545 const WM_POWER=72;
1546 const WM_POWERBROADCAST=536;
1547 const WM_PRINT=791;
1548 const WM_PRINTCLIENT=792;
1549 const WM_APPCOMMAND = 0x0319;
1550 const WM_QUERYDRAGICON=55;
1551 const WM_QUERYENDSESSION=17;
1552 const WM_QUERYNEWPALETTE=783;
1553 const WM_QUERYOPEN=19;
1554 const WM_QUEUESYNC=35;
1555 const WM_QUIT=18;
1556 const WM_RENDERALLFORMATS=774;
1557 const WM_RENDERFORMAT=773;
1558 const WM_SETCURSOR=32;
1559 const WM_SETFOCUS=7;
1560 const WM_SETFONT=48;
1561 const WM_SETHOTKEY=50;
1562 const WM_SETICON=128;
1563 const WM_SETREDRAW=11;
1564 const WM_SETTEXT=12;
1565 const WM_SETTINGCHANGE=26;
1566 const WM_SHOWWINDOW=24;
1567 const WM_SIZE=5;
1568 const WM_SIZECLIPBOARD=779;
1569 const WM_SIZING=532;
1570 const WM_SPOOLERSTATUS=42;
1571 const WM_STYLECHANGED=125;
1572 const WM_STYLECHANGING=124;
1573 const WM_SYSCHAR=262;
1574 const WM_SYSCOLORCHANGE=21;
1575 const WM_SYSCOMMAND=274;
1576 const WM_SYSDEADCHAR=263;
1577 const WM_SYSKEYDOWN=260;
1578 const WM_SYSKEYUP=261;
1579 const WM_TCARD=82;
1580 const WM_THEMECHANGED=794;
1581 const WM_TIMECHANGE=30;
1582 const WM_TIMER=275;
1583 const WM_UNDO=772;
1584 const WM_USER=1024;
1585 const WM_USERCHANGED=84;
1586 const WM_VKEYTOITEM=46;
1587 const WM_VSCROLL=277;
1588 const WM_VSCROLLCLIPBOARD=778;
1589 const WM_WINDOWPOSCHANGED=71;
1590 const WM_WINDOWPOSCHANGING=70;
1591 const WM_WININICHANGE=26;
1592 const WM_INPUT=255;
1593 const WM_KEYFIRST=256;
1594 const WM_KEYLAST=264;
1595 const WM_SYNCPAINT=136;
1596 const WM_MOUSEACTIVATE=33;
1597 const WM_MOUSEMOVE=512;
1598 const WM_LBUTTONDOWN=513;
1599 const WM_LBUTTONUP=514;
1600 const WM_LBUTTONDBLCLK=515;
1601 const WM_RBUTTONDOWN=516;
1602 const WM_RBUTTONUP=517;
1603 const WM_RBUTTONDBLCLK=518;
1604 const WM_MBUTTONDOWN=519;
1605 const WM_MBUTTONUP=520;
1606 const WM_MBUTTONDBLCLK=521;
1607 const WM_MOUSEWHEEL=522;
1608 const WM_MOUSEFIRST=512;
1609 static if (_WIN32_WINNT >= 0x500) {
1610 const WM_XBUTTONDOWN=523;
1611 const WM_XBUTTONUP=524;
1612 const WM_XBUTTONDBLCLK=525;
1613 const WM_MOUSELAST=525;
1614 } else {
1615 const WM_MOUSELAST=522;
1616 }
1617 const WM_MOUSEHOVER=0x2A1;
1618 const WM_MOUSELEAVE=0x2A3;
1619 static if (_WIN32_WINNT >= 0x400) {
1620 const WHEEL_DELTA=120;
1621 
1622 SHORT GET_WHEEL_DELTA_WPARAM(WPARAM wparam)
1623 {
1624 return cast(SHORT) HIWORD(wparam);
1625 }
1626 
1627 const WHEEL_PAGESCROLL = uint.max;
1628 }
1629 const BM_CLICK=245;
1630 const BM_GETCHECK=240;
1631 const BM_GETIMAGE=246;
1632 const BM_GETSTATE=242;
1633 const BM_SETCHECK=241;
1634 const BM_SETIMAGE=247;
1635 const BM_SETSTATE=243;
1636 const BM_SETSTYLE=244;
1637 const BN_CLICKED=0;
1638 const BN_DBLCLK=5;
1639 const BN_DISABLE=4;
1640 const BN_DOUBLECLICKED=5;
1641 const BN_HILITE=2;
1642 const BN_KILLFOCUS=7;
1643 const BN_PAINT=1;
1644 const BN_PUSHED=2;
1645 const BN_SETFOCUS=6;
1646 const BN_UNHILITE=3;
1647 const BN_UNPUSHED=3;
1648 const CB_ADDSTRING=323;
1649 const CB_DELETESTRING=324;
1650 const CB_DIR=325;
1651 const CB_FINDSTRING=332;
1652 const CB_FINDSTRINGEXACT=344;
1653 const CB_GETCOUNT=326;
1654 const CB_GETCURSEL=327;
1655 const CB_GETDROPPEDCONTROLRECT=338;
1656 const CB_GETDROPPEDSTATE=343;
1657 const CB_GETDROPPEDWIDTH=351;
1658 const CB_GETEDITSEL=320;
1659 const CB_GETEXTENDEDUI=342;
1660 const CB_GETHORIZONTALEXTENT=349;
1661 const CB_GETITEMDATA=336;
1662 const CB_GETITEMHEIGHT=340;
1663 const CB_GETLBTEXT=328;
1664 const CB_GETLBTEXTLEN=329;
1665 const CB_GETLOCALE=346;
1666 const CB_GETTOPINDEX=347;
1667 const CB_INITSTORAGE=353;
1668 const CB_INSERTSTRING=330;
1669 const CB_LIMITTEXT=321;
1670 const CB_RESETCONTENT=331;
1671 const CB_SELECTSTRING=333;
1672 const CB_SETCURSEL=334;
1673 const CB_SETDROPPEDWIDTH=352;
1674 const CB_SETEDITSEL=322;
1675 const CB_SETEXTENDEDUI=341;
1676 const CB_SETHORIZONTALEXTENT=350;
1677 const CB_SETITEMDATA=337;
1678 const CB_SETITEMHEIGHT=339;
1679 const CB_SETLOCALE=345;
1680 const CB_SETTOPINDEX=348;
1681 const CB_SHOWDROPDOWN=335;
1682 
1683 const CBN_CLOSEUP=8;
1684 const CBN_DBLCLK=2;
1685 const CBN_DROPDOWN=7;
1686 const CBN_EDITCHANGE=5;
1687 const CBN_EDITUPDATE=6;
1688 const CBN_ERRSPACE=(-1);
1689 const CBN_KILLFOCUS=4;
1690 const CBN_SELCHANGE=1;
1691 const CBN_SELENDCANCEL=10;
1692 const CBN_SELENDOK=9;
1693 const CBN_SETFOCUS=3;
1694 
1695 const EM_CANUNDO=198;
1696 const EM_CHARFROMPOS=215;
1697 const EM_EMPTYUNDOBUFFER=205;
1698 const EM_FMTLINES=200;
1699 const EM_GETFIRSTVISIBLELINE=206;
1700 const EM_GETHANDLE=189;
1701 const EM_GETLIMITTEXT=213;
1702 const EM_GETLINE=196;
1703 const EM_GETLINECOUNT=186;
1704 const EM_GETMARGINS=212;
1705 const EM_GETMODIFY=184;
1706 const EM_GETPASSWORDCHAR=210;
1707 const EM_GETRECT=178;
1708 const EM_GETSEL=176;
1709 const EM_GETTHUMB=190;
1710 const EM_GETWORDBREAKPROC=209;
1711 const EM_LIMITTEXT=197;
1712 const EM_LINEFROMCHAR=201;
1713 const EM_LINEINDEX=187;
1714 const EM_LINELENGTH=193;
1715 const EM_LINESCROLL=182;
1716 const EM_POSFROMCHAR=214;
1717 const EM_REPLACESEL=194;
1718 const EM_SCROLL=181;
1719 const EM_SCROLLCARET=183;
1720 const EM_SETHANDLE=188;
1721 const EM_SETLIMITTEXT=197;
1722 const EM_SETMARGINS=211;
1723 const EM_SETMODIFY=185;
1724 const EM_SETPASSWORDCHAR=204;
1725 const EM_SETREADONLY=207;
1726 const EM_SETRECT=179;
1727 const EM_SETRECTNP=180;
1728 const EM_SETSEL=177;
1729 const EM_SETTABSTOPS=203;
1730 const EM_SETWORDBREAKPROC=208;
1731 const EM_UNDO=199;
1732 
1733 const EN_CHANGE=768;
1734 const EN_ERRSPACE=1280;
1735 const EN_HSCROLL=1537;
1736 const EN_KILLFOCUS=512;
1737 const EN_MAXTEXT=1281;
1738 const EN_SETFOCUS=256;
1739 const EN_UPDATE=1024;
1740 const EN_VSCROLL=1538;
1741 
1742 const LB_ADDFILE=406;
1743 const LB_ADDSTRING=384;
1744 const LB_DELETESTRING=386;
1745 const LB_DIR=397;
1746 const LB_FINDSTRING=399;
1747 const LB_FINDSTRINGEXACT=418;
1748 const LB_GETANCHORINDEX=413;
1749 const LB_GETCARETINDEX=415;
1750 const LB_GETCOUNT=395;
1751 const LB_GETCURSEL=392;
1752 const LB_GETHORIZONTALEXTENT=403;
1753 const LB_GETITEMDATA=409;
1754 const LB_GETITEMHEIGHT=417;
1755 const LB_GETITEMRECT=408;
1756 const LB_GETLOCALE=422;
1757 const LB_GETSEL=391;
1758 const LB_GETSELCOUNT=400;
1759 const LB_GETSELITEMS=401;
1760 const LB_GETTEXT=393;
1761 const LB_GETTEXTLEN=394;
1762 const LB_GETTOPINDEX=398;
1763 const LB_INITSTORAGE=424;
1764 const LB_INSERTSTRING=385;
1765 const LB_ITEMFROMPOINT=425;
1766 const LB_RESETCONTENT=388;
1767 const LB_SELECTSTRING=396;
1768 const LB_SELITEMRANGE=411;
1769 const LB_SELITEMRANGEEX=387;
1770 const LB_SETANCHORINDEX=412;
1771 const LB_SETCARETINDEX=414;
1772 const LB_SETCOLUMNWIDTH=405;
1773 const LB_SETCOUNT=423;
1774 const LB_SETCURSEL=390;
1775 const LB_SETHORIZONTALEXTENT=404;
1776 const LB_SETITEMDATA=410;
1777 const LB_SETITEMHEIGHT=416;
1778 const LB_SETLOCALE=421;
1779 const LB_SETSEL=389;
1780 const LB_SETTABSTOPS=402;
1781 const LB_SETTOPINDEX=407;
1782 
1783 const LBN_DBLCLK=2;
1784 const LBN_ERRSPACE=-2;
1785 const LBN_KILLFOCUS=5;
1786 const LBN_SELCANCEL=3;
1787 const LBN_SELCHANGE=1;
1788 const LBN_SETFOCUS=4;
1789 
1790 const SBM_ENABLE_ARROWS=228;
1791 const SBM_GETPOS=225;
1792 const SBM_GETRANGE=227;
1793 const SBM_GETSCROLLINFO=234;
1794 const SBM_SETPOS=224;
1795 const SBM_SETRANGE=226;
1796 const SBM_SETRANGEREDRAW=230;
1797 const SBM_SETSCROLLINFO=233;
1798 const STM_GETICON=369;
1799 const STM_GETIMAGE=371;
1800 const STM_SETICON=368;
1801 const STM_SETIMAGE=370;
1802 const STN_CLICKED=0;
1803 const STN_DBLCLK=1;
1804 const STN_DISABLE=3;
1805 const STN_ENABLE=2;
1806 
1807 const DM_GETDEFID   = WM_USER;
1808 const DM_SETDEFID   = WM_USER+1;
1809 const DM_REPOSITION = WM_USER+2;
1810 
1811 const PSM_PAGEINFO  = WM_USER+100;
1812 const PSM_SHEETINFO = WM_USER+101;
1813 
1814 const PSI_SETACTIVE=1;
1815 const PSI_KILLACTIVE=2;
1816 const PSI_APPLY=3;
1817 const PSI_RESET=4;
1818 const PSI_HASHELP=5;
1819 const PSI_HELP=6;
1820 const PSI_CHANGED=1;
1821 const PSI_GUISTART=2;
1822 const PSI_REBOOT=3;
1823 const PSI_GETSIBLINGS=4;
1824 
1825 const DCX_WINDOW=1;
1826 const DCX_CACHE=2;
1827 const DCX_PARENTCLIP=32;
1828 const DCX_CLIPSIBLINGS=16;
1829 const DCX_CLIPCHILDREN=8;
1830 const DCX_NORESETATTRS=4;
1831 const DCX_INTERSECTUPDATE=0x200;
1832 const DCX_LOCKWINDOWUPDATE=0x400;
1833 const DCX_EXCLUDERGN=64;
1834 const DCX_INTERSECTRGN=128;
1835 const DCX_VALIDATE=0x200000;
1836 
1837 const GMDI_GOINTOPOPUPS=2;
1838 const GMDI_USEDISABLED=1;
1839 const FKF_AVAILABLE=2;
1840 const FKF_CLICKON=64;
1841 const FKF_FILTERKEYSON=1;
1842 const FKF_HOTKEYACTIVE=4;
1843 const FKF_HOTKEYSOUND=16;
1844 const FKF_CONFIRMHOTKEY=8;
1845 const FKF_INDICATOR=32;
1846 const HCF_HIGHCONTRASTON=1;
1847 const HCF_AVAILABLE=2;
1848 const HCF_HOTKEYACTIVE=4;
1849 const HCF_CONFIRMHOTKEY=8;
1850 const HCF_HOTKEYSOUND=16;
1851 const HCF_INDICATOR=32;
1852 const HCF_HOTKEYAVAILABLE=64;
1853 const MKF_AVAILABLE=2;
1854 const MKF_CONFIRMHOTKEY=8;
1855 const MKF_HOTKEYACTIVE=4;
1856 const MKF_HOTKEYSOUND=16;
1857 const MKF_INDICATOR=32;
1858 const MKF_MOUSEKEYSON=1;
1859 const MKF_MODIFIERS=64;
1860 const MKF_REPLACENUMBERS=128;
1861 const SERKF_ACTIVE=8;  // May be obsolete. Not in recent MS docs.
1862 const SERKF_AVAILABLE=2;
1863 const SERKF_INDICATOR=4;
1864 const SERKF_SERIALKEYSON=1;
1865 const SSF_AVAILABLE=2;
1866 const SSF_SOUNDSENTRYON=1;
1867 const SSTF_BORDER=2;
1868 const SSTF_CHARS=1;
1869 const SSTF_DISPLAY=3;
1870 const SSTF_NONE=0;
1871 const SSGF_DISPLAY=3;
1872 const SSGF_NONE=0;
1873 const SSWF_CUSTOM=4;
1874 const SSWF_DISPLAY=3;
1875 const SSWF_NONE=0;
1876 const SSWF_TITLE=1;
1877 const SSWF_WINDOW=2;
1878 const SKF_AUDIBLEFEEDBACK=64;
1879 const SKF_AVAILABLE=2;
1880 const SKF_CONFIRMHOTKEY=8;
1881 const SKF_HOTKEYACTIVE=4;
1882 const SKF_HOTKEYSOUND=16;
1883 const SKF_INDICATOR=32;
1884 const SKF_STICKYKEYSON=1;
1885 const SKF_TRISTATE=128;
1886 const SKF_TWOKEYSOFF=256;
1887 const TKF_AVAILABLE=2;
1888 const TKF_CONFIRMHOTKEY=8;
1889 const TKF_HOTKEYACTIVE=4;
1890 const TKF_HOTKEYSOUND=16;
1891 const TKF_TOGGLEKEYSON=1;
1892 const MDITILE_SKIPDISABLED=2;
1893 const MDITILE_HORIZONTAL=1;
1894 const MDITILE_VERTICAL=0;
1895 
1896 enum {
1897 	VK_LBUTTON = 0x01,
1898 	VK_RBUTTON = 0x02,
1899 	VK_CANCEL = 0x03,
1900 	VK_MBUTTON = 0x04,
1901 	//static if (_WIN32_WINNT > =  0x500) {
1902 	VK_XBUTTON1 = 0x05,
1903 	VK_XBUTTON2 = 0x06,
1904 	//}
1905 	VK_BACK = 0x08,
1906 	VK_TAB = 0x09,
1907 	VK_CLEAR = 0x0C,
1908 	VK_RETURN = 0x0D,
1909 	VK_SHIFT = 0x10,
1910 	VK_CONTROL = 0x11,
1911 	VK_MENU = 0x12,
1912 	VK_PAUSE = 0x13,
1913 	VK_CAPITAL = 0x14,
1914 	VK_KANA = 0x15,
1915 	VK_HANGEUL = 0x15,
1916 	VK_HANGUL = 0x15,
1917 	VK_JUNJA = 0x17,
1918 	VK_FINAL = 0x18,
1919 	VK_HANJA = 0x19,
1920 	VK_KANJI = 0x19,
1921 	VK_ESCAPE = 0x1B,
1922 	VK_CONVERT = 0x1C,
1923 	VK_NONCONVERT = 0x1D,
1924 	VK_ACCEPT = 0x1E,
1925 	VK_MODECHANGE = 0x1F,
1926 	VK_SPACE = 0x20,
1927 	VK_PRIOR = 0x21,
1928 	VK_NEXT = 0x22,
1929 	VK_END = 0x23,
1930 	VK_HOME = 0x24,
1931 	VK_LEFT = 0x25,
1932 	VK_UP = 0x26,
1933 	VK_RIGHT = 0x27,
1934 	VK_DOWN = 0x28,
1935 	VK_SELECT = 0x29,
1936 	VK_PRINT = 0x2A,
1937 	VK_EXECUTE = 0x2B,
1938 	VK_SNAPSHOT = 0x2C,
1939 	VK_INSERT = 0x2D,
1940 	VK_DELETE = 0x2E,
1941 	VK_HELP = 0x2F,
1942 	VK_LWIN = 0x5B,
1943 	VK_RWIN = 0x5C,
1944 	VK_APPS = 0x5D,
1945 	VK_SLEEP = 0x5F,
1946 	VK_NUMPAD0 = 0x60,
1947 	VK_NUMPAD1 = 0x61,
1948 	VK_NUMPAD2 = 0x62,
1949 	VK_NUMPAD3 = 0x63,
1950 	VK_NUMPAD4 = 0x64,
1951 	VK_NUMPAD5 = 0x65,
1952 	VK_NUMPAD6 = 0x66,
1953 	VK_NUMPAD7 = 0x67,
1954 	VK_NUMPAD8 = 0x68,
1955 	VK_NUMPAD9 = 0x69,
1956 	VK_MULTIPLY = 0x6A,
1957 	VK_ADD = 0x6B,
1958 	VK_SEPARATOR = 0x6C,
1959 	VK_SUBTRACT = 0x6D,
1960 	VK_DECIMAL = 0x6E,
1961 	VK_DIVIDE = 0x6F,
1962 	VK_F1 = 0x70,
1963 	VK_F2 = 0x71,
1964 	VK_F3 = 0x72,
1965 	VK_F4 = 0x73,
1966 	VK_F5 = 0x74,
1967 	VK_F6 = 0x75,
1968 	VK_F7 = 0x76,
1969 	VK_F8 = 0x77,
1970 	VK_F9 = 0x78,
1971 	VK_F10 = 0x79,
1972 	VK_F11 = 0x7A,
1973 	VK_F12 = 0x7B,
1974 	VK_F13 = 0x7C,
1975 	VK_F14 = 0x7D,
1976 	VK_F15 = 0x7E,
1977 	VK_F16 = 0x7F,
1978 	VK_F17 = 0x80,
1979 	VK_F18 = 0x81,
1980 	VK_F19 = 0x82,
1981 	VK_F20 = 0x83,
1982 	VK_F21 = 0x84,
1983 	VK_F22 = 0x85,
1984 	VK_F23 = 0x86,
1985 	VK_F24 = 0x87,
1986 	VK_NUMLOCK = 0x90,
1987 	VK_SCROLL = 0x91,
1988 	VK_LSHIFT = 0xA0,
1989 	VK_RSHIFT = 0xA1,
1990 	VK_LCONTROL = 0xA2,
1991 	VK_RCONTROL = 0xA3,
1992 	VK_LMENU = 0xA4,
1993 	VK_RMENU = 0xA5,
1994 	//static if (_WIN32_WINNT > =  0x500) {
1995 	VK_BROWSER_BACK = 0xA6,
1996 	VK_BROWSER_FORWARD = 0xA7,
1997 	VK_BROWSER_REFRESH = 0xA8,
1998 	VK_BROWSER_STOP = 0xA9,
1999 	VK_BROWSER_SEARCH = 0xAA,
2000 	VK_BROWSER_FAVORITES = 0xAB,
2001 	VK_BROWSER_HOME = 0xAC,
2002 	VK_VOLUME_MUTE = 0xAD,
2003 	VK_VOLUME_DOWN = 0xAE,
2004 	VK_VOLUME_UP = 0xAF,
2005 	VK_MEDIA_NEXT_TRACK = 0xB0,
2006 	VK_MEDIA_PREV_TRACK = 0xB1,
2007 	VK_MEDIA_STOP = 0xB2,
2008 	VK_MEDIA_PLAY_PAUSE = 0xB3,
2009 	VK_LAUNCH_MAIL = 0xB4,
2010 	VK_LAUNCH_MEDIA_SELECT = 0xB5,
2011 	VK_LAUNCH_APP1 = 0xB6,
2012 	VK_LAUNCH_APP2 = 0xB7,
2013 	//}
2014 	VK_OEM_1 = 0xBA,
2015 	//static if (_WIN32_WINNT > =  0x500) {
2016 	VK_OEM_PLUS = 0xBB,
2017 	VK_OEM_COMMA = 0xBC,
2018 	VK_OEM_MINUS = 0xBD,
2019 	VK_OEM_PERIOD = 0xBE,
2020 	//}
2021 	VK_OEM_2 = 0xBF,
2022 	VK_OEM_3 = 0xC0,
2023 	VK_OEM_4 = 0xDB,
2024 	VK_OEM_5 = 0xDC,
2025 	VK_OEM_6 = 0xDD,
2026 	VK_OEM_7 = 0xDE,
2027 	VK_OEM_8 = 0xDF,
2028 	//static if (_WIN32_WINNT > =  0x500) {
2029 	VK_OEM_102 = 0xE2,
2030 	//}
2031 	VK_PROCESSKEY = 0xE5,
2032 	//static if (_WIN32_WINNT > =  0x500) {
2033 	VK_PACKET = 0xE7,
2034 	//}
2035 	VK_ATTN = 0xF6,
2036 	VK_CRSEL = 0xF7,
2037 	VK_EXSEL = 0xF8,
2038 	VK_EREOF = 0xF9,
2039 	VK_PLAY = 0xFA,
2040 	VK_ZOOM = 0xFB,
2041 	VK_NONAME = 0xFC,
2042 	VK_PA1 = 0xFD,
2043 	VK_OEM_CLEAR = 0xFE,
2044 }
2045 
2046 const TME_HOVER=1;
2047 const TME_LEAVE=2;
2048 const TME_QUERY=0x40000000;
2049 const TME_CANCEL=0x80000000;
2050 
2051 const HOVER_DEFAULT=0xFFFFFFFF;
2052 
2053 const MK_LBUTTON=1;
2054 const MK_RBUTTON=2;
2055 const MK_SHIFT=4;
2056 const MK_CONTROL=8;
2057 const MK_MBUTTON=16;
2058 static if (_WIN32_WINNT >= 0x500) {
2059 const MK_XBUTTON1=32;
2060 const MK_XBUTTON2=64;
2061 }
2062 const TPM_CENTERALIGN=4;
2063 const TPM_LEFTALIGN=0;
2064 const TPM_RIGHTALIGN=8;
2065 const TPM_LEFTBUTTON=0;
2066 const TPM_RIGHTBUTTON=2;
2067 const TPM_HORIZONTAL=0;
2068 const TPM_VERTICAL=64;
2069 const TPM_TOPALIGN=0;
2070 const TPM_VCENTERALIGN=16;
2071 const TPM_BOTTOMALIGN=32;
2072 const TPM_NONOTIFY=128;
2073 const TPM_RETURNCMD=256;
2074 static if ((_WIN32_WINNT >= 0x500) || (_WIN32_WINDOWS >= 0x410)) {
2075 const TPM_RECURSE=1;
2076 }
2077 
2078 const HELP_COMMAND=0x102;
2079 const HELP_CONTENTS=3;
2080 const HELP_CONTEXT=1;
2081 const HELP_CONTEXTPOPUP=8;
2082 const HELP_FORCEFILE=9;
2083 const HELP_HELPONHELP=4;
2084 const HELP_INDEX=3;
2085 const HELP_KEY=0x101;
2086 const HELP_MULTIKEY=0x201;
2087 const HELP_PARTIALKEY=0x105;
2088 const HELP_QUIT=2;
2089 const HELP_SETCONTENTS=5;
2090 const HELP_SETINDEX=5;
2091 const HELP_SETWINPOS=0x203;
2092 const HELP_CONTEXTMENU=0xa;
2093 const HELP_FINDER=0xb;
2094 const HELP_WM_HELP=0xc;
2095 const HELP_TCARD=0x8000;
2096 const HELP_TCARD_DATA=16;
2097 const HELP_TCARD_OTHER_CALLER=0x11;
2098 
2099 const IDH_NO_HELP=28440;
2100 const IDH_MISSING_CONTEXT=28441;
2101 const IDH_GENERIC_HELP_BUTTON=28442;
2102 const IDH_OK=28443;
2103 const IDH_CANCEL=28444;
2104 const IDH_HELP=28445;
2105 
2106 const LB_CTLCODE=0;
2107 const LB_OKAY=0;
2108 const LB_ERR=-1;
2109 const LB_ERRSPACE=-2;
2110 
2111 const CB_OKAY=0;
2112 const CB_ERR=-1;
2113 const CB_ERRSPACE=-2;
2114 
2115 const HIDE_WINDOW=0;
2116 
2117 const SHOW_OPENWINDOW=1;
2118 const SHOW_ICONWINDOW=2;
2119 const SHOW_FULLSCREEN=3;
2120 const SHOW_OPENNOACTIVATE=4;
2121 
2122 const SW_PARENTCLOSING=1;
2123 const SW_OTHERZOOM=2;
2124 const SW_PARENTOPENING=3;
2125 const SW_OTHERUNZOOM=4;
2126 
2127 const KF_EXTENDED=256;
2128 const KF_DLGMODE=2048;
2129 const KF_MENUMODE=4096;
2130 const KF_ALTDOWN=8192;
2131 const KF_REPEAT=16384;
2132 const KF_UP=32768;
2133 
2134 const WSF_VISIBLE=1;
2135 
2136 const PWR_OK=1;
2137 const PWR_FAIL=-1;
2138 const PWR_SUSPENDREQUEST=1;
2139 const PWR_SUSPENDRESUME=2;
2140 const PWR_CRITICALRESUME=3;
2141 
2142 const NFR_ANSI=1;
2143 const NFR_UNICODE=2;
2144 const NF_QUERY=3;
2145 const NF_REQUERY=4;
2146 
2147 const MENULOOP_WINDOW=0;
2148 const MENULOOP_POPUP=1;
2149 
2150 const WMSZ_LEFT=1;
2151 const WMSZ_RIGHT=2;
2152 const WMSZ_TOP=3;
2153 const WMSZ_TOPLEFT=4;
2154 const WMSZ_TOPRIGHT=5;
2155 const WMSZ_BOTTOM=6;
2156 const WMSZ_BOTTOMLEFT=7;
2157 const WMSZ_BOTTOMRIGHT=8;
2158 
2159 const HTERROR=-2;
2160 const HTTRANSPARENT=-1;
2161 const HTNOWHERE=0;
2162 const HTCLIENT=1;
2163 const HTCAPTION=2;
2164 const HTSYSMENU=3;
2165 const HTGROWBOX=4;
2166 const HTSIZE=4;
2167 const HTMENU=5;
2168 const HTHSCROLL=6;
2169 const HTVSCROLL=7;
2170 const HTMINBUTTON=8;
2171 const HTMAXBUTTON=9;
2172 const HTREDUCE=8;
2173 const HTZOOM=9;
2174 const HTLEFT=10;
2175 const HTSIZEFIRST=10;
2176 const HTRIGHT=11;
2177 const HTTOP=12;
2178 const HTTOPLEFT=13;
2179 const HTTOPRIGHT=14;
2180 const HTBOTTOM=15;
2181 const HTBOTTOMLEFT=16;
2182 const HTBOTTOMRIGHT=17;
2183 const HTSIZELAST=17;
2184 const HTBORDER=18;
2185 const HTOBJECT=19;
2186 const HTCLOSE=20;
2187 const HTHELP=21;
2188 
2189 const MA_ACTIVATE=1;
2190 const MA_ACTIVATEANDEAT=2;
2191 const MA_NOACTIVATE=3;
2192 const MA_NOACTIVATEANDEAT=4;
2193 
2194 const SIZE_RESTORED=0;
2195 const SIZE_MINIMIZED=1;
2196 const SIZE_MAXIMIZED=2;
2197 const SIZE_MAXSHOW=3;
2198 const SIZE_MAXHIDE=4;
2199 
2200 const SIZENORMAL=0;
2201 const SIZEICONIC=1;
2202 const SIZEFULLSCREEN=2;
2203 const SIZEZOOMSHOW=3;
2204 const SIZEZOOMHIDE=4;
2205 
2206 const WVR_ALIGNTOP=16;
2207 const WVR_ALIGNLEFT=32;
2208 const WVR_ALIGNBOTTOM=64;
2209 const WVR_ALIGNRIGHT=128;
2210 const WVR_HREDRAW=256;
2211 const WVR_VREDRAW=512;
2212 const WVR_REDRAW=(WVR_HREDRAW|WVR_VREDRAW);
2213 const WVR_VALIDRECTS=1024;
2214 
2215 const PRF_CHECKVISIBLE=1;
2216 const PRF_NONCLIENT=2;
2217 const PRF_CLIENT=4;
2218 const PRF_ERASEBKGND=8;
2219 const PRF_CHILDREN=16;
2220 const PRF_OWNED=32;
2221 
2222 const IDANI_OPEN=1;
2223 const IDANI_CLOSE=2;
2224 const IDANI_CAPTION=3;
2225 
2226 const WPF_RESTORETOMAXIMIZED=2;
2227 const WPF_SETMINPOSITION=1;
2228 
2229 const ODT_MENU=1;
2230 const ODT_LISTBOX=2;
2231 const ODT_COMBOBOX=3;
2232 const ODT_BUTTON=4;
2233 const ODT_STATIC=5;
2234 const ODA_DRAWENTIRE=1;
2235 const ODA_SELECT=2;
2236 const ODA_FOCUS=4;
2237 const ODS_SELECTED=1;
2238 const ODS_GRAYED=2;
2239 const ODS_DISABLED=4;
2240 const ODS_CHECKED=8;
2241 const ODS_FOCUS=16;
2242 const ODS_DEFAULT=32;
2243 const ODS_COMBOBOXEDIT=4096;
2244 
2245 const IDHOT_SNAPWINDOW=-1;
2246 const IDHOT_SNAPDESKTOP=-2;
2247 
2248 const DBWF_LPARAMPOINTER=0x8000;
2249 const DLGWINDOWEXTRA=30;
2250 const MNC_IGNORE=0;
2251 const MNC_CLOSE=1;
2252 const MNC_EXECUTE=2;
2253 const MNC_SELECT=3;
2254 const DOF_EXECUTABLE=0x8001;
2255 const DOF_DOCUMENT=0x8002;
2256 const DOF_DIRECTORY=0x8003;
2257 const DOF_MULTIPLE=0x8004;
2258 const DOF_PROGMAN=1;
2259 const DOF_SHELLDATA=2;
2260 const DO_DROPFILE=0x454C4946;
2261 const DO_PRINTFILE=0x544E5250;
2262 
2263 const SW_SCROLLCHILDREN=1;
2264 const SW_INVALIDATE=2;
2265 const SW_ERASE=4;
2266 
2267 const SC_SIZE=0xF000;
2268 const SC_MOVE=0xF010;
2269 const SC_MINIMIZE=0xF020;
2270 const SC_ICON=0xf020;
2271 const SC_MAXIMIZE=0xF030;
2272 const SC_ZOOM=0xF030;
2273 const SC_NEXTWINDOW=0xF040;
2274 const SC_PREVWINDOW=0xF050;
2275 const SC_CLOSE=0xF060;
2276 const SC_VSCROLL=0xF070;
2277 const SC_HSCROLL=0xF080;
2278 const SC_MOUSEMENU=0xF090;
2279 const SC_KEYMENU=0xF100;
2280 const SC_ARRANGE=0xF110;
2281 const SC_RESTORE=0xF120;
2282 const SC_TASKLIST=0xF130;
2283 const SC_SCREENSAVE=0xF140;
2284 const SC_HOTKEY=0xF150;
2285 const SC_DEFAULT=0xF160;
2286 const SC_MONITORPOWER=0xF170;
2287 const SC_CONTEXTHELP=0xF180;
2288 const SC_SEPARATOR=0xF00F;
2289 
2290 const EC_LEFTMARGIN=1;
2291 const EC_RIGHTMARGIN=2;
2292 const EC_USEFONTINFO=0xffff;
2293 
2294 const DC_HASDEFID=0x534B;
2295 
2296 const DLGC_WANTARROWS=1;
2297 const DLGC_WANTTAB=2;
2298 const DLGC_WANTALLKEYS=4;
2299 const DLGC_WANTMESSAGE=4;
2300 const DLGC_HASSETSEL=8;
2301 const DLGC_DEFPUSHBUTTON=16;
2302 const DLGC_UNDEFPUSHBUTTON=32;
2303 const DLGC_RADIOBUTTON=64;
2304 const DLGC_WANTCHARS=128;
2305 const DLGC_STATIC=256;
2306 const DLGC_BUTTON=0x2000;
2307 
2308 const WA_INACTIVE=0;
2309 const WA_ACTIVE=1;
2310 const WA_CLICKACTIVE=2;
2311 
2312 const ICON_SMALL=0;
2313 const ICON_BIG=1;
2314 static if (_WIN32_WINNT >= 0x501) {
2315 const ICON_SMALL2=2;
2316 }
2317 
2318 const HBITMAP
2319 	HBMMENU_CALLBACK = cast(HBITMAP)-1,
2320 	HBMMENU_SYSTEM = cast(HBITMAP)1,
2321 	HBMMENU_MBAR_RESTORE = cast(HBITMAP)2,
2322 	HBMMENU_MBAR_MINIMIZE = cast(HBITMAP)3,
2323 	HBMMENU_MBAR_CLOSE = cast(HBITMAP)5,
2324 	HBMMENU_MBAR_CLOSE_D = cast(HBITMAP)6,
2325 	HBMMENU_MBAR_MINIMIZE_D = cast(HBITMAP)7,
2326 	HBMMENU_POPUP_CLOSE = cast(HBITMAP)8,
2327 	HBMMENU_POPUP_RESTORE = cast(HBITMAP)9,
2328 	HBMMENU_POPUP_MAXIMIZE = cast(HBITMAP)10,
2329 	HBMMENU_POPUP_MINIMIZE = cast(HBITMAP)11;
2330 
2331 const MOD_ALT=1;
2332 const MOD_CONTROL=2;
2333 const MOD_SHIFT=4;
2334 const MOD_WIN=8;
2335 const MOD_IGNORE_ALL_MODIFIER=1024;
2336 const MOD_ON_KEYUP=2048;
2337 const MOD_RIGHT=16384;
2338 const MOD_LEFT=32768;
2339 
2340 const LLKHF_EXTENDED=(KF_EXTENDED >> 8);
2341 const LLKHF_INJECTED=0x00000010;
2342 const LLKHF_ALTDOWN=(KF_ALTDOWN >> 8);
2343 const LLKHF_UP=(KF_UP >> 8);
2344 
2345 static if (WINVER >= 0x500) {
2346 const FLASHW_STOP=0;
2347 const FLASHW_CAPTION=1;
2348 const FLASHW_TRAY=2;
2349 const FLASHW_ALL=(FLASHW_CAPTION|FLASHW_TRAY);
2350 const FLASHW_TIMER=4;
2351 const FLASHW_TIMERNOFG=12;
2352 }
2353 
2354 const CURSOR_SHOWING=0x00000001;
2355 const WS_ACTIVECAPTION=0x00000001;
2356 static if (_WIN32_WINNT >= 0x403) {
2357 const INPUT_MOUSE=0x00000000;
2358 const INPUT_KEYBOARD=0x00000001;
2359 const INPUT_HARDWARE=0x00000002;
2360 }
2361 static if (WINVER >= 0x400) {
2362 const ENDSESSION_LOGOFF = 0x80000000;
2363 }
2364 
2365 static if (WINVER >= 0x500) {
2366 const CHILDID_SELF   = 0;
2367 const OBJID_WINDOW   = 0x00000000;
2368 const OBJID_SYSMENU  = 0xFFFFFFFF;
2369 const OBJID_TITLEBAR = 0xFFFFFFFE;
2370 const OBJID_MENU     = 0xFFFFFFFD;
2371 const OBJID_CLIENT   = 0xFFFFFFFC;
2372 const OBJID_VSCROLL  = 0xFFFFFFFB;
2373 const OBJID_HSCROLL  = 0xFFFFFFFA;
2374 const OBJID_SIZEGRIP = 0xFFFFFFF9;
2375 const OBJID_CARET    = 0xFFFFFFF8;
2376 const OBJID_CURSOR   = 0xFFFFFFF7;
2377 const OBJID_ALERT    = 0xFFFFFFF6;
2378 const OBJID_SOUND    = 0xFFFFFFF5;
2379 
2380 const GUI_CARETBLINKING  = 0x00000001;
2381 const GUI_INMOVESIZE     = 0x00000002;
2382 const GUI_INMENUMODE     = 0x00000004;
2383 const GUI_SYSTEMMENUMODE = 0x00000008;
2384 const GUI_POPUPMENUMODE  = 0x00000010;
2385 
2386 static if (_WIN32_WINNT >= 0x501) {
2387 const GUI_16BITTASK      = 0x00000020;
2388 }
2389 const WINEVENT_OUTOFCONTEXT=0x0000;
2390 const WINEVENT_SKIPOWNTHREAD=0x0001;
2391 const WINEVENT_SKIPOWNPROCESS=0x0002;
2392 const WINEVENT_INCONTEXT=0x0004;
2393 const AW_HOR_POSITIVE=0x00000001;
2394 const AW_HOR_NEGATIVE=0x00000002;
2395 const AW_VER_POSITIVE=0x00000004;
2396 const AW_VER_NEGATIVE=0x00000008;
2397 const AW_CENTER=0x00000010;
2398 const AW_HIDE=0x00010000;
2399 const AW_ACTIVATE=0x00020000;
2400 const AW_SLIDE=0x00040000;
2401 const AW_BLEND=0x00080000;
2402 const DEVICE_NOTIFY_WINDOW_HANDLE=0x00000000;
2403 const DEVICE_NOTIFY_SERVICE_HANDLE=0x00000001;
2404 
2405 static if (_WIN32_WINNT >= 0x501) {
2406 const DEVICE_NOTIFY_ALL_INTERFACE_CLASSES=0x00000004;
2407 }
2408 
2409 const EVENT_MIN = 0x00000001;
2410 const EVENT_SYSTEM_SOUND = 0x00000001;
2411 const EVENT_SYSTEM_ALERT = 0x00000002;
2412 const EVENT_SYSTEM_FOREGROUND = 0x00000003;
2413 const EVENT_SYSTEM_MENUSTART = 0x00000004;
2414 const EVENT_SYSTEM_MENUEND = 0x00000005;
2415 const EVENT_SYSTEM_MENUPOPUPSTART = 0x00000006;
2416 const EVENT_SYSTEM_MENUPOPUPEND = 0x00000007;
2417 const EVENT_SYSTEM_CAPTURESTART = 0x00000008;
2418 const EVENT_SYSTEM_CAPTUREEND = 0x00000009;
2419 const EVENT_SYSTEM_MOVESIZESTART = 0x0000000a;
2420 const EVENT_SYSTEM_MOVESIZEEND = 0x0000000b;
2421 const EVENT_SYSTEM_CONTEXTHELPSTART = 0x0000000c;
2422 const EVENT_SYSTEM_CONTEXTHELPEND = 0x0000000d;
2423 const EVENT_SYSTEM_DRAGDROPSTART = 0x0000000e;
2424 const EVENT_SYSTEM_DRAGDROPEND = 0x0000000f;
2425 const EVENT_SYSTEM_DIALOGSTART = 0x00000010;
2426 const EVENT_SYSTEM_DIALOGEND = 0x00000011;
2427 const EVENT_SYSTEM_SCROLLINGSTART = 0x00000012;
2428 const EVENT_SYSTEM_SCROLLINGEND = 0x00000013;
2429 const EVENT_SYSTEM_SWITCHSTART = 0x00000014;
2430 const EVENT_SYSTEM_SWITCHEND = 0x00000015;
2431 const EVENT_SYSTEM_MINIMIZESTART = 0x00000016;
2432 const EVENT_SYSTEM_MINIMIZEEND = 0x00000017;
2433 
2434 const EVENT_OBJECT_CREATE = 0x00008000;
2435 const EVENT_OBJECT_DESTROY = 0x00008001;
2436 const EVENT_OBJECT_SHOW = 0x00008002;
2437 const EVENT_OBJECT_HIDE = 0x00008003;
2438 const EVENT_OBJECT_REORDER = 0x00008004;
2439 const EVENT_OBJECT_FOCUS = 0x00008005;
2440 const EVENT_OBJECT_SELECTION = 0x00008006;
2441 const EVENT_OBJECT_SELECTIONADD = 0x00008007;
2442 const EVENT_OBJECT_SELECTIONREMOVE = 0x00008008;
2443 const EVENT_OBJECT_SELECTIONWITHIN = 0x00008009;
2444 const EVENT_OBJECT_STATECHANGE = 0x0000800a;
2445 const EVENT_OBJECT_LOCATIONCHANGE = 0x0000800b;
2446 const EVENT_OBJECT_NAMECHANGE = 0x0000800c;
2447 const EVENT_OBJECT_DESCRIPTIONCHANGE = 0x0000800d;
2448 const EVENT_OBJECT_VALUECHANGE = 0x0000800e;
2449 const EVENT_OBJECT_PARENTCHANGE = 0x0000800f;
2450 const EVENT_OBJECT_HELPCHANGE = 0x00008010;
2451 const EVENT_OBJECT_DEFACTIONCHANGE = 0x00008011;
2452 const EVENT_OBJECT_ACCELERATORCHANGE = 0x00008012;
2453 
2454 static if (_WIN32_WINNT >= 0x501) {
2455 const EVENT_CONSOLE_CARET             = 0x00004001;
2456 const EVENT_CONSOLE_UPDATE_REGION     = 0x00004002;
2457 const EVENT_CONSOLE_UPDATE_SIMPLE     = 0x00004003;
2458 const EVENT_CONSOLE_UPDATE_SCROLL     = 0x00004004;
2459 const EVENT_CONSOLE_LAYOUT            = 0x00004005;
2460 const EVENT_CONSOLE_START_APPLICATION = 0x00004006;
2461 const EVENT_CONSOLE_END_APPLICATION   = 0x00004007;
2462 
2463 const CONSOLE_CARET_SELECTION   = 0x00000001;
2464 const CONSOLE_CARET_VISIBLE     = 0x00000002;
2465 
2466 const CONSOLE_APPLICATION_16BIT = 0x00000001;
2467 
2468 }
2469 const EVENT_MAX=0x7fffffff;
2470 
2471 }//(WINVER >= 0x500)
2472 
2473 static if ((_WIN32_WINNT >= 0x500) || (_WIN32_WINDOWS >= 0x490)) {
2474 const DWORD ASFW_ANY = -1;
2475 const LSFW_LOCK   = 1;
2476 const LSFW_UNLOCK = 2;
2477 }
2478 
2479 static if (_WIN32_WINNT >= 0x500) {
2480 const LWA_COLORKEY=0x01;
2481 const LWA_ALPHA=0x02;
2482 const ULW_COLORKEY=0x01;
2483 const ULW_ALPHA=0x02;
2484 const ULW_OPAQUE=0x04;
2485 }
2486 
2487 const GA_PARENT    = 1;
2488 const GA_ROOT      = 2;
2489 const GA_ROOTOWNER = 3;
2490 
2491 static if ((_WIN32_WINNT >= 0x500) || (_WIN32_WINDOWS >= 0x410)) {
2492 
2493 const MONITOR_DEFAULTTONULL    = 0;
2494 const MONITOR_DEFAULTTOPRIMARY = 1;
2495 const MONITOR_DEFAULTTONEAREST = 2;
2496 const MONITORINFOF_PRIMARY     = 1;
2497 
2498 const EDS_RAWMODE = 0x00000002;
2499 
2500 const ISMEX_NOSEND   = 0x00000000;
2501 const ISMEX_SEND     = 0x00000001;
2502 const ISMEX_NOTIFY   = 0x00000002;
2503 const ISMEX_CALLBACK = 0x00000004;
2504 const ISMEX_REPLIED  = 0x00000008;
2505 }
2506 
2507 static if (_WIN32_WINNT >= 0x500) {
2508 const GR_GDIOBJECTS  = 0;
2509 const GR_USEROBJECTS = 1;
2510 }
2511 
2512 static if ((_WIN32_WINNT >= 0x500) || (_WIN32_WINDOWS >= 0x490)) {
2513 const GMMP_USE_DISPLAY_POINTS         = 1;
2514 const GMMP_USE_HIGH_RESOLUTION_POINTS = 2;
2515 }
2516 
2517 static if (_WIN32_WINNT >= 0x501) {
2518 const PW_CLIENTONLY               = 0x00000001;
2519 const RIM_INPUT                   = 0x00000000;
2520 const RIM_INPUTSINK               = 0x00000001;
2521 const RIM_TYPEMOUSE               = 0x00000000;
2522 const RIM_TYPEKEYBOARD            = 0x00000001;
2523 const RIM_TYPEHID                 = 0x00000002;
2524 const MOUSE_MOVE_RELATIVE         = 0x00000000;
2525 const MOUSE_MOVE_ABSOLUTE         = 0x00000001;
2526 const MOUSE_VIRTUAL_DESKTOP       = 0x00000002;
2527 const MOUSE_ATTRIBUTES_CHANGED    = 0x00000004;
2528 const RI_MOUSE_LEFT_BUTTON_DOWN   = 0x0001;
2529 const RI_MOUSE_LEFT_BUTTON_UP     = 0x0002;
2530 const RI_MOUSE_RIGHT_BUTTON_DOWN  = 0x0004;
2531 const RI_MOUSE_RIGHT_BUTTON_UP    = 0x0008;
2532 const RI_MOUSE_MIDDLE_BUTTON_DOWN = 0x0010;
2533 const RI_MOUSE_MIDDLE_BUTTON_UP   = 0x0020;
2534 const RI_MOUSE_BUTTON_1_DOWN = RI_MOUSE_LEFT_BUTTON_DOWN;
2535 const RI_MOUSE_BUTTON_1_UP   = RI_MOUSE_LEFT_BUTTON_UP;
2536 const RI_MOUSE_BUTTON_2_DOWN = RI_MOUSE_RIGHT_BUTTON_DOWN;
2537 const RI_MOUSE_BUTTON_2_UP   = RI_MOUSE_RIGHT_BUTTON_UP;
2538 const RI_MOUSE_BUTTON_3_DOWN = RI_MOUSE_MIDDLE_BUTTON_DOWN;
2539 const RI_MOUSE_BUTTON_3_UP   = RI_MOUSE_MIDDLE_BUTTON_UP;
2540 const RI_MOUSE_BUTTON_4_DOWN = 0x0040;
2541 const RI_MOUSE_BUTTON_4_UP   = 0x0080;
2542 const RI_MOUSE_BUTTON_5_DOWN = 0x0100;
2543 const RI_MOUSE_BUTTON_5_UP   = 0x0200;
2544 const RI_MOUSE_WHEEL         = 0x0400;
2545 const KEYBOARD_OVERRUN_MAKE_CODE = 0x00ff;
2546 const RI_KEY_MAKE            = 0x0000;
2547 const RI_KEY_BREAK           = 0x0001;
2548 const RI_KEY_E0              = 0x0002;
2549 const RI_KEY_E1              = 0x0004;
2550 const RI_KEY_TERMSRV_SET_LED = 0x0008;
2551 const RI_KEY_TERMSRV_SHADOW  = 0x0010;
2552 
2553 const RID_INPUT          = 0x10000003;
2554 const RID_HEADER         = 0x10000005;
2555 
2556 const RIDI_PREPARSEDDATA = 0x20000005;
2557 const RIDI_DEVICENAME    = 0x20000007;
2558 const RIDI_DEVICEINFO    = 0x2000000b;
2559 
2560 const RIDEV_REMOVE       = 0x00000001;
2561 const RIDEV_EXCLUDE      = 0x00000010;
2562 const RIDEV_PAGEONLY     = 0x00000020;
2563 const RIDEV_NOLEGACY     = 0x00000030;
2564 const RIDEV_INPUTSINK    = 0x00000100;
2565 const RIDEV_CAPTUREMOUSE = 0x00000200;
2566 const RIDEV_NOHOTKEYS    = 0x00000200;
2567 const RIDEV_APPKEYS      = 0x00000400;
2568 }
2569 
2570 // Callbacks
2571 // ---------
2572 extern (Windows) {
2573 	alias BOOL function (HWND, UINT, WPARAM, LPARAM)    DLGPROC;
2574 	alias void function (HWND, UINT, UINT, DWORD)       TIMERPROC;
2575 	alias BOOL function (HDC, LPARAM, int)              GRAYSTRINGPROC;
2576 	alias LRESULT function (int, WPARAM, LPARAM)        HOOKPROC;
2577 	alias BOOL function (HWND, LPCSTR, HANDLE)          PROPENUMPROCA;
2578 	alias BOOL function (HWND, LPCWSTR, HANDLE)         PROPENUMPROCW;
2579 	alias BOOL function (HWND, LPSTR, HANDLE, DWORD)    PROPENUMPROCEXA;
2580 	alias BOOL function (HWND, LPWSTR, HANDLE, DWORD)   PROPENUMPROCEXW;
2581 	alias int function (LPSTR, int, int, int)           EDITWORDBREAKPROCA;
2582 	alias int function (LPWSTR, int, int, int)          EDITWORDBREAKPROCW;
2583 	alias LRESULT function (HWND, UINT, WPARAM, LPARAM) WNDPROC;
2584 	alias BOOL function (HDC, LPARAM, WPARAM, int, int) DRAWSTATEPROC;
2585 	alias BOOL function (HWND, LPARAM)                  WNDENUMPROC;
2586 	alias BOOL function (HWND, LPARAM)                  ENUMWINDOWSPROC;
2587 	alias void function (LPHELPINFO)                    MSGBOXCALLBACK;
2588 
2589 	static if (WINVER >= 0x410) {
2590 		alias BOOL function (HMONITOR, HDC, LPRECT, LPARAM) MONITORENUMPROC;
2591 	}
2592 	alias BOOL function (LPSTR, LPARAM)                 NAMEENUMPROCA;
2593 	alias BOOL function (LPWSTR, LPARAM)                NAMEENUMPROCW;
2594 	alias void function (HWND, UINT, DWORD, LRESULT)    SENDASYNCPROC;
2595 
2596 	alias NAMEENUMPROCA DESKTOPENUMPROCA;
2597 	alias NAMEENUMPROCW DESKTOPENUMPROCW;
2598 	alias NAMEENUMPROCA WINSTAENUMPROCA;
2599 	alias NAMEENUMPROCW WINSTAENUMPROCW;
2600 }
2601 
2602 alias HANDLE HHOOK;
2603 alias HANDLE HDWP;
2604 alias HANDLE HDEVNOTIFY;
2605 
2606 struct ACCEL {
2607 	BYTE fVirt;
2608 	WORD key;
2609 	WORD cmd;
2610 }
2611 alias ACCEL* LPACCEL;
2612 
2613 struct ACCESSTIMEOUT {
2614 	UINT  cbSize = ACCESSTIMEOUT.sizeof;
2615 	DWORD dwFlags;
2616 	DWORD iTimeOutMSec;
2617 }
2618 alias ACCESSTIMEOUT* LPACCESSTIMEOUT;
2619 
2620 struct ANIMATIONINFO {
2621 	UINT cbSize = ANIMATIONINFO.sizeof;
2622 	int  iMinAnimate;
2623 }
2624 alias ANIMATIONINFO* LPANIMATIONINFO;
2625 
2626 struct CREATESTRUCTA {
2627 	LPVOID    lpCreateParams;
2628 	HINSTANCE hInstance;
2629 	HMENU     hMenu;
2630 	HWND      hwndParent;
2631 	int       cy;
2632 	int       cx;
2633 	int       y;
2634 	int       x;
2635 	LONG      style;
2636 	LPCSTR    lpszName;
2637 	LPCSTR    lpszClass;
2638 	DWORD     dwExStyle;
2639 }
2640 alias CREATESTRUCTA* LPCREATESTRUCTA;
2641 
2642 struct CREATESTRUCTW {
2643 	LPVOID    lpCreateParams;
2644 	HINSTANCE hInstance;
2645 	HMENU     hMenu;
2646 	HWND      hwndParent;
2647 	int       cy;
2648 	int       cx;
2649 	int       y;
2650 	int       x;
2651 	LONG      style;
2652 	LPCWSTR   lpszName;
2653 	LPCWSTR   lpszClass;
2654 	DWORD     dwExStyle;
2655 }
2656 alias CREATESTRUCTW* LPCREATESTRUCTW;
2657 
2658 struct CBT_CREATEWNDA {
2659 	LPCREATESTRUCTA lpcs;
2660 	HWND            hwndInsertAfter;
2661 }
2662 alias CBT_CREATEWNDA* LPCBT_CREATEWNDA;
2663 
2664 struct CBT_CREATEWNDW {
2665 	LPCREATESTRUCTW lpcs;
2666 	HWND            hwndInsertAfter;
2667 }
2668 alias CBT_CREATEWNDW* LPCBT_CREATEWNDW;
2669 
2670 struct CBTACTIVATESTRUCT {
2671 	BOOL fMouse;
2672 	HWND hWndActive;
2673 }
2674 alias CBTACTIVATESTRUCT* LPCBTACTIVATESTRUCT;
2675 
2676 struct CLIENTCREATESTRUCT {
2677 	HANDLE hWindowMenu;
2678 	UINT   idFirstChild;
2679 }
2680 alias CLIENTCREATESTRUCT* LPCLIENTCREATESTRUCT;
2681 
2682 struct COMPAREITEMSTRUCT {
2683 	UINT  CtlType;
2684 	UINT  CtlID;
2685 	HWND  hwndItem;
2686 	UINT  itemID1;
2687 	DWORD itemData1;
2688 	UINT  itemID2;
2689 	DWORD itemData2;
2690 	DWORD dwLocaleId;
2691 }
2692 alias COMPAREITEMSTRUCT* LPCOMPAREITEMSTRUCT;
2693 
2694 struct COPYDATASTRUCT {
2695 	DWORD dwData;
2696 	DWORD cbData;
2697 	PVOID lpData;
2698 }
2699 alias COPYDATASTRUCT* PCOPYDATASTRUCT;
2700 
2701 struct CURSORSHAPE {
2702 	int xHotSpot;
2703 	int yHotSpot;
2704 	int cx;
2705 	int cy;
2706 	int cbWidth;
2707 	BYTE Planes;
2708 	BYTE BitsPixel;
2709 }
2710 alias CURSORSHAPE* LPCURSORSHAPE;
2711 
2712 struct CWPRETSTRUCT {
2713 	LRESULT lResult;
2714 	LPARAM lParam;
2715 	WPARAM wParam;
2716 	DWORD message;
2717 	HWND hwnd;
2718 }
2719 
2720 struct CWPSTRUCT {
2721 	LPARAM lParam;
2722 	WPARAM wParam;
2723 	UINT message;
2724 	HWND hwnd;
2725 }
2726 alias CWPSTRUCT* PCWPSTRUCT;
2727 
2728 struct DEBUGHOOKINFO {
2729 	DWORD idThread;
2730 	DWORD idThreadInstaller;
2731 	LPARAM lParam;
2732 	WPARAM wParam;
2733 	int code;
2734 }
2735 alias DEBUGHOOKINFO* PDEBUGHOOKINFO, LPDEBUGHOOKINFO;
2736 
2737 struct DELETEITEMSTRUCT {
2738 	UINT CtlType;
2739 	UINT CtlID;
2740 	UINT itemID;
2741 	HWND hwndItem;
2742 	UINT itemData;
2743 }
2744 alias DELETEITEMSTRUCT* PDELETEITEMSTRUCT, LPDELETEITEMSTRUCT;
2745 
2746 align(2):
2747 struct DLGITEMTEMPLATE {
2748 	DWORD style;
2749 	DWORD dwExtendedStyle;
2750 	short x;
2751 	short y;
2752 	short cx;
2753 	short cy;
2754 	WORD id;
2755 }
2756 alias DLGITEMTEMPLATE* LPDLGITEMTEMPLATE;
2757 
2758 struct DLGTEMPLATE {
2759 	DWORD style;
2760 	DWORD dwExtendedStyle;
2761 	WORD  cdit;
2762 	short x;
2763 	short y;
2764 	short cx;
2765 	short cy;
2766 }
2767 alias DLGTEMPLATE*       LPDLGTEMPLATE, LPDLGTEMPLATEA, LPDLGTEMPLATEW;
2768 alias CPtr!(DLGTEMPLATE) LPCDLGTEMPLATE;
2769 
2770 align:
2771 
2772 struct DRAWITEMSTRUCT {
2773 	UINT  CtlType;
2774 	UINT  CtlID;
2775 	UINT  itemID;
2776 	UINT  itemAction;
2777 	UINT  itemState;
2778 	HWND  hwndItem;
2779 	HDC   hDC;
2780 	RECT  rcItem;
2781 	DWORD itemData;
2782 }
2783 alias DRAWITEMSTRUCT* LPDRAWITEMSTRUCT, PDRAWITEMSTRUCT;
2784 
2785 struct DRAWTEXTPARAMS {
2786 	UINT cbSize = DRAWTEXTPARAMS.sizeof;
2787 	int  iTabLength;
2788 	int  iLeftMargin;
2789 	int  iRightMargin;
2790 	UINT uiLengthDrawn;
2791 }
2792 alias DRAWTEXTPARAMS* LPDRAWTEXTPARAMS;
2793 
2794 struct PAINTSTRUCT {
2795 	HDC      hdc;
2796 	BOOL     fErase;
2797 	RECT     rcPaint;
2798 	BOOL     fRestore;
2799 	BOOL     fIncUpdate;
2800 	BYTE[32] rgbReserved;
2801 }
2802 alias PAINTSTRUCT* LPPAINTSTRUCT;
2803 
2804 struct MSG {
2805 	HWND   hwnd;
2806 	UINT   message;
2807 	WPARAM wParam;
2808 	LPARAM lParam;
2809 	DWORD  time;
2810 	POINT  pt;
2811 }
2812 alias MSG* LPMSG, PMSG;
2813 
2814 struct ICONINFO {
2815 	BOOL    fIcon;
2816 	DWORD   xHotspot;
2817 	DWORD   yHotspot;
2818 	HBITMAP hbmMask;
2819 	HBITMAP hbmColor;
2820 }
2821 alias ICONINFO* PICONINFO;
2822 
2823 struct NMHDR {
2824 	HWND hwndFrom;
2825 	UINT idFrom;
2826 	UINT code;
2827 }
2828 alias NMHDR* LPNMHDR;
2829 
2830 struct WNDCLASSA {
2831 	UINT      style;
2832 	WNDPROC   lpfnWndProc;
2833 	int       cbClsExtra;
2834 	int       cbWndExtra;
2835 	HINSTANCE hInstance;
2836 	HICON     hIcon;
2837 	HCURSOR   hCursor;
2838 	HBRUSH    hbrBackground;
2839 	LPCSTR    lpszMenuName;
2840 	LPCSTR    lpszClassName;
2841 }
2842 alias WNDCLASSA* LPWNDCLASSA, PWNDCLASSA;
2843 
2844 struct WNDCLASSW {
2845 	UINT      style;
2846 	WNDPROC   lpfnWndProc;
2847 	int       cbClsExtra;
2848 	int       cbWndExtra;
2849 	HINSTANCE hInstance;
2850 	HICON     hIcon;
2851 	HCURSOR   hCursor;
2852 	HBRUSH    hbrBackground;
2853 	LPCWSTR   lpszMenuName;
2854 	LPCWSTR   lpszClassName;
2855 }
2856 alias WNDCLASSW* LPWNDCLASSW, PWNDCLASSW;
2857 
2858 struct WNDCLASSEXA {
2859 	UINT      cbSize = WNDCLASSEXA.sizeof;
2860 	UINT      style;
2861 	WNDPROC   lpfnWndProc;
2862 	int       cbClsExtra;
2863 	int       cbWndExtra;
2864 	HINSTANCE hInstance;
2865 	HICON     hIcon;
2866 	HCURSOR   hCursor;
2867 	HBRUSH    hbrBackground;
2868 	LPCSTR    lpszMenuName;
2869 	LPCSTR    lpszClassName;
2870 	HICON     hIconSm;
2871 }
2872 alias WNDCLASSEXA* LPWNDCLASSEXA, PWNDCLASSEXA;
2873 
2874 struct WNDCLASSEXW {
2875 	UINT      cbSize = WNDCLASSEXW.sizeof;
2876 	UINT      style;
2877 	WNDPROC   lpfnWndProc;
2878 	int       cbClsExtra;
2879 	int       cbWndExtra;
2880 	HINSTANCE hInstance;
2881 	HICON     hIcon;
2882 	HCURSOR   hCursor;
2883 	HBRUSH    hbrBackground;
2884 	LPCWSTR   lpszMenuName;
2885 	LPCWSTR   lpszClassName;
2886 	HICON     hIconSm;
2887 }
2888 alias WNDCLASSEXW* LPWNDCLASSEXW, PWNDCLASSEXW;
2889 
2890 struct MENUITEMINFOA {
2891 	UINT    cbSize = MENUITEMINFOA.sizeof;
2892 	UINT    fMask;
2893 	UINT    fType;
2894 	UINT    fState;
2895 	UINT    wID;
2896 	HMENU   hSubMenu;
2897 	HBITMAP hbmpChecked;
2898 	HBITMAP hbmpUnchecked;
2899 	DWORD   dwItemData;
2900 	LPSTR   dwTypeData;
2901 	UINT    cch;
2902 	static if (_WIN32_WINNT >= 0x500) {
2903 		HBITMAP hbmpItem;
2904 	}
2905 }
2906 alias MENUITEMINFOA*       LPMENUITEMINFOA;
2907 alias CPtr!(MENUITEMINFOA) LPCMENUITEMINFOA;
2908 
2909 struct MENUITEMINFOW {
2910 	UINT    cbSize = MENUITEMINFOW.sizeof;
2911 	UINT    fMask;
2912 	UINT    fType;
2913 	UINT    fState;
2914 	UINT    wID;
2915 	HMENU   hSubMenu;
2916 	HBITMAP hbmpChecked;
2917 	HBITMAP hbmpUnchecked;
2918 	DWORD   dwItemData;
2919 	LPWSTR  dwTypeData;
2920 	UINT    cch;
2921 	static if (_WIN32_WINNT >= 0x500) {
2922 		HBITMAP hbmpItem;
2923 	}
2924 }
2925 alias MENUITEMINFOW*       LPMENUITEMINFOW;
2926 alias CPtr!(MENUITEMINFOW) LPCMENUITEMINFOW;
2927 
2928 struct SCROLLINFO {
2929 	UINT cbSize = this.sizeof;
2930 	UINT fMask;
2931 	int nMin;
2932 	int nMax;
2933 	UINT nPage;
2934 	int nPos;
2935 	int nTrackPos;
2936 }
2937 alias SCROLLINFO*       LPSCROLLINFO;
2938 alias CPtr!(SCROLLINFO) LPCSCROLLINFO;
2939 
2940 struct WINDOWPLACEMENT {
2941 	UINT length;
2942 	UINT flags;
2943 	UINT showCmd;
2944 	POINT ptMinPosition;
2945 	POINT ptMaxPosition;
2946 	RECT rcNormalPosition;
2947 }
2948 alias WINDOWPLACEMENT* LPWINDOWPLACEMENT, PWINDOWPLACEMENT;
2949 
2950 struct MENUITEMTEMPLATEHEADER {
2951 	WORD versionNumber;
2952 	WORD offset;
2953 }
2954 
2955 struct MENUITEMTEMPLATE {
2956 	WORD mtOption;
2957 	WORD mtID;
2958 	WCHAR mtString[1];
2959 }
2960 
2961 alias void MENUTEMPLATE, MENUTEMPLATEA, MENUTEMPLATEW;
2962 
2963 alias MENUTEMPLATE* LPMENUTEMPLATEA, LPMENUTEMPLATEW, LPMENUTEMPLATE;
2964 
2965 struct HELPINFO {
2966 	UINT cbSize = this.sizeof;
2967 	int iContextType;
2968 	int iCtrlId;
2969 	HANDLE hItemHandle;
2970 	DWORD dwContextId;
2971 	POINT MousePos;
2972 }
2973 alias HELPINFO* LPHELPINFO;
2974 
2975 struct MSGBOXPARAMSA {
2976 	UINT cbSize = this.sizeof;
2977 	HWND hwndOwner;
2978 	HINSTANCE hInstance;
2979 	LPCSTR lpszText;
2980 	LPCSTR lpszCaption;
2981 	DWORD dwStyle;
2982 	LPCSTR lpszIcon;
2983 	DWORD dwContextHelpId;
2984 	MSGBOXCALLBACK lpfnMsgBoxCallback;
2985 	DWORD dwLanguageId;
2986 }
2987 alias MSGBOXPARAMSA* PMSGBOXPARAMSA, LPMSGBOXPARAMSA;
2988 
2989 struct MSGBOXPARAMSW {
2990 	UINT cbSize = this.sizeof;
2991 	HWND hwndOwner;
2992 	HINSTANCE hInstance;
2993 	LPCWSTR lpszText;
2994 	LPCWSTR lpszCaption;
2995 	DWORD dwStyle;
2996 	LPCWSTR lpszIcon;
2997 	DWORD dwContextHelpId;
2998 	MSGBOXCALLBACK lpfnMsgBoxCallback;
2999 	DWORD dwLanguageId;
3000 }
3001 alias MSGBOXPARAMSW* PMSGBOXPARAMSW, LPMSGBOXPARAMSW;
3002 
3003 struct USEROBJECTFLAGS {
3004 	BOOL fInherit;
3005 	BOOL fReserved;
3006 	DWORD dwFlags;
3007 }
3008 
3009 struct FILTERKEYS {
3010 	UINT cbSize = this.sizeof;
3011 	DWORD dwFlags;
3012 	DWORD iWaitMSec;
3013 	DWORD iDelayMSec;
3014 	DWORD iRepeatMSec;
3015 	DWORD iBounceMSec;
3016 }
3017 
3018 struct HIGHCONTRASTA {
3019 	UINT cbSize = this.sizeof;
3020 	DWORD dwFlags;
3021 	LPSTR lpszDefaultScheme;
3022 }
3023 alias HIGHCONTRASTA* LPHIGHCONTRASTA;
3024 
3025 struct HIGHCONTRASTW {
3026 	UINT cbSize = this.sizeof;
3027 	DWORD dwFlags;
3028 	LPWSTR lpszDefaultScheme;
3029 }
3030 alias HIGHCONTRASTW* LPHIGHCONTRASTW;
3031 
3032 struct ICONMETRICSA {
3033 	UINT cbSize = this.sizeof;
3034 	int iHorzSpacing;
3035 	int iVertSpacing;
3036 	int iTitleWrap;
3037 	LOGFONTA lfFont;
3038 }
3039 alias ICONMETRICSA* LPICONMETRICSA;
3040 
3041 struct ICONMETRICSW {
3042 	UINT cbSize = this.sizeof;
3043 	int iHorzSpacing;
3044 	int iVertSpacing;
3045 	int iTitleWrap;
3046 	LOGFONTW lfFont;
3047 }
3048 alias ICONMETRICSW* LPICONMETRICSW;
3049 
3050 struct MINIMIZEDMETRICS {
3051 	UINT cbSize = this.sizeof;
3052 	int iWidth;
3053 	int iHorzGap;
3054 	int iVertGap;
3055 	int iArrange;
3056 }
3057 alias MINIMIZEDMETRICS* LPMINIMIZEDMETRICS;
3058 
3059 struct MOUSEKEYS {
3060 	UINT cbSize = this.sizeof;
3061 	DWORD dwFlags;
3062 	DWORD iMaxSpeed;
3063 	DWORD iTimeToMaxSpeed;
3064 	DWORD iCtrlSpeed;
3065 	DWORD dwReserved1;
3066 	DWORD dwReserved2;
3067 }
3068 alias MOUSEKEYS* LPMOUSEKEYS;
3069 
3070 struct NONCLIENTMETRICSA {
3071 	UINT cbSize = this.sizeof;
3072 	int iBorderWidth;
3073 	int iScrollWidth;
3074 	int iScrollHeight;
3075 	int iCaptionWidth;
3076 	int iCaptionHeight;
3077 	LOGFONTA lfCaptionFont;
3078 	int iSmCaptionWidth;
3079 	int iSmCaptionHeight;
3080 	LOGFONTA lfSmCaptionFont;
3081 	int iMenuWidth;
3082 	int iMenuHeight;
3083 	LOGFONTA lfMenuFont;
3084 	LOGFONTA lfStatusFont;
3085 	LOGFONTA lfMessageFont;
3086 }
3087 alias NONCLIENTMETRICSA* LPNONCLIENTMETRICSA;
3088 
3089 struct NONCLIENTMETRICSW {
3090 	UINT cbSize = this.sizeof;
3091 	int iBorderWidth;
3092 	int iScrollWidth;
3093 	int iScrollHeight;
3094 	int iCaptionWidth;
3095 	int iCaptionHeight;
3096 	LOGFONTW lfCaptionFont;
3097 	int iSmCaptionWidth;
3098 	int iSmCaptionHeight;
3099 	LOGFONTW lfSmCaptionFont;
3100 	int iMenuWidth;
3101 	int iMenuHeight;
3102 	LOGFONTW lfMenuFont;
3103 	LOGFONTW lfStatusFont;
3104 	LOGFONTW lfMessageFont;
3105 }
3106 alias NONCLIENTMETRICSW* LPNONCLIENTMETRICSW;
3107 
3108 struct SERIALKEYSA {
3109 	UINT cbSize = this.sizeof;
3110 	DWORD dwFlags;
3111 	LPSTR lpszActivePort;
3112 	LPSTR lpszPort;
3113 	UINT iBaudRate;
3114 	UINT iPortState;
3115 	UINT iActive;
3116 }
3117 alias SERIALKEYSA* LPSERIALKEYSA;
3118 
3119 struct SERIALKEYSW {
3120 	UINT cbSize = this.sizeof;
3121 	DWORD dwFlags;
3122 	LPWSTR lpszActivePort;
3123 	LPWSTR lpszPort;
3124 	UINT iBaudRate;
3125 	UINT iPortState;
3126 	UINT iActive;
3127 }
3128 alias SERIALKEYSW* LPSERIALKEYSW;
3129 
3130 struct SOUNDSENTRYA {
3131 	UINT cbSize = this.sizeof;
3132 	DWORD dwFlags;
3133 	DWORD iFSTextEffect;
3134 	DWORD iFSTextEffectMSec;
3135 	DWORD iFSTextEffectColorBits;
3136 	DWORD iFSGrafEffect;
3137 	DWORD iFSGrafEffectMSec;
3138 	DWORD iFSGrafEffectColor;
3139 	DWORD iWindowsEffect;
3140 	DWORD iWindowsEffectMSec;
3141 	LPSTR lpszWindowsEffectDLL;
3142 	DWORD iWindowsEffectOrdinal;
3143 }
3144 alias SOUNDSENTRYA* LPSOUNDSENTRYA;
3145 
3146 struct SOUNDSENTRYW {
3147 	UINT cbSize = this.sizeof;
3148 	DWORD dwFlags;
3149 	DWORD iFSTextEffect;
3150 	DWORD iFSTextEffectMSec;
3151 	DWORD iFSTextEffectColorBits;
3152 	DWORD iFSGrafEffect;
3153 	DWORD iFSGrafEffectMSec;
3154 	DWORD iFSGrafEffectColor;
3155 	DWORD iWindowsEffect;
3156 	DWORD iWindowsEffectMSec;
3157 	LPWSTR lpszWindowsEffectDLL;
3158 	DWORD iWindowsEffectOrdinal;
3159 }
3160 alias SOUNDSENTRYW* LPSOUNDSENTRYW;
3161 
3162 struct STICKYKEYS {
3163 	DWORD cbSize = this.sizeof;
3164 	DWORD dwFlags;
3165 }
3166 alias STICKYKEYS* LPSTICKYKEYS;
3167 
3168 struct TOGGLEKEYS {
3169 	DWORD cbSize = this.sizeof;
3170 	DWORD dwFlags;
3171 }
3172 
3173 struct MOUSEHOOKSTRUCT {
3174 	POINT pt;
3175 	HWND hwnd;
3176 	UINT wHitTestCode;
3177 	DWORD dwExtraInfo;
3178 }
3179 alias MOUSEHOOKSTRUCT* LPMOUSEHOOKSTRUCT, PMOUSEHOOKSTRUCT;
3180 
3181 struct TRACKMOUSEEVENT {
3182 	DWORD cbSize = this.sizeof;
3183 	DWORD dwFlags;
3184 	HWND  hwndTrack;
3185 	DWORD dwHoverTime;
3186 }
3187 alias TRACKMOUSEEVENT* LPTRACKMOUSEEVENT;
3188 
3189 struct TPMPARAMS {
3190 	UINT cbSize = this.sizeof;
3191 	RECT rcExclude;
3192 }
3193 alias TPMPARAMS* LPTPMPARAMS;
3194 
3195 struct EVENTMSG {
3196 	UINT message;
3197 	UINT paramL;
3198 	UINT paramH;
3199 	DWORD time;
3200 	HWND hwnd;
3201 }
3202 alias EVENTMSG* PEVENTMSGMSG, LPEVENTMSGMSG, PEVENTMSG, LPEVENTMSG;
3203 
3204 struct WINDOWPOS {
3205 	HWND hwnd;
3206 	HWND hwndInsertAfter;
3207 	int x;
3208 	int y;
3209 	int cx;
3210 	int cy;
3211 	UINT flags;
3212 }
3213 alias WINDOWPOS* PWINDOWPOS, LPWINDOWPOS;
3214 
3215 struct NCCALCSIZE_PARAMS {
3216 	RECT rgrc[3];
3217 	PWINDOWPOS lppos;
3218 }
3219 alias NCCALCSIZE_PARAMS* LPNCCALCSIZE_PARAMS;
3220 
3221 struct MDICREATESTRUCTA {
3222 	LPCSTR szClass;
3223 	LPCSTR szTitle;
3224 	HANDLE hOwner;
3225 	int x;
3226 	int y;
3227 	int cx;
3228 	int cy;
3229 	DWORD style;
3230 	LPARAM lParam;
3231 }
3232 alias MDICREATESTRUCTA* LPMDICREATESTRUCTA;
3233 
3234 struct MDICREATESTRUCTW {
3235 	LPCWSTR szClass;
3236 	LPCWSTR szTitle;
3237 	HANDLE hOwner;
3238 	int x;
3239 	int y;
3240 	int cx;
3241 	int cy;
3242 	DWORD style;
3243 	LPARAM lParam;
3244 }
3245 alias MDICREATESTRUCTW* LPMDICREATESTRUCTW;
3246 
3247 struct MINMAXINFO {
3248 	POINT ptReserved;
3249 	POINT ptMaxSize;
3250 	POINT ptMaxPosition;
3251 	POINT ptMinTrackSize;
3252 	POINT ptMaxTrackSize;
3253 }
3254 alias MINMAXINFO* PMINMAXINFO, LPMINMAXINFO;
3255 
3256 struct MDINEXTMENU {
3257 	HMENU hmenuIn;
3258 	HMENU hmenuNext;
3259 	HWND hwndNext;
3260 }
3261 alias MDINEXTMENU* PMDINEXTMENU, LPMDINEXTMENU;
3262 
3263 struct MEASUREITEMSTRUCT {
3264 	UINT CtlType;
3265 	UINT CtlID;
3266 	UINT itemID;
3267 	UINT itemWidth;
3268 	UINT itemHeight;
3269 	DWORD itemData;
3270 }
3271 alias MEASUREITEMSTRUCT* PMEASUREITEMSTRUCT, LPMEASUREITEMSTRUCT;
3272 
3273 struct DROPSTRUCT {
3274 	HWND hwndSource;
3275 	HWND hwndSink;
3276 	DWORD wFmt;
3277 	DWORD dwData;
3278 	POINT ptDrop;
3279 	DWORD dwControlData;
3280 }
3281 alias DROPSTRUCT* PDROPSTRUCT, LPDROPSTRUCT;
3282 
3283 alias DWORD HELPPOLY;
3284 
3285 struct MULTIKEYHELPA {
3286 	DWORD mkSize;
3287 	CHAR mkKeylist;
3288 	CHAR szKeyphrase[1];
3289 }
3290 alias MULTIKEYHELPA* PMULTIKEYHELPA, LPMULTIKEYHELPA;
3291 
3292 struct MULTIKEYHELPW {
3293 	DWORD mkSize;
3294 	WCHAR mkKeylist;
3295 	WCHAR szKeyphrase[1];
3296 }
3297 alias MULTIKEYHELPW* PMULTIKEYHELPW, LPMULTIKEYHELPW;
3298 
3299 struct HELPWININFOA {
3300 	int wStructSize;
3301 	int x;
3302 	int y;
3303 	int dx;
3304 	int dy;
3305 	int wMax;
3306 	CHAR rgchMember[2];
3307 }
3308 alias HELPWININFOA* PHELPWININFOA, LPHELPWININFOA;
3309 
3310 struct HELPWININFOW {
3311 	int wStructSize;
3312 	int x;
3313 	int y;
3314 	int dx;
3315 	int dy;
3316 	int wMax;
3317 	WCHAR rgchMember[2];
3318 }
3319 alias HELPWININFOW* PHELPWININFOW, LPHELPWININFOW;
3320 
3321 struct STYLESTRUCT {
3322 	DWORD styleOld;
3323 	DWORD styleNew;
3324 }
3325 alias STYLESTRUCT* LPSTYLESTRUCT;
3326 
3327 struct ALTTABINFO {
3328 	DWORD cbSize = this.sizeof;
3329 	int   cItems;
3330 	int   cColumns;
3331 	int   cRows;
3332 	int   iColFocus;
3333 	int   iRowFocus;
3334 	int   cxItem;
3335 	int   cyItem;
3336 	POINT ptStart;
3337 }
3338 alias ALTTABINFO* PALTTABINFO, LPALTTABINFO;
3339 
3340 struct COMBOBOXINFO {
3341 	DWORD cbSize = this.sizeof;
3342 	RECT rcItem;
3343 	RECT rcButton;
3344 	DWORD stateButton;
3345 	HWND hwndCombo;
3346 	HWND hwndItem;
3347 	HWND hwndList;
3348 }
3349 alias COMBOBOXINFO* PCOMBOBOXINFO, LPCOMBOBOXINFO;
3350 
3351 struct CURSORINFO {
3352 	DWORD cbSize = this.sizeof;
3353 	DWORD flags;
3354 	HCURSOR hCursor;
3355 	POINT ptScreenPos;
3356 }
3357 alias CURSORINFO* PCURSORINFO, LPCURSORINFO;
3358 
3359 struct MENUBARINFO {
3360 	DWORD cbSize = this.sizeof;
3361 	RECT  rcBar;
3362 	HMENU hMenu;
3363 	HWND  hwndMenu;
3364 	byte bf_; // Simulated bitfield
3365 //	BOOL  fBarFocused:1;
3366 //	BOOL  fFocused:1;
3367 	bool fBarFocused() { return (bf_ & 1) == 1; }
3368 	bool fFocused() { return (bf_ & 2) == 2; }
3369 	void fBarFocused(bool b) { bf_ = cast(byte)((bf_ & 0xFE) | b); }
3370 	void fFocused(bool b) { bf_ = cast(byte)(b ? (bf_ | 2) : bf_ & 0xFD); }
3371 }
3372 alias MENUBARINFO* PMENUBARINFO;
3373 
3374 struct MENUINFO {
3375 	DWORD cbSize = this.sizeof;
3376 	DWORD fMask;
3377 	DWORD dwStyle;
3378 	UINT cyMax;
3379 	HBRUSH  hbrBack;
3380 	DWORD   dwContextHelpID;
3381 	ULONG_PTR dwMenuData;
3382 }
3383 alias MENUINFO*       LPMENUINFO;
3384 alias CPtr!(MENUINFO) LPCMENUINFO;
3385 
3386 
3387 const CCHILDREN_SCROLLBAR=5;
3388 
3389 struct SCROLLBARINFO {
3390 	DWORD cbSize = this.sizeof;
3391 	RECT  rcScrollBar;
3392 	int   dxyLineButton;
3393 	int   xyThumbTop;
3394 	int   xyThumbBottom;
3395 	int   reserved;
3396 	DWORD rgstate[CCHILDREN_SCROLLBAR+1];
3397 }
3398 alias SCROLLBARINFO* PSCROLLBARINFO, LPSCROLLBARINFO;
3399 
3400 const CCHILDREN_TITLEBAR=5;
3401 
3402 struct TITLEBARINFO {
3403 	DWORD cbSize = TITLEBARINFO.sizeof;
3404 	RECT  rcTitleBar;
3405 	DWORD[CCHILDREN_TITLEBAR+1] rgstate;
3406 }
3407 alias TITLEBARINFO* PTITLEBARINFO, LPTITLEBARINFO;
3408 
3409 struct WINDOWINFO {
3410 	DWORD cbSize = WINDOWINFO.sizeof;
3411 	RECT  rcWindow;
3412 	RECT  rcClient;
3413 	DWORD dwStyle;
3414 	DWORD dwExStyle;
3415 	DWORD dwWindowStatus;
3416 	UINT  cxWindowBorders;
3417 	UINT  cyWindowBorders;
3418 	ATOM  atomWindowType;
3419 	WORD  wCreatorVersion;
3420 }
3421 alias WINDOWINFO* PWINDOWINFO, LPWINDOWINFO;
3422 
3423 struct LASTINPUTINFO {
3424 	UINT cbSize = this.sizeof;
3425 	DWORD dwTime;
3426 }
3427 alias LASTINPUTINFO* PLASTINPUTINFO;
3428 
3429 struct MONITORINFO {
3430 	DWORD cbSize = this.sizeof;
3431 	RECT rcMonitor;
3432 	RECT rcWork;
3433 	DWORD dwFlags;
3434 }
3435 alias MONITORINFO* LPMONITORINFO;
3436 
3437 const CCHDEVICENAME=32;
3438 
3439 struct MONITORINFOEXA {
3440 	DWORD cbSize = MONITORINFOEXA.sizeof;
3441 	RECT  rcMonitor;
3442 	RECT  rcWork;
3443 	DWORD dwFlags;
3444 	CHAR[CCHDEVICENAME] szDevice;
3445 }
3446 alias MONITORINFOEXA* LPMONITORINFOEXA;
3447 
3448 struct MONITORINFOEXW {
3449 	DWORD cbSize = MONITORINFOEXW.sizeof;
3450 	RECT  rcMonitor;
3451 	RECT  rcWork;
3452 	DWORD dwFlags;
3453 	WCHAR[CCHDEVICENAME] szDevice;
3454 }
3455 alias MONITORINFOEXW* LPMONITORINFOEXW;
3456 
3457 struct KBDLLHOOKSTRUCT {
3458 	DWORD vkCode;
3459 	DWORD scanCode;
3460 	DWORD flags;
3461 	DWORD time;
3462 	DWORD dwExtraInfo;
3463 }
3464 alias KBDLLHOOKSTRUCT* LPKBDLLHOOKSTRUCT, PKBDLLHOOKSTRUCT;
3465 
3466 static if ((_WIN32_WINNT >= 0x500) || (_WIN32_WINDOWS >= 0x410)) {
3467 
3468 struct FLASHWINFO {
3469 	UINT  cbSize = this.sizeof;
3470 	HWND  hwnd;
3471 	DWORD dwFlags;
3472 	UINT  uCount;
3473 	DWORD dwTimeout;
3474 }
3475 alias FLASHWINFO* PFLASHWINFO;
3476 
3477 }
3478 
3479 static if ((_WIN32_WINNT >= 0x500) || (_WIN32_WINDOWS >= 0x490)) {
3480 
3481 struct MOUSEMOVEPOINT {
3482 	int x;
3483 	int y;
3484 	DWORD time;
3485 	ULONG_PTR dwExtraInfo;
3486 }
3487 alias MOUSEMOVEPOINT* PMOUSEMOVEPOINT, LPMOUSEMOVEPOINT;
3488 }
3489 
3490 static if (_WIN32_WINNT >= 0x403) {
3491 struct MOUSEINPUT {
3492 	LONG dx;
3493 	LONG dy;
3494 	DWORD mouseData;
3495 	DWORD dwFlags;
3496 	DWORD time;
3497 	ULONG_PTR dwExtraInfo;
3498 }
3499 alias MOUSEINPUT* PMOUSEINPUT;
3500 
3501 struct KEYBDINPUT {
3502 	WORD wVk;
3503 	WORD wScan;
3504 	DWORD dwFlags;
3505 	DWORD time;
3506 	ULONG_PTR dwExtraInfo;
3507 }
3508 alias KEYBDINPUT* PKEYBDINPUT;
3509 
3510 struct HARDWAREINPUT {
3511 	DWORD uMsg;
3512 	WORD wParamL;
3513 	WORD wParamH;
3514 }
3515 alias HARDWAREINPUT* PHARDWAREINPUT;
3516 
3517 struct INPUT {
3518 	DWORD type;
3519 	union {
3520 		MOUSEINPUT mi;
3521 		KEYBDINPUT ki;
3522 		HARDWAREINPUT hi;
3523 	}
3524 }
3525 alias INPUT* PINPUT, LPINPUT;
3526 }// (_WIN32_WINNT >= 0x403)
3527 
3528 static if (WINVER >= 0x500) {
3529 struct GUITHREADINFO {
3530 	DWORD cbSize = this.sizeof;
3531 	DWORD flags;
3532 	HWND hwndActive;
3533 	HWND hwndFocus;
3534 	HWND hwndCapture;
3535 	HWND hwndMenuOwner;
3536 	HWND hwndMoveSize;
3537 	HWND hwndCaret;
3538 	RECT rcCaret;
3539 }
3540 alias GUITHREADINFO* PGUITHREADINFO, LPGUITHREADINFO;
3541 extern (Windows) {
3542 alias void function (HWINEVENTHOOK, DWORD, HWND, LONG, LONG, DWORD, DWORD) WINEVENTPROC;
3543 }
3544 
3545 }// (WINVER >= 0x500)
3546 
3547 static if (_WIN32_WINNT >= 0x501) {
3548 struct BSMINFO {
3549 	UINT  cbSize = this.sizeof;
3550 	HDESK hdesk;
3551 	HWND  hwnd;
3552 	LUID  luid;
3553 }
3554 alias BSMINFO* PBSMINFO;
3555 
3556 alias HANDLE HRAWINPUT;
3557 
3558 struct RAWINPUTHEADER {
3559 	DWORD dwType;
3560 	DWORD dwSize;
3561 	HANDLE hDevice;
3562 	WPARAM wParam;
3563 }
3564 alias RAWINPUTHEADER* PRAWINPUTHEADER;
3565 
3566 struct RAWMOUSE {
3567 	USHORT usFlags;
3568 	union {
3569 		ULONG ulButtons;
3570 		struct {
3571 			USHORT usButtonFlags;
3572 			USHORT usButtonData;
3573 		}
3574 	}
3575 	ULONG ulRawButtons;
3576 	LONG lLastX;
3577 	LONG lLastY;
3578 	ULONG ulExtraInformation;
3579 }
3580 alias RAWMOUSE* PRAWMOUSE, LPRAWMOUSE;
3581 
3582 struct RAWKEYBOARD {
3583 	USHORT MakeCode;
3584 	USHORT Flags;
3585 	USHORT Reserved;
3586 	USHORT VKey;
3587 	UINT Message;
3588 	ULONG ExtraInformation;
3589 }
3590 alias RAWKEYBOARD* PRAWKEYBOARD, LPRAWKEYBOARD;
3591 
3592 struct RAWHID {
3593 	DWORD dwSizeHid;
3594 	DWORD dwCount;
3595 	BYTE bRawData;
3596 }
3597 alias RAWHID* PRAWHID, LPRAWHID;
3598 
3599 struct RAWINPUT {
3600 	RAWINPUTHEADER header;
3601 	union _data {
3602 		RAWMOUSE    mouse;
3603 		RAWKEYBOARD keyboard;
3604 		RAWHID      hid;
3605 	}
3606 	_data data;
3607 }
3608 alias RAWINPUT* PRAWINPUT, LPRAWINPUT;
3609 
3610 struct RAWINPUTDEVICE {
3611 	USHORT usUsagePage;
3612 	USHORT usUsage;
3613 	DWORD dwFlags;
3614 	HWND hwndTarget;
3615 }
3616 alias RAWINPUTDEVICE*       PRAWINPUTDEVICE, LPRAWINPUTDEVICE;
3617 alias CPtr!(RAWINPUTDEVICE) PCRAWINPUTDEVICE;
3618 
3619 struct RAWINPUTDEVICELIST {
3620 	HANDLE hDevice;
3621 	DWORD dwType;
3622 }
3623 alias RAWINPUTDEVICELIST* PRAWINPUTDEVICELIST;
3624 
3625 struct RID_DEVICE_INFO_MOUSE {
3626 	DWORD dwId;
3627 	DWORD dwNumberOfButtons;
3628 	DWORD dwSampleRate;
3629 	BOOL  fHasHorizontalWheel;
3630 }
3631 
3632 struct RID_DEVICE_INFO_KEYBOARD {
3633 	DWORD dwType;
3634 	DWORD dwSubType;
3635 	DWORD dwKeyboardMode;
3636 	DWORD dwNumberOfFunctionKeys;
3637 	DWORD dwNumberOfIndicators;
3638 	DWORD dwNumberOfKeysTotal;
3639 }
3640 
3641 struct RID_DEVICE_INFO_HID {
3642 	DWORD dwVendorId;
3643 	DWORD dwProductId;
3644 	DWORD dwVersionNumber;
3645 	USHORT usUsagePage;
3646 	USHORT usUsage;
3647 }
3648 
3649 struct RID_DEVICE_INFO {
3650 	DWORD cbSize = this.sizeof;
3651 	DWORD dwType;
3652 	union {
3653 		RID_DEVICE_INFO_MOUSE mouse;
3654 		RID_DEVICE_INFO_KEYBOARD keyboard;
3655 		RID_DEVICE_INFO_HID hid;
3656 	}
3657 }
3658 }// (_WIN32_WINNT >= 0x501)
3659 
3660 struct MSLLHOOKSTRUCT {
3661 	POINT pt;
3662 	DWORD mouseData;
3663 	DWORD flags;
3664 	DWORD time;
3665 	ULONG_PTR dwExtraInfo;
3666 }
3667 alias MSLLHOOKSTRUCT* PMSLLHOOKSTRUCT;
3668 
3669 alias CharToOemA AnsiToOem;
3670 alias OemToCharA OemToAnsi;
3671 alias CharToOemBuffA AnsiToOemBuff;
3672 alias OemToCharBuffA OemToAnsiBuff;
3673 alias CharUpperA AnsiUpper;
3674 alias CharUpperBuffA AnsiUpperBuff;
3675 alias CharLowerA AnsiLower;
3676 alias CharLowerBuffA AnsiLowerBuff;
3677 alias CharNextA AnsiNext;
3678 alias CharPrevA AnsiPrev;
3679 
3680 alias MAKELONG MAKEWPARAM;
3681 alias MAKELONG MAKELPARAM;
3682 alias MAKELONG MAKELRESULT;
3683 
3684 //MACRO #define POINTSTOPOINT(p, ps) { (p).x=LOWORD(*(DWORD* )&ps); (p).y=HIWORD(*(DWORD* )&ps); }
3685 //MACRO #define POINTTOPOINTS(p) ((POINTS)MAKELONG((p).x, (p).y))
3686 
3687 extern (Windows) {
3688 
3689 HKL ActivateKeyboardLayout(HKL, UINT);
3690 BOOL AdjustWindowRect(LPRECT, DWORD, BOOL);
3691 BOOL AdjustWindowRectEx(LPRECT, DWORD, BOOL, DWORD);
3692 BOOL AnyPopup();
3693 BOOL AppendMenuA(HMENU, UINT, UINT_PTR, LPCSTR);
3694 BOOL AppendMenuW(HMENU, UINT, UINT_PTR, LPCWSTR);
3695 UINT ArrangeIconicWindows(HWND);
3696 BOOL AttachThreadInput(DWORD, DWORD, BOOL);
3697 HDWP BeginDeferWindowPos(int);
3698 HDC BeginPaint(HWND, LPPAINTSTRUCT);
3699 BOOL BringWindowToTop(HWND);
3700 BOOL CallMsgFilterA(LPMSG, INT);
3701 BOOL CallMsgFilterW(LPMSG, INT);
3702 LRESULT CallNextHookEx(HHOOK, int, WPARAM, LPARAM);
3703 LRESULT CallWindowProcA(WNDPROC, HWND, UINT, WPARAM, LPARAM);
3704 LRESULT CallWindowProcW(WNDPROC, HWND, UINT, WPARAM, LPARAM);
3705 WORD CascadeWindows(HWND, UINT, LPCRECT, UINT, CPtr!(HWND));
3706 BOOL ChangeClipboardChain(HWND, HWND);
3707 
3708 LONG ChangeDisplaySettingsA(PDEVMODEA, DWORD);
3709 LONG ChangeDisplaySettingsW(PDEVMODEW, DWORD);
3710 LONG ChangeDisplaySettingsExA(LPCSTR, LPDEVMODEA, HWND, DWORD, LPVOID);
3711 LONG ChangeDisplaySettingsExW(LPCWSTR, LPDEVMODEW, HWND, DWORD, LPVOID);
3712 
3713 BOOL ChangeMenuA(HMENU, UINT, LPCSTR, UINT, UINT);
3714 BOOL ChangeMenuW(HMENU, UINT, LPCWSTR, UINT, UINT);
3715 LPSTR CharLowerA(LPSTR);
3716 LPWSTR CharLowerW(LPWSTR);
3717 DWORD CharLowerBuffA(LPSTR, DWORD);
3718 DWORD CharLowerBuffW(LPWSTR, DWORD);
3719 LPSTR CharNextA(LPCSTR);
3720 LPWSTR CharNextW(LPCWSTR);
3721 LPSTR CharNextExA(WORD, LPCSTR, DWORD);
3722 LPWSTR CharNextExW(WORD, LPCWSTR, DWORD);
3723 LPSTR CharPrevA(LPCSTR, LPCSTR);
3724 LPWSTR CharPrevW(LPCWSTR, LPCWSTR);
3725 LPSTR CharPrevExA(WORD, LPCSTR, LPCSTR, DWORD);
3726 LPWSTR CharPrevExW(WORD, LPCWSTR, LPCWSTR, DWORD);
3727 BOOL CharToOemA(LPCSTR, LPSTR);
3728 BOOL CharToOemW(LPCWSTR, LPSTR);
3729 BOOL CharToOemBuffA(LPCSTR, LPSTR, DWORD);
3730 BOOL CharToOemBuffW(LPCWSTR, LPSTR, DWORD);
3731 LPSTR CharUpperA(LPSTR);
3732 LPWSTR CharUpperW(LPWSTR);
3733 DWORD CharUpperBuffA(LPSTR, DWORD);
3734 DWORD CharUpperBuffW(LPWSTR, DWORD);
3735 BOOL CheckDlgButton(HWND, int, UINT);
3736 DWORD CheckMenuItem(HMENU, UINT, UINT);
3737 BOOL CheckMenuRadioItem(HMENU, UINT, UINT, UINT, UINT);
3738 BOOL CheckRadioButton(HWND, int, int, int);
3739 HWND ChildWindowFromPoint(HWND, POINT);
3740 HWND ChildWindowFromPointEx(HWND, POINT, UINT);
3741 BOOL ClientToScreen(HWND, LPPOINT);
3742 BOOL ClipCursor(LPCRECT);
3743 BOOL CloseClipboard();
3744 BOOL CloseDesktop(HDESK);
3745 BOOL CloseWindow(HWND);
3746 BOOL CloseWindowStation(HWINSTA);
3747 int CopyAcceleratorTableA(HACCEL, LPACCEL, int);
3748 int CopyAcceleratorTableW(HACCEL, LPACCEL, int);
3749 
3750 HICON CopyIcon(HICON);
3751 HANDLE CopyImage(HANDLE, UINT, int, int, UINT);
3752 BOOL CopyRect(LPRECT, LPCRECT);
3753 int CountClipboardFormats();
3754 HACCEL CreateAcceleratorTableA(LPACCEL, int);
3755 HACCEL CreateAcceleratorTableW(LPACCEL, int);
3756 BOOL CreateCaret(HWND, HBITMAP, int, int);
3757 HCURSOR CreateCursor(HINSTANCE, int, int, int, int, PCVOID, PCVOID);
3758 
3759 HDESK CreateDesktopA(LPCSTR, LPCSTR, LPDEVMODEA, DWORD, ACCESS_MASK, LPSECURITY_ATTRIBUTES);
3760 HDESK CreateDesktopW(LPCWSTR, LPCWSTR, LPDEVMODEW, DWORD, ACCESS_MASK, LPSECURITY_ATTRIBUTES);
3761 
3762 HWND CreateDialogParamA(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM);
3763 HWND CreateDialogParamW(HINSTANCE, LPCWSTR, HWND, DLGPROC, LPARAM);
3764 HWND CreateDialogIndirectParamA(HINSTANCE, LPCDLGTEMPLATE, HWND, DLGPROC, LPARAM);
3765 HWND CreateDialogIndirectParamW(HINSTANCE, LPCDLGTEMPLATE, HWND, DLGPROC, LPARAM);
3766 
3767 HICON CreateIcon(HINSTANCE, int, int, BYTE, BYTE, CPtr!(BYTE), BYTE*);
3768 HICON CreateIconFromResource(PBYTE, DWORD, BOOL, DWORD);
3769 HICON CreateIconFromResourceEx(PBYTE, DWORD, BOOL, DWORD, int, int, UINT);
3770 HICON CreateIconIndirect(PICONINFO);
3771 HWND CreateMDIWindowA(LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HINSTANCE, LPARAM);
3772 HWND CreateMDIWindowW(LPCWSTR, LPCWSTR, DWORD, int, int, int, int, HWND, HINSTANCE, LPARAM);
3773 HMENU CreateMenu();
3774 HMENU CreatePopupMenu();
3775 
3776 HWND CreateWindowExA(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID);
3777 HWND CreateWindowExW(DWORD, LPCWSTR, LPCWSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID);
3778 
3779 HWINSTA CreateWindowStationA(LPSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES);
3780 HWINSTA CreateWindowStationW(LPWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES);
3781 LRESULT DefDlgProcA(HWND, UINT, WPARAM, LPARAM);
3782 LRESULT DefDlgProcW(HWND, UINT, WPARAM, LPARAM);
3783 HDWP DeferWindowPos(HDWP, HWND, HWND, int, int, int, int, UINT);
3784 LRESULT DefFrameProcA(HWND, HWND, UINT, WPARAM, LPARAM);
3785 LRESULT DefFrameProcW(HWND, HWND, UINT, WPARAM, LPARAM);
3786 
3787 LRESULT DefMDIChildProcA(HWND, UINT, WPARAM, LPARAM);
3788 LRESULT DefMDIChildProcW(HWND, UINT, WPARAM, LPARAM);
3789 LRESULT DefWindowProcA(HWND, UINT, WPARAM, LPARAM);
3790 LRESULT DefWindowProcW(HWND, UINT, WPARAM, LPARAM);
3791 BOOL DeleteMenu(HMENU, UINT, UINT);
3792 BOOL DeregisterShellHookWindow(HWND);
3793 BOOL DestroyAcceleratorTable(HACCEL);
3794 BOOL DestroyCaret();
3795 BOOL DestroyCursor(HCURSOR);
3796 BOOL DestroyIcon(HICON);
3797 BOOL DestroyMenu(HMENU);
3798 BOOL DestroyWindow(HWND);
3799 
3800 int DialogBoxParamA(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM);
3801 int DialogBoxParamW(HINSTANCE, LPCWSTR, HWND, DLGPROC, LPARAM);
3802 int DialogBoxIndirectParamA(HINSTANCE, LPCDLGTEMPLATE, HWND, DLGPROC, LPARAM);
3803 int DialogBoxIndirectParamW(HINSTANCE, LPCDLGTEMPLATE, HWND, DLGPROC, LPARAM);
3804 
3805 } // extern (Windows)
3806 
3807 HCURSOR CopyCursor(HCURSOR c)
3808 {
3809 	return cast(HCURSOR)CopyIcon(cast(HICON)c);
3810 }
3811 
3812 HWND CreateDialogA(HINSTANCE h, LPCSTR n, HWND w, DLGPROC f)
3813 {
3814 	return CreateDialogParamA(h, n, w, f, 0);
3815 }
3816 
3817 HWND CreateDialogW(HINSTANCE h, LPCWSTR n, HWND w, DLGPROC f)
3818 {
3819 	return CreateDialogParamW(h, n, w, f, 0);
3820 }
3821 
3822 HWND CreateDialogIndirectA(HINSTANCE h, LPCDLGTEMPLATE t, HWND w , DLGPROC f)
3823 {
3824 	return CreateDialogIndirectParamA(h, t, w, f, 0);
3825 }
3826 
3827 HWND CreateDialogIndirectW(HINSTANCE h, LPCDLGTEMPLATE t, HWND w , DLGPROC f)
3828 {
3829 	return CreateDialogIndirectParamW(h, t, w, f, 0);
3830 }
3831 
3832 
3833 HWND CreateWindowA(LPCSTR a, LPCSTR b, DWORD c, int d, int e, int f, int g, HWND h, HMENU i, HINSTANCE j, LPVOID k)
3834 {
3835 	return CreateWindowExA(0, a, b, c, d, e, f, g, h, i, j, k);
3836 }
3837 
3838 HWND CreateWindowW(LPCWSTR a, LPCWSTR b, DWORD c, int d, int e, int f, int g, HWND h, HMENU i, HINSTANCE j, LPVOID k)
3839 {
3840 	return CreateWindowExW(0, a, b, c, d, e, f, g, h, i, j, k);
3841 }
3842 
3843 int DialogBoxA(HINSTANCE i, LPCSTR t, HWND p, DLGPROC f)
3844 {
3845 	return DialogBoxParamA(i, t, p, f, 0);
3846 }
3847 
3848 int DialogBoxW(HINSTANCE i, LPCWSTR t, HWND p, DLGPROC f)
3849 {
3850 	return DialogBoxParamW(i, t, p, f, 0);
3851 }
3852 
3853 int DialogBoxIndirectA(HINSTANCE i, LPCDLGTEMPLATE t, HWND p, DLGPROC f)
3854 {
3855 	return DialogBoxIndirectParamA(i, t, p, f, 0);
3856 }
3857 
3858 int DialogBoxIndirectW(HINSTANCE i, LPCDLGTEMPLATE t, HWND p, DLGPROC f)
3859 {
3860 	return DialogBoxIndirectParamW(i, t, p, f, 0);
3861 }
3862 
3863 BOOL ExitWindows(UINT r, DWORD c)
3864 {
3865 	return ExitWindowsEx(EWX_LOGOFF, 0);
3866 }
3867 alias GetWindow GetNextWindow;
3868 
3869 extern (Windows):
3870 LONG DispatchMessageA( CPtr!(MSG));
3871 LONG DispatchMessageW( CPtr!(MSG));
3872 int DlgDirListA(HWND, LPSTR, int, int, UINT);
3873 int DlgDirListW(HWND, LPWSTR, int, int, UINT);
3874 int DlgDirListComboBoxA(HWND, LPSTR, int, int, UINT);
3875 int DlgDirListComboBoxW(HWND, LPWSTR, int, int, UINT);
3876 BOOL DlgDirSelectComboBoxExA(HWND, LPSTR, int, int);
3877 BOOL DlgDirSelectComboBoxExW(HWND, LPWSTR, int, int);
3878 BOOL DlgDirSelectExA(HWND, LPSTR, int, int);
3879 BOOL DlgDirSelectExW(HWND, LPWSTR, int, int);
3880 BOOL DragDetect(HWND, POINT);
3881 DWORD DragObject(HWND, HWND, UINT, DWORD, HCURSOR);
3882 BOOL DrawAnimatedRects(HWND, int, LPCRECT, LPCRECT);
3883 BOOL DrawCaption(HWND, HDC, LPCRECT, UINT);
3884 BOOL DrawEdge(HDC, LPRECT, UINT, UINT);
3885 BOOL DrawFocusRect(HDC, LPCRECT);
3886 BOOL DrawFrameControl(HDC, LPRECT, UINT, UINT);
3887 BOOL DrawIcon(HDC, int, int, HICON);
3888 BOOL DrawIconEx(HDC, int, int, HICON, int, int, UINT, HBRUSH, UINT);
3889 BOOL DrawMenuBar(HWND);
3890 BOOL DrawStateA(HDC, HBRUSH, DRAWSTATEPROC, LPARAM, WPARAM, int, int, int, int, UINT);
3891 BOOL DrawStateW(HDC, HBRUSH, DRAWSTATEPROC, LPARAM, WPARAM, int, int, int, int, UINT);
3892 int DrawTextA(HDC, LPCSTR, int, LPRECT, UINT);
3893 int DrawTextW(HDC, LPCWSTR, int, LPRECT, UINT);
3894 int DrawTextExA(HDC, LPSTR, int, LPRECT, UINT, LPDRAWTEXTPARAMS);
3895 int DrawTextExW(HDC, LPWSTR, int, LPRECT, UINT, LPDRAWTEXTPARAMS);
3896 BOOL EmptyClipboard();
3897 BOOL EnableMenuItem(HMENU, UINT, UINT);
3898 BOOL EnableScrollBar(HWND, UINT, UINT);
3899 BOOL EnableWindow(HWND, BOOL);
3900 BOOL EndDeferWindowPos(HDWP);
3901 BOOL EndDialog(HWND, int);
3902 BOOL EndMenu();
3903 BOOL EndPaint(HWND, CPtr!(PAINTSTRUCT));
3904 BOOL EnumChildWindows(HWND, ENUMWINDOWSPROC, LPARAM);
3905 UINT EnumClipboardFormats(UINT);
3906 BOOL EnumDesktopsA(HWINSTA, DESKTOPENUMPROCA, LPARAM);
3907 BOOL EnumDesktopsW(HWINSTA, DESKTOPENUMPROCW, LPARAM);
3908 BOOL EnumDesktopWindows(HDESK, ENUMWINDOWSPROC, LPARAM);
3909 BOOL EnumDisplaySettingsA(LPCSTR, DWORD, PDEVMODEA);
3910 BOOL EnumDisplaySettingsW(LPCWSTR, DWORD, PDEVMODEW);
3911 
3912 BOOL EnumDisplayDevicesA(LPCSTR, DWORD, PDISPLAY_DEVICEA, DWORD);
3913 BOOL EnumDisplayDevicesW(LPCWSTR, DWORD, PDISPLAY_DEVICEW, DWORD);
3914 
3915 int EnumPropsA(HWND, PROPENUMPROCA);
3916 int EnumPropsW(HWND, PROPENUMPROCW);
3917 int EnumPropsExA(HWND, PROPENUMPROCEXA, LPARAM);
3918 int EnumPropsExW(HWND, PROPENUMPROCEXW, LPARAM);
3919 
3920 BOOL EnumThreadWindows(DWORD, WNDENUMPROC, LPARAM);
3921 BOOL EnumWindows(WNDENUMPROC, LPARAM);
3922 BOOL EnumWindowStationsA(WINSTAENUMPROCA, LPARAM);
3923 BOOL EnumWindowStationsW(WINSTAENUMPROCW, LPARAM);
3924 BOOL EqualRect(LPCRECT, LPCRECT);
3925 
3926 BOOL ExitWindowsEx(UINT, DWORD);
3927 HWND FindWindowA(LPCSTR, LPCSTR);
3928 HWND FindWindowExA(HWND, HWND, LPCSTR, LPCSTR);
3929 HWND FindWindowExW(HWND, HWND, LPCWSTR, LPCWSTR);
3930 HWND FindWindowW(LPCWSTR, LPCWSTR);
3931 BOOL FlashWindow(HWND, BOOL);
3932 
3933 int FrameRect(HDC, LPCRECT, HBRUSH);
3934 BOOL FrameRgn(HDC, HRGN, HBRUSH, int, int);
3935 HWND GetActiveWindow();
3936 HWND GetAncestor(HWND, UINT);
3937 SHORT GetAsyncKeyState(int);
3938 HWND GetCapture();
3939 UINT GetCaretBlinkTime();
3940 BOOL GetCaretPos(LPPOINT);
3941 BOOL GetClassInfoA(HINSTANCE, LPCSTR, LPWNDCLASSA);
3942 BOOL GetClassInfoExA(HINSTANCE, LPCSTR, LPWNDCLASSEXA);
3943 BOOL GetClassInfoW(HINSTANCE, LPCWSTR, LPWNDCLASSW);
3944 BOOL GetClassInfoExW(HINSTANCE, LPCWSTR, LPWNDCLASSEXW);
3945 DWORD GetClassLongA(HWND, int);
3946 DWORD GetClassLongW(HWND, int);
3947 int GetClassNameA(HWND, LPSTR, int);
3948 int GetClassNameW(HWND, LPWSTR, int);
3949 WORD GetClassWord(HWND, int);
3950 BOOL GetClientRect(HWND, LPRECT);
3951 HANDLE GetClipboardData(UINT);
3952 int GetClipboardFormatNameA(UINT, LPSTR, int);
3953 int GetClipboardFormatNameW(UINT, LPWSTR, int);
3954 HWND GetClipboardOwner();
3955 HWND GetClipboardViewer();
3956 BOOL GetClipCursor(LPRECT);
3957 BOOL GetCursorPos(LPPOINT);
3958 HDC GetDC(HWND);
3959 HDC GetDCEx(HWND, HRGN, DWORD);
3960 HWND GetDesktopWindow();
3961 int GetDialogBaseUnits();
3962 int GetDlgCtrlID(HWND);
3963 HWND GetDlgItem(HWND, int);
3964 UINT GetDlgItemInt(HWND, int, PBOOL, BOOL);
3965 UINT GetDlgItemTextA(HWND, int, LPSTR, int);
3966 UINT GetDlgItemTextW(HWND, int, LPWSTR, int);
3967 UINT GetDoubleClickTime();
3968 HWND GetFocus();
3969 HWND GetForegroundWindow();
3970 
3971 BOOL GetIconInfo(HICON, PICONINFO);
3972 BOOL GetInputState();
3973 UINT GetKBCodePage();
3974 HKL GetKeyboardLayout(DWORD);
3975 UINT GetKeyboardLayoutList(int, HKL*);
3976 BOOL GetKeyboardLayoutNameA(LPSTR);
3977 BOOL GetKeyboardLayoutNameW(LPWSTR);
3978 BOOL GetKeyboardState(PBYTE);
3979 int GetKeyboardType(int);
3980 int GetKeyNameTextA(LONG, LPSTR, int);
3981 int GetKeyNameTextW(LONG, LPWSTR, int);
3982 SHORT GetKeyState(int);
3983 HWND GetLastActivePopup(HWND);
3984 HMENU GetMenu(HWND);
3985 LONG GetMenuCheckMarkDimensions();
3986 DWORD GetMenuContextHelpId(HMENU);
3987 UINT GetMenuDefaultItem(HMENU, UINT, UINT);
3988 int GetMenuItemCount(HMENU);
3989 UINT GetMenuItemID(HMENU, int);
3990 BOOL GetMenuItemInfoA(HMENU, UINT, BOOL, LPMENUITEMINFOA);
3991 BOOL GetMenuItemInfoW(HMENU, UINT, BOOL, LPMENUITEMINFOW);
3992 BOOL GetMenuItemRect(HWND, HMENU, UINT, LPRECT);
3993 UINT GetMenuState(HMENU, UINT, UINT);
3994 int GetMenuStringA(HMENU, UINT, LPSTR, int, UINT);
3995 int GetMenuStringW(HMENU, UINT, LPWSTR, int, UINT);
3996 BOOL GetMessageA(LPMSG, HWND, UINT, UINT);
3997 BOOL GetMessageW(LPMSG, HWND, UINT, UINT);
3998 LONG GetMessageExtraInfo();
3999 DWORD GetMessagePos();
4000 LONG GetMessageTime();
4001 
4002 HWND GetNextDlgGroupItem(HWND, HWND, BOOL);
4003 HWND GetNextDlgTabItem(HWND, HWND, BOOL);
4004 
4005 HWND GetOpenClipboardWindow();
4006 HWND GetParent(HWND);
4007 int GetPriorityClipboardFormat(UINT*, int);
4008 HANDLE GetPropA(HWND, LPCSTR);
4009 HANDLE GetPropW(HWND, LPCWSTR);
4010 
4011 DWORD GetQueueStatus(UINT);
4012 BOOL GetScrollInfo(HWND, int, LPSCROLLINFO);
4013 int GetScrollPos(HWND, int);
4014 BOOL GetScrollRange(HWND, int, LPINT, LPINT);
4015 
4016 HMENU GetSubMenu(HMENU, int);
4017 DWORD GetSysColor(int);
4018 HBRUSH GetSysColorBrush(int);
4019 
4020 HMENU GetSystemMenu(HWND, BOOL);
4021 int GetSystemMetrics(int);
4022 DWORD GetTabbedTextExtentA(HDC, LPCSTR, int, int, LPINT);
4023 DWORD GetTabbedTextExtentW(HDC, LPCWSTR, int, int, LPINT);
4024 LONG GetWindowLongA(HWND, int);
4025 LONG GetWindowLongW(HWND, int);
4026 
4027 HDESK GetThreadDesktop(DWORD);
4028 HWND GetTopWindow(HWND);
4029 BOOL GetUpdateRect(HWND, LPRECT, BOOL);
4030 int GetUpdateRgn(HWND, HRGN, BOOL);
4031 BOOL GetUserObjectInformationA(HANDLE, int, PVOID, DWORD, PDWORD);
4032 BOOL GetUserObjectInformationW(HANDLE, int, PVOID, DWORD, PDWORD);
4033 BOOL GetUserObjectSecurity(HANDLE, PSECURITY_INFORMATION, PSECURITY_DESCRIPTOR, DWORD, PDWORD);
4034 HWND GetWindow(HWND, UINT);
4035 DWORD GetWindowContextHelpId(HWND);
4036 HDC GetWindowDC(HWND);
4037 BOOL GetWindowPlacement(HWND, WINDOWPLACEMENT*);
4038 BOOL GetWindowRect(HWND, LPRECT);
4039 int GetWindowRgn(HWND, HRGN);
4040 int GetWindowTextA(HWND, LPSTR, int);
4041 int GetWindowTextLengthA(HWND);
4042 int GetWindowTextLengthW(HWND);
4043 int GetWindowTextW(HWND, LPWSTR, int);
4044 WORD GetWindowWord(HWND, int);
4045 BOOL GetAltTabInfoA(HWND, int, PALTTABINFO, LPSTR, UINT);
4046 BOOL GetAltTabInfoW(HWND, int, PALTTABINFO, LPWSTR, UINT);
4047 BOOL GetComboBoxInfo(HWND, PCOMBOBOXINFO);
4048 BOOL GetCursorInfo(PCURSORINFO);
4049 BOOL GetLastInputInfo(PLASTINPUTINFO);
4050 DWORD GetListBoxInfo(HWND);
4051 BOOL GetMenuBarInfo(HWND, LONG, LONG, PMENUBARINFO);
4052 BOOL GetMenuInfo(HMENU, LPMENUINFO);
4053 BOOL GetScrollBarInfo(HWND, LONG, PSCROLLBARINFO);
4054 BOOL GetTitleBarInfo(HWND, PTITLEBARINFO);
4055 BOOL GetWindowInfo(HWND, PWINDOWINFO);
4056 UINT GetWindowModuleFileNameA(HWND, LPSTR, UINT);
4057 UINT GetWindowModuleFileNameW(HWND, LPWSTR, UINT);
4058 BOOL GrayStringA(HDC, HBRUSH, GRAYSTRINGPROC, LPARAM, int, int, int, int, int);
4059 BOOL GrayStringW(HDC, HBRUSH, GRAYSTRINGPROC, LPARAM, int, int, int, int, int);
4060 BOOL HideCaret(HWND);
4061 BOOL HiliteMenuItem(HWND, HMENU, UINT, UINT);
4062 BOOL InflateRect(LPRECT, int, int);
4063 BOOL InSendMessage();
4064 BOOL InsertMenuA(HMENU, UINT, UINT, UINT, LPCSTR);
4065 BOOL InsertMenuW(HMENU, UINT, UINT, UINT, LPCWSTR);
4066 BOOL InsertMenuItemA(HMENU, UINT, BOOL, LPCMENUITEMINFOA);
4067 BOOL InsertMenuItemW(HMENU, UINT, BOOL, LPCMENUITEMINFOW);
4068 INT InternalGetWindowText(HWND, LPWSTR, INT);
4069 BOOL IntersectRect(LPRECT, LPCRECT, LPCRECT);
4070 BOOL InvalidateRect(HWND, LPCRECT, BOOL);
4071 BOOL InvalidateRgn(HWND, HRGN, BOOL);
4072 BOOL InvertRect(HDC, LPCRECT);
4073 BOOL IsCharAlphaA(CHAR ch);
4074 BOOL IsCharAlphaNumericA(CHAR);
4075 BOOL IsCharAlphaNumericW(WCHAR);
4076 BOOL IsCharAlphaW(WCHAR);
4077 BOOL IsCharLowerA(CHAR);
4078 BOOL IsCharLowerW(WCHAR);
4079 BOOL IsCharUpperA(CHAR);
4080 BOOL IsCharUpperW(WCHAR);
4081 BOOL IsChild(HWND, HWND);
4082 BOOL IsClipboardFormatAvailable(UINT);
4083 BOOL IsDialogMessageA(HWND, LPMSG);
4084 BOOL IsDialogMessageW(HWND, LPMSG);
4085 UINT IsDlgButtonChecked(HWND, int);
4086 BOOL IsIconic(HWND);
4087 BOOL IsMenu(HMENU);
4088 BOOL IsRectEmpty(LPCRECT);
4089 BOOL IsWindow(HWND);
4090 BOOL IsWindowEnabled(HWND);
4091 BOOL IsWindowUnicode(HWND);
4092 BOOL IsWindowVisible(HWND);
4093 BOOL IsZoomed(HWND);
4094 void keybd_event(BYTE, BYTE, DWORD, DWORD);
4095 BOOL KillTimer(HWND, UINT);
4096 HACCEL LoadAcceleratorsA(HINSTANCE, LPCSTR);
4097 HACCEL LoadAcceleratorsW(HINSTANCE, LPCWSTR);
4098 HBITMAP LoadBitmapA(HINSTANCE, LPCSTR);
4099 HBITMAP LoadBitmapW(HINSTANCE, LPCWSTR);
4100 HCURSOR LoadCursorA(HINSTANCE, LPCSTR);
4101 HCURSOR LoadCursorFromFileA(LPCSTR);
4102 HCURSOR LoadCursorFromFileW(LPCWSTR);
4103 HCURSOR LoadCursorW(HINSTANCE, LPCWSTR);
4104 HICON LoadIconA(HINSTANCE, LPCSTR);
4105 HICON LoadIconW(HINSTANCE, LPCWSTR);
4106 HANDLE LoadImageA(HINSTANCE, LPCSTR, UINT, int, int, UINT);
4107 HANDLE LoadImageW(HINSTANCE, LPCWSTR, UINT, int, int, UINT);
4108 HKL LoadKeyboardLayoutA(LPCSTR, UINT);
4109 HKL LoadKeyboardLayoutW(LPCWSTR, UINT);
4110 HMENU LoadMenuA(HINSTANCE, LPCSTR);
4111 HMENU LoadMenuIndirectA( CPtr!(MENUTEMPLATE));
4112 HMENU LoadMenuIndirectW( CPtr!(MENUTEMPLATE));
4113 HMENU LoadMenuW(HINSTANCE, LPCWSTR);
4114 int LoadStringA(HINSTANCE, UINT, LPSTR, int);
4115 int LoadStringW(HINSTANCE, UINT, LPWSTR, int);
4116 BOOL LockWindowUpdate(HWND);
4117 int LookupIconIdFromDirectory(PBYTE, BOOL);
4118 int LookupIconIdFromDirectoryEx(PBYTE, BOOL, int, int, UINT);
4119 BOOL MapDialogRect(HWND, LPRECT);
4120 UINT MapVirtualKeyA(UINT, UINT);
4121 UINT MapVirtualKeyExA(UINT, UINT, HKL);
4122 UINT MapVirtualKeyExW(UINT, UINT, HKL);
4123 UINT MapVirtualKeyW(UINT, UINT);
4124 int MapWindowPoints(HWND, HWND, LPPOINT, UINT);
4125 int MenuItemFromPoint(HWND, HMENU, POINT);
4126 BOOL MessageBeep(UINT);
4127 int MessageBoxA(HWND, LPCSTR, LPCSTR, UINT);
4128 int MessageBoxW(HWND, LPCWSTR, LPCWSTR, UINT);
4129 int MessageBoxExA(HWND, LPCSTR, LPCSTR, UINT, WORD);
4130 int MessageBoxExW(HWND, LPCWSTR, LPCWSTR, UINT, WORD);
4131 int MessageBoxIndirectA(CPtr!(MSGBOXPARAMSA));
4132 int MessageBoxIndirectW(CPtr!(MSGBOXPARAMSW));
4133 BOOL ModifyMenuA(HMENU, UINT, UINT, UINT, LPCSTR);
4134 BOOL ModifyMenuW(HMENU, UINT, UINT, UINT, LPCWSTR);
4135 void mouse_event(DWORD, DWORD, DWORD, DWORD, ULONG_PTR);
4136 BOOL MoveWindow(HWND, int, int, int, int, BOOL);
4137 DWORD MsgWaitForMultipleObjects(DWORD, CPtr!(HANDLE), BOOL, DWORD, DWORD);
4138 DWORD MsgWaitForMultipleObjectsEx(DWORD, CPtr!(HANDLE), DWORD, DWORD, DWORD);
4139 DWORD OemKeyScan(WORD);
4140 BOOL OemToCharA(LPCSTR, LPSTR);
4141 BOOL OemToCharBuffA(LPCSTR, LPSTR, DWORD);
4142 BOOL OemToCharBuffW(LPCSTR, LPWSTR, DWORD);
4143 BOOL OemToCharW(LPCSTR, LPWSTR);
4144 BOOL OffsetRect(LPRECT, int, int);
4145 BOOL OpenClipboard(HWND);
4146 HDESK OpenDesktopA(LPSTR, DWORD, BOOL, DWORD);
4147 HDESK OpenDesktopW(LPWSTR, DWORD, BOOL, DWORD);
4148 BOOL OpenIcon(HWND);
4149 HDESK OpenInputDesktop(DWORD, BOOL, DWORD);
4150 HWINSTA OpenWindowStationA(LPSTR, BOOL, DWORD);
4151 HWINSTA OpenWindowStationW(LPWSTR, BOOL, DWORD);
4152 BOOL PaintDesktop(HDC);
4153 BOOL PeekMessageA(LPMSG, HWND, UINT, UINT, UINT);
4154 BOOL PeekMessageW(LPMSG, HWND, UINT, UINT, UINT);
4155 BOOL PostMessageA(HWND, UINT, WPARAM, LPARAM);
4156 BOOL PostMessageW(HWND, UINT, WPARAM, LPARAM);
4157 void PostQuitMessage(int);
4158 BOOL PostThreadMessageA(DWORD, UINT, WPARAM, LPARAM);
4159 BOOL PostThreadMessageW(DWORD, UINT, WPARAM, LPARAM);
4160 BOOL PtInRect(LPCRECT, POINT);
4161 HWND RealChildWindowFromPoint(HWND, POINT);
4162 UINT RealGetWindowClassA(HWND, LPSTR, UINT);
4163 UINT RealGetWindowClassW(HWND, LPWSTR, UINT);
4164 BOOL RedrawWindow(HWND, LPCRECT, HRGN, UINT);
4165 ATOM RegisterClassA(CPtr!(WNDCLASSA));
4166 ATOM RegisterClassW(CPtr!(WNDCLASSW));
4167 ATOM RegisterClassExA(CPtr!(WNDCLASSEXA));
4168 ATOM RegisterClassExW(CPtr!(WNDCLASSEXW));
4169 UINT RegisterClipboardFormatA(LPCSTR);
4170 UINT RegisterClipboardFormatW(LPCWSTR);
4171 BOOL RegisterHotKey(HWND, int, UINT, UINT);
4172 UINT RegisterWindowMessageA(LPCSTR);
4173 UINT RegisterWindowMessageW(LPCWSTR);
4174 BOOL ReleaseCapture();
4175 int ReleaseDC(HWND, HDC);
4176 BOOL RemoveMenu(HMENU, UINT, UINT);
4177 HANDLE RemovePropA(HWND, LPCSTR);
4178 HANDLE RemovePropW(HWND, LPCWSTR);
4179 BOOL ReplyMessage(LRESULT);
4180 BOOL ScreenToClient(HWND, LPPOINT);
4181 BOOL ScrollDC(HDC, int, int, LPCRECT, LPCRECT, HRGN, LPRECT);
4182 BOOL ScrollWindow(HWND, int, int, LPCRECT, LPCRECT);
4183 int ScrollWindowEx(HWND, int, int, LPCRECT, LPCRECT, HRGN, LPRECT, UINT);
4184 LONG SendDlgItemMessageA(HWND, int, UINT, WPARAM, LPARAM);
4185 LONG SendDlgItemMessageW(HWND, int, UINT, WPARAM, LPARAM);
4186 LRESULT SendMessageA(HWND, UINT, WPARAM, LPARAM);
4187 BOOL SendMessageCallbackA(HWND, UINT, WPARAM, LPARAM, SENDASYNCPROC, DWORD);
4188 BOOL SendMessageCallbackW(HWND, UINT, WPARAM, LPARAM, SENDASYNCPROC, DWORD);
4189 LRESULT SendMessageTimeoutA(HWND, UINT, WPARAM, LPARAM, UINT, UINT, PDWORD);
4190 LRESULT SendMessageTimeoutW(HWND, UINT, WPARAM, LPARAM, UINT, UINT, PDWORD);
4191 LRESULT SendMessageW(HWND, UINT, WPARAM, LPARAM);
4192 BOOL SendNotifyMessageA(HWND, UINT, WPARAM, LPARAM);
4193 BOOL SendNotifyMessageW(HWND, UINT, WPARAM, LPARAM);
4194 HWND SetActiveWindow(HWND);
4195 HWND SetCapture(HWND hWnd);
4196 BOOL SetCaretBlinkTime(UINT);
4197 BOOL SetCaretPos(int, int);
4198 DWORD SetClassLongA(HWND, int, LONG);
4199 DWORD SetClassLongW(HWND, int, LONG);
4200 WORD SetClassWord(HWND, int, WORD);
4201 HANDLE SetClipboardData(UINT, HANDLE);
4202 HWND SetClipboardViewer(HWND);
4203 HCURSOR SetCursor(HCURSOR);
4204 BOOL SetCursorPos(int, int);
4205 void SetDebugErrorLevel(DWORD);
4206 BOOL SetDlgItemInt(HWND, int, UINT, BOOL);
4207 BOOL SetDlgItemTextA(HWND, int, LPCSTR);
4208 BOOL SetDlgItemTextW(HWND, int, LPCWSTR);
4209 BOOL SetDoubleClickTime(UINT);
4210 HWND SetFocus(HWND);
4211 BOOL SetForegroundWindow(HWND);
4212 BOOL SetKeyboardState(PBYTE);
4213 BOOL SetMenu(HWND, HMENU);
4214 BOOL SetMenuContextHelpId(HMENU, DWORD);
4215 BOOL SetMenuDefaultItem(HMENU, UINT, UINT);
4216 BOOL SetMenuInfo(HMENU, LPCMENUINFO);
4217 BOOL SetMenuItemBitmaps(HMENU, UINT, UINT, HBITMAP, HBITMAP);
4218 BOOL SetMenuItemInfoA(HMENU, UINT, BOOL, LPCMENUITEMINFOA);
4219 BOOL SetMenuItemInfoW( HMENU, UINT, BOOL, LPCMENUITEMINFOW);
4220 LPARAM SetMessageExtraInfo(LPARAM);
4221 BOOL SetMessageQueue(int);
4222 HWND SetParent(HWND, HWND);
4223 BOOL SetProcessWindowStation(HWINSTA);
4224 BOOL SetPropA(HWND, LPCSTR, HANDLE);
4225 BOOL SetPropW(HWND, LPCWSTR, HANDLE);
4226 BOOL SetRect(LPRECT, int, int, int, int);
4227 BOOL SetRectEmpty(LPRECT);
4228 int SetScrollInfo(HWND, int, LPCSCROLLINFO, BOOL);
4229 int SetScrollPos(HWND, int, int, BOOL);
4230 BOOL SetScrollRange(HWND, int, int, int, BOOL);
4231 BOOL SetSysColors(int, CPtr!(INT) , CPtr!(COLORREF) );
4232 BOOL SetSystemCursor(HCURSOR, DWORD);
4233 BOOL SetThreadDesktop(HDESK);
4234 UINT SetTimer(HWND, UINT, UINT, TIMERPROC);
4235 BOOL SetUserObjectInformationA(HANDLE, int, PVOID, DWORD);
4236 BOOL SetUserObjectInformationW(HANDLE, int, PVOID, DWORD);
4237 BOOL SetUserObjectSecurity(HANDLE, PSECURITY_INFORMATION, PSECURITY_DESCRIPTOR);
4238 BOOL SetWindowContextHelpId(HWND, DWORD);
4239 LONG SetWindowLongA(HWND, int, LONG);
4240 LONG SetWindowLongW(HWND, int, LONG);
4241 BOOL SetWindowPlacement(HWND hWnd, CPtr!(WINDOWPLACEMENT));
4242 BOOL SetWindowPos(HWND, HWND, int, int, int, int, UINT);
4243 int SetWindowRgn(HWND, HRGN, BOOL);
4244 HHOOK SetWindowsHookA(int, HOOKPROC);
4245 HHOOK SetWindowsHookW(int, HOOKPROC);
4246 HHOOK SetWindowsHookExA(int, HOOKPROC, HINSTANCE, DWORD);
4247 HHOOK SetWindowsHookExW(int, HOOKPROC, HINSTANCE, DWORD);
4248 BOOL SetWindowTextA(HWND, LPCSTR);
4249 BOOL SetWindowTextW(HWND, LPCWSTR);
4250 WORD SetWindowWord(HWND, int, WORD);
4251 BOOL ShowCaret(HWND);
4252 int ShowCursor(BOOL);
4253 BOOL ShowOwnedPopups(HWND, BOOL);
4254 BOOL ShowScrollBar(HWND, int, BOOL);
4255 BOOL ShowWindow(HWND, int);
4256 BOOL ShowWindowAsync(HWND, int);
4257 BOOL SubtractRect(LPRECT, LPCRECT, LPCRECT);
4258 BOOL SwapMouseButton(BOOL);
4259 BOOL SwitchDesktop(HDESK);
4260 BOOL SystemParametersInfoA(UINT, UINT, PVOID, UINT);
4261 BOOL SystemParametersInfoW(UINT, UINT, PVOID, UINT);
4262 LONG TabbedTextOutA(HDC, int, int, LPCSTR, int, int, LPINT, int);
4263 LONG TabbedTextOutW(HDC, int, int, LPCWSTR, int, int, LPINT, int);
4264 WORD TileWindows(HWND, UINT, LPCRECT, UINT, CPtr!(HWND) );
4265 int ToAscii(UINT, UINT, PBYTE, LPWORD, UINT);
4266 int ToAsciiEx(UINT, UINT, PBYTE, LPWORD, UINT, HKL);
4267 int ToUnicode(UINT, UINT, PBYTE, LPWSTR, int, UINT);
4268 int ToUnicodeEx(UINT, UINT, PBYTE, LPWSTR, int, UINT, HKL);
4269 BOOL TrackMouseEvent(LPTRACKMOUSEEVENT);
4270 BOOL TrackPopupMenu(HMENU, UINT, int, int, int, HWND, LPCRECT);
4271 BOOL TrackPopupMenuEx(HMENU, UINT, int, int, HWND, LPTPMPARAMS);
4272 int TranslateAcceleratorA(HWND, HACCEL, LPMSG);
4273 int TranslateAcceleratorW(HWND, HACCEL, LPMSG);
4274 BOOL TranslateMDISysAccel(HWND, LPMSG);
4275 BOOL TranslateMessage( CPtr!(MSG));
4276 BOOL UnhookWindowsHook(int, HOOKPROC);
4277 BOOL UnhookWindowsHookEx(HHOOK);
4278 BOOL UnionRect(LPRECT, LPCRECT, LPCRECT);
4279 BOOL UnloadKeyboardLayout(HKL);
4280 BOOL UnregisterClassA(LPCSTR, HINSTANCE);
4281 BOOL UnregisterClassW(LPCWSTR, HINSTANCE);
4282 BOOL UnregisterHotKey(HWND, int);
4283 BOOL UpdateWindow(HWND);
4284 BOOL ValidateRect(HWND, LPCRECT);
4285 BOOL ValidateRgn(HWND, HRGN);
4286 SHORT VkKeyScanA(CHAR);
4287 SHORT VkKeyScanExA(CHAR, HKL);
4288 SHORT VkKeyScanExW(WCHAR, HKL);
4289 SHORT VkKeyScanW(WCHAR);
4290 DWORD WaitForInputIdle(HANDLE, DWORD);
4291 BOOL WaitMessage();
4292 HWND WindowFromDC(HDC hDC);
4293 HWND WindowFromPoint(POINT);
4294 UINT WinExec(LPCSTR, UINT);
4295 BOOL WinHelpA(HWND, LPCSTR, UINT, DWORD);
4296 BOOL WinHelpW(HWND, LPCWSTR, UINT, DWORD);
4297 
4298 extern (C) {
4299 	int wsprintfA(LPSTR, LPCSTR, ...);
4300 	int wsprintfW(LPWSTR, LPCWSTR, ...);
4301 }
4302 
4303 
4304 // These shouldn't be necessary for D.
4305 alias char* va_list_;
4306 int wvsprintfA(LPSTR, LPCSTR, va_list_ arglist);
4307 int wvsprintfW(LPWSTR, LPCWSTR, va_list_ arglist);
4308 
4309 
4310 static if (_WIN32_WINDOWS == 0x400) {
4311 // On Win95, there's only one version.
4312 int BroadcastSystemMessage(DWORD, LPDWORD, UINT, WPARAM, LPARAM);
4313 }
4314 static if (_WIN32_WINNT >= 0x400) {
4315 int BroadcastSystemMessageA(DWORD, LPDWORD, UINT, WPARAM, LPARAM);
4316 int BroadcastSystemMessageW(DWORD, LPDWORD, UINT, WPARAM, LPARAM);
4317 }
4318 static if (_WIN32_WINNT >= 0x501) {
4319 int BroadcastSystemMessageExA(DWORD, LPDWORD, UINT, WPARAM, LPARAM, PBSMINFO);
4320 int BroadcastSystemMessageExW(DWORD, LPDWORD, UINT, WPARAM, LPARAM, PBSMINFO);
4321 }
4322 
4323 static if (_WIN32_WINNT >= 0x403) {
4324 UINT SendInput(UINT, LPINPUT, int);
4325 }
4326 static if (_WIN32_WINNT >= 0x500) {
4327 BOOL AnimateWindow(HWND, DWORD, DWORD);
4328 BOOL EndTask(HWND, BOOL, BOOL);
4329 DWORD GetGuiResources(HANDLE, DWORD);
4330 HWND GetShellWindow();
4331 BOOL GetProcessDefaultLayout(DWORD*);
4332 BOOL IsHungAppWindow(HWND);
4333 BOOL LockWorkStation();
4334 HDEVNOTIFY RegisterDeviceNotificationA(HANDLE, LPVOID, DWORD);
4335 HDEVNOTIFY RegisterDeviceNotificationW(HANDLE, LPVOID, DWORD);
4336 BOOL SetProcessDefaultLayout(DWORD);
4337 void SwitchToThisWindow(HWND, BOOL);
4338 BOOL SetLayeredWindowAttributes(HWND, COLORREF, BYTE, DWORD);
4339 BOOL UpdateLayeredWindow(HWND, HDC, POINT*, SIZE*, HDC, POINT*, COLORREF, BLENDFUNCTION*, DWORD);
4340 BOOL UserHandleGrantAccess(HANDLE, HANDLE, BOOL);
4341 }
4342 static if (_WIN32_WINNT >= 0x501) {
4343 UINT GetRawInputBuffer(PRAWINPUT, PUINT, UINT);
4344 UINT GetRawInputData(HRAWINPUT, UINT, LPVOID, PUINT, UINT);
4345 UINT GetRawInputDeviceInfoA(HANDLE, UINT, LPVOID, PUINT);
4346 UINT GetRawInputDeviceInfoW(HANDLE, UINT, LPVOID, PUINT);
4347 UINT GetRawInputDeviceList(PRAWINPUTDEVICELIST, PUINT, UINT);
4348 UINT GetRegisteredRawInputDevices(PRAWINPUTDEVICE, PUINT, UINT);
4349 LRESULT DefRawInputProc(PRAWINPUT*, INT, UINT);
4350 BOOL RegisterRawInputDevices(PCRAWINPUTDEVICE, UINT, UINT);
4351 
4352 BOOL IsGUIThread(BOOL);
4353 BOOL IsWinEventHookInstalled(DWORD);
4354 BOOL PrintWindow(HWND, HDC, UINT);
4355 BOOL GetLayeredWindowAttributes(HWND, COLORREF*, BYTE*, DWORD*);
4356 }
4357 static if (WINVER >= 0x410) {
4358 	BOOL EnumDisplayMonitors(HDC, LPCRECT, MONITORENUMPROC, LPARAM);
4359 	BOOL GetMonitorInfoA(HMONITOR, LPMONITORINFO);
4360 	BOOL GetMonitorInfoA(HMONITOR, LPMONITORINFOEXA);
4361 	BOOL GetMonitorInfoW(HMONITOR, LPMONITORINFO);
4362 	BOOL GetMonitorInfoW(HMONITOR, LPMONITORINFOEXW);
4363 	HMONITOR MonitorFromPoint(POINT, DWORD);
4364 	HMONITOR MonitorFromRect(LPCRECT, DWORD);
4365 	HMONITOR MonitorFromWindow(HWND, DWORD);
4366 }
4367 static if (WINVER >= 0x500) {
4368 BOOL GetGUIThreadInfo(DWORD, LPGUITHREADINFO);
4369 void NotifyWinEvent(DWORD, HWND, LONG, LONG);
4370 HWINEVENTHOOK SetWinEventHook(UINT, UINT, HMODULE, WINEVENTPROC, DWORD, DWORD, UINT);
4371 BOOL UnhookWinEvent(HWINEVENTHOOK);
4372 BOOL UnregisterDeviceNotification(HANDLE);
4373 }
4374 static if ((_WIN32_WINNT >= 0x500) || (_WIN32_WINDOWS >= 0x410)) {
4375 BOOL EnumDisplaySettingsExA(LPCSTR, DWORD, LPDEVMODEA, DWORD);
4376 BOOL EnumDisplaySettingsExW(LPCWSTR, DWORD, LPDEVMODEW, DWORD);
4377 BOOL FlashWindowEx(PFLASHWINFO);
4378 DWORD GetClipboardSequenceNumber();
4379 DWORD InSendMessageEx(LPVOID);
4380 }
4381 static if ((_WIN32_WINNT >= 0x500) || (_WIN32_WINDOWS >= 0x490)) {
4382 BOOL AllowSetForegroundWindow(DWORD);
4383 BOOL LockSetForegroundWindow(UINT);
4384 int GetMouseMovePointsEx(UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEPOINT, int, DWORD);
4385 }
4386 
4387 version (Win64) {
4388 LONG_PTR GetWindowLongPtrA(HWND, int);
4389 LONG_PTR GetWindowLongPtrW(HWND, int);
4390 LONG_PTR SetWindowLongPtrA(HWND, int, LONG_PTR);
4391 LONG_PTR SetWindowLongPtrW(HWND, int, LONG_PTR);
4392 } else {
4393 alias GetWindowLongA GetWindowLongPtrA;
4394 alias GetWindowLongW GetWindowLongPtrW;
4395 alias SetWindowLongA SetWindowLongPtrA;
4396 alias SetWindowLongW SetWindowLongPtrW;
4397 }
4398 
4399 
4400 // -----
4401 // Aliases for Unicode or Ansi
4402 version(Unicode) {
4403 
4404 alias EDITWORDBREAKPROCW EDITWORDBREAKPROC;
4405 alias PROPENUMPROCW PROPENUMPROC;
4406 alias PROPENUMPROCEXW PROPENUMPROCEX;
4407 alias DESKTOPENUMPROCW DESKTOPENUMPROC;
4408 alias WINSTAENUMPROCW WINSTAENUMPROC;
4409 alias MAKEINTRESOURCEW MAKEINTRESOURCE;
4410 
4411 alias WNDCLASSW WNDCLASS;
4412 alias WNDCLASSEXW WNDCLASSEX;
4413 alias MENUITEMINFOW MENUITEMINFO;
4414 alias LPCMENUITEMINFOW LPCMENUITEMINFO;
4415 alias MSGBOXPARAMSW MSGBOXPARAMS;
4416 alias HIGHCONTRASTW HIGHCONTRAST;
4417 alias SERIALKEYSW SERIALKEYS;
4418 alias SOUNDSENTRYW SOUNDSENTRY;
4419 alias CREATESTRUCTW CREATESTRUCT;
4420 alias CBT_CREATEWNDW CBT_CREATEWND;
4421 alias MDICREATESTRUCTW MDICREATESTRUCT;
4422 alias MULTIKEYHELPW MULTIKEYHELP;
4423 alias MONITORINFOEXW MONITORINFOEX;
4424 alias ICONMETRICSW ICONMETRICS;
4425 alias NONCLIENTMETRICSW NONCLIENTMETRICS;
4426 
4427 alias AppendMenuW AppendMenu;
4428 alias BroadcastSystemMessageW BroadcastSystemMessage;
4429 static if (_WIN32_WINNT >= 0x501) {
4430 alias BroadcastSystemMessageExW BroadcastSystemMessageEx;
4431 }
4432 alias CallMsgFilterW CallMsgFilter;
4433 alias CallWindowProcW CallWindowProc;
4434 alias ChangeMenuW ChangeMenu;
4435 alias CharLowerW CharLower;
4436 alias CharLowerBuffW CharLowerBuff;
4437 alias CharNextW CharNext;
4438 alias CharNextExW CharNextEx;
4439 alias CharPrevW CharPrev;
4440 alias CharPrevExW CharPrevEx;
4441 alias CharToOemW CharToOem;
4442 alias CharToOemBuffW CharToOemBuff;
4443 alias CharUpperW CharUpper;
4444 alias CharUpperBuffW CharUpperBuff;
4445 alias CopyAcceleratorTableW CopyAcceleratorTable;
4446 alias CreateAcceleratorTableW CreateAcceleratorTable;
4447 alias CreateDialogW CreateDialog;
4448 alias CreateDialogIndirectW CreateDialogIndirect;
4449 alias CreateDialogIndirectParamW CreateDialogIndirectParam;
4450 alias CreateDialogParamW CreateDialogParam;
4451 alias CreateMDIWindowW CreateMDIWindow;
4452 alias CreateWindowW CreateWindow;
4453 alias CreateWindowExW CreateWindowEx;
4454 alias CreateWindowStationW CreateWindowStation;
4455 alias DefDlgProcW DefDlgProc;
4456 alias DefFrameProcW DefFrameProc;
4457 alias DefMDIChildProcW DefMDIChildProc;
4458 alias DefWindowProcW DefWindowProc;
4459 alias DialogBoxW DialogBox;
4460 alias DialogBoxIndirectW DialogBoxIndirect;
4461 alias DialogBoxIndirectParamW DialogBoxIndirectParam;
4462 alias DialogBoxParamW DialogBoxParam;
4463 alias DispatchMessageW DispatchMessage;
4464 alias DlgDirListW DlgDirList;
4465 alias DlgDirListComboBoxW DlgDirListComboBox;
4466 alias DlgDirSelectComboBoxExW DlgDirSelectComboBoxEx;
4467 alias DlgDirSelectExW DlgDirSelectEx;
4468 alias DrawStateW DrawState;
4469 alias DrawTextW DrawText;
4470 alias DrawTextExW DrawTextEx;
4471 alias EnumDesktopsW EnumDesktops;
4472 alias EnumPropsW EnumProps;
4473 alias EnumPropsExW EnumPropsEx;
4474 alias EnumWindowStationsW EnumWindowStations;
4475 alias FindWindowW FindWindow;
4476 alias FindWindowExW FindWindowEx;
4477 alias GetClassInfoW GetClassInfo;
4478 alias GetClassInfoExW GetClassInfoEx;
4479 alias GetClassLongW GetClassLong;
4480 alias GetClassNameW GetClassName;
4481 alias GetClipboardFormatNameW GetClipboardFormatName;
4482 alias GetDlgItemTextW GetDlgItemText;
4483 alias GetKeyboardLayoutNameW GetKeyboardLayoutName;
4484 alias GetKeyNameTextW GetKeyNameText;
4485 alias GetMenuItemInfoW GetMenuItemInfo;
4486 alias GetMenuStringW GetMenuString;
4487 alias GetMessageW GetMessage;
4488 static if (WINVER >=0x410) {
4489 alias GetMonitorInfoW GetMonitorInfo;
4490 }
4491 alias GetPropW GetProp;
4492 static if (_WIN32_WINNT >= 0x501) {
4493 alias GetRawInputDeviceInfoW GetRawInputDeviceInfo;
4494 }
4495 alias GetTabbedTextExtentW GetTabbedTextExtent;
4496 alias GetUserObjectInformationW GetUserObjectInformation;
4497 alias GetWindowLongW GetWindowLong;
4498 alias GetWindowLongPtrW GetWindowLongPtr;
4499 alias GetWindowTextW GetWindowText;
4500 alias GetWindowTextLengthW GetWindowTextLength;
4501 alias GetAltTabInfoW GetAltTabInfo;
4502 alias GetWindowModuleFileNameW GetWindowModuleFileName;
4503 alias GrayStringW GrayString;
4504 alias InsertMenuW InsertMenu;
4505 alias InsertMenuItemW InsertMenuItem;
4506 alias IsCharAlphaW IsCharAlpha;
4507 alias IsCharAlphaNumericW IsCharAlphaNumeric;
4508 alias IsCharLowerW IsCharLower;
4509 alias IsCharUpperW IsCharUpper;
4510 alias IsDialogMessageW IsDialogMessage;
4511 alias LoadAcceleratorsW LoadAccelerators;
4512 alias LoadBitmapW LoadBitmap;
4513 alias LoadCursorW LoadCursor;
4514 alias LoadCursorFromFileW LoadCursorFromFile;
4515 alias LoadIconW LoadIcon;
4516 alias LoadImageW LoadImage;
4517 alias LoadKeyboardLayoutW LoadKeyboardLayout;
4518 alias LoadMenuW LoadMenu;
4519 alias LoadMenuIndirectW LoadMenuIndirect;
4520 alias LoadStringW LoadString;
4521 alias MapVirtualKeyW MapVirtualKey;
4522 alias MapVirtualKeyExW MapVirtualKeyEx;
4523 alias MessageBoxW MessageBox;
4524 alias MessageBoxExW MessageBoxEx;
4525 alias MessageBoxIndirectW MessageBoxIndirect;
4526 alias ModifyMenuW ModifyMenu;
4527 alias OemToCharW OemToChar;
4528 alias OemToCharBuffW OemToCharBuff;
4529 alias OpenDesktopW OpenDesktop;
4530 alias OpenWindowStationW OpenWindowStation;
4531 alias PeekMessageW PeekMessage;
4532 alias PostMessageW PostMessage;
4533 alias PostThreadMessageW PostThreadMessage;
4534 alias RealGetWindowClassW RealGetWindowClass;
4535 alias RegisterClassW RegisterClass;
4536 alias RegisterClassExW RegisterClassEx;
4537 alias RegisterClipboardFormatW RegisterClipboardFormat;
4538 static if (WINVER >= 0x500) {
4539 alias RegisterDeviceNotificationW RegisterDeviceNotification;
4540 }
4541 alias RegisterWindowMessageW RegisterWindowMessage;
4542 alias RemovePropW RemoveProp;
4543 alias SendDlgItemMessageW SendDlgItemMessage;
4544 alias SendMessageW SendMessage;
4545 alias SendMessageCallbackW SendMessageCallback;
4546 alias SendMessageTimeoutW SendMessageTimeout;
4547 alias SendNotifyMessageW SendNotifyMessage;
4548 alias SetClassLongW SetClassLong;
4549 alias SetDlgItemTextW SetDlgItemText;
4550 alias SetMenuItemInfoW SetMenuItemInfo;
4551 alias SetPropW SetProp;
4552 alias SetUserObjectInformationW SetUserObjectInformation;
4553 alias SetWindowLongW SetWindowLong;
4554 alias SetWindowLongPtrW SetWindowLongPtr;
4555 alias SetWindowsHookW SetWindowsHook;
4556 alias SetWindowsHookExW SetWindowsHookEx;
4557 alias SetWindowTextW SetWindowText;
4558 alias SystemParametersInfoW SystemParametersInfo;
4559 alias TabbedTextOutW TabbedTextOut;
4560 alias TranslateAcceleratorW TranslateAccelerator;
4561 alias UnregisterClassW UnregisterClass;
4562 alias VkKeyScanW VkKeyScan;
4563 alias VkKeyScanExW VkKeyScanEx;
4564 alias WinHelpW WinHelp;
4565 alias wsprintfW wsprintf;
4566 alias wvsprintfW wvsprintf;
4567 
4568 alias ChangeDisplaySettingsW ChangeDisplaySettings;
4569 alias ChangeDisplaySettingsExW ChangeDisplaySettingsEx;
4570 alias CreateDesktopW CreateDesktop;
4571 alias EnumDisplaySettingsW EnumDisplaySettings;
4572 static if ((_WIN32_WINNT >= 0x500) || (_WIN32_WINDOWS >= 0x410)) {
4573 alias EnumDisplaySettingsExW EnumDisplaySettingsEx;
4574 }
4575 alias EnumDisplayDevicesW EnumDisplayDevices;
4576 
4577 } else { // ANSI
4578 
4579 alias EDITWORDBREAKPROCA EDITWORDBREAKPROC;
4580 alias PROPENUMPROCA PROPENUMPROC;
4581 alias PROPENUMPROCEXA PROPENUMPROCEX;
4582 alias DESKTOPENUMPROCA DESKTOPENUMPROC;
4583 alias WINSTAENUMPROCA WINSTAENUMPROC;
4584 alias MAKEINTRESOURCEA MAKEINTRESOURCE;
4585 
4586 alias WNDCLASSA WNDCLASS;
4587 alias WNDCLASSEXA WNDCLASSEX;
4588 alias MENUITEMINFOA MENUITEMINFO;
4589 alias LPCMENUITEMINFOA LPCMENUITEMINFO;
4590 alias MSGBOXPARAMSA MSGBOXPARAMS;
4591 alias HIGHCONTRASTA HIGHCONTRAST;
4592 alias SERIALKEYSA SERIALKEYS;
4593 alias SOUNDSENTRYA SOUNDSENTRY;
4594 alias CREATESTRUCTA CREATESTRUCT;
4595 alias CBT_CREATEWNDA CBT_CREATEWND;
4596 alias MDICREATESTRUCTA MDICREATESTRUCT;
4597 alias MULTIKEYHELPA MULTIKEYHELP;
4598 alias MONITORINFOEXA MONITORINFOEX;
4599 alias ICONMETRICSA ICONMETRICS;
4600 alias NONCLIENTMETRICSA NONCLIENTMETRICS;
4601 
4602 alias AppendMenuA AppendMenu;
4603 alias BroadcastSystemMessageA BroadcastSystemMessage;
4604 static if (_WIN32_WINNT >= 0x501) {
4605 alias BroadcastSystemMessageExA BroadcastSystemMessageEx;
4606 }
4607 alias CallMsgFilterA CallMsgFilter;
4608 alias CallWindowProcA CallWindowProc;
4609 alias ChangeMenuA ChangeMenu;
4610 alias CharLowerA CharLower;
4611 alias CharLowerBuffA CharLowerBuff;
4612 alias CharNextA CharNext;
4613 alias CharNextExA CharNextEx;
4614 alias CharPrevA CharPrev;
4615 alias CharPrevExA CharPrevEx;
4616 alias CharToOemA CharToOem;
4617 alias CharToOemBuffA CharToOemBuff;
4618 alias CharUpperA CharUpper;
4619 alias CharUpperBuffA CharUpperBuff;
4620 alias CopyAcceleratorTableA CopyAcceleratorTable;
4621 alias CreateAcceleratorTableA CreateAcceleratorTable;
4622 alias CreateDialogA CreateDialog;
4623 alias CreateDialogIndirectA CreateDialogIndirect;
4624 alias CreateDialogIndirectParamA CreateDialogIndirectParam;
4625 alias CreateDialogParamA CreateDialogParam;
4626 alias CreateMDIWindowA CreateMDIWindow;
4627 alias CreateWindowA CreateWindow;
4628 alias CreateWindowExA CreateWindowEx;
4629 alias CreateWindowStationA CreateWindowStation;
4630 alias DefDlgProcA DefDlgProc;
4631 alias DefFrameProcA DefFrameProc;
4632 alias DefMDIChildProcA DefMDIChildProc;
4633 alias DefWindowProcA DefWindowProc;
4634 alias DialogBoxA DialogBox;
4635 alias DialogBoxIndirectA DialogBoxIndirect;
4636 alias DialogBoxIndirectParamA DialogBoxIndirectParam;
4637 alias DialogBoxParamA DialogBoxParam;
4638 alias DispatchMessageA DispatchMessage;
4639 alias DlgDirListA DlgDirList;
4640 alias DlgDirListComboBoxA DlgDirListComboBox;
4641 alias DlgDirSelectComboBoxExA DlgDirSelectComboBoxEx;
4642 alias DlgDirSelectExA DlgDirSelectEx;
4643 alias DrawStateA DrawState;
4644 alias DrawTextA DrawText;
4645 alias DrawTextExA DrawTextEx;
4646 alias EnumDesktopsA EnumDesktops;
4647 alias EnumPropsA EnumProps;
4648 alias EnumPropsExA EnumPropsEx;
4649 alias EnumWindowStationsA EnumWindowStations;
4650 alias FindWindowA FindWindow;
4651 alias FindWindowExA FindWindowEx;
4652 alias GetClassInfoA GetClassInfo;
4653 alias GetClassInfoExA GetClassInfoEx;
4654 alias GetClassLongA GetClassLong;
4655 alias GetClassNameA GetClassName;
4656 alias GetClipboardFormatNameA GetClipboardFormatName;
4657 alias GetDlgItemTextA GetDlgItemText;
4658 alias GetKeyboardLayoutNameA GetKeyboardLayoutName;
4659 alias GetKeyNameTextA GetKeyNameText;
4660 alias GetMenuItemInfoA GetMenuItemInfo;
4661 alias GetMenuStringA GetMenuString;
4662 alias GetMessageA GetMessage;
4663 static if (WINVER >=0x410) {
4664 alias GetMonitorInfoA GetMonitorInfo;
4665 }
4666 alias GetPropA GetProp;
4667 static if (_WIN32_WINNT >= 0x501) {
4668 alias GetRawInputDeviceInfoA GetRawInputDeviceInfo;
4669 }
4670 alias GetTabbedTextExtentA GetTabbedTextExtent;
4671 alias GetUserObjectInformationA GetUserObjectInformation;
4672 alias GetWindowLongA GetWindowLong;
4673 alias GetWindowLongPtrA GetWindowLongPtr;
4674 alias GetWindowTextA GetWindowText;
4675 alias GetWindowTextLengthA GetWindowTextLength;
4676 alias GetAltTabInfoA GetAltTabInfo;
4677 alias GetWindowModuleFileNameA GetWindowModuleFileName;
4678 alias GrayStringA GrayString;
4679 alias InsertMenuA InsertMenu;
4680 alias InsertMenuItemA InsertMenuItem;
4681 alias IsCharAlphaA IsCharAlpha;
4682 alias IsCharAlphaNumericA IsCharAlphaNumeric;
4683 alias IsCharLowerA IsCharLower;
4684 alias IsCharUpperA IsCharUpper;
4685 alias IsDialogMessageA IsDialogMessage;
4686 alias LoadAcceleratorsA LoadAccelerators;
4687 alias LoadBitmapA LoadBitmap;
4688 alias LoadCursorA LoadCursor;
4689 alias LoadIconA LoadIcon;
4690 alias LoadCursorFromFileA LoadCursorFromFile;
4691 alias LoadImageA LoadImage;
4692 alias LoadKeyboardLayoutA LoadKeyboardLayout;
4693 alias LoadMenuA LoadMenu;
4694 alias LoadMenuIndirectA LoadMenuIndirect;
4695 alias LoadStringA LoadString;
4696 alias MapVirtualKeyA MapVirtualKey;
4697 alias MapVirtualKeyExA MapVirtualKeyEx;
4698 alias MessageBoxA MessageBox;
4699 alias MessageBoxExA MessageBoxEx;
4700 alias MessageBoxIndirectA MessageBoxIndirect;
4701 alias ModifyMenuA ModifyMenu;
4702 alias OemToCharA OemToChar;
4703 alias OemToCharBuffA OemToCharBuff;
4704 alias OpenDesktopA OpenDesktop;
4705 alias OpenWindowStationA OpenWindowStation;
4706 alias PeekMessageA PeekMessage;
4707 alias PostMessageA PostMessage;
4708 alias PostThreadMessageA PostThreadMessage;
4709 alias RealGetWindowClassA RealGetWindowClass;
4710 alias RegisterClassA RegisterClass;
4711 alias RegisterClassExA RegisterClassEx;
4712 alias RegisterClipboardFormatA RegisterClipboardFormat;
4713 static if (WINVER >= 0x500) {
4714 alias RegisterDeviceNotificationA RegisterDeviceNotification;
4715 }
4716 alias RegisterWindowMessageA RegisterWindowMessage;
4717 alias RemovePropA RemoveProp;
4718 alias SendDlgItemMessageA SendDlgItemMessage;
4719 alias SendMessageA SendMessage;
4720 alias SendMessageCallbackA SendMessageCallback;
4721 alias SendMessageTimeoutA SendMessageTimeout;
4722 alias SendNotifyMessageA SendNotifyMessage;
4723 alias SetClassLongA SetClassLong;
4724 alias SetDlgItemTextA SetDlgItemText;
4725 alias SetMenuItemInfoA SetMenuItemInfo;
4726 alias SetPropA SetProp;
4727 alias SetUserObjectInformationA SetUserObjectInformation;
4728 alias SetWindowLongA SetWindowLong;
4729 alias SetWindowLongPtrA SetWindowLongPtr;
4730 alias SetWindowsHookA SetWindowsHook;
4731 alias SetWindowsHookExA SetWindowsHookEx;
4732 alias SetWindowTextA SetWindowText;
4733 alias SystemParametersInfoA SystemParametersInfo;
4734 alias TabbedTextOutA TabbedTextOut;
4735 alias TranslateAcceleratorA TranslateAccelerator;
4736 alias UnregisterClassA UnregisterClass;
4737 alias VkKeyScanA VkKeyScan;
4738 alias VkKeyScanExA VkKeyScanEx;
4739 alias WinHelpA WinHelp;
4740 alias wsprintfA wsprintf;
4741 alias wvsprintfA wvsprintf;
4742 
4743 alias ChangeDisplaySettingsA ChangeDisplaySettings;
4744 alias ChangeDisplaySettingsExA ChangeDisplaySettingsEx;
4745 alias CreateDesktopA CreateDesktop;
4746 alias EnumDisplaySettingsA EnumDisplaySettings;
4747 static if ((_WIN32_WINNT >= 0x500) || (_WIN32_WINDOWS >= 0x410)) {
4748 	alias EnumDisplaySettingsExA EnumDisplaySettingsEx;
4749 }
4750 	alias EnumDisplayDevicesA EnumDisplayDevices;
4751 }
4752 
4753 
4754 alias WNDCLASS* LPWNDCLASS, PWNDCLASS;
4755 alias WNDCLASSEX* LPWNDCLASSEX, PWNDCLASSEX;
4756 alias MENUITEMINFO* LPMENUITEMINFO;
4757 alias MSGBOXPARAMS* PMSGBOXPARAMS, LPMSGBOXPARAMS;
4758 alias HIGHCONTRAST* LPHIGHCONTRAST;
4759 alias SERIALKEYS* LPSERIALKEYS;
4760 alias SOUNDSENTRY* LPSOUNDSENTRY;
4761 alias CREATESTRUCT* LPCREATESTRUCT;
4762 alias CBT_CREATEWND* LPCBT_CREATEWND;
4763 alias MDICREATESTRUCT* LPMDICREATESTRUCT;
4764 alias MULTIKEYHELP* PMULTIKEYHELP, LPMULTIKEYHELP;
4765 alias MONITORINFOEX* LPMONITORINFOEX;
4766 alias ICONMETRICS* LPICONMETRICS;
4767 alias NONCLIENTMETRICS* LPNONCLIENTMETRICS;