1 /***********************************************************************\
2 *                               commctrl.d                              *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *             Translated from MinGW API for MS-Windows 3.12             *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module windows.commctrl;
11 pragma(lib, "comctl32");
12 nothrow:
13 private import windows.w32api, windows.windef, windows.winuser;
14 private import windows.winbase; // for SYSTEMTIME
15 private import windows.objfwd;  // for LPSTREAM
16 
17 import windows.prsht;
18 
19 const COMCTL32_VERSION = 6;
20 
21 const TCHAR[]
22 	DRAGLISTMSGSTRING  = "commctrl_DragListMsg",
23 	HOTKEY_CLASS       = "msctls_hotkey32",
24 	PROGRESS_CLASS     = "msctls_progress32",
25 	STATUSCLASSNAME    = "msctls_statusbar32",
26 	TOOLBARCLASSNAME   = "ToolbarWindow32",
27 	TOOLTIPS_CLASS     = "tooltips_class32",
28 	TRACKBAR_CLASS     = "msctls_trackbar32",
29 	UPDOWN_CLASS       = "msctls_updown32",
30 	ANIMATE_CLASS      = "SysAnimate32",
31 	DATETIMEPICK_CLASS = "SysDateTimePick32",
32 	MONTHCAL_CLASS     = "SysMonthCal32",
33 	REBARCLASSNAME     = "ReBarWindow32",
34 	WC_COMBOBOXEX      = "ComboBoxEx32",
35 	WC_IPADDRESS       = "SysIPAddress32",
36 	WC_LISTVIEW        = "SysListView32",
37 	WC_TABCONTROL      = "SysTabControl32",
38 	WC_TREEVIEW        = "SysTreeView32",
39 	WC_HEADER          = "SysHeader32",
40 	WC_PAGESCROLLER    = "SysPager",
41 	WC_NATIVEFONTCTL   = "NativeFontCtl",
42 	WC_BUTTON          = "Button",
43 	WC_STATIC          = "Static",
44 	WC_EDIT            = "Edit",
45 	WC_LISTBOX         = "ListBox",
46 	WC_COMBOBOX        = "ComboBox",
47 	WC_SCROLLBAR       = "ScrollBar",
48 	WC_LINKA           = "SysLink";
49 
50 enum {
51 	LVM_FIRST = 0x1000,
52 	TV_FIRST  = 0x1100,
53 	HDM_FIRST = 0x1200
54 }
55 
56 enum {
57 	ACM_OPENA = WM_USER + 100,
58 	ACM_PLAY  = WM_USER + 101,
59 	ACM_STOP  = WM_USER + 102,
60 	ACM_OPENW = WM_USER + 103,
61     ACM_ISPLAYING = WM_USER + 104
62 }
63 
64 enum {
65 	ACN_START = 1,
66 	ACN_STOP
67 }
68 
69 enum {
70 	CBEIF_TEXT          = 0x00000001,
71 	CBEIF_IMAGE         = 0x00000002,
72 	CBEIF_SELECTEDIMAGE = 0x00000004,
73 	CBEIF_OVERLAY       = 0x00000008,
74 	CBEIF_INDENT        = 0x00000010,
75 	CBEIF_LPARAM        = 0x00000020,
76 	CBEIF_DI_SETITEM    = 0x10000000
77 }
78 
79 enum {
80 	RBN_FIRST  = -831U,
81 	RBN_LAST   = -859U,
82 	MCN_FIRST  = -750U,
83 	MCN_LAST   = -759U,
84 	DTN_FIRST  = -760U,
85 	DTN_LAST   = -799U,
86 	CBEN_FIRST = -800U,
87 	CBEN_LAST  = -830U
88 }
89 
90 enum {
91 	CBEN_INSERTITEM = CBEN_FIRST - 1,
92 	CBEN_DELETEITEM = CBEN_FIRST - 2,
93 	CBEN_BEGINEDIT  = CBEN_FIRST - 4,
94 	CBEN_ENDEDITA   = CBEN_FIRST - 5,
95 	CBEN_ENDEDITW   = CBEN_FIRST - 6
96 }
97 
98 enum {
99 	CBENF_KILLFOCUS = 1,
100 	CBENF_RETURN,
101 	CBENF_ESCAPE,
102 	CBENF_DROPDOWN // = 4
103 }
104 
105 const CBEMAXSTRLEN = 260;
106 
107 enum {
108 	DL_BEGINDRAG  = 1157,
109 	DL_CANCELDRAG = 1160,
110 	DL_DRAGGING   = 1158,
111 	DL_DROPPED    = 1159,
112 	DL_CURSORSET  = 0,
113 	DL_STOPCURSOR = 1,
114 	DL_COPYCURSOR = 2,
115 	DL_MOVECURSOR = 3
116 }
117 
118 enum {
119 	CCS_TOP           = 1,
120 	CCS_NOMOVEY       = 2,
121 	CCS_BOTTOM        = 3,
122 	CCS_NORESIZE      = 4,
123 	CCS_NOPARENTALIGN = 8,
124 	CCS_ADJUSTABLE    = 32,
125 	CCS_NODIVIDER     = 64
126 }
127 static if (_WIN32_IE >= 0x300) {
128 	enum {
129 		CCS_VERT    = 128,
130 		CCS_LEFT    = 129,
131 		CCS_NOMOVEX = 130,
132 		CCS_RIGHT   = 131
133 	}
134 }
135 
136 enum {
137 	ACS_CENTER      = 0x0001,
138 	ACS_TRANSPARENT = 0x0002,
139 	ACS_AUTOPLAY    = 0x0004,
140 	ACS_TIMER       = 0x0008
141 }
142 
143 enum {
144 	PGS_VERT       = 0x00000000,
145 	PGS_HORZ       = 0x00000001,
146 	PGS_AUTOSCROLL = 0x00000002,
147 	PGS_DRAGNDROP  = 0x00000004
148 }
149 
150 const CMB_MASKED = 2;
151 
152 const MINSYSCOMMAND = SC_SIZE;
153 
154 enum {
155 	SBT_OWNERDRAW  = 0x1000,
156 	SBT_NOBORDERS  = 256,
157 	SBT_POPOUT     = 512,
158 	SBT_RTLREADING = 1024
159 }
160 
161 enum {
162 	SB_SETTEXTA       = WM_USER + 1,
163 	SB_SETTEXTW       = WM_USER + 11,
164 	SB_GETTEXTA       = WM_USER + 2,
165 	SB_GETTEXTW       = WM_USER + 13,
166 	SB_GETTEXTLENGTHA = WM_USER + 3,
167 	SB_GETTEXTLENGTHW = WM_USER + 12,
168 	SB_SETPARTS       = WM_USER + 4,
169 	SB_GETPARTS       = WM_USER + 6,
170 	SB_GETBORDERS     = WM_USER + 7,
171 	SB_SETMINHEIGHT   = WM_USER + 8,
172 	SB_SIMPLE         = WM_USER + 9,
173 	SB_GETRECT        = WM_USER + 10
174 }
175 
176 enum {
177 	MSGF_COMMCTRL_BEGINDRAG   = 0x4200,
178 	MSGF_COMMCTRL_SIZEHEADER  = 0x4201,
179 	MSGF_COMMCTRL_DRAGSELECT  = 0x4202,
180 	MSGF_COMMCTRL_TOOLBARCUST = 0x4203
181 }
182 
183 enum {
184 	ILC_COLOR    = 0,
185 	ILC_COLOR4   = 4,
186 	ILC_COLOR8   = 8,
187 	ILC_COLOR16  = 16,
188 	ILC_COLOR24  = 24,
189 	ILC_COLOR32  = 32,
190 	ILC_COLORDDB = 254,
191 	ILC_MASK     = 1,
192 	ILC_PALETTE  = 2048
193 }
194 
195 enum {
196 	ILCF_MOVE,
197 	ILCF_SWAP
198 }
199 
200 enum {
201 	ILS_NORMAL        = 0,
202 	ILS_GLOW          = 1,
203 	ILS_SHADOW        = 2,
204 	ILS_SATURATE      = 4,
205 	ILS_ALPHA         = 8,
206 	ILD_BLEND25       = 2,
207 	ILD_BLEND50       = 4,
208 	ILD_SELECTED      = 4,
209 	ILD_BLEND         = 4,
210 	ILD_FOCUS         = 2,
211 	ILD_MASK          = 16,
212 	ILD_NORMAL        = 0,
213 	ILD_TRANSPARENT   = 1,
214 	ILD_IMAGE         = 0x0020,
215 	ILD_ROP           = 0x0040,
216 	ILD_OVERLAYMASK   = 0x0F00,
217 	ILD_PRESERVEALPHA = 0x1000,
218 	ILD_SCALE         = 0x2000,
219 	ILD_DPISCALE      = 0x4000
220 }
221 
222 enum {
223 	HDS_HORZ    = 0,
224 	HDS_BUTTONS = 2,
225 	HDS_HIDDEN  = 8
226 }
227 static if (_WIN32_IE >= 0x400) {
228 	enum {
229 		HDS_HOTTRACK = 4,
230 		HDS_DRAGDROP = 0x0040,
231 		HDS_FULLDRAG = 0x0080
232 	}
233 }
234 static if (_WIN32_IE >= 0x500) {
235 	enum {
236 		HDS_FILTERBAR = 0x0100
237 	}
238 }
239 
240 enum {
241 	NM_FIRST  = 0,
242 	NM_LAST   = -99U,
243 	LVN_FIRST = -100U,
244 	LVN_LAST  = -199U,
245 	HDN_FIRST = -300U,
246 	HDN_LAST  = -399U,
247 	TVN_FIRST = -400U,
248 	TVN_LAST  = -499U,
249 	TTN_FIRST = -520U,
250 	TTN_LAST  = -549U,
251 	TCN_FIRST = -550U,
252 	TCN_LAST  = -580U,
253 	CDN_FIRST = -601U, /* also in commdlg.h */
254 	CDN_LAST  = -699U,
255 	TBN_FIRST = -700U,
256 	TBN_LAST  = -720U,
257 	UDN_FIRST = -721U,
258 	UDN_LAST  = -740U
259 }
260 /*static if (_WIN32_IE >= 0x300) {
261 	enum {
262 		RBN_FIRST  = -831U,
263 		RBN_LAST   = -859U,
264 		MCN_FIRST  = -750U,
265 		MCN_LAST   = -759U,
266 		DTN_FIRST  = -760U,
267 		DTN_LAST   = -799U,
268 		CBEN_FIRST = -800U,
269 		CBEN_LAST  = -830U
270 	}
271 }*/
272 static if (_WIN32_IE >= 0x400) {
273 	enum {
274 		IPN_FIRST        = -860U,
275 		IPN_LAST         = -879U,
276 		IPN_FIELDCHANGED = IPN_FIRST,
277 		SBN_FIRST        = -880U,
278 		SBN_LAST         = -899U,
279 		PGN_FIRST        = -900U,
280 		PGN_LAST         = -950U,
281 		PGN_SCROLL       = PGN_FIRST-1,
282 		PGN_CALCSIZE     = PGN_FIRST-2
283 	}
284 }
285 
286 static if (_WIN32_IE >= 0x500) {
287 	enum {
288 		WMN_FIRST = -1000U,
289 		WMN_LAST = -1200U,
290     }
291 }
292 
293 static if (_WIN32_WINNT >= 0x501)
294 {
295     enum {
296         BCN_FIRST = -1250U,
297         BCN_LAST = -1350U,
298     }
299 }
300 
301 static if (_WIN32_WINNT >= 0x600)
302 {
303     enum {
304         TRBN_FIRST = -1501U,
305         TRBN_LAST = -1519U,
306     }
307 }
308 
309 enum {
310 	HDI_WIDTH  = 1,
311 	HDI_HEIGHT = 1,
312 	HDI_TEXT   = 2,
313 	HDI_FORMAT = 4,
314 	HDI_LPARAM = 8,
315 	HDI_BITMAP = 16
316 }
317 static if (_WIN32_IE >= 0x300) {
318 	enum {
319 		HDI_IMAGE      = 32,
320 		HDI_DI_SETITEM = 64,
321 		HDI_ORDER      = 128
322 	}
323 }
324 static if (_WIN32_IE >= 0x500) {
325 	enum {
326 		HDI_FILTER = 256
327 	}
328 }
329 
330 enum {
331 	CBES_EX_NOEDITIMAGE       = 0x00000001,
332 	CBES_EX_NOEDITIMAGEINDENT = 0x00000002,
333 	CBES_EX_PATHWORDBREAKPROC = 0x00000004
334 }
335 static if (_WIN32_IE >= 0x400) {
336 	enum {
337 		CBES_EX_NOSIZELIMIT   = 0x00000008,
338 		CBES_EX_CASESENSITIVE = 0x00000010,
339 		CBEN_GETDISPINFOA     = CBEN_FIRST - 0,
340 		CBEN_GETDISPINFOW     = CBEN_FIRST - 7,
341 		CBEN_DRAGBEGINA       = CBEN_FIRST - 8,
342 		CBEN_DRAGBEGINW       = CBEN_FIRST - 9
343 	}
344 }
345 
346 enum {
347 	HDF_LEFT,
348 	HDF_RIGHT,
349 	HDF_CENTER,
350 	HDF_JUSTIFYMASK,
351 	HDF_RTLREADING, // = 4
352 	HDF_OWNERDRAW = 0x8000,
353 	HDF_STRING    = 0x4000,
354 	HDF_BITMAP    = 0x2000
355 }
356 static if (_WIN32_IE >= 0x300) {
357 	enum {
358 		HDF_BITMAP_ON_RIGHT = 0x1000,
359 		HDF_IMAGE           = 0x0800
360 	}
361 }
362 
363 enum {
364 	CCM_FIRST            = 0x2000,
365 	CCM_LAST             = CCM_FIRST + 0x200,
366 	CCM_SETBKCOLOR       = 8193,
367 	CCM_SETCOLORSCHEME   = 8194,
368 	CCM_GETCOLORSCHEME   = 8195,
369 	CCM_GETDROPTARGET    = 8196,
370 	CCM_SETUNICODEFORMAT = 8197,
371 	CCM_GETUNICODEFORMAT = 8198,
372 	CCM_SETVERSION       = 0x2007,
373 	CCM_GETVERSION       = 0x2008,
374 	CCM_SETNOTIFYWINDOW  = 0x2009
375 }
376 
377 enum {
378 	HDM_GETITEMCOUNT = HDM_FIRST,
379 	HDM_INSERTITEMA  = HDM_FIRST + 1,
380 	HDM_INSERTITEMW  = HDM_FIRST + 10,
381 	HDM_DELETEITEM   = HDM_FIRST + 2,
382 	HDM_GETITEMA     = HDM_FIRST + 3,
383 	HDM_GETITEMW     = HDM_FIRST + 11,
384 	HDM_SETITEMA     = HDM_FIRST + 4,
385 	HDM_SETITEMW     = HDM_FIRST + 12,
386 	HDM_LAYOUT       = HDM_FIRST + 5
387 }
388 static if (_WIN32_IE >= 0x300) {
389 	enum {
390 		HDM_GETITEMRECT     = HDM_FIRST + 7,
391 		HDM_SETIMAGELIST    = HDM_FIRST + 8,
392 		HDM_GETIMAGELIST    = HDM_FIRST + 9,
393 		HDM_ORDERTOINDEX    = HDM_FIRST + 15,
394 		HDM_CREATEDRAGIMAGE = HDM_FIRST + 16,
395 		HDM_GETORDERARRAY   = HDM_FIRST + 17,
396 		HDM_SETORDERARRAY   = HDM_FIRST + 18,
397 		HDM_SETHOTDIVIDER   = HDM_FIRST + 19
398 	}
399 }
400 static if (_WIN32_IE >= 0x400) {
401 	enum {
402 		HDM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT,
403 		HDM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT
404 	}
405 }
406 static if (_WIN32_IE >= 0x500) {
407 	enum {
408 		HDM_SETBITMAPMARGIN = HDM_FIRST + 20,
409 		HDM_GETBITMAPMARGIN = HDM_FIRST + 21,
410         HDM_SETFILTERCHANGETIMEOUT = HDM_FIRST + 22,
411         HDM_EDITFILTER = HDM_FIRST + 23,
412         HDM_CLEARFILTER = HDM_FIRST + 24,
413     }
414 }
415 static if (_WIN32_IE >= 0x600) {
416 	enum {
417         HDM_GETITEMDROPDOWNRECT = HDM_FIRST + 25,
418         HDM_GETOVERFLOWRECT = HDM_FIRST + 26,
419         HDM_GETFOCUSEDITEM = HDM_FIRST + 27,
420         HDM_SETFOCUSEDITEM = HDM_FIRST + 28,
421 	}
422 }
423 
424 enum {
425 	HHT_NOWHERE   = 1,
426 	HHT_ONHEADER  = 2,
427 	HHT_ONDIVIDER = 4,
428 	HHT_ONDIVOPEN = 8,
429 	HHT_ABOVE     = 256,
430 	HHT_BELOW     = 512,
431 	HHT_TORIGHT   = 1024,
432 	HHT_TOLEFT    = 2048
433 }
434 
435 enum {
436 	HDM_HITTEST = HDM_FIRST + 6
437 }
438 
439 enum {
440 	HDN_ITEMCHANGINGA    = HDN_FIRST -0,
441 	HDN_ITEMCHANGINGW    = HDN_FIRST -20,
442 	HDN_ITEMCHANGEDA     = HDN_FIRST -1,
443 	HDN_ITEMCHANGEDW     = HDN_FIRST -21,
444 	HDN_ITEMCLICKA       = HDN_FIRST -2,
445 	HDN_ITEMCLICKW       = HDN_FIRST -22,
446 	HDN_ITEMDBLCLICKA    = HDN_FIRST -3,
447 	HDN_ITEMDBLCLICKW    = HDN_FIRST -23,
448 	HDN_DIVIDERDBLCLICKA = HDN_FIRST -5,
449 	HDN_DIVIDERDBLCLICKW = HDN_FIRST -25,
450 	HDN_BEGINTRACKA      = HDN_FIRST -6,
451 	HDN_BEGINTRACKW      = HDN_FIRST -26,
452 	HDN_ENDTRACKA        = HDN_FIRST -7,
453 	HDN_ENDTRACKW        = HDN_FIRST -27,
454 	HDN_TRACKA           = HDN_FIRST -8,
455 	HDN_TRACKW           = HDN_FIRST -28
456 }
457 static if (_WIN32_IE >= 0x300) {
458 	enum {
459 		HDN_ENDDRAG      = (HDN_FIRST-11),
460 		HDN_BEGINDRAG    = (HDN_FIRST-10),
461 		HDN_GETDISPINFOA = (HDN_FIRST-9),
462 		HDN_GETDISPINFOW = (HDN_FIRST-29)
463 	}
464 }
465 
466 static if (_WIN32_IE >= 0x400) {
467 	enum {
468 		HICF_OTHER          = 0x00,
469 		HICF_MOUSE          = 0x01,
470 		HICF_ARROWKEYS      = 0x02,
471 		HICF_ACCELERATOR    = 0x04,
472 		HICF_DUPACCEL       = 0x08,
473 		HICF_ENTERING       = 0x10,
474 		HICF_LEAVING        = 0x20,
475 		HICF_RESELECT       = 0x40,
476 		HICF_LMOUSE         = 0x80,
477 		HICF_TOGGLEDROPDOWN = 0x100
478 	}
479 }
480 
481 enum {
482 	IPM_CLEARADDRESS = WM_USER + 100,
483 	IPM_SETADDRESS   = WM_USER + 101,
484 	IPM_GETADDRESS   = WM_USER + 102,
485 	IPM_SETRANGE     = WM_USER + 103,
486 	IPM_SETFOCUS     = WM_USER + 104,
487 	IPM_ISBLANK      = WM_USER + 105
488 }
489 
490 static if (_WIN32_IE >= 0x500) {
491 	enum {
492 		I_INDENTCALLBACK = -1,
493 		I_IMAGENONE      = -2
494 	}
495 }
496 
497 enum {
498 	TBSTATE_CHECKED       = 1,
499 	TBSTATE_PRESSED       = 2,
500 	TBSTATE_ENABLED       = 4,
501 	TBSTATE_HIDDEN        = 8,
502 	TBSTATE_INDETERMINATE = 16,
503 	TBSTATE_WRAP          = 32
504 }
505 static if (_WIN32_IE >= 0x300) {
506 	enum {
507 		TBSTATE_ELLIPSES = 0x40
508 	}
509 }
510 static if (_WIN32_IE >= 0x400) {
511 	enum {
512 		TBSTATE_MARKED = 0x0080
513 	}
514 }
515 
516 enum {
517 	TBSTYLE_BUTTON     = 0,
518 	TBSTYLE_SEP        = 1,
519 	TBSTYLE_CHECK      = 2,
520 	TBSTYLE_GROUP      = 4,
521 	TBSTYLE_CHECKGROUP = TBSTYLE_GROUP | TBSTYLE_CHECK
522 }
523 static if (_WIN32_IE >= 0x300) {
524 	enum {
525 		TBSTYLE_DROPDOWN = 8
526 	}
527 }
528 static if (_WIN32_IE >= 0x400) {
529 	enum {
530 		TBSTYLE_AUTOSIZE = 16,
531 		TBSTYLE_NOPREFIX = 32
532 	}
533 }
534 enum {
535 	TBSTYLE_TOOLTIPS = 256,
536 	TBSTYLE_WRAPABLE = 512,
537 	TBSTYLE_ALTDRAG  = 1024
538 }
539 static if (_WIN32_IE >= 0x300) {
540 	enum {
541 		TBSTYLE_FLAT        = 2048,
542 		TBSTYLE_LIST        = 4096,
543 		TBSTYLE_CUSTOMERASE = 8192
544 	}
545 }
546 static if (_WIN32_IE >= 0x400) {
547 	enum {
548 		TBSTYLE_REGISTERDROP    = 0x4000,
549 		TBSTYLE_TRANSPARENT     = 0x8000,
550 		TBSTYLE_EX_DRAWDDARROWS = 0x00000001
551 	}
552 }
553 static if (_WIN32_IE >= 0x501) {
554 	enum {
555 		TBSTYLE_EX_MIXEDBUTTONS       = 8,
556 		TBSTYLE_EX_HIDECLIPPEDBUTTONS = 16
557 	}
558 }
559 static if (_WIN32_WINNT >= 0x501) {
560 	enum {
561 		TBSTYLE_EX_DOUBLEBUFFER = 0x80
562 	}
563 }
564 
565 static if (_WIN32_IE >= 0x500) {
566 	enum {
567 		BTNS_BUTTON        = TBSTYLE_BUTTON,
568 		BTNS_SEP           = TBSTYLE_SEP,
569 		BTNS_CHECK         = TBSTYLE_CHECK,
570 		BTNS_GROUP         = TBSTYLE_GROUP,
571 		BTNS_CHECKGROUP    = TBSTYLE_CHECKGROUP,
572 		BTNS_DROPDOWN      = TBSTYLE_DROPDOWN,
573 		BTNS_AUTOSIZE      = TBSTYLE_AUTOSIZE,
574 		BTNS_NOPREFIX      = TBSTYLE_NOPREFIX,
575 		BTNS_WHOLEDROPDOWN = 0x0080
576 	}
577 }
578 static if (_WIN32_IE >= 0x501) {
579 	enum {
580 		BTNS_SHOWTEXT = 0x0040
581 	}
582 }
583 
584 static if (_WIN32_IE >= 0x400) {
585 	enum {
586 		TBCDRF_NOEDGES        = 0x10000,
587 		TBCDRF_HILITEHOTTRACK = 0x20000,
588 		TBCDRF_NOOFFSET       = 0x40000,
589 		TBCDRF_NOMARK         = 0x80000,
590 		TBCDRF_NOETCHEDEFFECT = 0x100000
591 	}
592 }
593 
594 const HINST_COMMCTRL = cast(HINSTANCE) (-1);
595 
596 enum {
597 	IDB_STD_SMALL_COLOR,
598 	IDB_STD_LARGE_COLOR,
599 	IDB_VIEW_SMALL_COLOR = 4,
600 	IDB_VIEW_LARGE_COLOR = 5
601 }
602 static if (_WIN32_IE >= 0x300) {
603 	enum {
604 		IDB_HIST_SMALL_COLOR = 8,
605 		IDB_HIST_LARGE_COLOR = 9
606 	}
607 }
608 
609 enum {
610 	STD_CUT,
611 	STD_COPY,
612 	STD_PASTE,
613 	STD_UNDO,
614 	STD_REDOW,
615 	STD_DELETE,
616 	STD_FILENEW,
617 	STD_FILEOPEN,
618 	STD_FILESAVE,
619 	STD_PRINTPRE,
620 	STD_PROPERTIES,
621 	STD_HELP,
622 	STD_FIND,
623 	STD_REPLACE,
624 	STD_PRINT // = 14
625 }
626 
627 enum {
628 	VIEW_LARGEICONS,
629 	VIEW_SMALLICONS,
630 	VIEW_LIST,
631 	VIEW_DETAILS,
632 	VIEW_SORTNAME,
633 	VIEW_SORTSIZE,
634 	VIEW_SORTDATE,
635 	VIEW_SORTTYPE,
636 	VIEW_PARENTFOLDER,
637 	VIEW_NETCONNECT,
638 	VIEW_NETDISCONNECT,
639 	VIEW_NEWFOLDER // = 11
640 }
641 
642 enum {
643 	TB_ENABLEBUTTON          = WM_USER + 1,
644 	TB_CHECKBUTTON,
645 	TB_PRESSBUTTON,
646 	TB_HIDEBUTTON,
647 	TB_INDETERMINATE, //     = WM_USER + 5,
648 	TB_ISBUTTONENABLED       = WM_USER + 9,
649 	TB_ISBUTTONCHECKED,
650 	TB_ISBUTTONPRESSED,
651 	TB_ISBUTTONHIDDEN,
652 	TB_ISBUTTONINDETERMINATE, // = WM_USER + 13,
653 	TB_SETSTATE              = WM_USER + 17,
654 	TB_GETSTATE              = WM_USER + 18,
655 	TB_ADDBITMAP             = WM_USER + 19,
656 	TB_DELETEBUTTON          = WM_USER + 22,
657 	TB_GETBUTTON,
658 	TB_BUTTONCOUNT,
659 	TB_COMMANDTOINDEX,
660 	TB_SAVERESTOREA,
661 	TB_CUSTOMIZE,
662 	TB_ADDSTRINGA,
663 	TB_GETITEMRECT,
664 	TB_BUTTONSTRUCTSIZE,
665 	TB_SETBUTTONSIZE,
666 	TB_SETBITMAPSIZE,
667 	TB_AUTOSIZE, //          = WM_USER + 33,
668 	TB_GETTOOLTIPS           = WM_USER + 35,
669 	TB_SETTOOLTIPS           = WM_USER + 36,
670 	TB_SETPARENT             = WM_USER + 37,
671 	TB_SETROWS               = WM_USER + 39,
672 	TB_GETROWS,
673 	TB_GETBITMAPFLAGS,
674 	TB_SETCMDID,
675 	TB_CHANGEBITMAP,
676 	TB_GETBITMAP,
677 	TB_GETBUTTONTEXTA,
678 	TB_REPLACEBITMAP, //     = WM_USER + 46,
679 	TB_GETBUTTONSIZE         = WM_USER + 58,
680 	TB_SETBUTTONWIDTH        = WM_USER + 59,
681 	TB_GETBUTTONTEXTW        = WM_USER + 75,
682 	TB_SAVERESTOREW          = WM_USER + 76,
683 	TB_ADDSTRINGW            = WM_USER + 77,
684 }
685 static if (_WIN32_IE >= 0x400) {
686 	enum {
687 		TB_MARKBUTTON = WM_USER + 6
688 	}
689 }
690 static if (_WIN32_IE >= 0x400) {
691 	enum {
692 		TB_ISBUTTONHIGHLIGHTED = WM_USER + 14
693 	}
694 }
695 static if (_WIN32_IE >= 0x400) {
696 	enum {
697 		TB_ADDBUTTONSA   = WM_USER + 20,
698 		TB_INSERTBUTTONA = WM_USER + 21
699 	}
700 } else {
701 	enum {
702 		TB_ADDBUTTONS   = WM_USER + 20,
703 		TB_INSERTBUTTON = WM_USER + 21
704 	}
705 }
706 static if (_WIN32_IE >= 0x300) {
707 	enum {
708 		TB_SETINDENT = WM_USER + 47,
709 		TB_SETIMAGELIST,
710 		TB_GETIMAGELIST,
711 		TB_LOADIMAGES,
712 		TB_GETRECT,
713 		TB_SETHOTIMAGELIST,
714 		TB_GETHOTIMAGELIST,
715 		TB_SETDISABLEDIMAGELIST,
716 		TB_GETDISABLEDIMAGELIST,
717 		TB_SETSTYLE,
718 		TB_GETSTYLE,
719 		//TB_GETBUTTONSIZE,
720 		//TB_SETBUTTONWIDTH,
721 		TB_SETMAXTEXTROWS,
722 		TB_GETTEXTROWS // = WM_USER + 61
723 	}
724 }
725 static if (_WIN32_IE >= 0x400) {
726 	enum {
727 		TB_GETOBJECT            = WM_USER + 62,
728 		TB_GETBUTTONINFOW,
729 		TB_SETBUTTONINFOW,
730 		TB_GETBUTTONINFOA,
731 		TB_SETBUTTONINFOA,
732 		TB_INSERTBUTTONW,
733 		TB_ADDBUTTONSW,
734 		TB_HITTEST, //          = WM_USER + 69
735 		TB_SETEXTENDEDSTYLE     = WM_USER + 84,
736 		TB_GETEXTENDEDSTYLE     = WM_USER + 85,
737 		TB_SETDRAWTEXTFLAGS     = WM_USER + 70,
738 		TB_GETHOTITEM,
739 		TB_SETHOTITEM,
740 		TB_SETANCHORHIGHLIGHT,
741 		TB_GETANCHORHIGHLIGHT, // = WM_USER + 74
742 		TB_MAPACCELERATORA      = WM_USER + 78,
743 		TB_GETINSERTMARK,
744 		TB_SETINSERTMARK,
745 		TB_INSERTMARKHITTEST,
746 		TB_MOVEBUTTON,
747 		TB_GETMAXSIZE,
748 		//TB_SETEXTENDEDSTYLE,
749 		//TB_GETEXTENDEDSTYLE,
750 		TB_GETPADDING,
751 		TB_SETPADDING,
752 		TB_SETINSERTMARKCOLOR,
753 		TB_GETINSERTMARKCOLOR,
754 		TB_MAPACCELERATORW,
755 		TB_GETSTRINGW,
756 		TB_GETSTRINGA, //       = WM_USER + 92
757         TB_SETHOTITEM2          = WM_USER + 94,
758         TB_SETLISTGAP           = WM_USER + 96,
759         TB_GETIMAGELISTCOUNT    = WM_USER + 98,
760         TB_GETIDEALSIZE         = WM_USER + 99,
761         //TB_TRANSLATEACCELERATOR = CCM_TRANSLATEACCELERATOR,
762 		TB_SETCOLORSCHEME       = CCM_SETCOLORSCHEME,
763 		TB_GETCOLORSCHEME       = CCM_GETCOLORSCHEME,
764 		TB_SETUNICODEFORMAT     = CCM_SETUNICODEFORMAT,
765 		TB_GETUNICODEFORMAT     = CCM_GETUNICODEFORMAT
766 	}
767 }
768 
769 static if (_WIN32_WINNT >= 0x501) {
770 	enum {
771         TB_GETMETRICS = WM_USER + 101,
772         TB_SETMETRICS = WM_USER + 102,
773     }
774 }
775 
776 static if (_WIN32_WINNT >= 0x600) {
777 	enum {
778         TB_GETITEMDROPDOWNRECT = WM_USER + 103,
779         TB_SETPRESSEDIMAGELIST = WM_USER + 104,
780         TB_GETPRESSEDIMAGELIST = WM_USER + 105,
781     }
782 }
783 
784 const TBBF_LARGE = 1;
785 
786 enum {
787 	TBN_GETBUTTONINFOA = TBN_FIRST -0,
788 	TBN_BEGINDRAG      = TBN_FIRST -1,
789 	TBN_ENDDRAG        = TBN_FIRST -2,
790 	TBN_BEGINADJUST    = TBN_FIRST -3,
791 	TBN_ENDADJUST      = TBN_FIRST -4,
792 	TBN_RESET          = TBN_FIRST -5,
793 	TBN_QUERYINSERT    = TBN_FIRST -6,
794 	TBN_QUERYDELETE    = TBN_FIRST -7,
795 	TBN_TOOLBARCHANGE  = TBN_FIRST -8,
796 	TBN_CUSTHELP       = TBN_FIRST -9
797 }
798 static if (_WIN32_IE >= 0x300) {
799 	enum {
800 		TBN_DROPDOWN = TBN_FIRST - 10
801 	}
802 }
803 static if (_WIN32_IE >= 0x400) {
804 	enum {
805 		TBN_HOTITEMCHANGE  = TBN_FIRST - 13,
806 		TBN_DRAGOUT        = TBN_FIRST - 14,
807 		TBN_DELETINGBUTTON = TBN_FIRST - 15,
808 		TBN_GETDISPINFOA   = TBN_FIRST - 16,
809 		TBN_GETDISPINFOW   = TBN_FIRST - 17,
810 		TBN_GETINFOTIPA    = TBN_FIRST - 18,
811 		TBN_GETINFOTIPW    = TBN_FIRST - 19,
812 		TBN_GETBUTTONINFOW = TBN_FIRST - 20
813 	}
814 }
815 static if (_WIN32_IE >= 0x500) {
816 	enum {
817 		TBN_RESTORE       = TBN_FIRST - 21,
818 		TBN_SAVE          = TBN_FIRST - 22,
819 		TBN_INITCUSTOMIZE = TBN_FIRST - 23
820 	}
821 
822 	enum {
823 		TBNRF_HIDEHELP = 1,
824 		TBNRF_ENDCUSTOMIZE
825 	}
826 
827 	enum {
828 		TBNF_IMAGE      = 1,
829 		TBNF_TEXT       = 2,
830 		TBNF_DI_SETITEM = 0x10000000
831 	}
832 }
833 
834 enum {
835 	TTS_ALWAYSTIP = 1,
836 	TTS_NOPREFIX
837 }
838 static if(_WIN32_IE >= 0x500) {
839 	enum {
840 		TTS_NOANIMATE = 0x10,
841 		TTS_NOFADE    = 0x20,
842 		TTS_BALLOON   = 0x40,
843 		TTS_CLOSE     = 0x80
844 	}
845 }
846 
847 enum {
848 	TTF_IDISHWND   = 1,
849 	TTF_CENTERTIP  = 2,
850 	TTF_RTLREADING = 4,
851 	TTF_SUBCLASS   = 16
852 }
853 static if (_WIN32_IE >= 0x300) {
854 	enum {
855 		TTF_TRACK       = 0x0020,
856 		TTF_ABSOLUTE    = 0x0080,
857 		TTF_TRANSPARENT = 0x0100,
858 		TTF_DI_SETITEM  = 0x8000
859 	}
860 
861 	static if (_WIN32_IE >= 0x501) {
862 		enum {
863 			TTF_PARSELINKS = 0x1000
864 		}
865 	}
866 
867 	enum {
868 		TBCD_TICS = 1,
869 		TBCD_THUMB,
870 		TBCD_CHANNEL // = 3
871 	}
872 }
873 
874 static if (_WIN32_IE >= 0x400) {
875 	enum {
876 		TBDDRET_DEFAULT,
877 		TBDDRET_NODEFAULT,
878 		TBDDRET_TREATPRESSED
879 	}
880 
881 	enum {
882 		TBIMHT_AFTER = 1,
883 		TBIMHT_BACKGROUND
884 	}
885 }
886 
887 enum {
888 	TTDT_AUTOMATIC,
889 	TTDT_RESHOW,
890 	TTDT_AUTOPOP,
891 	TTDT_INITIAL
892 }
893 
894 enum {
895 	TTM_ACTIVATE        = WM_USER + 1,
896 	TTM_SETDELAYTIME    = WM_USER + 3,
897 	TTM_ADDTOOLA,
898 	TTM_DELTOOLA,
899 	TTM_NEWTOOLRECTA,
900 	TTM_RELAYEVENT,
901 	TTM_GETTOOLINFOA,
902 	TTM_SETTOOLINFOA,
903 	TTM_HITTESTA,
904 	TTM_GETTEXTA,
905 	TTM_UPDATETIPTEXTA,
906 	TTM_GETTOOLCOUNT,
907 	TTM_ENUMTOOLSA,
908 	TTM_GETCURRENTTOOLA,
909 	TTM_WINDOWFROMPOINT, // = WM_USER + 16
910 	TTM_ADDTOOLW        = WM_USER + 50,
911 	TTM_DELTOOLW,
912 	TTM_NEWTOOLRECTW,
913 	TTM_GETTOOLINFOW,
914 	TTM_SETTOOLINFOW,
915 	TTM_HITTESTW,
916 	TTM_GETTEXTW,
917 	TTM_UPDATETIPTEXTW,
918 	TTM_ENUMTOOLSW,
919 	TTM_GETCURRENTTOOLW // = WM_USER + 59
920 }
921 
922 static if (_WIN32_IE >= 0x300) {
923 	enum {
924 		TTM_TRACKACTIVATE = WM_USER + 17,
925 		TTM_TRACKPOSITION,
926 		TTM_SETTIPBKCOLOR,
927 		TTM_SETTIPTEXTCOLOR,
928 		TTM_GETDELAYTIME,
929 		TTM_GETTIPBKCOLOR,
930 		TTM_GETTIPTEXTCOLOR,
931 		TTM_SETMAXTIPWIDTH,
932 		TTM_GETMAXTIPWIDTH,
933 		TTM_SETMARGIN,
934 		TTM_GETMARGIN,
935 		TTM_POP // = WM_USER + 28
936 	}
937 }
938 
939 static if (_WIN32_IE >= 0x400) {  // IE4.0 ???
940 	enum {
941 		TTM_UPDATE = WM_USER + 29,
942 		TTM_GETBUBBLESIZE,
943 		TTM_ADJUSTRECT,
944 		TTM_SETTITLEA,
945 		TTM_SETTITLEW // = WM_USER + 33
946 	}
947     static if (_WIN32_IE >= 0x500)
948     {
949         alias TTM_SETTITLEW TTM_SETTITLE;
950     }
951     else
952     {
953         alias TTM_SETTITLEA TTM_SETTITLE;
954     }
955 }
956 
957 static if (_WIN32_WINNT >= 0x501) {
958     enum {
959         TTM_POPUP = (WM_USER + 34),
960         TTM_GETTITLE = (WM_USER + 35),
961     }
962 }
963 
964 enum {
965 	TTN_GETDISPINFOA = TTN_FIRST - 0,
966 	TTN_GETDISPINFOW = TTN_FIRST - 10,
967 	TTN_NEEDTEXTA    = TTN_GETDISPINFOA,
968 	TTN_NEEDTEXTW    = TTN_GETDISPINFOW,
969 	TTN_SHOW         = TTN_FIRST-1,
970 	TTN_POP          = TTN_FIRST-2
971 }
972 
973 const UD_MAXVAL = 0x7fff;
974 const UD_MINVAL = -UD_MAXVAL;
975 
976 enum {
977 	UDN_DELTAPOS    = UDN_FIRST-1,
978 	UDS_WRAP        = 1,
979 	UDS_SETBUDDYINT = 2,
980 	UDS_ALIGNRIGHT  = 4,
981 	UDS_ALIGNLEFT   = 8,
982 	UDS_AUTOBUDDY   = 16,
983 	UDS_ARROWKEYS   = 32,
984 	UDS_HORZ        = 64,
985 	UDS_NOTHOUSANDS = 128
986 }
987 
988 static if (_WIN32_IE >= 0x300) {
989 	enum {
990 		UDS_HOTTRACK = 0x0100
991 	}
992 }
993 
994 enum {
995 	UDM_SETRANGE = WM_USER + 101,
996 	UDM_GETRANGE,
997 	UDM_SETPOS,
998 	UDM_GETPOS,
999 	UDM_SETBUDDY,
1000 	UDM_GETBUDDY,
1001 	UDM_SETACCEL,
1002 	UDM_GETACCEL,
1003 	UDM_SETBASE,
1004 	UDM_GETBASE // = WM_USER + 110
1005 }
1006 
1007 static if (_WIN32_IE >= 0x400) {
1008 	enum {
1009 		UDM_SETRANGE32 = WM_USER + 111,
1010 		UDM_GETRANGE32,
1011 		UDM_SETPOS32,
1012 		UDM_GETPOS32 // = WM_USER + 114
1013 	}
1014 }
1015 
1016 static if (_WIN32_IE >= 0x500) {
1017 	enum {
1018 		UDM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
1019 		UDM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
1020 	}
1021 }
1022 
1023 /*enum {
1024 	SB_SETTEXTA       = WM_USER + 1,
1025 	SB_GETTEXTA,
1026 	SB_GETTEXTLENGTHA,
1027 	SB_SETPARTS,   // = WM_USER + 4
1028 	SB_GETPARTS       = WM_USER + 6,
1029 	SB_GETBORDERS,
1030 	SB_SETMINHEIGHT,
1031 	SB_SIMPLE,
1032 	SB_GETRECT,
1033 	SB_SETTEXTW,
1034 	SB_GETTEXTLENGTHW,
1035 	SB_GETTEXTW    // = WM_USER + 13
1036 }*/
1037 
1038 /*enum {
1039 	SBT_OWNERDRAW  = 0x1000,
1040 	SBT_NOBORDERS  = 256,
1041 	SBT_POPOUT     = 512,
1042 	SBT_RTLREADING = 1024
1043 }*/
1044 
1045 static if(_WIN32_IE >= 0x400) {
1046 	enum {
1047 		SBT_TOOLTIPS         = 0x0800,
1048 		SBN_SIMPLEMODECHANGE = SBN_FIRST
1049 	}
1050 }
1051 
1052 enum {
1053 	TBS_AUTOTICKS      = 1,
1054 	TBS_VERT           = 2,
1055 	TBS_HORZ           = 0,
1056 	TBS_TOP            = 4,
1057 	TBS_BOTTOM         = 0,
1058 	TBS_LEFT           = 4,
1059 	TBS_RIGHT          = 0,
1060 	TBS_BOTH           = 8,
1061 	TBS_NOTICKS        = 16,
1062 	TBS_ENABLESELRANGE = 32,
1063 	TBS_FIXEDLENGTH    = 64,
1064 	TBS_NOTHUMB        = 128
1065 }
1066 
1067 static if (_WIN32_IE >= 0x300) {
1068 	enum {
1069 		TBS_TOOLTIPS = 0x0100,
1070 		TBTS_TOP     = 0,
1071 		TBTS_LEFT,
1072 		TBTS_BOTTOM,
1073 		TBTS_RIGHT // = 3
1074 	}
1075 }
1076 
1077 static if (_WIN32_IE >= 0x500) {
1078 	enum {
1079 		TBS_REVERSED = 0x0200
1080 	}
1081 }
1082 
1083 static if (_WIN32_IE >= 0x501) {
1084 	enum {
1085 		TBS_DOWNISLEFT = 0x0400
1086 	}
1087 }
1088 
1089 static if (_WIN32_IE >= 0x400) {
1090 	enum {
1091 		TBIF_BYINDEX = 0x80000000,
1092 		TBIF_COMMAND = 32,
1093 		TBIF_IMAGE   = 1,
1094 		TBIF_LPARAM  = 16,
1095 		TBIF_SIZE    = 64,
1096 		TBIF_STATE   = 4,
1097 		TBIF_STYLE   = 8,
1098 		TBIF_TEXT    = 2
1099 	}
1100 }
1101 
1102 enum {
1103 	TBM_GETPOS           = WM_USER,
1104 	TBM_GETRANGEMIN,
1105 	TBM_GETRANGEMAX,
1106 	TBM_GETTIC,
1107 	TBM_SETTIC,
1108 	TBM_SETPOS,
1109 	TBM_SETRANGE,
1110 	TBM_SETRANGEMIN,
1111 	TBM_SETRANGEMAX,
1112 	TBM_CLEARTICS,
1113 	TBM_SETSEL,
1114 	TBM_SETSELSTART,
1115 	TBM_SETSELEND,    // = WM_USER+12,
1116 	TBM_GETPTICS         = WM_USER+14,
1117 	TBM_GETTICPOS,
1118 	TBM_GETNUMTICS,
1119 	TBM_GETSELSTART,
1120 	TBM_GETSELEND,
1121 	TBM_CLEARSEL,
1122 	TBM_SETTICFREQ,
1123 	TBM_SETPAGESIZE,
1124 	TBM_GETPAGESIZE,
1125 	TBM_SETLINESIZE,
1126 	TBM_GETLINESIZE,
1127 	TBM_GETTHUMBRECT,
1128 	TBM_GETCHANNELRECT,
1129 	TBM_SETTHUMBLENGTH,
1130 	TBM_GETTHUMBLENGTH,
1131 	TBM_SETTOOLTIPS,
1132 	TBM_GETTOOLTIPS,
1133 	TBM_SETTIPSIDE,
1134 	TBM_SETBUDDY,
1135 	TBM_GETBUDDY, //     = WM_USER+33,
1136 	TBM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT,
1137 	TBM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT
1138 }
1139 
1140 enum {
1141 	TB_LINEUP,
1142 	TB_LINEDOWN,
1143 	TB_PAGEUP,
1144 	TB_PAGEDOWN,
1145 	TB_THUMBPOSITION,
1146 	TB_THUMBTRACK,
1147 	TB_TOP,
1148 	TB_BOTTOM,
1149 	TB_ENDTRACK // = 8
1150 }
1151 
1152 enum {
1153 	HOTKEYF_SHIFT   = 1,
1154 	HOTKEYF_CONTROL = 2,
1155 	HOTKEYF_ALT     = 4,
1156 	HOTKEYF_EXT     = 8
1157 }
1158 
1159 enum {
1160 	HKCOMB_NONE = 1,
1161 	HKCOMB_S    = 2,
1162 	HKCOMB_C    = 4,
1163 	HKCOMB_A    = 8,
1164 	HKCOMB_SC   = 16,
1165 	HKCOMB_SA   = 32,
1166 	HKCOMB_CA   = 64,
1167 	HKCOMB_SCA  = 128
1168 }
1169 
1170 enum {
1171 	HKM_SETHOTKEY = WM_USER + 1,
1172 	HKM_GETHOTKEY = WM_USER + 2,
1173 	HKM_SETRULES  = WM_USER + 3
1174 }
1175 
1176 enum {
1177 	PBM_SETRANGE     = WM_USER + 1,
1178 	PBM_SETPOS,
1179 	PBM_DELTAPOS,
1180 	PBM_SETSTEP,
1181 	PBM_STEPIT,   // = WM_USER + 5
1182 	PBM_SETRANGE32   = 1030,
1183 	PBM_GETRANGE,
1184 	PBM_GETPOS,
1185 	PBM_SETBARCOLOR, // = 1033
1186 	PBM_SETBKCOLOR   = CCM_SETBKCOLOR
1187 }
1188 
1189 static if (_WIN32_WINNT >= 0x501) {
1190     enum {
1191         PBM_SETMARQUEE = WM_USER + 10,
1192     }
1193 }
1194 
1195 static if (_WIN32_WINNT >= 0x600) {
1196     enum {
1197         PBM_GETSTEP = WM_USER + 13,
1198         PBM_GETBKCOLOR,
1199         PBM_GETBARCOLOR,
1200         PBM_SETSTATE,
1201         PBM_GETSTATE,
1202     }
1203 }
1204 
1205 enum {
1206 	PBS_SMOOTH   = 1,
1207 	PBS_VERTICAL = 4
1208 }
1209 
1210 static if (_WIN32_WINNT >= 0x501) {
1211     enum {
1212         PBS_MARQUEE = 8,
1213     }
1214 }
1215 
1216 static if (_WIN32_WINNT >= 0x600) {
1217     enum {
1218         PBS_SMOOTHREVERSE = 16,
1219     }
1220 }
1221 
1222 enum {
1223 	LVS_ICON,
1224 	LVS_REPORT,
1225 	LVS_SMALLICON,
1226 	LVS_LIST,        // = 3
1227 	LVS_TYPEMASK        = 3,
1228 	LVS_SINGLESEL       = 4,
1229 	LVS_SHOWSELALWAYS   = 8,
1230 	LVS_SORTASCENDING   = 16,
1231 	LVS_SORTDESCENDING  = 32,
1232 	LVS_SHAREIMAGELISTS = 64,
1233 	LVS_NOLABELWRAP     = 128,
1234 	LVS_AUTOARRANGE     = 256,
1235 	LVS_EDITLABELS      = 512,
1236 	LVS_NOSCROLL        = 0x2000,
1237 	LVS_TYPESTYLEMASK   = 0xFC00,
1238 	LVS_ALIGNTOP        = 0,
1239 	LVS_ALIGNLEFT       = 0x800,
1240 	LVS_ALIGNMASK       = 0xC00,
1241 	LVS_OWNERDRAWFIXED  = 0x400,
1242 	LVS_NOCOLUMNHEADER  = 0x4000,
1243 	LVS_NOSORTHEADER    = 0x8000
1244 }
1245 
1246 static if (_WIN32_IE >= 0x300) {
1247 	enum {
1248 		CDIS_CHECKED       = 8,
1249 		CDIS_DEFAULT       = 32,
1250 		CDIS_DISABLED      = 4,
1251 		CDIS_FOCUS         = 16,
1252 		CDIS_GRAYED        = 2,
1253 		CDIS_HOT           = 64,
1254 		CDIS_SELECTED      = 1,
1255 		CDIS_MARKED        = 128,
1256 		CDIS_INDETERMINATE = 256
1257 	}
1258 
1259 	static if (_WIN32_WINNT >= 0x501) {
1260 		enum {
1261 			CDIS_SHOWKEYBOARDCUES = 512
1262 		}
1263 	}
1264 
1265 	enum {
1266 		CDDS_POSTERASE     = 4,
1267 		CDDS_POSTPAINT     = 2,
1268 		CDDS_PREERASE      = 3,
1269 		CDDS_PREPAINT      = 1,
1270 		CDDS_ITEM          = 65536,
1271 		CDDS_ITEMPOSTERASE = 65540,
1272 		CDDS_ITEMPOSTPAINT = 65538,
1273 		CDDS_ITEMPREERASE  = 65539,
1274 		CDDS_ITEMPREPAINT  = 65537
1275 	}
1276 
1277 	static if (_WIN32_IE >= 0x400) {
1278 		enum {
1279 			CDDS_SUBITEM = 0x20000
1280 		}
1281 	}
1282 
1283 	enum {
1284 		CDRF_DODEFAULT         = 0x00,
1285 		CDRF_NOTIFYITEMDRAW    = 0x20,
1286 		CDRF_NOTIFYSUBITEMDRAW = 0x20,
1287 		CDRF_NOTIFYITEMERASE   = 0x80,
1288 		CDRF_NOTIFYPOSTERASE   = 0x40,
1289 		CDRF_NOTIFYPOSTPAINT   = 0x10,
1290 		CDRF_NEWFONT           = 0x02,
1291 		CDRF_SKIPDEFAULT       = 0x04
1292 	}
1293 
1294 	static if (_WIN32_IE >= 0x400) {
1295 		enum {
1296 			LVBKIF_SOURCE_NONE    = 0x00000000,
1297 			LVBKIF_SOURCE_HBITMAP = 0x00000001,
1298 			LVBKIF_SOURCE_URL     = 0x00000002,
1299 			LVBKIF_SOURCE_MASK    = 0x00000003,
1300 			LVBKIF_STYLE_NORMAL   = 0x00000000,
1301 			LVBKIF_STYLE_TILE     = 0x00000010,
1302 			LVBKIF_STYLE_MASK     = 0x00000010
1303 		}
1304 	}
1305 
1306 	static if (_WIN32_WINNT >= 0x501) {
1307 		enum {
1308 			LVBKIF_FLAG_TILEOFFSET = 0x00000100,
1309 			LVBKIF_TYPE_WATERMARK  = 0x10000000
1310 		}
1311 	}
1312 
1313 	enum {
1314 		LVS_OWNERDATA = 4096
1315 	}
1316 
1317 	enum {
1318 		LVS_EX_CHECKBOXES       = 4,
1319 		LVS_EX_FULLROWSELECT    = 32,
1320 		LVS_EX_GRIDLINES        = 1,
1321 		LVS_EX_HEADERDRAGDROP   = 16,
1322 		LVS_EX_ONECLICKACTIVATE = 64,
1323 		LVS_EX_SUBITEMIMAGES    = 2,
1324 		LVS_EX_TRACKSELECT      = 8,
1325 		LVS_EX_TWOCLICKACTIVATE = 128
1326 	}
1327 
1328 	enum {
1329 		LVSICF_NOINVALIDATEALL = 0x00000001,
1330 		LVSICF_NOSCROLL        = 0x00000002
1331 	}
1332 
1333 	static if(_WIN32_IE >= 0x400) {
1334 		enum {
1335 			LVS_EX_FLATSB         = 0x00000100,
1336 			LVS_EX_REGIONAL       = 0x00000200,
1337 			LVS_EX_INFOTIP        = 0x00000400,
1338 			LVS_EX_UNDERLINEHOT   = 0x00000800,
1339 			LVS_EX_UNDERLINECOLD  = 0x00001000,
1340 			LVS_EX_MULTIWORKAREAS = 0x00002000
1341 		}
1342 	}
1343 
1344 	static if(_WIN32_IE >= 0x500) {
1345 		enum {
1346 			LVS_EX_LABELTIP     = 0x00004000,
1347 			LVS_EX_BORDERSELECT = 0x00008000
1348 		}
1349 	}
1350 }
1351 
1352 enum {
1353 	LVSIL_NORMAL,
1354 	LVSIL_SMALL,
1355 	LVSIL_STATE
1356 }
1357 
1358 enum {
1359 	LVM_GETBKCOLOR             = LVM_FIRST,
1360 	LVM_SETBKCOLOR,
1361 	LVM_GETIMAGELIST,
1362 	LVM_SETIMAGELIST,
1363 	LVM_GETITEMCOUNT,       // = LVM_FIRST +   4
1364 	LVM_SORTITEMSEX            = LVM_FIRST +  81,
1365     LVM_GETGROUPSTATE          = LVM_FIRST + 92,
1366     LVM_GETFOCUSEDGROUP,
1367     LVM_GETGROUPRECT           = LVM_FIRST + 98,
1368 	LVM_SETVIEW                = LVM_FIRST + 142,
1369 	LVM_GETVIEW,            // = LVM_FIRST + 143
1370 	LVM_INSERTGROUP            = LVM_FIRST + 145,
1371 	LVM_SETGROUPINFO           = LVM_FIRST + 147,
1372 	LVM_GETGROUPINFO           = LVM_FIRST + 149,
1373 	LVM_REMOVEGROUP,
1374 	LVM_MOVEGROUP,          // = LVM_FIRST + 151
1375     LVM_GETGROUPCOUNT,
1376     LVM_GETGROUPINFOBYINDEX,
1377     LVM_MOVEITEMTOGROUP,
1378 	LVM_SETGROUPMETRICS        = LVM_FIRST + 155,
1379 	LVM_GETGROUPMETRICS,
1380 	LVM_ENABLEGROUPVIEW,
1381 	LVM_SORTGROUPS,
1382 	LVM_INSERTGROUPSORTED,
1383 	LVM_REMOVEALLGROUPS,
1384 	LVM_HASGROUP,
1385 	LVM_SETTILEVIEWINFO,
1386 	LVM_GETTILEVIEWINFO,
1387 	LVM_SETTILEINFO,
1388 	LVM_GETTILEINFO,
1389 	LVM_SETINSERTMARK,
1390 	LVM_GETINSERTMARK,
1391 	LVM_INSERTMARKHITTEST,
1392 	LVM_GETINSERTMARKRECT,
1393 	LVM_SETINSERTMARKCOLOR,
1394 	LVM_GETINSERTMARKCOLOR, // = LVM_FIRST + 171
1395 	LVM_SETINFOTIP             = LVM_FIRST + 173,
1396 	LVM_GETSELECTEDCOLUMN,
1397 	LVM_ISGROUPVIEWENABLED,
1398 	LVM_GETOUTLINECOLOR,
1399 	LVM_SETOUTLINECOLOR,    // = LVM_FIRST + 177
1400 	LVM_CANCELEDITLABEL        = LVM_FIRST + 179,
1401     LVM_MAPINDEXTOID           = LVM_FIRST + 180,
1402 	LVM_MAPIDTOINDEX           = LVM_FIRST + 181,
1403     LVM_ISITEMVISIBLE          = LVM_FIRST + 182,
1404 }
1405 
1406 static if (_WIN32_WINNT >= 0x501) {
1407 	enum {
1408 		LVM_SETSELECTEDCOLUMN  = LVM_FIRST + 140
1409 	}
1410 }
1411 
1412 static if (_WIN32_WINNT >= 0x600) {
1413     enum {
1414         LVM_GETEMPTYTEXT = LVM_FIRST + 204,
1415         LVM_GETFOOTERRECT = LVM_FIRST + 205,
1416         LVM_GETFOOTERINFO = LVM_FIRST + 206,
1417         LVM_GETFOOTERITEMRECT = LVM_FIRST + 207,
1418         LVM_GETFOOTERITEM = (LVM_FIRST + 208),
1419         LVM_GETITEMINDEXRECT = (LVM_FIRST + 209),
1420         LVM_SETITEMINDEXSTATE = (LVM_FIRST + 210),
1421         LVM_GETNEXTITEMINDEX = (LVM_FIRST + 211),
1422     }
1423 }
1424 
1425 enum {
1426 	LVIF_TEXT  = 1,
1427 	LVIF_IMAGE = 2,
1428 	LVIF_PARAM = 4,
1429 	LVIF_STATE = 8
1430 }
1431 
1432 static if (_WIN32_IE >= 0x300) {
1433 	enum {
1434 		LVIF_INDENT      = 16,
1435 		LVIF_NORECOMPUTE = 2048
1436 	}
1437 }
1438 
1439 static if (_WIN32_WINNT >= 0x501) {
1440 	enum {
1441 		LVIF_GROUPID = 128,
1442 		LVIF_COLUMNS = 256
1443 	}
1444 }
1445 
1446 enum {
1447 	LVIS_FOCUSED        = 1,
1448 	LVIS_SELECTED       = 2,
1449 	LVIS_CUT            = 4,
1450 	LVIS_DROPHILITED    = 8,
1451 	LVIS_OVERLAYMASK    = 0xF00,
1452 	LVIS_STATEIMAGEMASK = 0xF000
1453 }
1454 
1455 const LPWSTR LPSTR_TEXTCALLBACKW = cast(LPWSTR) -1;
1456 const LPSTR  LPSTR_TEXTCALLBACKA = cast(LPSTR) -1;
1457 
1458 const I_IMAGECALLBACK = -1;
1459 
1460 static if(_WIN32_IE >= 0x400) {
1461 	enum {
1462 		LVM_SETBKIMAGEA          = LVM_FIRST + 68,
1463 		LVM_SETBKIMAGEW          = LVM_FIRST + 138,
1464 		LVM_GETBKIMAGEA          = LVM_FIRST + 69,
1465 		LVM_GETBKIMAGEW          = LVM_FIRST + 139,
1466 		LV_MAX_WORKAREAS         = 16,
1467 		LVM_SETWORKAREAS         = LVM_FIRST + 65,
1468 		LVM_GETWORKAREAS         = LVM_FIRST + 70,
1469 		LVM_GETNUMBEROFWORKAREAS = LVM_FIRST + 73,
1470 		LVM_GETSELECTIONMARK     = LVM_FIRST + 66,
1471 		LVM_SETSELECTIONMARK     = LVM_FIRST + 67,
1472 		LVM_SETHOVERTIME         = LVM_FIRST + 71,
1473 		LVM_GETHOVERTIME         = LVM_FIRST + 72,
1474 		LVM_SETTOOLTIPS          = LVM_FIRST + 74,
1475 		LVM_GETTOOLTIPS          = LVM_FIRST + 78,
1476 		LVM_SETUNICODEFORMAT     = CCM_SETUNICODEFORMAT,
1477 		LVM_GETUNICODEFORMAT     = CCM_GETUNICODEFORMAT
1478 	}
1479 }
1480 
1481 enum {
1482 	LVNI_ALL,
1483 	LVNI_FOCUSED     = 1,
1484 	LVNI_SELECTED    = 2,
1485 	LVNI_CUT         = 4,
1486 	LVNI_DROPHILITED = 8,
1487 	LVNI_ABOVE       = 256,
1488 	LVNI_BELOW       = 512,
1489 	LVNI_TOLEFT      = 1024,
1490 	LVNI_TORIGHT     = 2048
1491 }
1492 
1493 enum {
1494 	LVM_GETITEMA          = LVM_FIRST + 5,
1495 	LVM_SETITEMA,
1496 	LVM_INSERTITEMA,
1497 	LVM_DELETEITEM,
1498 	LVM_DELETEALLITEMS,
1499 	LVM_GETCALLBACKMASK,
1500 	LVM_SETCALLBACKMASK,
1501 	LVM_GETNEXTITEM,
1502 	LVM_FINDITEMA,
1503 	LVM_GETITEMRECT,
1504 	LVM_SETITEMPOSITION,
1505 	LVM_GETITEMPOSITION,
1506 	LVM_GETSTRINGWIDTHA,
1507 	LVM_HITTEST,
1508 	LVM_ENSUREVISIBLE,
1509 	LVM_SCROLL,
1510 	LVM_REDRAWITEMS,
1511 	LVM_ARRANGE,
1512 	LVM_EDITLABELA,
1513 	LVM_GETEDITCONTROL,
1514 	LVM_GETCOLUMNA,
1515 	LVM_SETCOLUMNA,
1516 	LVM_INSERTCOLUMNA,
1517 	LVM_DELETECOLUMN,
1518 	LVM_GETCOLUMNWIDTH,
1519 	LVM_SETCOLUMNWIDTH, // = LVM_FIRST + 30,
1520 	LVM_CREATEDRAGIMAGE   = LVM_FIRST + 33,
1521 	LVM_GETVIEWRECT,
1522 	LVM_GETTEXTCOLOR,
1523 	LVM_SETTEXTCOLOR,
1524 	LVM_GETTEXTBKCOLOR,
1525 	LVM_SETTEXTBKCOLOR,
1526 	LVM_GETTOPINDEX,
1527 	LVM_GETCOUNTPERPAGE,
1528 	LVM_GETORIGIN,
1529 	LVM_UPDATE,
1530 	LVM_SETITEMSTATE,
1531 	LVM_GETITEMSTATE,
1532 	LVM_GETITEMTEXTA,
1533 	LVM_SETITEMTEXTA,
1534 	LVM_SETITEMCOUNT,
1535 	LVM_SORTITEMS,
1536 	LVM_SETITEMPOSITION32,
1537 	LVM_GETSELECTEDCOUNT,
1538 	LVM_GETITEMSPACING,
1539 	LVM_GETISEARCHSTRINGA, // = LVM_FIRST + 52,
1540 	LVM_GETITEMW          = LVM_FIRST + 75,
1541 	LVM_SETITEMW          = LVM_FIRST + 76,
1542 	LVM_INSERTITEMW       = LVM_FIRST + 77,
1543 	LVM_FINDITEMW         = LVM_FIRST + 83,
1544 	LVM_GETSTRINGWIDTHW   = LVM_FIRST + 87,
1545 	LVM_GETCOLUMNW        = LVM_FIRST + 95,
1546 	LVM_SETCOLUMNW        = LVM_FIRST + 96,
1547 	LVM_INSERTCOLUMNW     = LVM_FIRST + 97,
1548 	LVM_GETITEMTEXTW      = LVM_FIRST + 115,
1549 	LVM_SETITEMTEXTW,
1550 	LVM_GETISEARCHSTRINGW,
1551 	LVM_EDITLABELW     // = LVM_FIRST + 118,
1552 }
1553 
1554 static if (_WIN32_IE >= 0x300) {
1555 	enum {
1556 		LVM_GETHEADER                = LVM_FIRST + 31,
1557 		LVM_SETICONSPACING           = LVM_FIRST + 53,
1558 		LVM_SETEXTENDEDLISTVIEWSTYLE,
1559 		LVM_GETEXTENDEDLISTVIEWSTYLE,
1560 		LVM_GETSUBITEMRECT,
1561 		LVM_SUBITEMHITTEST,
1562 		LVM_SETCOLUMNORDERARRAY,
1563 		LVM_GETCOLUMNORDERARRAY,
1564 		LVM_SETHOTITEM,
1565 		LVM_GETHOTITEM,
1566 		LVM_SETHOTCURSOR,
1567 		LVM_GETHOTCURSOR,
1568 		LVM_APPROXIMATEVIEWRECT   // = LVM_FIRST + 64,
1569 	}
1570 }
1571 
1572 enum {
1573 	LVFI_PARAM     = 1,
1574 	LVFI_STRING    = 2,
1575 	LVFI_PARTIAL   = 8,
1576 	LVFI_WRAP      = 32,
1577 	LVFI_NEARESTXY = 64
1578 }
1579 
1580 enum {
1581 	LVIF_DI_SETITEM = 0x1000
1582 }
1583 
1584 enum {
1585 	LVIR_BOUNDS,
1586 	LVIR_ICON,
1587 	LVIR_LABEL,
1588 	LVIR_SELECTBOUNDS // = 3
1589 }
1590 
1591 enum {
1592 	LVHT_NOWHERE         = 1,
1593 	LVHT_ONITEMICON      = 2,
1594 	LVHT_ONITEMLABEL     = 4,
1595 	LVHT_ONITEMSTATEICON = 8,
1596 	LVHT_ONITEM          = LVHT_ONITEMICON | LVHT_ONITEMLABEL
1597 	                       | LVHT_ONITEMSTATEICON,
1598 	LVHT_ABOVE           = 8,
1599 	LVHT_BELOW           = 16,
1600 	LVHT_TORIGHT         = 32,
1601 	LVHT_TOLEFT          = 64
1602 }
1603 
1604 enum {
1605 	LVA_DEFAULT    = 0,
1606 	LVA_ALIGNLEFT  = 1,
1607 	LVA_ALIGNTOP   = 2,
1608 	LVA_SNAPTOGRID = 5
1609 }
1610 
1611 enum {
1612 	LVCF_FMT     = 1,
1613 	LVCF_WIDTH   = 2,
1614 	LVCF_TEXT    = 4,
1615 	LVCF_SUBITEM = 8
1616 }
1617 
1618 static if (_WIN32_IE >= 0x300) {
1619 	enum {
1620 		LVCF_IMAGE = 16,
1621 		LVCF_ORDER = 32
1622 	}
1623 }
1624 
1625 enum {
1626 	LVCFMT_LEFT,
1627 	LVCFMT_RIGHT,
1628 	LVCFMT_CENTER,
1629 	LVCFMT_JUSTIFYMASK // = 3
1630 }
1631 
1632 static if (_WIN32_IE >= 0x300) {
1633 	enum {
1634 		LVCFMT_IMAGE           = 2048,
1635 		LVCFMT_BITMAP_ON_RIGHT = 4096,
1636 		LVCFMT_COL_HAS_IMAGES  = 32768
1637 	}
1638 }
1639 
1640 enum {
1641 	LVSCW_AUTOSIZE           = -1,
1642 	LVSCW_AUTOSIZE_USEHEADER = -2
1643 }
1644 
1645 enum {
1646 	LVN_ITEMCHANGING    = LVN_FIRST,
1647 	LVN_ITEMCHANGED     = LVN_FIRST - 1,
1648 	LVN_INSERTITEM      = LVN_FIRST - 2,
1649 	LVN_DELETEITEM      = LVN_FIRST - 3,
1650 	LVN_DELETEALLITEMS  = LVN_FIRST - 4,
1651 	LVN_BEGINLABELEDITA = LVN_FIRST - 5,
1652 	LVN_ENDLABELEDITA   = LVN_FIRST - 6,
1653 	LVN_COLUMNCLICK     = LVN_FIRST - 8,
1654 	LVN_BEGINDRAG       = LVN_FIRST - 9,
1655 	LVN_BEGINRDRAG      = LVN_FIRST - 11,
1656 	LVN_GETDISPINFOA    = LVN_FIRST - 50,
1657 	LVN_SETDISPINFOA    = LVN_FIRST - 51,
1658 	LVN_KEYDOWN         = LVN_FIRST - 55,
1659 	LVN_BEGINLABELEDITW = LVN_FIRST - 75,
1660 	LVN_ENDLABELEDITW   = LVN_FIRST - 76,
1661 	LVN_GETDISPINFOW    = LVN_FIRST - 77,
1662 	LVN_SETDISPINFOW    = LVN_FIRST - 78
1663 }
1664 
1665 static if (_WIN32_IE >= 0x400) {
1666 	enum {
1667 		LVN_MARQUEEBEGIN = LVN_FIRST - 56,
1668 		LVN_GETINFOTIPA  = LVN_FIRST - 57,
1669 		LVN_GETINFOTIPW  = LVN_FIRST - 58,
1670 		LVKF_ALT         = 1,
1671 		LVKF_CONTROL     = 2,
1672 		LVKF_SHIFT       = 4,
1673 		LVGIT_UNFOLDED   = 1
1674 	}
1675 }
1676 
1677 enum {
1678 	TVS_HASBUTTONS      = 1,
1679 	TVS_HASLINES        = 2,
1680 	TVS_LINESATROOT     = 4,
1681 	TVS_EDITLABELS      = 8,
1682 	TVS_DISABLEDRAGDROP = 16,
1683 	TVS_SHOWSELALWAYS   = 32
1684 }
1685 
1686 static if (_WIN32_IE >= 0x300) {
1687 	enum {
1688 		TVS_RTLREADING  = 64,
1689 		TVS_NOTOOLTIPS  = 128,
1690 		TVS_CHECKBOXES  = 256,
1691 		TVS_TRACKSELECT = 512
1692 	}
1693 }
1694 
1695 static if (_WIN32_IE >= 0x400) {
1696 	enum {
1697 		TVS_SINGLEEXPAND  = 1024,
1698 		TVS_INFOTIP       = 2048,
1699 		TVS_FULLROWSELECT = 4096,
1700 		TVS_NOSCROLL      = 8192,
1701 		TVS_NONEVENHEIGHT = 16384
1702 	}
1703 }
1704 
1705 static if (_WIN32_IE >= 0x500) {
1706 	enum {
1707 		TVS_NOHSCROLL = 0x8000
1708 	}
1709 }
1710 
1711 enum {
1712 	TVIF_TEXT          = 1,
1713 	TVIF_IMAGE         = 2,
1714 	TVIF_PARAM         = 4,
1715 	TVIF_STATE         = 8,
1716 	TVIF_HANDLE        = 16,
1717 	TVIF_SELECTEDIMAGE = 32,
1718 	TVIF_CHILDREN      = 64
1719 }
1720 
1721 static if (_WIN32_IE >= 0x400) {
1722 	enum {
1723 		TVIF_INTEGRAL = 0x0080
1724 	}
1725 }
1726 
1727 enum {
1728 	TVIS_FOCUSED        = 1,
1729 	TVIS_SELECTED       = 2,
1730 	TVIS_CUT            = 4,
1731 	TVIS_DROPHILITED    = 8,
1732 	TVIS_BOLD           = 16,
1733 	TVIS_EXPANDED       = 32,
1734 	TVIS_EXPANDEDONCE   = 64,
1735 	TVIS_OVERLAYMASK    = 0xF00,
1736 	TVIS_STATEIMAGEMASK = 0xF000,
1737 	TVIS_USERMASK       = 0xF000
1738 }
1739 
1740 enum {
1741 	I_CHILDRENCALLBACK = -1
1742 }
1743 
1744 mixin DECLARE_HANDLE!("HTREEITEM");
1745 mixin DECLARE_HANDLE!("HIMAGELIST");
1746 
1747 version(Win64)
1748 {
1749 const HTREEITEM
1750 	TVI_ROOT  = cast(HTREEITEM) cast(ULONG_PTR)-0x10000,
1751 	TVI_FIRST = cast(HTREEITEM) cast(ULONG_PTR)-0xffff,
1752 	TVI_LAST  = cast(HTREEITEM) cast(ULONG_PTR)-0xfffe,
1753 	TVI_SORT  = cast(HTREEITEM) cast(ULONG_PTR)-0xfffd;
1754 } else {
1755 const HTREEITEM
1756 	TVI_ROOT  = cast(HTREEITEM) 0xFFFF0000,
1757 	TVI_FIRST = cast(HTREEITEM) 0xFFFF0001,
1758 	TVI_LAST  = cast(HTREEITEM) 0xFFFF0002,
1759 	TVI_SORT  = cast(HTREEITEM) 0xFFFF0003;
1760 }
1761 
1762 enum {
1763 	TVSIL_NORMAL = 0,
1764 	TVSIL_STATE  = 2
1765 }
1766 
1767 enum {
1768 	TVM_INSERTITEMA       = TV_FIRST,
1769 	TVM_DELETEITEM        = TV_FIRST + 1,
1770 	TVM_EXPAND            = TV_FIRST + 2,
1771 	TVM_GETITEMRECT       = TV_FIRST + 4,
1772 	TVM_GETCOUNT,
1773 	TVM_GETINDENT,
1774 	TVM_SETINDENT,
1775 	TVM_GETIMAGELIST,
1776 	TVM_SETIMAGELIST,
1777 	TVM_GETNEXTITEM,
1778 	TVM_SELECTITEM,
1779 	TVM_GETITEMA,
1780 	TVM_SETITEMA,
1781 	TVM_EDITLABELA,
1782 	TVM_GETEDITCONTROL,
1783 	TVM_GETVISIBLECOUNT,
1784 	TVM_HITTEST,
1785 	TVM_CREATEDRAGIMAGE,
1786 	TVM_SORTCHILDREN,
1787 	TVM_ENSUREVISIBLE,
1788 	TVM_SORTCHILDRENCB,
1789 	TVM_ENDEDITLABELNOW,
1790 	TVM_GETISEARCHSTRINGA, // = TV_FIRST + 23
1791 	TVM_INSERTITEMW       = TV_FIRST + 50,
1792 	TVM_GETITEMW          = TV_FIRST + 62,
1793 	TVM_SETITEMW          = TV_FIRST + 63,
1794 	TVM_GETISEARCHSTRINGW = TV_FIRST + 64,
1795 	TVM_EDITLABELW        = TV_FIRST + 65
1796 }
1797 
1798 static if (_WIN32_IE >= 0x300) {
1799 	enum {
1800 		TVM_GETTOOLTIPS = TV_FIRST + 25,
1801 		TVM_SETTOOLTIPS = TV_FIRST + 24
1802 	}
1803 }
1804 
1805 static if (_WIN32_IE >= 0x400) {
1806 	enum {
1807 		TVM_SETINSERTMARK      = TV_FIRST + 26,
1808 		TVM_SETITEMHEIGHT,
1809 		TVM_GETITEMHEIGHT,
1810 		TVM_SETBKCOLOR,
1811 		TVM_SETTEXTCOLOR,
1812 		TVM_GETBKCOLOR,
1813 		TVM_GETTEXTCOLOR,
1814 		TVM_SETSCROLLTIME,
1815 		TVM_GETSCROLLTIME,  // = TV_FIRST + 34
1816 		TVM_SETINSERTMARKCOLOR = TV_FIRST + 37,
1817 		TVM_GETINSERTMARKCOLOR = TV_FIRST + 38,
1818 		TVM_SETUNICODEFORMAT   = CCM_SETUNICODEFORMAT,
1819 		TVM_GETUNICODEFORMAT   = CCM_GETUNICODEFORMAT
1820 	}
1821 }
1822 
1823 static if (_WIN32_IE >= 0x500) {
1824 	enum {
1825 		TVM_GETITEMSTATE = TV_FIRST + 39,
1826 		TVM_SETLINECOLOR = TV_FIRST + 40,
1827 		TVM_GETLINECOLOR = TV_FIRST + 41
1828 	}
1829 }
1830 
1831 static if (_WIN32_IE >= 0x501) {
1832 	enum {
1833         TVM_MAPACCIDTOHTREEITEM = TV_FIRST + 42,
1834         TVM_MAPHTREEITEMTOACCID = TV_FIRST + 43,
1835         TVM_SETEXTENDEDSTYLE = TV_FIRST + 44,
1836         TVM_GETEXTENDEDSTYLE = TV_FIRST + 45,
1837         TVM_SETAUTOSCROLLINFO = TV_FIRST + 59
1838     }
1839 }
1840 
1841 static if (_WIN32_IE >= 0x600) {
1842 	enum {
1843         TVM_GETSELECTEDCOUNT = TV_FIRST + 70,
1844         TVM_SHOWINFOTIP = TV_FIRST + 71,
1845         TVM_GETITEMPARTRECT = TV_FIRST + 72,
1846     }
1847 }
1848 
1849 enum {
1850 	TVE_COLLAPSE      = 1,
1851 	TVE_EXPAND        = 2,
1852 	TVE_TOGGLE        = 3,
1853 	TVE_COLLAPSERESET = 0x8000
1854 }
1855 
1856 static if (_WIN32_IE >= 0x300) {
1857 	enum {
1858 		TVE_EXPANDPARTIAL = 0x4000
1859 	}
1860 }
1861 
1862 enum {
1863 	TVC_UNKNOWN,
1864 	TVC_BYMOUSE,
1865 	TVC_BYKEYBOARD // = 2
1866 }
1867 
1868 enum {
1869 	TVGN_ROOT,
1870 	TVGN_NEXT,
1871 	TVGN_PREVIOUS,
1872 	TVGN_PARENT,
1873 	TVGN_CHILD,
1874 	TVGN_FIRSTVISIBLE,
1875 	TVGN_NEXTVISIBLE,
1876 	TVGN_PREVIOUSVISIBLE,
1877 	TVGN_DROPHILITE,
1878 	TVGN_CARET // = 9
1879 }
1880 
1881 static if (_WIN32_IE >= 0x400) {
1882 	enum {
1883 		TVGN_LASTVISIBLE = 10
1884 	}
1885 }
1886 
1887 static if (_WIN32_IE >= 0x600) {
1888 	enum {
1889 		TVGN_NEXTSELECTED = 11
1890 	}
1891 }
1892 
1893 enum {
1894 	TVN_SELCHANGINGA    = TVN_FIRST - 1,
1895 	TVN_SELCHANGEDA     = TVN_FIRST - 2,
1896 	TVN_GETDISPINFOA    = TVN_FIRST - 3,
1897 	TVN_SETDISPINFOA    = TVN_FIRST - 4,
1898 	TVN_ITEMEXPANDINGA  = TVN_FIRST - 5,
1899 	TVN_ITEMEXPANDEDA   = TVN_FIRST - 6,
1900 	TVN_BEGINDRAGA      = TVN_FIRST - 7,
1901 	TVN_BEGINRDRAGA     = TVN_FIRST - 8,
1902 	TVN_DELETEITEMA     = TVN_FIRST - 9,
1903 	TVN_BEGINLABELEDITA = TVN_FIRST - 10,
1904 	TVN_ENDLABELEDITA   = TVN_FIRST - 11,
1905 	TVN_KEYDOWN         = TVN_FIRST - 12,
1906 	TVN_SELCHANGINGW    = TVN_FIRST - 50,
1907 	TVN_SELCHANGEDW     = TVN_FIRST - 51,
1908 	TVN_GETDISPINFOW    = TVN_FIRST - 52,
1909 	TVN_SETDISPINFOW    = TVN_FIRST - 53,
1910 	TVN_ITEMEXPANDINGW  = TVN_FIRST - 54,
1911 	TVN_ITEMEXPANDEDW   = TVN_FIRST - 55,
1912 	TVN_BEGINDRAGW      = TVN_FIRST - 56,
1913 	TVN_BEGINRDRAGW     = TVN_FIRST - 57,
1914 	TVN_DELETEITEMW     = TVN_FIRST - 58,
1915 	TVN_BEGINLABELEDITW = TVN_FIRST - 59,
1916 	TVN_ENDLABELEDITW   = TVN_FIRST - 60
1917 }
1918 
1919 static if (_WIN32_IE >= 0x400) {
1920 	enum {
1921 		TVNRET_DEFAULT   = 0,
1922 		TVNRET_SKIPOLD   = 1,
1923 		TVNRET_SKIPNEW   = 2,
1924 		TVN_GETINFOTIPA  = TVN_FIRST - 13,
1925 		TVN_GETINFOTIPW  = TVN_FIRST - 14,
1926 		TVN_SINGLEEXPAND = TVN_FIRST - 15
1927 	}
1928 }
1929 
1930 enum {
1931 	TVIF_DI_SETITEM = 0x1000
1932 }
1933 
1934 enum {
1935 	TVHT_NOWHERE         = 1,
1936 	TVHT_ONITEMICON      = 2,
1937 	TVHT_ONITEMLABEL     = 4,
1938 	TVHT_ONITEMINDENT    = 8,
1939 	TVHT_ONITEMBUTTON    = 16,
1940 	TVHT_ONITEMRIGHT     = 32,
1941 	TVHT_ONITEMSTATEICON = 64,
1942 	TVHT_ABOVE           = 256,
1943 	TVHT_BELOW           = 512,
1944 	TVHT_TORIGHT         = 1024,
1945 	TVHT_TOLEFT          = 2048,
1946 	TCHT_NOWHERE         = 1,
1947 	TCHT_ONITEMICON      = 2,
1948 	TCHT_ONITEMLABEL     = 4,
1949 	TVHT_ONITEM          = TVHT_ONITEMICON | TVHT_ONITEMLABEL
1950 	                       | TVHT_ONITEMSTATEICON,
1951 	TCHT_ONITEM          = TCHT_ONITEMICON | TCHT_ONITEMLABEL
1952 }
1953 
1954 enum {
1955 	TCS_TABS              = 0,
1956 	TCS_RIGHTJUSTIFY      = 0,
1957 	TCS_SINGLELINE        = 0,
1958 	TCS_FORCEICONLEFT     = 16,
1959 	TCS_FORCELABELLEFT    = 32,
1960 	TCS_BUTTONS           = 256,
1961 	TCS_MULTILINE         = 512,
1962 	TCS_FIXEDWIDTH        = 1024,
1963 	TCS_RAGGEDRIGHT       = 2048,
1964 	TCS_FOCUSONBUTTONDOWN = 0x1000,
1965 	TCS_OWNERDRAWFIXED    = 0x2000,
1966 	TCS_TOOLTIPS          = 0x4000,
1967 	TCS_FOCUSNEVER        = 0x8000
1968 }
1969 
1970 static if (_WIN32_IE >= 0x300) {
1971 	enum {
1972 		TCS_BOTTOM         = 2,
1973 		TCS_RIGHT          = 2,
1974 		TCS_VERTICAL       = 128,
1975 		TCS_SCROLLOPPOSITE = 0x0001,
1976 		TCS_HOTTRACK       = 0x0040,
1977 		TCS_MULTISELECT    = 0x0004
1978 	}
1979 }
1980 
1981 static if(_WIN32_IE >= 0x400) {
1982 	enum {
1983 		TCS_FLATBUTTONS       = 0x0008,
1984 		TCS_EX_FLATSEPARATORS = 0x00000001,
1985 		TCS_EX_REGISTERDROP   = 0x00000002
1986 	}
1987 }
1988 
1989 enum {
1990 	TCIF_TEXT       = 1,
1991 	TCIF_IMAGE      = 2,
1992 	TCIF_RTLREADING = 4,
1993 	TCIF_PARAM      = 8
1994 }
1995 
1996 static if (_WIN32_IE >= 0x400) {
1997 	enum {
1998 		TCIF_STATE = 16
1999 	}
2000 }
2001 
2002 enum {
2003 	TCIS_BUTTONPRESSED = 1
2004 }
2005 
2006 static if (_WIN32_IE >= 0x400) {
2007 	enum {
2008 		TCIS_HIGHLIGHTED = 2
2009 	}
2010 }
2011 
2012 enum {
2013 	TCM_FIRST          = 0x1300,
2014 	TCM_GETIMAGELIST   = TCM_FIRST + 2,
2015 	TCM_SETIMAGELIST,
2016 	TCM_GETITEMCOUNT,
2017 	TCM_GETITEMA,
2018 	TCM_SETITEMA,
2019 	TCM_INSERTITEMA,
2020 	TCM_DELETEITEM,
2021 	TCM_DELETEALLITEMS,
2022 	TCM_GETITEMRECT,
2023 	TCM_GETCURSEL,
2024 	TCM_SETCURSEL,
2025 	TCM_HITTEST,
2026 	TCM_SETITEMEXTRA, // = TCM_FIRST + 14
2027 	TCM_ADJUSTRECT     = TCM_FIRST + 40,
2028 	TCM_SETITEMSIZE,
2029 	TCM_REMOVEIMAGE,
2030 	TCM_SETPADDING,
2031 	TCM_GETROWCOUNT,
2032 	TCM_GETTOOLTIPS,
2033 	TCM_SETTOOLTIPS,
2034 	TCM_GETCURFOCUS,
2035 	TCM_SETCURFOCUS,
2036 	TCM_SETMINTABWIDTH,
2037 	TCM_DESELECTALL, // = TCM_FIRST + 50
2038 	TCM_GETITEMW       = TCM_FIRST + 60,
2039 	TCM_SETITEMW       = TCM_FIRST + 61,
2040 	TCM_INSERTITEMW    = TCM_FIRST + 62
2041 }
2042 
2043 static if (_WIN32_IE >=0x0400) {
2044 	enum {
2045 		TCM_HIGHLIGHTITEM    = TCM_FIRST + 51,
2046 		TCM_SETEXTENDEDSTYLE = TCM_FIRST + 52,
2047 		TCM_GETEXTENDEDSTYLE = TCM_FIRST + 53,
2048 		TCM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
2049 		TCM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
2050 	}
2051 }
2052 
2053 enum {
2054 	TCN_KEYDOWN     = TCN_FIRST,
2055 	TCN_SELCHANGE   = TCN_FIRST - 1,
2056 	TCN_SELCHANGING = TCN_FIRST - 2
2057 }
2058 
2059 enum {
2060 	NM_OUTOFMEMORY     = NM_FIRST - 1,
2061 	NM_CLICK           = NM_FIRST - 2,
2062 	NM_DBLCLK          = NM_FIRST - 3,
2063 	NM_RETURN          = NM_FIRST - 4,
2064 	NM_RCLICK          = NM_FIRST - 5,
2065 	NM_RDBLCLK         = NM_FIRST - 6,
2066 	NM_SETFOCUS        = NM_FIRST - 7,
2067 	NM_KILLFOCUS       = NM_FIRST - 8,
2068 	NM_CUSTOMDRAW      = NM_FIRST - 12,
2069 	NM_HOVER           = NM_FIRST - 13,
2070 	NM_NCHITTEST       = NM_FIRST - 14,
2071 	NM_KEYDOWN         = NM_FIRST - 15,
2072 	NM_RELEASEDCAPTURE = NM_FIRST - 16,
2073 	NM_SETCURSOR       = NM_FIRST - 17,
2074 	NM_CHAR            = NM_FIRST - 18,
2075 	NM_TOOLTIPSCREATED = NM_FIRST - 19
2076 }
2077 
2078 enum {
2079 	SBARS_SIZEGRIP = 256
2080 }
2081 
2082 /*enum {
2083 	CCM_FIRST            = 0x2000,
2084 	CCM_LAST             = CCM_FIRST + 0x200,
2085 	CCM_SETBKCOLOR       = 8193,
2086 	CCM_SETCOLORSCHEME   = 8194,
2087 	CCM_GETCOLORSCHEME   = 8195,
2088 	CCM_GETDROPTARGET    = 8196,
2089 	CCM_SETUNICODEFORMAT = 8197,
2090 	CCM_GETUNICODEFORMAT = 8198,
2091 	CCM_SETVERSION       = 0x2007,
2092 	CCM_GETVERSION       = 0x2008,
2093 	CCM_SETNOTIFYWINDOW  = 0x2009
2094 }*/
2095 
2096 static if (_WIN32_WINNT >= 0x501) {
2097 	enum {
2098 		CCM_SETWINDOWTHEME = 0x200b,
2099 		CCM_DPISCALE       = 0x200c,
2100 
2101         RB_GETBANDMARGINS = WM_USER + 40,
2102         RB_SETWINDOWTHEME = CCM_SETWINDOWTHEME,
2103         TB_SETWINDOWTHEME  = CCM_SETWINDOWTHEME,
2104         TTM_SETWINDOWTHEME = CCM_SETWINDOWTHEME,
2105 	}
2106 }
2107 
2108 enum {
2109 	ICC_LISTVIEW_CLASSES = 1,
2110 	ICC_TREEVIEW_CLASSES = 2,
2111 	ICC_BAR_CLASSES      = 4,
2112 	ICC_TAB_CLASSES      = 8,
2113 	ICC_UPDOWN_CLASS     = 16,
2114 	ICC_PROGRESS_CLASS   = 32,
2115 	ICC_HOTKEY_CLASS     = 64,
2116 	ICC_ANIMATE_CLASS    = 128,
2117 	ICC_WIN95_CLASSES    = 255,
2118 	ICC_DATE_CLASSES     = 256,
2119 	ICC_USEREX_CLASSES   = 512,
2120 	ICC_COOL_CLASSES     = 1024
2121 }
2122 
2123 static if (_WIN32_IE >= 0x400) {
2124 	enum {
2125 		INFOTIPSIZE            = 1024,
2126 		ICC_INTERNET_CLASSES   = 2048,
2127 		ICC_PAGESCROLLER_CLASS = 4096,
2128 		ICC_NATIVEFNTCTL_CLASS = 8192
2129 	}
2130 }
2131 
2132 static if (_WIN32_WINNT >= 0x501) {
2133 	enum {
2134 		ICC_STANDARD_CLASSES = 0x00004000,
2135 		ICC_LINK_CLASS       = 0x00008000
2136 	}
2137 }
2138 
2139 enum {
2140 	GDTR_MIN = 1,
2141 	GDTR_MAX = 2
2142 }
2143 
2144 enum {
2145 	GMR_VISIBLE,
2146 	GMR_DAYSTATE
2147 }
2148 
2149 enum {
2150 	GDT_ERROR = -1,
2151 	GDT_VALID = 0,
2152 	GDT_NONE  = 1
2153 }
2154 
2155 enum {
2156 	DTS_SHORTDATEFORMAT = 0,
2157 	DTS_UPDOWN          = 1,
2158 	DTS_SHOWNONE        = 2,
2159 	DTS_LONGDATEFORMAT  = 4,
2160 	DTS_TIMEFORMAT      = 9,
2161 	DTS_APPCANPARSE     = 16,
2162 	DTS_RIGHTALIGN      = 32
2163 }
2164 
2165 static if (_WIN32_IE >= 0x500) {
2166 	enum {
2167 		DTS_SHORTDATECENTURYFORMAT = 0x000C
2168 	}
2169 }
2170 
2171 enum {
2172 	MCS_DAYSTATE    = 1,
2173 	MCS_MULTISELECT = 2,
2174 	MCS_WEEKNUMBERS = 4
2175 }
2176 
2177 static if (_WIN32_IE >= 0x400) {
2178 	enum {
2179 		MCS_NOTODAYCIRCLE = 0x0008,
2180 		MCS_NOTODAY       = 0x0010
2181 	}
2182 } else {
2183 	enum {
2184 		MCS_NOTODAY = 0x0008
2185 	}
2186 }
2187 
2188 enum {
2189     DTM_FIRST         = 0x10000,
2190 	DTM_GETSYSTEMTIME = 0x1001,
2191 	DTM_SETSYSTEMTIME = 0x1002,
2192 	DTM_GETRANGE      = 0x1003,
2193 	DTM_SETRANGE      = 0x1004,
2194 	DTM_SETFORMATA    = 0x1005,
2195 	DTM_SETMCCOLOR    = 0x1006,
2196 	DTM_GETMCCOLOR    = 0x1007,
2197 	DTM_GETMONTHCAL   = 0x1008,
2198 	DTM_SETMCFONT     = 0x1009,
2199 	DTM_GETMCFONT     = 0x100a,
2200 	DTM_SETFORMATW    = 0x1050
2201 }
2202 
2203 static if (_WIN32_WINNT >= 0x600) {
2204     enum {
2205         DTM_SETMCSTYLE = DTM_FIRST + 11,
2206         DTM_GETMCSTYLE,
2207         DTM_CLOSEMONTHCAL,
2208         DTM_GETDATETIMEPICKERINFO,
2209         DTM_GETIDEALSIZE,
2210     }
2211 }
2212 
2213 enum {
2214 	DTN_USERSTRINGA    = -758U,
2215 	DTN_USERSTRINGW    = -745U,
2216 	DTN_WMKEYDOWNA     = -757U,
2217 	DTN_WMKEYDOWNW     = -744U,
2218 	DTN_FORMATA        = -756U,
2219 	DTN_FORMATW        = -743U,
2220 	DTN_FORMATQUERYA   = -755U,
2221 	DTN_FORMATQUERYW   = -742U,
2222 	DTN_DROPDOWN       = -754U,
2223 	DTN_CLOSEUP        = -753U,
2224 	DTN_DATETIMECHANGE = -759U,
2225 }
2226 
2227 enum {
2228     MCM_FIRST             = 0x1000,
2229 	MCM_GETCURSEL         = 0x1001,
2230 	MCM_SETCURSEL         = 0x1002,
2231 	MCM_GETMAXSELCOUNT    = 0x1003,
2232 	MCM_SETMAXSELCOUNT    = 0x1004,
2233 	MCM_GETSELRANGE       = 0x1005,
2234 	MCM_SETSELRANGE       = 0x1006,
2235 	MCM_GETMONTHRANGE     = 0x1007,
2236 	MCM_SETDAYSTATE       = 0x1008,
2237 	MCM_GETMINREQRECT     = 0x1009,
2238 	MCM_SETCOLOR          = 0x100a,
2239 	MCM_GETCOLOR          = 0x100b,
2240 	MCM_SETTODAY          = 0x100c,
2241 	MCM_GETTODAY          = 0x100d,
2242 	MCM_HITTEST           = 0x100e,
2243 	MCM_SETFIRSTDAYOFWEEK = 0x100f,
2244 	MCM_GETFIRSTDAYOFWEEK = 0x1010,
2245 	MCM_GETRANGE          = 0x1011,
2246 	MCM_SETRANGE          = 0x1012,
2247 	MCM_GETMONTHDELTA     = 0x1013,
2248 	MCM_SETMONTHDELTA     = 0x1014,
2249 	MCM_GETMAXTODAYWIDTH  = 0x1015,
2250 	MCM_GETUNICODEFORMAT  = CCM_GETUNICODEFORMAT,
2251 	MCM_SETUNICODEFORMAT  = CCM_SETUNICODEFORMAT
2252 }
2253 
2254 static if (_WIN32_WINNT >= 0x600) {
2255     enum {
2256         MCM_GETCURRENTVIEW = MCM_FIRST + 22,
2257         MCM_GETCALENDARCOUNT,
2258         MCM_GETCALENDARGRIDINFO,
2259         MCM_GETCALID = MCM_FIRST + 27,
2260         MCM_SETCALID,
2261         MCM_SIZERECTTOMIN,
2262         MCM_SETCALENDARBORDER,
2263         MCM_GETCALENDARBORDER,
2264         MCM_SETCURRENTVIEW,
2265     }
2266 }
2267 
2268 enum {
2269 	MCN_SELCHANGE   = -749U,
2270 	MCN_GETDAYSTATE = -747U,
2271 	MCN_SELECT      = -746U
2272 }
2273 
2274 enum {
2275 	ODT_HEADER = 100,
2276 	ODT_TAB,
2277 	ODT_LISTVIEW // = 102
2278 }
2279 
2280 enum {
2281 	SB_SETBKCOLOR = 0x2001
2282 }
2283 
2284 static if (_WIN32_IE >= 0x300) {
2285 	enum {
2286 		SB_ISSIMPLE = 1038
2287 	}
2288 
2289 	enum {
2290 		MCSC_BACKGROUND,
2291 		MCSC_TEXT,
2292 		MCSC_TITLEBK,
2293 		MCSC_TITLETEXT,
2294 		MCSC_MONTHBK,
2295 		MCSC_TRAILINGTEXT // = 5
2296 	}
2297 }
2298 
2299 static if (_WIN32_IE >= 0x400) {
2300 	enum {
2301 		MCHT_TITLE            = 0x10000,
2302 		MCHT_CALENDAR         = 0x20000,
2303 		MCHT_TODAYLINK        = 0x30000,
2304 		MCHT_NEXT             = 0x1000000,
2305 		MCHT_PREV             = 0x2000000,
2306 		MCHT_NOWHERE          = 0x00,
2307 		MCHT_TITLEBK          = MCHT_TITLE,
2308 		MCHT_TITLEMONTH       = MCHT_TITLE | 0x0001,
2309 		MCHT_TITLEYEAR        = MCHT_TITLE | 0x0002,
2310 		MCHT_TITLEBTNNEXT     = MCHT_TITLE | MCHT_NEXT | 0x0003,
2311 		MCHT_TITLEBTNPREV     = MCHT_TITLE | MCHT_PREV | 0x0003,
2312 		MCHT_CALENDARBK       = MCHT_CALENDAR,
2313 		MCHT_CALENDARDATE     = MCHT_CALENDAR | 0x0001,
2314 		MCHT_CALENDARDATENEXT = MCHT_CALENDARDATE | MCHT_NEXT,
2315 		MCHT_CALENDARDATEPREV = MCHT_CALENDARDATE | MCHT_PREV,
2316 		MCHT_CALENDARDAY      = MCHT_CALENDAR | 0x0002,
2317 		MCHT_CALENDARWEEKNUM  = MCHT_CALENDAR | 0x0003
2318 	}
2319 }
2320 
2321 enum {
2322 	RBS_TOOLTIPS    = 256,
2323 	RBS_VARHEIGHT   = 512,
2324 	RBS_BANDBORDERS = 1024,
2325 	RBS_FIXEDORDER  = 2048
2326 }
2327 
2328 enum {
2329 	RBIM_IMAGELIST = 1
2330 }
2331 
2332 enum {
2333 	RB_SETCOLORSCHEME = CCM_SETCOLORSCHEME,
2334 	RB_GETCOLORSCHEME = CCM_GETCOLORSCHEME
2335 }
2336 
2337 enum {
2338 	RBBS_BREAK          = 0x0001,
2339 	RBBS_FIXEDSIZE      = 0x0002,
2340 	RBBS_CHILDEDGE      = 0x0004,
2341 	RBBS_HIDDEN         = 0x0008,
2342 	RBBS_NOVERT         = 0x0010,
2343 	RBBS_FIXEDBMP       = 0x0020,
2344 	RBBS_VARIABLEHEIGHT = 0x0040,
2345 	RBBS_GRIPPERALWAYS  = 0x0080,
2346 	RBBS_NOGRIPPER      = 0x0100
2347 }
2348 
2349 static if (_WIN32_IE >= 0x500) {
2350 	enum {
2351 		RBBS_USECHEVRON = 0x0200
2352 	}
2353 }
2354 
2355 static if (_WIN32_IE >= 0x501) {
2356 	enum {
2357 		RBBS_HIDETITLE = 0x0400,
2358 		RBBS_TOPALIGN  = 0x0800
2359 	}
2360 }
2361 
2362 enum {
2363 	RBBIM_STYLE      = 1,
2364 	RBBIM_COLORS     = 2,
2365 	RBBIM_TEXT       = 4,
2366 	RBBIM_IMAGE      = 8,
2367 	RBBIM_CHILD      = 16,
2368 	RBBIM_CHILDSIZE  = 32,
2369 	RBBIM_SIZE       = 64,
2370 	RBBIM_BACKGROUND = 128,
2371 	RBBIM_ID         = 256
2372 }
2373 
2374 enum {
2375 	RB_INSERTBANDA  = WM_USER + 1,
2376 	RB_DELETEBAND,
2377 	RB_GETBARINFO,
2378 	RB_SETBARINFO, // = WM_USER + 4
2379 	RB_SETBANDINFOA = WM_USER + 6,
2380 	RB_SETPARENT    = WM_USER + 7,
2381 	RB_INSERTBANDW  = WM_USER + 10,
2382 	RB_SETBANDINFOW,
2383 	RB_GETBANDCOUNT,
2384 	RB_GETROWCOUNT,
2385 	RB_GETROWHEIGHT // = WM_USER + 14,
2386 }
2387 
2388 enum {
2389 	RBN_HEIGHTCHANGE = RBN_FIRST
2390 }
2391 
2392 static if (_WIN32_IE >= 0x300) {
2393 	enum {
2394 		LVN_ODCACHEHINT    = LVN_FIRST - 13,
2395 		LVN_ODFINDITEMA    = LVN_FIRST - 52,
2396 		LVN_ODFINDITEMW    = LVN_FIRST - 79,
2397 		LVN_ITEMACTIVATE   = LVN_FIRST - 14,
2398 		LVN_ODSTATECHANGED = LVN_FIRST - 15
2399 	}
2400 
2401 	version (Unicode) {
2402 		enum {
2403 			LVN_ODFINDITEM = LVN_ODFINDITEMW
2404 		}
2405 	} else {
2406 		enum {
2407 			LVN_ODFINDITEM = LVN_ODFINDITEMA
2408 		}
2409 	}
2410 }
2411 
2412 static if (_WIN32_IE >= 0x400) {
2413 	enum {
2414 		SB_SETICON          = 1039,
2415 		SB_SETTIPTEXTA,
2416 		SB_SETTIPTEXTW,
2417 		SB_GETTIPTEXTA,
2418 		SB_GETTIPTEXTW,
2419 		SB_GETICON,      // = 1044
2420 		SB_SETUNICODEFORMAT = 0x2005,
2421 		SB_GETUNICODEFORMAT = 0x2006
2422 	}
2423 
2424 	enum {
2425 		PGF_INVISIBLE = 0,
2426 		PGF_NORMAL    = 1,
2427 		PGF_GRAYED    = 2,
2428 		PGF_DEPRESSED = 4,
2429 		PGF_HOT       = 8
2430 	}
2431 
2432 	enum {
2433 		PGB_TOPORLEFT,
2434 		PGB_BOTTOMORRIGHT
2435 	}
2436 
2437 	enum {
2438 		PGF_SCROLLUP    = 1,
2439 		PGF_SCROLLDOWN  = 2,
2440 		PGF_SCROLLLEFT  = 4,
2441 		PGF_SCROLLRIGHT = 8
2442 	}
2443 
2444 	enum {
2445 		PGK_SHIFT   = 1,
2446 		PGK_CONTROL = 2,
2447 		PGK_MENU    = 4
2448 	}
2449 
2450 	enum {
2451 		PGF_CALCWIDTH  = 1,
2452 		PGF_CALCHEIGHT = 2
2453 	}
2454 
2455 	enum {
2456 		PGM_FIRST    = 0x1400,
2457 		PGM_SETCHILD = PGM_FIRST + 1,
2458 		PGM_RECALCSIZE,
2459 		PGM_FORWARDMOUSE,
2460 		PGM_SETBKCOLOR,
2461 		PGM_GETBKCOLOR,
2462 		PGM_SETBORDER,
2463 		PGM_GETBORDER,
2464 		PGM_SETPOS,
2465 		PGM_GETPOS,
2466 		PGM_SETBUTTONSIZE,
2467 		PGM_GETBUTTONSIZE,
2468 		PGM_GETBUTTONSTATE, // = PGM_FIRST + 12
2469 		PGM_GETDROPTARGET = CCM_GETDROPTARGET
2470 	}
2471 
2472 	enum {
2473 		RBS_REGISTERDROP    = 4096,
2474 		RBS_AUTOSIZE        = 8192,
2475 		RBS_VERTICALGRIPPER = 16384,
2476 		RBS_DBLCLKTOGGLE    = 32768
2477 	}
2478 
2479 	enum {
2480 		RBBIM_IDEALSIZE  = 512,
2481 		RBBIM_LPARAM     = 1024,
2482 		RBBIM_HEADERSIZE = 2048
2483 	}
2484 
2485 	enum {
2486 		RB_HITTEST          = WM_USER + 8,
2487 		RB_GETRECT          = WM_USER + 9,
2488 		RB_IDTOINDEX        = WM_USER + 16,
2489 		RB_GETTOOLTIPS,
2490 		RB_SETTOOLTIPS,
2491 		RB_SETBKCOLOR,
2492 		RB_GETBKCOLOR,
2493 		RB_SETTEXTCOLOR,
2494 		RB_GETTEXTCOLOR,
2495 		RB_SIZETORECT,
2496 		RB_BEGINDRAG,
2497 		RB_ENDDRAG,
2498 		RB_DRAGMOVE,
2499 		RB_GETBARHEIGHT,
2500 		RB_GETBANDINFOW,
2501 		RB_GETBANDINFOA,
2502 		RB_MINIMIZEBAND,
2503 		RB_MAXIMIZEBAND, // = WM_USER + 31
2504 		RB_GETDROPTARGET    = CCM_GETDROPTARGET,
2505 		RB_GETBANDBORDERS   = WM_USER + 34,
2506 		RB_SHOWBAND         = WM_USER + 35,
2507 		RB_SETPALETTE       = WM_USER + 37,
2508 		RB_GETPALETTE       = WM_USER + 38,
2509 		RB_MOVEBAND         = WM_USER + 39,
2510 		RB_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
2511 		RB_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
2512 	}
2513 
2514 	enum {
2515 		RBN_GETOBJECT     = RBN_FIRST - 1,
2516 		RBN_LAYOUTCHANGED = RBN_FIRST - 2,
2517 		RBN_AUTOSIZE      = RBN_FIRST - 3,
2518 		RBN_BEGINDRAG     = RBN_FIRST - 4,
2519 		RBN_ENDDRAG       = RBN_FIRST - 5,
2520 		RBN_DELETINGBAND  = RBN_FIRST - 6,
2521 		RBN_DELETEDBAND   = RBN_FIRST - 7,
2522 		RBN_CHILDSIZE     = RBN_FIRST - 8
2523 	}
2524 
2525 	enum {
2526 		RBNM_ID     = 1,
2527 		RBNM_STYLE  = 2,
2528 		RBNM_LPARAM = 4
2529 	}
2530 
2531 	enum {
2532 		RBHT_NOWHERE = 1,
2533 		RBHT_CAPTION,
2534 		RBHT_CLIENT,
2535 		RBHT_GRABBER
2536 	}
2537 
2538 	version (Unicode) {
2539 		alias SB_SETTIPTEXTW SB_SETTIPTEXT;
2540 		alias SB_GETTIPTEXTW SB_GETTIPTEXT;
2541 		alias RB_GETBANDINFOW RB_GETBANDINFO;
2542 	} else {
2543 		alias SB_SETTIPTEXTA SB_SETTIPTEXT;
2544 		alias SB_GETTIPTEXTA SB_GETTIPTEXT;
2545 		alias RB_GETBANDINFOA RB_GETBANDINFO;
2546 	}
2547 } else {
2548 	enum {
2549 		RB_GETBANDINFO = WM_USER + 5
2550 	}
2551 }
2552 
2553 static if (_WIN32_IE >= 0x500) {
2554 	enum {
2555         RB_PUSHCHEVRON = WM_USER + 43,
2556     }
2557 }
2558 
2559 static if (_WIN32_IE >= 0x600) {
2560 	enum {
2561         RB_SETEXTENDEDSTYLE = WM_USER + 41,
2562         RB_GETEXTENDEDSTYLE = WM_USER + 42,
2563     }
2564 }
2565 
2566 static if (_WIN32_WINNT >= 0x500) {
2567 	enum {
2568         RB_SETBANDWIDTH = WM_USER + 44,
2569     }
2570 }
2571 
2572 static if (_WIN32_WINNT >= 0x501) {
2573 	enum {
2574         ECM_FIRST = 0x1500,
2575         BCM_FIRST = 0x1600,
2576 
2577         BCM_GETIDEALSIZE = BCM_FIRST + 0x0001,
2578         BCM_SETIMAGELIST = BCM_FIRST + 0x0002,
2579         BCM_GETIMAGELIST = BCM_FIRST + 0x0003,
2580         BCM_SETTEXTMARGIN = BCM_FIRST + 0x0004,
2581         BCM_GETTEXTMARGIN = BCM_FIRST + 0x0005,
2582 
2583         BCN_HOTITEMCHANGE = BCN_FIRST + 0x0001,
2584     }
2585 
2586     struct NMBCHOTITEM {
2587         NMHDR hdr;
2588         DWORD dwFlags;
2589     }
2590     alias NMBCHOTITEM* LPNMBCHOTITEM;
2591 }
2592 
2593 static if(_WIN32_WINNT >= 0x600) {
2594     enum {
2595         BST_DROPDOWNPUSHED      = 0x0400,
2596 
2597         BS_SPLITBUTTON          = 0x0000_000C,
2598         BS_DEFSPLITBUTTON       = 0x0000_000D,
2599         BS_COMMANDLINK          = 0x0000_000E,
2600         BS_DEFCOMMANDLINK       = 0x0000_000F,
2601 
2602         BCSIF_GLYPH             = 0x0001,
2603         BCSIF_IMAGE             = 0x0002,
2604         BCSIF_STYLE             = 0x0004,
2605         BCSIF_SIZE              = 0x0008,
2606 
2607         BCSS_NOSPLIT            = 0x0001,
2608         BCSS_STRETCH            = 0x0002,
2609         BCSS_ALIGNLEFT          = 0x0004,
2610         BCSS_IMAGE              = 0x0008,
2611 
2612         BCM_SETDROPDOWNSTATE = BCM_FIRST + 0x0006,
2613         BCM_SETSPLITINFO = BCM_FIRST + 0x0007,
2614         BCM_GETSPLITINFO = BCM_FIRST + 0x0008,
2615         BCM_SETNOTE = BCM_FIRST + 0x0009,
2616         BCM_GETNOTE = BCM_FIRST + 0x000A,
2617         BCM_GETNOTELENGTH = BCM_FIRST + 0x000B,
2618         BCM_SETSHIELD = BCM_FIRST + 0x000C,
2619 
2620         BCN_DROPDOWN = BCN_FIRST + 0x0002,
2621     }
2622 
2623     const HIMAGELIST BCCL_NOGLYPH = cast(HIMAGELIST)-1;
2624 
2625     struct BUTTON_SPLITINFO
2626     {
2627         UINT mask;
2628         HIMAGELIST himlGlyph;
2629         UINT uSplitStyle;
2630         SIZE size;
2631     }
2632     alias BUTTON_SPLITINFO* PBUTTON_SPLITINFO;
2633 }
2634 
2635 enum {
2636 	CBEM_INSERTITEMA = WM_USER + 1,
2637 	CBEM_SETIMAGELIST,
2638 	CBEM_GETIMAGELIST,
2639 	CBEM_GETITEMA,
2640 	CBEM_SETITEMA,
2641 	CBEM_GETCOMBOCONTROL,
2642 	CBEM_GETEDITCONTROL,
2643 	CBEM_SETEXSTYLE,
2644 	CBEM_GETEXSTYLE, // = WM_USER + 9)
2645 	CBEM_DELETEITEM  = CB_DELETESTRING
2646 }
2647 
2648 static if (_WIN32_IE >= 0x400) {
2649 	enum {
2650 		CBEM_SETEXTENDEDSTYLE = WM_USER + 14,
2651 		CBEM_GETEXTENDEDSTYLE = WM_USER + 9,
2652 		CBEM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT,
2653 		CBEM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
2654 	}
2655 }
2656 
2657 enum {
2658 	CBEM_HASEDITCHANGED = WM_USER + 10,
2659 	CBEM_INSERTITEMW    = WM_USER + 11,
2660 	CBEM_SETITEMW       = WM_USER + 12,
2661 	CBEM_GETITEMW       = WM_USER + 13
2662 }
2663 
2664 static if (_WIN32_WINNT >= 0x501)
2665 {
2666     enum {
2667         CBEM_SETWINDOWTHEME = CCM_SETWINDOWTHEME
2668     }
2669 }
2670 
2671 enum {
2672 	DA_LAST = 0x7fffffff
2673 }
2674 
2675 enum {
2676 	DPA_APPEND = 0x7fffffff,
2677 	DPA_ERR    = -1
2678 }
2679 
2680 enum {
2681 	DSA_APPEND = 0x7fffffff,
2682 	DSA_ERR    = -1
2683 }
2684 
2685 enum {
2686 	DPAS_SORTED       = 1,
2687 	DPAS_INSERTBEFORE = 2,
2688 	DPAS_INSERTAFTER  = 4
2689 }
2690 
2691 static if (_WIN32_IE >= 0x400) {
2692 	enum {
2693 		WSB_PROP_CYVSCROLL = 1,
2694 		WSB_PROP_CXHSCROLL = 2,
2695 		WSB_PROP_CYHSCROLL = 4,
2696 		WSB_PROP_CXVSCROLL = 8,
2697 		WSB_PROP_CXHTHUMB  = 16,
2698 		WSB_PROP_CYVTHUMB  = 32,
2699 		WSB_PROP_VBKGCOLOR = 64,
2700 		WSB_PROP_HBKGCOLOR = 128,
2701 		WSB_PROP_VSTYLE    = 256,
2702 		WSB_PROP_HSTYLE    = 512,
2703 		WSB_PROP_WINSTYLE  = 1024,
2704 		WSB_PROP_PALETTE   = 2048,
2705 		WSB_PROP_MASK      = 0xfff,
2706 		FSB_FLAT_MODE      = 2,
2707 		FSB_ENCARTA_MODE   = 1,
2708 		FSB_REGULAR_MODE   = 0
2709 	}
2710 }
2711 
2712 static if (_WIN32_WINNT >= 0x501) {
2713 	enum {
2714 		LIF_ITEMINDEX = 1,
2715 		LIF_STATE     = 2,
2716 		LIF_ITEMID    = 4,
2717 		LIF_URL	      = 8
2718 	}
2719 
2720 	enum {
2721 		LIS_FOCUSED = 1,
2722 		LIS_ENABLED = 2,
2723 		LIS_VISITED = 4
2724 	}
2725 
2726 	enum {
2727 		LM_HITTEST        = WM_USER + 768,
2728 		LM_GETIDEALHEIGHT,
2729 		LM_SETITEM,
2730 		LM_GETITEM,     // = WM_USER + 771
2731         LM_GETIDEALSIZE = LM_GETIDEALHEIGHT,
2732 	}
2733 
2734 	const size_t MAX_LINKID_TEXT  =   48;
2735 	const size_t L_MAX_URL_LENGTH = 2084;
2736 }
2737 
2738 
2739 struct TBMETRICS {
2740     UINT  cbSize = TBMETRICS.sizeof;
2741     DWORD dwMask;
2742     int   cxPad;
2743     int   cyPad;
2744     int   cxBarPad;
2745     int   cyBarPad;
2746     int   cxButtonSpacing;
2747     int   cyButtonSpacing;
2748 }
2749 alias TBMETRICS* LPTBMETRICS;
2750 
2751 static if (_WIN32_WINNT >= 0x501) {
2752     struct TTGETTITLE {
2753         DWORD dwSize = TTGETTITLE.sizeof;
2754         UINT  uTitleBitmap;
2755         UINT  cch;
2756         WCHAR* pszTitle;
2757     }
2758     alias TTGETTITLE* PTTGETTITLE;
2759 }
2760 
2761 static if (_WIN32_WINNT >= 0x600) {
2762     struct MCGRIDINFO {
2763         UINT cbSize;
2764         DWORD dwPart;
2765         DWORD dwFlags;
2766         int iCalendar;
2767         int iRow;
2768         int iCol;
2769         BOOL bSelected;
2770         SYSTEMTIME stStart;
2771         SYSTEMTIME stEnd;
2772         RECT rc;
2773         PWSTR pszName;
2774         size_t cchName;
2775     }
2776     alias MCGRIDINFO* PMCGRIDINFO;
2777 
2778     struct DATETIMEPICKERINFO
2779     {
2780         DWORD cbSize;
2781         RECT rcCheck;
2782         DWORD stateCheck;
2783         RECT rcButton;
2784         DWORD stateButton;
2785         HWND hwndEdit;
2786         HWND hwndUD;
2787         HWND hwndDropDown;
2788     }
2789     alias DATETIMEPICKERINFO* LPDATETIMEPICKERINFO;
2790 }
2791 
2792 struct COMBOBOXEXITEMA {
2793 	UINT   mask;
2794 	INT_PTR iItem;
2795 	LPSTR  pszText;
2796 	int    cchTextMax;
2797 	int    iImage;
2798 	int    iSelectedImage;
2799 	int    iOverlay;
2800 	int    iIndent;
2801 	LPARAM lParam;
2802 }
2803 alias COMBOBOXEXITEMA*        PCOMBOBOXEXITEMA;
2804 alias const(COMBOBOXEXITEMA)* PCCOMBOEXITEMA;
2805 
2806 struct COMBOBOXEXITEMW {
2807 	UINT   mask;
2808 	INT_PTR iItem;
2809 	LPWSTR pszText;
2810 	int    cchTextMax;
2811 	int    iImage;
2812 	int    iSelectedImage;
2813 	int    iOverlay;
2814 	int    iIndent;
2815 	LPARAM lParam;
2816 }
2817 alias COMBOBOXEXITEMW*        PCOMBOBOXEXITEMW;
2818 alias const(COMBOBOXEXITEMW)* PCCOMBOEXITEMW;
2819 
2820 static if (_WIN32_IE >= 0x400) {
2821 	struct NMCOMBOBOXEXA {
2822 		NMHDR           hdr;
2823 		COMBOBOXEXITEMA ceItem;
2824 	}
2825 	alias NMCOMBOBOXEXA* PNMCOMBOBOXEXA;
2826 
2827 	struct NMCOMBOBOXEXW {
2828 		NMHDR           hdr;
2829 		COMBOBOXEXITEMW ceItem;
2830 	}
2831 	alias NMCOMBOBOXEXW* PNMCOMBOBOXEXW;
2832 
2833 	struct NMCBEDRAGBEGINW {
2834 		NMHDR hdr;
2835 		int   iItemid;
2836 		WCHAR[CBEMAXSTRLEN] szText;
2837 	}
2838 	alias NMCBEDRAGBEGINW* LPNMCBEDRAGBEGINW, PNMCBEDRAGBEGINW;
2839 
2840 	struct NMCBEDRAGBEGINA {
2841 		NMHDR hdr;
2842 		int   iItemid;
2843 		char[CBEMAXSTRLEN] szText;
2844 	}
2845 	alias NMCBEDRAGBEGINA* LPNMCBEDRAGBEGINA, PNMCBEDRAGBEGINA;
2846 
2847 	struct NMIPADDRESS {
2848 		NMHDR hdr;
2849 		int   iField;
2850 		int   iValue;
2851 	}
2852 	alias NMIPADDRESS* LPNMIPADDRESS;
2853 
2854 	struct NMLVKEYDOWN {
2855 		NMHDR hdr;
2856 		WORD  wVKey;
2857 		UINT  flags;
2858 	}
2859 	alias NMLVKEYDOWN* LPNMLVKEYDOWN;
2860 
2861 	struct NMPGCALCSIZE {
2862 		NMHDR hdr;
2863 		DWORD dwFlag;
2864 		int   iWidth;
2865 		int   iHeight;
2866 	}
2867 	alias NMPGCALCSIZE* LPNMPGCALCSIZE;
2868 
2869 	struct NMPGSCROLL {
2870 		NMHDR hdr;
2871 		BOOL  fwKeys;
2872 		RECT  rcParent;
2873 		int   iDir;
2874 		int   iXpos;
2875 		int   iYpos;
2876 		int   iScroll;
2877 	}
2878 	alias NMPGSCROLL* LPNMPGSCROLL;
2879 
2880 	struct NMSELCHANGE {
2881 		NMHDR      nmhdr;
2882 		SYSTEMTIME stSelStart;
2883 		SYSTEMTIME stSelEnd;
2884 	}
2885 	alias NMSELCHANGE* LPNMSELCHANGE;
2886 
2887 	struct NMTBHOTITEM {
2888 		NMHDR hdr;
2889 		int   idOld;
2890 		int   idNew;
2891 		DWORD dwFlags;
2892 	}
2893 	alias NMTBHOTITEM* LPNMTBHOTITEM;
2894 
2895 	struct NMTBDISPINFOA {
2896 		NMHDR     hdr;
2897 		DWORD     dwMask;
2898 		int       idCommand;
2899 		DWORD_PTR lParam;
2900 		int       iImage;
2901 		LPSTR     pszText;
2902 		int       cchText;
2903 	}
2904 	alias NMTBDISPINFOA* LPNMTBDISPINFOA;
2905 
2906 	struct NMTBDISPINFOW {
2907 		NMHDR     hdr;
2908 		DWORD     dwMask;
2909 		int       idCommand;
2910 		DWORD_PTR lParam;
2911 		int       iImage;
2912 		LPWSTR    pszText;
2913 		int       cchText;
2914 	}
2915 	alias NMTBDISPINFOW* LPNMTBDISPINFOW;
2916 
2917 	struct NMTBGETINFOTIPA {
2918 		NMHDR  hdr;
2919 		LPSTR  pszText;
2920 		int    cchTextMax;
2921 		int    iItem;
2922 		LPARAM lParam;
2923 	}
2924 	alias NMTBGETINFOTIPA* LPNMTBGETINFOTIPA;
2925 
2926 	struct NMTBGETINFOTIPW {
2927 		NMHDR  hdr;
2928 		LPWSTR pszText;
2929 		int    cchTextMax;
2930 		int    iItem;
2931 		LPARAM lParam;
2932 	}
2933 	alias NMTBGETINFOTIPW* LPNMTBGETINFOTIPW;
2934 
2935 	struct NMMOUSE {
2936 		NMHDR     hdr;
2937 		DWORD_PTR dwItemSpec;
2938 		DWORD_PTR dwItemData;
2939 		POINT     pt;
2940 		LPARAM    dwHitInfo;
2941 	}
2942 	alias NMMOUSE* LPNMMOUSE;
2943 }
2944 
2945 static if (_WIN32_IE >= 0x401) {
2946 	struct NMTOOLTIPSCREATED {
2947 		NMHDR hdr;
2948 		HWND  hwndToolTips;
2949 	}
2950 	alias NMTOOLTIPSCREATED* LPNMTOOLTIPSCREATED;
2951 }
2952 
2953 struct NMDATETIMECHANGE {
2954 	NMHDR      nmhdr;
2955 	DWORD      dwFlags;
2956 	SYSTEMTIME st;
2957 }
2958 alias NMDATETIMECHANGE* LPNMDATETIMECHANGE;
2959 
2960 struct NMCBEENDEDITW {
2961 	NMHDR hdr;
2962 	BOOL  fChanged;
2963 	int   iNewSelection;
2964 	WCHAR[CBEMAXSTRLEN] szText;
2965 	int   iWhy;
2966 }
2967 alias NMCBEENDEDITW* LPNMCBEENDEDITW, PNMCBEENDEDITW;
2968 
2969 struct NMCBEENDEDITA {
2970 	NMHDR hdr;
2971 	BOOL  fChanged;
2972 	int   iNewSelection;
2973 	char[CBEMAXSTRLEN] szText;
2974 	int   iWhy;
2975 }
2976 alias NMCBEENDEDITA* LPNMCBEENDEDITA, PNMCBEENDEDITA;
2977 
2978 struct COLORMAP {
2979 	COLORREF from;
2980 	COLORREF to;
2981 }
2982 alias COLORMAP* LPCOLORMAP;
2983 
2984 struct DRAGLISTINFO {
2985 	UINT  uNotification;
2986 	HWND  hWnd;
2987 	POINT ptCursor;
2988 }
2989 alias DRAGLISTINFO* LPDRAGLISTINFO;
2990 
2991 struct TBBUTTON {
2992 	int   iBitmap;
2993 	int   idCommand;
2994 	BYTE  fsState;
2995 	BYTE  fsStyle;
2996 	version(Win64){
2997 		BYTE[6] bReserved;
2998 	} else {
2999 		BYTE[2] bReserved;
3000 	}
3001 	DWORD_PTR dwData;
3002 	INT_PTR iString;
3003 }
3004 alias TBBUTTON*        PTBBUTTON, LPTBBUTTON;
3005 alias const(TBBUTTON)* LPCTBBUTTON;
3006 
3007 static if (_WIN32_IE >= 0x400) {
3008 	struct TBBUTTONINFOA {
3009 		UINT  cbSize = TBBUTTONINFOA.sizeof;
3010 		DWORD dwMask;
3011 		int   idCommand;
3012 		int   iImage;
3013 		BYTE  fsState;
3014 		BYTE  fsStyle;
3015 		WORD  cx;
3016 		DWORD_PTR lParam;
3017 		LPSTR pszText;
3018 		int   cchText;
3019 	}
3020 	alias TBBUTTONINFOA* LPTBBUTTONINFOA;
3021 
3022 	struct TBBUTTONINFOW {
3023 		UINT   cbSize = TBBUTTONINFOW.sizeof;
3024 		DWORD  dwMask;
3025 		int    idCommand;
3026 		int    iImage;
3027 		BYTE   fsState;
3028 		BYTE   fsStyle;
3029 		WORD   cx;
3030 		DWORD_PTR lParam;
3031 		LPWSTR pszText;
3032 		int    cchText;
3033 	}
3034 	alias TBBUTTONINFOW* LPTBBUTTONINFOW;
3035 
3036 	struct TBINSERTMARK {
3037 		int   iButton;
3038 		DWORD dwFlags;
3039 	}
3040 	alias TBINSERTMARK* LPTBINSERTMARK;
3041 
3042 	struct LVBKIMAGEA {
3043 		ULONG   ulFlags;
3044 		HBITMAP hbm;
3045 		LPSTR   pszImage;
3046 		UINT    cchImageMax;
3047 		int     xOffsetPercent;
3048 		int     yOffsetPercent;
3049 	}
3050 	alias LVBKIMAGEA* LPLVBKIMAGEA;
3051 
3052 	struct LVBKIMAGEW {
3053 		ULONG   ulFlags;
3054 		HBITMAP hbm;
3055 		LPWSTR  pszImage;
3056 		UINT    cchImageMax;
3057 		int     xOffsetPercent;
3058 		int     yOffsetPercent;
3059 	}
3060 	alias LVBKIMAGEW* LPLVBKIMAGEW;
3061 }
3062 
3063 /*struct TBNOTIFY {
3064 	NMHDR    hdr;
3065 	int      iItem;
3066 	TBBUTTON tbButton;
3067 	int      cchText;
3068 	LPTSTR   pszText;
3069 }
3070 alias TBNOTIFY* LPTBNOTIFY;
3071 */
3072 
3073 /*struct TBSAVEPARAMS {
3074 	HKEY    hkr;
3075 	LPCTSTR pszSubKey;
3076 	LPCTSTR pszValueName;
3077 }*/
3078 
3079 struct IMAGEINFO {
3080 	HBITMAP hbmImage;
3081 	HBITMAP hbmMask;
3082 	int     Unused1;
3083 	int     Unused2;
3084 	RECT    rcImage;
3085 }
3086 alias IMAGEINFO* LPIMAGEINFO;
3087 
3088 static if (_WIN32_IE >= 0x500) {
3089 	struct HDITEMA {
3090 		UINT    mask;
3091 		int     cxy;
3092 		LPSTR   pszText;
3093 		HBITMAP hbm;
3094 		int     cchTextMax;
3095 		int     fmt;
3096 		LPARAM  lParam;
3097 		int     iImage;
3098 		int     iOrder;
3099 		UINT    type;
3100 		LPVOID  pvFilter;
3101 	}
3102 
3103 	struct HDITEMW {
3104 		UINT    mask;
3105 		int     cxy;
3106 		LPWSTR  pszText;
3107 		HBITMAP hbm;
3108 		int     cchTextMax;
3109 		int     fmt;
3110 		LPARAM  lParam;
3111 		int     iImage;
3112 		int     iOrder;
3113 		UINT    type;
3114 		LPVOID  pvFilter;
3115 	}
3116 } else static if (_WIN32_IE >= 0x300) {
3117 	struct HDITEMA {
3118 		UINT    mask;
3119 		int     cxy;
3120 		LPSTR   pszText;
3121 		HBITMAP hbm;
3122 		int     cchTextMax;
3123 		int     fmt;
3124 		LPARAM  lParam;
3125 		int     iImage;
3126 		int     iOrder;
3127 	}
3128 
3129 	struct HDITEMW {
3130 		UINT    mask;
3131 		int     cxy;
3132 		LPWSTR  pszText;
3133 		HBITMAP hbm;
3134 		int     cchTextMax;
3135 		int     fmt;
3136 		LPARAM  lParam;
3137 		int     iImage;
3138 		int     iOrder;
3139 	}
3140 } else {
3141 	struct HDITEMA {
3142 		UINT    mask;
3143 		int     cxy;
3144 		LPSTR   pszText;
3145 		HBITMAP hbm;
3146 		int     cchTextMax;
3147 		int     fmt;
3148 		LPARAM  lParam;
3149 	}
3150 
3151 	struct HDITEMW {
3152 		UINT    mask;
3153 		int     cxy;
3154 		LPWSTR  pszText;
3155 		HBITMAP hbm;
3156 		int     cchTextMax;
3157 		int     fmt;
3158 		LPARAM  lParam;
3159 	}
3160 }
3161 alias HDITEMA* LPHDITEMA;
3162 alias HDITEMW* LPHDITEMW;
3163 
3164 deprecated {
3165 	alias HDITEMA HD_ITEMA;
3166 	alias HDITEMW HD_ITEMW;
3167 	//alias HDITEM HD_ITEM; fixme
3168 }
3169 
3170 struct HD_LAYOUT {
3171 	RECT*      prc;
3172 	WINDOWPOS* pwpos;
3173 }
3174 alias HD_LAYOUT* LPHDLAYOUT;
3175 deprecated alias HD_LAYOUT HDLAYOUT;
3176 
3177 struct HD_HITTESTINFO {
3178 	POINT pt;
3179 	UINT  flags;
3180 	int   iItem;
3181 }
3182 alias HD_HITTESTINFO* LPHDHITTESTINFO;
3183 
3184 struct HD_NOTIFYA {
3185 	NMHDR    hdr;
3186 	int      iItem;
3187 	int      iButton;
3188 	HDITEMA* pitem;
3189 }
3190 
3191 struct HD_NOTIFYW {
3192 	NMHDR    hdr;
3193 	int      iItem;
3194 	int      iButton;
3195 	HDITEMW* pitem;
3196 }
3197 
3198 /* FIXME: NMHEADER structure (base for all events of the comctl controls)
3199    is the same as HD_NOTIFY depending on the value of _WIN32_IE macro.
3200    I'm defining both for now. */
3201 struct NMHEADERA {
3202 	NMHDR    hdr;
3203 	int      iItem;
3204 	int      iButton;
3205 	HDITEMA* pitem;
3206 }
3207 alias NMHEADERA* LPNMHEADERA;
3208 
3209 struct NMHEADERW {
3210 	NMHDR    hdr;
3211 	int      iItem;
3212 	int      iButton;
3213 	HDITEMW* pitem;
3214 }
3215 alias NMHEADERW* LPNMHEADERW;
3216 
3217 version (Unicode) {
3218 	alias NMHEADERW NMHEADER;
3219 	alias LPNMHEADERW LPNMHEADER;
3220 } else {
3221 	alias NMHEADERA NMHEADER;
3222 	alias LPNMHEADERA LPNMHEADER;
3223 }
3224 // End FIXME
3225 
3226 struct NMHDDISPINFOA {
3227 	NMHDR  hdr;
3228 	int    iItem;
3229 	UINT   mask;
3230 	LPSTR  pszText;
3231 	int    cchTextMax;
3232 	int    iImage;
3233 	LPARAM lParam;
3234 }
3235 alias NMHDDISPINFOA* LPNMHDDISPINFOA;
3236 
3237 struct NMHDDISPINFOW {
3238 	NMHDR  hdr;
3239 	int    iItem;
3240 	UINT   mask;
3241 	LPWSTR pszText;
3242 	int    cchTextMax;
3243 	int    iImage;
3244 	LPARAM lParam;
3245 }
3246 alias NMHDDISPINFOW* LPNMHDDISPINFOW;
3247 
3248 struct NMCUSTOMDRAW {
3249 	NMHDR  hdr;
3250 	DWORD  dwDrawStage;
3251 	HDC    hdc;
3252 	RECT   rc;
3253 	DWORD  dwItemSpec;
3254 	UINT   uItemState;
3255 	LPARAM lItemlParam;
3256 }
3257 alias NMCUSTOMDRAW* LPNMCUSTOMDRAW;
3258 
3259 static if (_WIN32_IE >= 0x400) {
3260 	struct NMLVCUSTOMDRAW {
3261 		NMCUSTOMDRAW nmcd;
3262 		COLORREF     clrText;
3263 		COLORREF     clrTextBk;
3264 		int          iSubItem;
3265 	}
3266 } else {
3267 	struct NMLVCUSTOMDRAW {
3268 		NMCUSTOMDRAW nmcd;
3269 		COLORREF     clrText;
3270 		COLORREF     clrTextBk;
3271 	}
3272 }
3273 alias NMLVCUSTOMDRAW* LPNMLVCUSTOMDRAW;
3274 
3275 static if (_WIN32_IE >= 0x400) {
3276 	struct NMLVGETINFOTIPA {
3277 		NMHDR  hdr;
3278 		DWORD  dwFlags;
3279 		LPSTR  pszText;
3280 		int    cchTextMax;
3281 		int    iItem;
3282 		int    iSubItem;
3283 		LPARAM lParam;
3284 	}
3285 	alias NMLVGETINFOTIPA* LPNMLVGETINFOTIPA;
3286 
3287 	struct NMLVGETINFOTIPW {
3288 		NMHDR  hdr;
3289 		DWORD  dwFlags;
3290 		LPWSTR pszText;
3291 		int    cchTextMax;
3292 		int    iItem;
3293 		int    iSubItem;
3294 		LPARAM lParam;
3295 	}
3296 	alias NMLVGETINFOTIPW* LPNMLVGETINFOTIPW;
3297 }
3298 
3299 static if (_WIN32_IE >= 0x400) {
3300 	struct NMTVCUSTOMDRAW {
3301 		NMCUSTOMDRAW nmcd;
3302 		COLORREF     clrText;
3303 		COLORREF     clrTextBk;
3304 		int          iLevel;
3305 	}
3306 } else {
3307 	struct NMTVCUSTOMDRAW {
3308 		NMCUSTOMDRAW nmcd;
3309 		COLORREF     clrText;
3310 		COLORREF     clrTextBk;
3311 	}
3312 }
3313 alias NMTVCUSTOMDRAW* LPNMTVCUSTOMDRAW;
3314 
3315 static if (_WIN32_IE >= 0x400) {
3316 	static if (_WIN32_WINNT >= 0x501) {
3317 		struct NMTBCUSTOMDRAW {
3318 			NMCUSTOMDRAW nmcd;
3319 			HBRUSH       hbrMonoDither;
3320 			HBRUSH       hbrLines;
3321 			HPEN         hpenLines;
3322 			COLORREF     clrText;
3323 			COLORREF     clrMark;
3324 			COLORREF     clrTextHighlight;
3325 			COLORREF     clrBtnFace;
3326 			COLORREF     clrBtnHighlight;
3327 			COLORREF     clrHighlightHotTrack;
3328 			RECT         rcText;
3329 			int          nStringBkMode;
3330 			int          nHLStringBkMode;
3331 			int          iListGap;
3332 		}
3333 	} else {
3334 		struct NMTBCUSTOMDRAW {
3335 			NMCUSTOMDRAW nmcd;
3336 			HBRUSH       hbrMonoDither;
3337 			HBRUSH       hbrLines;
3338 			HPEN         hpenLines;
3339 			COLORREF     clrText;
3340 			COLORREF     clrMark;
3341 			COLORREF     clrTextHighlight;
3342 			COLORREF     clrBtnFace;
3343 			COLORREF     clrBtnHighlight;
3344 			COLORREF     clrHighlightHotTrack;
3345 			RECT         rcText;
3346 			int          nStringBkMode;
3347 			int          nHLStringBkMode;
3348 		}
3349 	}
3350 	alias NMTBCUSTOMDRAW* LPNMTBCUSTOMDRAW;
3351 
3352 	struct NMITEMACTIVATE {
3353 		NMHDR  hdr;
3354 		int    iItem;
3355 		int    iSubItem;
3356 		UINT   uNewState;
3357 		UINT   uOldState;
3358 		UINT   uChanged;
3359 		POINT  ptAction;
3360 		LPARAM lParam;
3361 		UINT   uKeyFlags;
3362 	}
3363 	alias NMITEMACTIVATE* LPNMITEMACTIVATE;
3364 }
3365 
3366 struct TBADDBITMAP {
3367 	HINSTANCE hInst;
3368 	UINT_PTR  nID;
3369 }
3370 alias TBADDBITMAP* LPTBADDBITMAP;
3371 
3372 struct TBSAVEPARAMSA {
3373 	HKEY   hkr;
3374 	LPCSTR pszSubKey;
3375 	LPCSTR pszValueName;
3376 }
3377 
3378 struct TBSAVEPARAMSW {
3379 	HKEY    hkr;
3380 	LPCWSTR pszSubKey;
3381 	LPCWSTR pszValueName;
3382 }
3383 
3384 struct TBREPLACEBITMAP {
3385 	HINSTANCE hInstOld;
3386 	UINT_PTR  nIDOld;
3387 	HINSTANCE hInstNew;
3388 	UINT_PTR  nIDNew;
3389 	int       nButtons;
3390 }
3391 alias TBREPLACEBITMAP* LPTBREPLACEBITMAP;
3392 
3393 static if (_WIN32_IE >= 0x500) {
3394 	struct NMTOOLBARA {
3395 		NMHDR    hdr;
3396 		int      iItem;
3397 		TBBUTTON tbButton;
3398 		int      cchText;
3399 		LPSTR    pszText;
3400 		RECT     rcButton;
3401 	}
3402 
3403 	struct NMTOOLBARW {
3404 		NMHDR    hdr;
3405 		int      iItem;
3406 		TBBUTTON tbButton;
3407 		int      cchText;
3408 		LPWSTR   pszText;
3409 		RECT     rcButton;
3410 	}
3411 } else {
3412 	struct NMTOOLBARA {
3413 		NMHDR    hdr;
3414 		int      iItem;
3415 		TBBUTTON tbButton;
3416 		int      cchText;
3417 		LPSTR    pszText;
3418 	}
3419 
3420 	struct NMTOOLBARW {
3421 		NMHDR    hdr;
3422 		int      iItem;
3423 		TBBUTTON tbButton;
3424 		int      cchText;
3425 		LPWSTR   pszText;
3426 	}
3427 }
3428 alias NMTOOLBARA* LPNMTOOLBARA;
3429 alias NMTOOLBARW* LPNMTOOLBARW;
3430 
3431 alias NMTOOLBARA TBNOTIFYA;
3432 alias LPNMTOOLBARA LPTBNOTIFYA;
3433 
3434 alias NMTOOLBARW TBNOTIFYW;
3435 alias LPNMTOOLBARW LPTBNOTIFYW;
3436 
3437 static if (_WIN32_WINNT >= 0x501) {
3438 	struct TOOLINFOA {
3439 		UINT      cbSize = TOOLINFOA.sizeof;
3440 		UINT      uFlags;
3441 		HWND      hwnd;
3442 		UINT_PTR  uId;
3443 		RECT      rect;
3444 		HINSTANCE hinst;
3445 		LPSTR     lpszText;
3446 		LPARAM    lParam;
3447 		void*     lpReserved;
3448 	}
3449 
3450 	struct TOOLINFOW {
3451 		UINT      cbSize = TOOLINFOW.sizeof;
3452 		UINT      uFlags;
3453 		HWND      hwnd;
3454 		UINT_PTR  uId;
3455 		RECT      rect;
3456 		HINSTANCE hinst;
3457 		LPWSTR    lpszText;
3458 		LPARAM    lParam;
3459 		void*     lpReserved;
3460 	}
3461 
3462 	const size_t
3463 		TTTOOLINFOA_V1_SIZE = TOOLINFOA.lParam.offsetof,
3464 		TTTOOLINFOW_V1_SIZE = TOOLINFOW.lParam.offsetof,
3465 		TTTOOLINFOA_V2_SIZE = TOOLINFOA.lpReserved.offsetof,
3466 		TTTOOLINFOW_V2_SIZE = TOOLINFOW.lpReserved.offsetof,
3467 		TTTOOLINFOA_V3_SIZE = TOOLINFOA.sizeof,
3468 		TTTOOLINFOW_V3_SIZE = TOOLINFOW.sizeof;
3469 } else static if (_WIN32_IE >= 0x300) {
3470 	struct TOOLINFOA {
3471 		UINT      cbSize = TOOLINFOA.sizeof;
3472 		UINT      uFlags;
3473 		HWND      hwnd;
3474 		UINT      uId;
3475 		RECT      rect;
3476 		HINSTANCE hinst;
3477 		LPSTR     lpszText;
3478 		LPARAM    lParam;
3479 	}
3480 
3481 	struct TOOLINFOW {
3482 		UINT      cbSize = TOOLINFOW.sizeof;
3483 		UINT      uFlags;
3484 		HWND      hwnd;
3485 		UINT      uId;
3486 		RECT      rect;
3487 		HINSTANCE hinst;
3488 		LPWSTR    lpszText;
3489 		LPARAM    lParam;
3490 	}
3491 
3492 	const size_t
3493 		TTTOOLINFOA_V1_SIZE = TOOLINFOA.lParam.offsetof,
3494 		TTTOOLINFOW_V1_SIZE = TOOLINFOW.lParam.offsetof,
3495 		TTTOOLINFOA_V2_SIZE = TOOLINFOA.sizeof,
3496 		TTTOOLINFOW_V2_SIZE = TOOLINFOW.sizeof;
3497 } else {
3498 	struct TOOLINFOA {
3499 		UINT      cbSize = TOOLINFOA.sizeof;
3500 		UINT      uFlags;
3501 		HWND      hwnd;
3502 		UINT      uId;
3503 		RECT      rect;
3504 		HINSTANCE hinst;
3505 		LPSTR     lpszText;
3506 	}
3507 
3508 	struct TOOLINFOW {
3509 		UINT      cbSize = TOOLINFOW.sizeof;
3510 		UINT      uFlags;
3511 		HWND      hwnd;
3512 		UINT      uId;
3513 		RECT      rect;
3514 		HINSTANCE hinst;
3515 		LPWSTR    lpszText;
3516 	}
3517 
3518 	const size_t
3519 		TTTOOLINFOA_V1_SIZE = TOOLINFOA.sizeof,
3520 		TTTOOLINFOW_V1_SIZE = TOOLINFOW.sizeof;
3521 }
3522 alias TOOLINFOA TTTOOLINFOA;
3523 alias TOOLINFOW TTTOOLINFOW;
3524 alias TTTOOLINFOA* LPTTTOOLINFOA, PTOOLINFOA, LPTOOLINFOA;
3525 alias TTTOOLINFOW* LPTTTOOLINFOW, PTOOLINFOW, LPTOOLINFOW;
3526 
3527 struct TTHITTESTINFOA {
3528 	HWND      hwnd;
3529 	POINT     pt;
3530 	TOOLINFOA ti;
3531 }
3532 alias TTHITTESTINFOA* LPTTHITTESTINFOA, LPHITTESTINFOA;
3533 
3534 struct TTHITTESTINFOW {
3535 	HWND      hwnd;
3536 	POINT     pt;
3537 	TOOLINFOW ti;
3538 }
3539 alias TTHITTESTINFOW* LPTTHITTESTINFOW, LPHITTESTINFOW;
3540 
3541 static if (_WIN32_IE >= 0x300) {
3542 	struct NMTTDISPINFOA {
3543 		NMHDR     hdr;
3544 		LPSTR     lpszText;
3545 		char[80]  szText;
3546 		HINSTANCE hinst;
3547 		UINT      uFlags;
3548 		LPARAM    lParam;
3549 	}
3550 
3551 	struct NMTTDISPINFOW {
3552 		NMHDR     hdr;
3553 		LPWSTR    lpszText;
3554 		WCHAR[80] szText;
3555 		HINSTANCE hinst;
3556 		UINT      uFlags;
3557 		LPARAM    lParam;
3558 	}
3559 } else {
3560 	struct NMTTDISPINFOA {
3561 		NMHDR     hdr;
3562 		LPSTR     lpszText;
3563 		char[80]  szText;
3564 		HINSTANCE hinst;
3565 		UINT      uFlags;
3566 	}
3567 
3568 	struct NMTTDISPINFOW {
3569 		NMHDR     hdr;
3570 		LPWSTR    lpszText;
3571 		WCHAR[80] szText;
3572 		HINSTANCE hinst;
3573 		UINT      uFlags;
3574 	}
3575 }
3576 alias NMTTDISPINFOA* LPNMTTDISPINFOA;
3577 alias NMTTDISPINFOW* LPNMTTDISPINFOW;
3578 alias NMTTDISPINFOA TOOLTIPTEXTA;
3579 alias LPNMTTDISPINFOA LPTOOLTIPTEXTA;
3580 alias NMTTDISPINFOW TOOLTIPTEXTW;
3581 alias LPNMTTDISPINFOW LPTOOLTIPTEXTW;
3582 
3583 struct UDACCEL {
3584 	UINT nSec;
3585 	UINT nInc;
3586 }
3587 alias UDACCEL* LPUDACCEL;
3588 
3589 struct NMUPDOWN {
3590 	NMHDR hdr;
3591 	int   iPos;
3592 	int   iDelta;
3593 }
3594 alias NMUPDOWN* LPNMUPDOWN;
3595 
3596 deprecated {
3597 	alias NMUPDOWN NM_UPDOWN;
3598 	alias LPNMUPDOWN LPNM_UPDOWN;
3599 }
3600 
3601 static if (_WIN32_WINNT >= 0x501) {
3602 	struct LVITEMA {
3603 		UINT   mask;
3604 		int    iItem;
3605 		int    iSubItem;
3606 		UINT   state;
3607 		UINT   stateMask;
3608 		LPSTR  pszText;
3609 		int    cchTextMax;
3610 		int    iImage;
3611 		LPARAM lParam;
3612 		int    iIndent;
3613 		int    iGroupId;
3614 		UINT   cColumns;
3615 		PUINT  puColumns;
3616 	}
3617 
3618 	struct LVITEMW {
3619 		UINT   mask;
3620 		int    iItem;
3621 		int    iSubItem;
3622 		UINT   state;
3623 		UINT   stateMask;
3624 		LPWSTR pszText;
3625 		int    cchTextMax;
3626 		int    iImage;
3627 		LPARAM lParam;
3628 		int    iIndent;
3629 		int    iGroupId;
3630 		UINT   cColumns;
3631 		PUINT  puColumns;
3632 	}
3633 } else static if (_WIN32_IE >= 0x300) {
3634 	struct LVITEMA {
3635 		UINT   mask;
3636 		int    iItem;
3637 		int    iSubItem;
3638 		UINT   state;
3639 		UINT   stateMask;
3640 		LPSTR  pszText;
3641 		int    cchTextMax;
3642 		int    iImage;
3643 		LPARAM lParam;
3644 		int    iIndent;
3645 	}
3646 
3647 	struct LVITEMW {
3648 		UINT   mask;
3649 		int    iItem;
3650 		int    iSubItem;
3651 		UINT   state;
3652 		UINT   stateMask;
3653 		LPWSTR pszText;
3654 		int    cchTextMax;
3655 		int    iImage;
3656 		LPARAM lParam;
3657 		int    iIndent;
3658 	}
3659 } else {
3660 	struct LVITEMA {
3661 		UINT   mask;
3662 		int    iItem;
3663 		int    iSubItem;
3664 		UINT   state;
3665 		UINT   stateMask;
3666 		LPSTR  pszText;
3667 		int    cchTextMax;
3668 		int    iImage;
3669 		LPARAM lParam;
3670 	}
3671 
3672 	struct LVITEMW {
3673 		UINT   mask;
3674 		int    iItem;
3675 		int    iSubItem;
3676 		UINT   state;
3677 		UINT   stateMask;
3678 		LPWSTR pszText;
3679 		int    cchTextMax;
3680 		int    iImage;
3681 		LPARAM lParam;
3682 	}
3683 }
3684 alias LVITEMA* LPLVITEMA;
3685 alias LVITEMW* LPLVITEMW;
3686 alias LVITEMA LV_ITEMA;
3687 alias LVITEMW LV_ITEMW;
3688 
3689 struct LVFINDINFOA {
3690 	UINT   flags;
3691 	LPCSTR psz;
3692 	LPARAM lParam;
3693 	POINT  pt;
3694 	UINT   vkDirection;
3695 }
3696 
3697 struct LVFINDINFOW {
3698 	UINT    flags;
3699 	LPCWSTR psz;
3700 	LPARAM  lParam;
3701 	POINT   pt;
3702 	UINT    vkDirection;
3703 }
3704 
3705 alias LVFINDINFOA* LPFINDINFOA;
3706 alias LVFINDINFOA LV_FINDINFOA;
3707 alias LVFINDINFOW* LPFINDINFOW;
3708 alias LVFINDINFOW LV_FINDINFOW;
3709 
3710 struct NMLVFINDITEMA {
3711 	NMHDR       hdr;
3712 	int         iStart;
3713 	LVFINDINFOA lvfi;
3714 }
3715 
3716 struct NMLVFINDITEMW {
3717 	NMHDR       hdr;
3718 	int         iStart;
3719 	LVFINDINFOW lvfi;
3720 }
3721 
3722 alias NMLVFINDITEMA* PNMLVFINDITEMA, LPNMLVFINDITEMA;
3723 alias NMLVFINDITEMW* PNMLVFINDITEMW, LPNMLVFINDITEMW;
3724 
3725 static if (_WIN32_IE >= 0x300) {
3726 	struct LVHITTESTINFO {
3727 		POINT pt;
3728 		UINT  flags;
3729 		int   iItem;
3730 		int   iSubItem;
3731 	}
3732 } else {
3733 	struct LVHITTESTINFO {
3734 		POINT pt;
3735 		UINT  flags;
3736 		int   iItem;
3737 	}
3738 }
3739 alias LVHITTESTINFO* LPLVHITTESTINFO;
3740 alias LVHITTESTINFO LV_HITTESTINFO;
3741 
3742 static if (_WIN32_IE >= 0x300) {
3743 	struct LVCOLUMNA {
3744 		UINT  mask;
3745 		int   fmt;
3746 		int   cx;
3747 		LPSTR pszText;
3748 		int   cchTextMax;
3749 		int   iSubItem;
3750 		int   iImage;
3751 		int   iOrder;
3752 	}
3753 	struct LVCOLUMNW {
3754 		UINT   mask;
3755 		int    fmt;
3756 		int    cx;
3757 		LPWSTR pszText;
3758 		int    cchTextMax;
3759 		int    iSubItem;
3760 		int    iImage;
3761 		int    iOrder;
3762 	}
3763 } else {
3764 	struct LVCOLUMNA {
3765 		UINT  mask;
3766 		int   fmt;
3767 		int   cx;
3768 		LPSTR pszText;
3769 		int   cchTextMax;
3770 		int   iSubItem;
3771 	}
3772 	struct LVCOLUMNW {
3773 		UINT   mask;
3774 		int    fmt;
3775 		int    cx;
3776 		LPWSTR pszText;
3777 		int    cchTextMax;
3778 		int    iSubItem;
3779 	}
3780 }
3781 alias LVCOLUMNA* LPLVCOLUMNA;
3782 alias LVCOLUMNW* LPLVCOLUMNW;
3783 alias LVCOLUMNA LV_COLUMNA;
3784 alias LVCOLUMNW LV_COLUMNW;
3785 
3786 static if (_WIN32_WINNT >= 0x501) {
3787 	/*	SG: The definitions in this static if block are from the MSDN docs.
3788 	 *	They are not in MinGW, but nonetheless required for macros that are.
3789 	 */
3790 	struct LVGROUP {
3791 		UINT    cbSize = LVGROUP.sizeof;
3792 		UINT    mask;
3793 		LPWSTR  pszHeader;
3794 		int     cchHeader;
3795 		LPWSTR  pszFooter;
3796 		int     cchFooter;
3797 		int     iGroupId;
3798 		UINT    stateMask;
3799 		UINT    state;
3800 		UINT    uAlign;
3801 		static if (_WIN32_WINNT >= 0x600) {
3802 			LPWSTR  pszSubtitle;
3803 			UINT    cchSubtitle;
3804 			LPWSTR  pszTask;
3805 			UINT    cchTask;
3806 			LPWSTR  pszDescriptionTop;
3807 			UINT    cchDescriptionTop;
3808 			LPWSTR  pszDescriptionBottom;
3809 			UINT    cchDescriptionBottom;
3810 			int     iTitleImage;
3811 			int     iExtendedImage;
3812 			int     iFirstItem;         // Read only
3813 			UINT    cItems;             // Read only
3814 			LPWSTR  pszSubsetTitle;     // NULL if group is not subset
3815 			UINT    cchSubsetTitle;
3816 		}
3817 	}
3818 	alias LVGROUP* PLVGROUP;
3819 
3820 	struct LVGROUPMETRICS {
3821 		UINT     cbSize = LVGROUPMETRICS.sizeof;
3822 		UINT     mask;
3823 		UINT     Left;
3824 		UINT     Top;
3825 		UINT     Right;
3826 		UINT     Bottom;
3827 		COLORREF crLeft;
3828 		COLORREF crTop;
3829 		COLORREF crRight;
3830 		COLORREF crBottom;
3831 		COLORREF crHeader;
3832 		COLORREF crFooter;
3833 	}
3834 	alias LVGROUPMETRICS* PLVGROUPMETRICS;
3835 
3836 	struct LVINSERTMARK {
3837 		UINT  cbSize = LVINSERTMARK.sizeof;
3838 		DWORD dwFlags;
3839 		int   iItem;
3840 		DWORD dwReserved;
3841 	}
3842 	alias LVINSERTMARK* PLVINSERTMARK;
3843 	alias LVINSERTMARK* LPLVINSERTMARK;
3844 
3845 	struct LVTILEINFO {
3846 		UINT     cbSize = LVTILEINFO.sizeof;
3847 		int      iItem;
3848 		UINT     cColumns;
3849 		PUINT    puColumns;
3850 		static if (_WIN32_WINNT >= 0x600) {
3851 			int* piColFmt;
3852 		}
3853 	}
3854 	alias LVTILEINFO* PLVTILEINFO;
3855 
3856 	struct LVTILEVIEWINFO {
3857 		UINT  cbSize = LVTILEVIEWINFO.sizeof;
3858 		DWORD dwMask;
3859 		DWORD dwFlags;
3860 		SIZE  sizeTile;
3861 		int   cLines;
3862 		RECT  rcLabelMargin;
3863 	}
3864 	alias LVTILEVIEWINFO* PLVTILEVIEWINFO;
3865 
3866 	struct LVINSERTGROUPSORTED {
3867 		PFNLVGROUPCOMPARE pfnGroupCompare;
3868 		LPVOID* pvData;
3869 		LVGROUP lvGroup;
3870 	}
3871 	alias LVINSERTGROUPSORTED* PLVINSERTGROUPSORTED;
3872 
3873 	alias int function(INT, INT, VOID*) nothrow PFNLVGROUPCOMPARE;
3874 
3875 	struct LVSETINFOTIP {
3876 		UINT    cbSize = LVSETINFOTIP.sizeof;
3877 		DWORD   dwFlags;
3878 		LPWSTR  pszText;
3879 		int     iItem;
3880 		int     iSubItem;
3881 		HBITMAP hbmp;
3882 	}
3883 	alias LVSETINFOTIP* PLVSETINFOTIP;
3884 
3885     struct BUTTON_IMAGELIST {
3886         HIMAGELIST himl;
3887         RECT margin;
3888         UINT uAlign;
3889     }
3890     alias BUTTON_IMAGELIST* PBUTTON_IMAGELIST;
3891 }
3892 
3893 static if (_WIN32_WINNT >= 0x600) {
3894     struct LVITEMINDEX
3895     {
3896         int iItem;
3897         int iGroup;
3898     };
3899     alias LVITEMINDEX* PLVITEMINDEX;
3900 
3901     struct LVFOOTERINFO
3902     {
3903         UINT mask;
3904         LPWSTR pszText;
3905         int cchTextMax;
3906         UINT cItems;
3907     }
3908     alias LVFOOTERINFO* LPLVFOOTERINFO;
3909 
3910     struct LVFOOTERITEM
3911     {
3912         UINT mask;
3913         int iItem;
3914         LPWSTR pszText;
3915         int cchTextMax;
3916         UINT state;
3917         UINT stateMask;
3918     }
3919     alias LVFOOTERITEM *LPLVFOOTERITEM;
3920 
3921     alias UINT TVITEMPART;
3922     enum {
3923         TVGIPR_BUTTON  = 0x0001,
3924     }
3925 }
3926 
3927 alias int function(LPARAM, LPARAM, LPARAM) nothrow PFNLVCOMPARE;
3928 
3929 struct NMLISTVIEW {
3930 	NMHDR  hdr;
3931 	int    iItem;
3932 	int    iSubItem;
3933 	UINT   uNewState;
3934 	UINT   uOldState;
3935 	UINT   uChanged;
3936 	POINT  ptAction;
3937 	LPARAM lParam;
3938 }
3939 alias NMLISTVIEW* LPNMLISTVIEW;
3940 
3941 deprecated {
3942 	alias NMLISTVIEW NM_LISTVIEW;
3943 	alias LPNMLISTVIEW LPNM_LISTVIEW;
3944 }
3945 
3946 struct NMLVDISPINFOA {
3947 	NMHDR    hdr;
3948 	LV_ITEMA item;
3949 }
3950 alias NMLVDISPINFOA* LPNMLVDISPINFOA;
3951 alias NMLVDISPINFOA LV_DISPINFOA;
3952 
3953 struct NMLVDISPINFOW {
3954 	NMHDR    hdr;
3955 	LV_ITEMW item;
3956 }
3957 alias NMLVDISPINFOW* LPNMLVDISPINFOW;
3958 alias NMLVDISPINFOW LV_DISPINFOW;
3959 
3960 struct LV_KEYDOWN {
3961 	NMHDR hdr;
3962 	WORD  wVKey;
3963 	UINT  flags;
3964 }
3965 
3966 struct NMLVCACHEHINT {
3967 	NMHDR hdr;
3968 	int   iFrom;
3969 	int   iTo;
3970 }
3971 alias NMLVCACHEHINT* LPNMLVCACHEHINT, PNM_CACHEHINT, LPNM_CACHEHINT;
3972 alias NMLVCACHEHINT NM_CACHEHINT;
3973 
3974 struct TVITEMA {
3975 	UINT      mask;
3976 	HTREEITEM hItem;
3977 	UINT      state;
3978 	UINT      stateMask;
3979 	LPSTR     pszText;
3980 	int       cchTextMax;
3981 	int       iImage;
3982 	int       iSelectedImage;
3983 	int       cChildren;
3984 	LPARAM    lParam;
3985 }
3986 alias TVITEMA* LPTVITEMA, LPTV_ITEMA;
3987 alias TVITEMA TV_ITEMA;
3988 
3989 struct TVITEMW {
3990 	UINT      mask;
3991 	HTREEITEM hItem;
3992 	UINT      state;
3993 	UINT      stateMask;
3994 	LPWSTR    pszText;
3995 	int       cchTextMax;
3996 	int       iImage;
3997 	int       iSelectedImage;
3998 	int       cChildren;
3999 	LPARAM    lParam;
4000 }
4001 alias TVITEMW* LPTVITEMW, LPTV_ITEMW;
4002 alias TVITEMW TV_ITEMW;
4003 
4004 static if (_WIN32_IE >= 0x400) {
4005 	struct TVITEMEXA {
4006 		UINT      mask;
4007 		HTREEITEM hItem;
4008 		UINT      state;
4009 		UINT      stateMask;
4010 		LPSTR     pszText;
4011 		int       cchTextMax;
4012 		int       iImage;
4013 		int       iSelectedImage;
4014 		int       cChildren;
4015 		LPARAM    lParam;
4016 		int       iIntegral;
4017 	}
4018 	alias TVITEMEXA* LPTVITEMEXA;
4019 
4020 	struct TVITEMEXW {
4021 		UINT      mask;
4022 		HTREEITEM hItem;
4023 		UINT      state;
4024 		UINT      stateMask;
4025 		LPWSTR    pszText;
4026 		int       cchTextMax;
4027 		int       iImage;
4028 		int       iSelectedImage;
4029 		int       cChildren;
4030 		LPARAM    lParam;
4031 		int       iIntegral;
4032 	}
4033 	alias TVITEMEXW* LPTVITEMEXW;
4034 }
4035 
4036 static if (_WIN32_IE >= 0x400) {
4037 	struct TVINSERTSTRUCTA {
4038 		HTREEITEM hParent;
4039 		HTREEITEM hInsertAfter;
4040 		union {
4041 			TVITEMEXA itemex;
4042 			TV_ITEMA  item;
4043 		}
4044 	}
4045 
4046 	struct TVINSERTSTRUCTW {
4047 		HTREEITEM hParent;
4048 		HTREEITEM hInsertAfter;
4049 		union {
4050 			TVITEMEXW itemex;
4051 			TV_ITEMW  item;
4052 		}
4053 	}
4054 } else {
4055 	struct TVINSERTSTRUCTA {
4056 		HTREEITEM hParent;
4057 		HTREEITEM hInsertAfter;
4058 		TV_ITEMA  item;
4059 	}
4060 
4061 	struct TVINSERTSTRUCTW {
4062 		HTREEITEM hParent;
4063 		HTREEITEM hInsertAfter;
4064 		TV_ITEMW  item;
4065 	}
4066 }
4067 alias TVINSERTSTRUCTA* LPTVINSERTSTRUCTA, LPTV_INSERTSTRUCTA;
4068 alias TVINSERTSTRUCTA TV_INSERTSTRUCTA;
4069 alias TVINSERTSTRUCTW* LPTVINSERTSTRUCTW, LPTV_INSERTSTRUCTW;
4070 alias TVINSERTSTRUCTW TV_INSERTSTRUCTW;
4071 
4072 struct TVHITTESTINFO {
4073 	POINT     pt;
4074 	UINT      flags;
4075 	HTREEITEM hItem;
4076 }
4077 alias TVHITTESTINFO* LPTVHITTESTINFO, LPTV_HITTESTINFO;
4078 alias TVHITTESTINFO TV_HITTESTINFO;
4079 
4080 static if (_WIN32_WINNT >= 0x600) {
4081     struct TVGETITEMPARTRECTINFO {
4082         HTREEITEM hti;
4083         RECT*     prc;
4084         TVITEMPART partID;
4085     }
4086 }
4087 
4088 alias int function(LPARAM, LPARAM, LPARAM) PFNTVCOMPARE;
4089 struct TVSORTCB {
4090 	HTREEITEM    hParent;
4091 	PFNTVCOMPARE lpfnCompare;
4092 	LPARAM       lParam;
4093 }
4094 alias TVSORTCB* LPTVSORTCB, LPTV_SORTCB;
4095 alias TVSORTCB TV_SORTCB;
4096 
4097 struct NMTREEVIEWA {
4098 	NMHDR    hdr;
4099 	UINT     action;
4100 	TV_ITEMA itemOld;
4101 	TV_ITEMA itemNew;
4102 	POINT    ptDrag;
4103 }
4104 alias NMTREEVIEWA* LPNMTREEVIEWA, LPNM_TREEVIEWA;
4105 alias NMTREEVIEWA NM_TREEVIEWA;
4106 
4107 struct NMTREEVIEWW {
4108 	NMHDR    hdr;
4109 	UINT     action;
4110 	TV_ITEMW itemOld;
4111 	TV_ITEMW itemNew;
4112 	POINT    ptDrag;
4113 }
4114 alias NMTREEVIEWW* LPNMTREEVIEWW, LPNM_TREEVIEWW;
4115 alias NMTREEVIEWW NM_TREEVIEWW;
4116 
4117 struct NMTVDISPINFOA {
4118 	NMHDR   hdr;
4119 	TVITEMA item;
4120 }
4121 alias NMTVDISPINFOA* LPNMTVDISPINFOA;
4122 alias NMTVDISPINFOA TV_DISPINFOA;
4123 
4124 struct NMTVDISPINFOW {
4125 	NMHDR   hdr;
4126 	TVITEMW item;
4127 }
4128 alias NMTVDISPINFOW* LPNMTVDISPINFOW;
4129 alias NMTVDISPINFOW TV_DISPINFOW;
4130 
4131 static if (_WIN32_IE >= 0x400) {
4132 	struct NMTVGETINFOTIPA {
4133 		NMHDR     hdr;
4134 		LPSTR     pszText;
4135 		int       cchTextMax;
4136 		HTREEITEM hItem;
4137 		LPARAM    lParam;
4138 	}
4139 	alias NMTVGETINFOTIPA* LPNMTVGETINFOTIPA;
4140 
4141 	struct NMTVGETINFOTIPW {
4142 		NMHDR     hdr;
4143 		LPWSTR    pszText;
4144 		int       cchTextMax;
4145 		HTREEITEM hItem;
4146 		LPARAM    lParam;
4147 	}
4148 	alias NMTVGETINFOTIPW* LPNMTVGETINFOTIPW;
4149 }
4150 
4151 struct TV_KEYDOWN {
4152 	NMHDR hdr;
4153 	WORD  wVKey;
4154 	UINT  flags;
4155 }
4156 
4157 struct TC_ITEMHEADERA {
4158 	UINT  mask;
4159 	UINT  lpReserved1;
4160 	UINT  lpReserved2;
4161 	LPSTR pszText;
4162 	int   cchTextMax;
4163 	int   iImage;
4164 }
4165 
4166 struct TC_ITEMHEADERW {
4167 	UINT   mask;
4168 	UINT   lpReserved1;
4169 	UINT   lpReserved2;
4170 	LPWSTR pszText;
4171 	int    cchTextMax;
4172 	int    iImage;
4173 }
4174 
4175 static if (_WIN32_IE >= 0x300) {
4176 	struct TCITEMA {
4177 		UINT   mask;
4178 		DWORD  dwState;
4179 		DWORD  dwStateMask;
4180 		LPSTR  pszText;
4181 		int    cchTextMax;
4182 		int    iImage;
4183 		LPARAM lParam;
4184 	}
4185 
4186 	struct TCITEMW {
4187 		UINT   mask;
4188 		DWORD  dwState;
4189 		DWORD  dwStateMask;
4190 		LPWSTR pszText;
4191 		int    cchTextMax;
4192 		int    iImage;
4193 		LPARAM lParam;
4194 	}
4195 } else {
4196 	struct TCITEMA {
4197 		UINT   mask;
4198 		UINT   lpReserved1;
4199 		UINT   lpReserved2;
4200 		LPSTR  pszText;
4201 		int    cchTextMax;
4202 		int    iImage;
4203 		LPARAM lParam;
4204 	}
4205 
4206 	struct TCITEMW {
4207 		UINT   mask;
4208 		UINT   lpReserved1;
4209 		UINT   lpReserved2;
4210 		LPWSTR pszText;
4211 		int    cchTextMax;
4212 		int    iImage;
4213 		LPARAM lParam;
4214 	}
4215 }
4216 alias TCITEMA* LPTCITEMA;
4217 alias TCITEMA TC_ITEMA;
4218 alias TCITEMW* LPTCITEMW;
4219 alias TCITEMW TC_ITEMW;
4220 
4221 struct TCHITTESTINFO {
4222 	POINT pt;
4223 	UINT  flags;
4224 }
4225 alias TCHITTESTINFO* LPTCHITTESTINFO, LPTC_HITTESTINFO;
4226 alias TCHITTESTINFO TC_HITTESTINFO;
4227 
4228 struct TC_KEYDOWN {
4229 	NMHDR hdr;
4230 	WORD wVKey;
4231 	UINT flags;
4232 }
4233 
4234 static if (_WIN32_IE >= 0x300) {
4235 	struct INITCOMMONCONTROLSEX {
4236 		DWORD dwSize = INITCOMMONCONTROLSEX.sizeof;
4237 		DWORD dwICC;
4238 	}
4239 	alias INITCOMMONCONTROLSEX* LPINITCOMMONCONTROLSEX;
4240 }
4241 
4242 struct PBRANGE {
4243 	int iLow;
4244 	int iHigh;
4245 }
4246 alias PBRANGE* PPBRANGE;
4247 
4248 struct COLORSCHEME {
4249 	DWORD    dwSize = COLORSCHEME.sizeof;
4250 	COLORREF clrBtnHighlight;
4251 	COLORREF clrBtnShadow;
4252 }
4253 alias COLORSCHEME* LPCOLORSCHEME;
4254 
4255 struct MCHITTESTINFO {
4256 	UINT       cbSize = MCHITTESTINFO.sizeof;
4257 	POINT      pt;
4258 	UINT       uHit;
4259 	SYSTEMTIME st;
4260 }
4261 alias MCHITTESTINFO* PMCHITTESTINFO;
4262 
4263 alias DWORD MONTHDAYSTATE;
4264 alias MONTHDAYSTATE* LPMONTHDAYSTATE;
4265 
4266 struct NMDAYSTATE {
4267 	NMHDR           nmhdr;
4268 	SYSTEMTIME      stStart;
4269 	int             cDayState;
4270 	LPMONTHDAYSTATE prgDayState;
4271 }
4272 alias NMDAYSTATE* LPNMDAYSTATE;
4273 
4274 struct REBARINFO {
4275 	UINT       cbSize = REBARINFO.sizeof;
4276 	UINT       fMask;
4277 	HIMAGELIST himl;
4278 }
4279 alias REBARINFO* LPREBARINFO;
4280 
4281 static if (_WIN32_IE >= 0x400) {
4282 	struct REBARBANDINFOA {
4283 		UINT     cbSize = REBARBANDINFOA.sizeof;
4284 		UINT     fMask;
4285 		UINT     fStyle;
4286 		COLORREF clrFore;
4287 		COLORREF clrBack;
4288 		LPSTR    lpText;
4289 		UINT     cch;
4290 		int      iImage;
4291 		HWND     hwndChild;
4292 		UINT     cxMinChild;
4293 		UINT     cyMinChild;
4294 		UINT     cx;
4295 		HBITMAP  hbmBack;
4296 		UINT     wID;
4297 		UINT     cyChild;
4298 		UINT     cyMaxChild;
4299 		UINT     cyIntegral;
4300 		UINT     cxIdeal;
4301 		LPARAM   lParam;
4302 		UINT     cxHeader;
4303 	}
4304 
4305 	struct REBARBANDINFOW {
4306 		UINT     cbSize = REBARBANDINFOW.sizeof;
4307 		UINT     fMask;
4308 		UINT     fStyle;
4309 		COLORREF clrFore;
4310 		COLORREF clrBack;
4311 		LPWSTR   lpText;
4312 		UINT     cch;
4313 		int      iImage;
4314 		HWND     hwndChild;
4315 		UINT     cxMinChild;
4316 		UINT     cyMinChild;
4317 		UINT     cx;
4318 		HBITMAP  hbmBack;
4319 		UINT     wID;
4320 		UINT     cyChild;
4321 		UINT     cyMaxChild;
4322 		UINT     cyIntegral;
4323 		UINT     cxIdeal;
4324 		LPARAM   lParam;
4325 		UINT     cxHeader;
4326 	}
4327 
4328 	enum : size_t {
4329 		REBARBANDINFOA_V3_SIZE = REBARBANDINFOA.cyChild.offsetof,
4330 		REBARBANDINFOW_V3_SIZE = REBARBANDINFOW.cyChild.offsetof
4331 	}
4332 } else {
4333 	struct REBARBANDINFOA {
4334 		UINT     cbSize = REBARBANDINFOA.sizeof;
4335 		UINT     fMask;
4336 		UINT     fStyle;
4337 		COLORREF clrFore;
4338 		COLORREF clrBack;
4339 		LPSTR    lpText;
4340 		UINT     cch;
4341 		int      iImage;
4342 		HWND     hwndChild;
4343 		UINT     cxMinChild;
4344 		UINT     cyMinChild;
4345 		UINT     cx;
4346 		HBITMAP  hbmBack;
4347 		UINT     wID;
4348 	}
4349 
4350 	struct REBARBANDINFOW {
4351 		UINT     cbSize = REBARBANDINFOW.sizeof;
4352 		UINT     fMask;
4353 		UINT     fStyle;
4354 		COLORREF clrFore;
4355 		COLORREF clrBack;
4356 		LPWSTR   lpText;
4357 		UINT     cch;
4358 		int      iImage;
4359 		HWND     hwndChild;
4360 		UINT     cxMinChild;
4361 		UINT     cyMinChild;
4362 		UINT     cx;
4363 		HBITMAP  hbmBack;
4364 		UINT     wID;
4365 	}
4366 
4367 	enum : size_t {
4368 		REBARBANDINFOA_V3_SIZE = REBARBANDINFOA.sizeof,
4369 		REBARBANDINFOW_V3_SIZE = REBARBANDINFOW.sizeof
4370 	}
4371 }
4372 alias REBARBANDINFOA*        LPREBARBANDINFOA;
4373 alias const(REBARBANDINFOA)* LPCREBARBANDINFOA;
4374 alias REBARBANDINFOW*        LPREBARBANDINFOW;
4375 alias const(REBARBANDINFOW)* LPCREBARBANDINFOW;
4376 
4377 static if (_WIN32_IE >= 0x300) {
4378 	struct NMLVODSTATECHANGE {
4379 		NMHDR hdr;
4380 		int iFrom;
4381 		int iTo;
4382 		UINT uNewState;
4383 		UINT uOldState;
4384 	}
4385 	alias NMLVODSTATECHANGE* LPNMLVODSTATECHANGE;
4386 
4387 	static if (_WIN32_WINNT >= 0x501) {
4388 		struct IMAGELISTDRAWPARAMS {
4389 			DWORD      cbSize = IMAGELISTDRAWPARAMS.sizeof;
4390 			HIMAGELIST himl;
4391 			int        i;
4392 			HDC        hdcDst;
4393 			int        x;
4394 			int        y;
4395 			int        cx;
4396 			int        cy;
4397 			int        xBitmap;
4398 			int        yBitmap;
4399 			COLORREF   rgbBk;
4400 			COLORREF   rgbFg;
4401 			UINT       fStyle;
4402 			DWORD      dwRop;
4403 			DWORD      fState;
4404 			DWORD      Frame;
4405 			COLORREF   crEffect;
4406 		}
4407 	} else {
4408 		struct IMAGELISTDRAWPARAMS {
4409 			DWORD      cbSize = IMAGELISTDRAWPARAMS.sizeof;
4410 			HIMAGELIST himl;
4411 			int        i;
4412 			HDC        hdcDst;
4413 			int        x;
4414 			int        y;
4415 			int        cx;
4416 			int        cy;
4417 			int        xBitmap;
4418 			int        yBitmap;
4419 			COLORREF   rgbBk;
4420 			COLORREF   rgbFg;
4421 			UINT       fStyle;
4422 			DWORD      dwRop;
4423 		}
4424 	}
4425 	alias IMAGELISTDRAWPARAMS* LPIMAGELISTDRAWPARAMS;
4426 }
4427 
4428 static if (_WIN32_IE >= 0x400) {
4429 	struct NMREBARCHILDSIZE {
4430 		NMHDR hdr;
4431 		UINT  uBand;
4432 		UINT  wID;
4433 		RECT  rcChild;
4434 		RECT  rcBand;
4435 	}
4436 	alias NMREBARCHILDSIZE* LPNMREBARCHILDSIZE;
4437 
4438 	struct NMREBAR {
4439 		NMHDR  hdr;
4440 		DWORD  dwMask;
4441 		UINT   uBand;
4442 		UINT   fStyle;
4443 		UINT   wID;
4444 		LPARAM lParam;
4445 	}
4446 	alias NMREBAR* LPNMREBAR;
4447 
4448 	struct NMRBAUTOSIZE {
4449 		NMHDR hdr;
4450 		BOOL  fChanged;
4451 		RECT  rcTarget;
4452 		RECT  rcActual;
4453 	}
4454 	alias NMRBAUTOSIZE* LPNMRBAUTOSIZE;
4455 
4456 	static if (_WIN32_IE >= 0x500) {
4457 		struct NMREBARCHEVRON {
4458 			NMHDR  hdr;
4459 			UINT   uBand;
4460 			UINT   wID;
4461 			LPARAM lParam;
4462 			RECT   rc;
4463 			LPARAM lParamNM;
4464 		}
4465 		alias NMREBARCHEVRON* LPNMREBARCHEVRON;
4466 	}
4467 
4468 	struct RBHITTESTINFO {
4469 		POINT pt;
4470 		UINT  flags;
4471 		int   iBand;
4472 	}
4473 	alias RBHITTESTINFO* LPRBHITTESTINFO;
4474 }
4475 
4476 mixin DECLARE_HANDLE!("HDSA");
4477 mixin DECLARE_HANDLE!("HDPA");
4478 
4479 version (Unicode) {
4480 	alias HDITEMW HDITEM;
4481 	alias LPHDITEMW LPHDITEM;
4482 	alias TOOLINFOW TOOLINFO;
4483 	alias TOOLINFOW* PTOOLINFO, LPTOOLINFO;
4484 	alias TTHITTESTINFOW TTHITTESTINFO;
4485 	alias TTHITTESTINFOW* LPHITTESTINFO, LPTTHITTESTINFO;
4486 	alias TOOLTIPTEXTW TOOLTIPTEXT;
4487 	alias TOOLTIPTEXTW* LPTOOLTIPTEXT;
4488 	alias NMTTDISPINFOW NMTTDISPINFO;
4489 	alias NMTTDISPINFOW* LPNMTTDISPINFO;
4490 	alias TV_ITEMW TV_ITEM;
4491 	alias TV_ITEMW* LPTV_ITEM;
4492 	alias TVITEMW TVITEM;
4493 	alias TVITEMW* LPTVITEM;
4494 
4495 	static if (_WIN32_IE >= 0x400) {
4496 		alias TVITEMEXW TVITEMEX;
4497 		alias TVITEMEXW* LPTVITEMEX;
4498 	}
4499 
4500 	alias TV_INSERTSTRUCTW TV_INSERTSTRUCT;
4501 	alias TV_INSERTSTRUCTW* LPTV_INSERTSTRUCT;
4502 	alias TVINSERTSTRUCTW TVINSERTSTRUCT;
4503 	alias TVINSERTSTRUCTW* LPTVINSERTSTRUCT;
4504 	alias NM_TREEVIEWW NM_TREEVIEW;
4505 	alias NM_TREEVIEWW* LPNM_TREEVIEW;
4506 	alias NMTREEVIEWW NMTREEVIEW;
4507 	alias NMTREEVIEWW* LPNMTREEVIEW;
4508 	alias NMHDDISPINFOW NMHDDISPINFO;
4509 	alias NMHDDISPINFOW* LPNMHDDISPINFO;
4510 
4511 	alias ACM_OPENW ACM_OPEN;
4512 	alias COMBOBOXEXITEMW COMBOBOXEXITEM;
4513 	alias PCOMBOBOXEXITEMW PCOMBOBOXEXITEM;
4514 	//alias PCCOMBOBOXEXITEMW PCCOMBOBOXEXITEM; fixme
4515 	alias CBEM_INSERTITEMW CBEM_INSERTITEM;
4516 	alias CBEM_SETITEMW CBEM_SETITEM;
4517 	alias CBEM_GETITEMW CBEM_GETITEM;
4518 	alias CBEN_ENDEDITW CBEN_ENDEDIT;
4519 	alias NMCBEENDEDITW NMCBEENDEDIT;
4520 	alias LPNMCBEENDEDITW LPNMCBEENDEDIT;
4521 	alias PNMCBEENDEDITW PNMCBEENDEDIT;
4522 
4523 	static if (_WIN32_IE >= 0x400) {
4524 		alias NMCOMBOBOXEXW NMCOMBOBOXEX;
4525 		alias PNMCOMBOBOXEXW PNMCOMBOBOXEX;
4526 		alias CBEN_GETDISPINFOW CBEN_GETDISPINFO;
4527 		alias CBEN_DRAGBEGINW CBEN_DRAGBEGIN;
4528 		alias NMCBEDRAGBEGINW NMCBEDRAGBEGIN;
4529 		alias LPNMCBEDRAGBEGINW LPNMCBEDRAGBEGIN;
4530 		alias PNMCBEDRAGBEGINW PNMCBEDRAGBEGIN;
4531 	}
4532 
4533 	alias SB_GETTEXTW SB_GETTEXT;
4534 	alias SB_SETTEXTW SB_SETTEXT;
4535 	alias SB_GETTEXTLENGTHW SB_GETTEXTLENGTH;
4536 	alias HDM_INSERTITEMW HDM_INSERTITEM;
4537 	alias HDM_GETITEMW HDM_GETITEM;
4538 	alias HDM_SETITEMW HDM_SETITEM;
4539 	alias HDN_ITEMCHANGINGW HDN_ITEMCHANGING;
4540 	alias HDN_ITEMCHANGEDW HDN_ITEMCHANGED;
4541 	alias HDN_ITEMCLICKW HDN_ITEMCLICK;
4542 	alias HDN_ITEMDBLCLICKW HDN_ITEMDBLCLICK;
4543 	alias HDN_DIVIDERDBLCLICKW HDN_DIVIDERDBLCLICK;
4544 	alias HDN_BEGINTRACKW HDN_BEGINTRACK;
4545 	alias HDN_ENDTRACKW HDN_ENDTRACK;
4546 	alias HDN_TRACKW HDN_TRACK;
4547 
4548 	static if (_WIN32_IE >= 0x300) {
4549 		alias HDN_GETDISPINFOW HDN_GETDISPINFO;
4550 	}
4551 
4552 	alias HD_NOTIFYW HD_NOTIFY;
4553 	alias TBSAVEPARAMSW TBSAVEPARAMS;
4554 	alias TB_GETBUTTONTEXTW TB_GETBUTTONTEXT;
4555 	alias TB_SAVERESTOREW TB_SAVERESTORE;
4556 	alias TB_ADDSTRINGW TB_ADDSTRING;
4557 
4558 	static if (_WIN32_IE >= 0x400) {
4559 		alias TBN_GETBUTTONINFOW TBN_GETBUTTONINFO;  // fixme
4560 		alias TB_GETBUTTONINFOW TB_GETBUTTONINFO;
4561 		alias TB_SETBUTTONINFOW TB_SETBUTTONINFO;
4562 		alias TB_INSERTBUTTONW TB_INSERTBUTTON;
4563 		alias TB_ADDBUTTONSW TB_ADDBUTTONS;
4564 		alias TB_MAPACCELERATORW TB_MAPACCELERATOR;
4565 		alias TB_GETSTRINGW TB_GETSTRING;
4566 		alias TBBUTTONINFOW TBBUTTONINFO;
4567 		alias LPTBBUTTONINFOW LPTBBUTTONINFO;
4568 		alias TBN_GETDISPINFOW TBN_GETDISPINFO;
4569 		alias NMTBDISPINFOW NMTBDISPINFO;
4570 		alias LPNMTBDISPINFOW LPNMTBDISPINFO;
4571 		alias NMTBGETINFOTIPW NMTBGETINFOTIP;
4572 		alias LPNMTBGETINFOTIPW LPNMTBGETINFOTIP;
4573 	}
4574 
4575 	alias TBNOTIFYW TBNOTIFY;
4576 	alias LPTBNOTIFYW LPTBNOTIFY;
4577 	alias NMTOOLBARW NMTOOLBAR;
4578 	alias LPNMTOOLBARW LPNMTOOLBAR;
4579 	alias TTM_ADDTOOLW TTM_ADDTOOL;
4580 	alias TTM_DELTOOLW TTM_DELTOOL;
4581 	alias TTM_NEWTOOLRECTW TTM_NEWTOOLRECT;
4582 	alias TTM_GETTOOLINFOW TTM_GETTOOLINFO;
4583 	alias TTM_SETTOOLINFOW TTM_SETTOOLINFO;
4584 	alias TTM_HITTESTW TTM_HITTEST;
4585 	alias TTM_GETTEXTW TTM_GETTEXT;
4586 	alias TTM_UPDATETIPTEXTW TTM_UPDATETIPTEXT;
4587 	alias TTM_ENUMTOOLSW TTM_ENUMTOOLS;
4588 	alias TTM_GETCURRENTTOOLW TTM_GETCURRENTTOOL;
4589 	alias TTN_NEEDTEXTW TTN_NEEDTEXT;
4590 	alias TTN_GETDISPINFOW TTN_GETDISPINFO;
4591 	//alias SB_GETTEXTW SB_GETTEXT;
4592 	//alias SB_SETTEXTW SB_SETTEXT;
4593 	//alias SB_GETTEXTLENGTHW SB_GETTEXTLENGTH;
4594 	alias LV_ITEMW LV_ITEM;
4595 	alias LVITEMW LVITEM;
4596 	alias LVITEM* LPLVITEM;
4597 	alias LPSTR_TEXTCALLBACKW LPSTR_TEXTCALLBACK;
4598 
4599 	static if (_WIN32_IE >= 0x400) {
4600 		alias LVBKIMAGEW LVBKIMAGE;
4601 		alias LPLVBKIMAGEW LPLVBKIMAGE;
4602 		alias LVM_SETBKIMAGEW LVM_SETBKIMAGE;
4603 		alias LVM_GETBKIMAGEW LVM_GETBKIMAGE;
4604 	}
4605 
4606 	alias LVM_GETITEMW LVM_GETITEM;
4607 	alias LVM_SETITEMW LVM_SETITEM;
4608 	alias LVM_INSERTITEMW LVM_INSERTITEM;
4609 	alias LV_FINDINFOW LV_FINDINFO;
4610 	alias LVFINDINFOW LVFINDINFO;
4611 	alias LPFINDINFOW LPFINDINFO;
4612 	alias NMLVFINDITEMW NMLVFINDITEM;
4613 	alias PNMLVFINDITEMW PNMLVFINDITEM;
4614 	alias LPNMLVFINDITEMW LPNMLVFINDITEM;
4615 	alias LVM_FINDITEMW LVM_FINDITEM;
4616 	alias LVM_GETSTRINGWIDTHW LVM_GETSTRINGWIDTH;
4617 	alias LVM_EDITLABELW LVM_EDITLABEL;
4618 	alias LV_COLUMNW LV_COLUMN;
4619 	alias LVCOLUMNW LVCOLUMN;
4620 	alias LVCOLUMNW* LPLVCOLUMN;
4621 	alias LVM_GETCOLUMNW LVM_GETCOLUMN;
4622 	alias LVM_SETCOLUMNW LVM_SETCOLUMN;
4623 	alias LVM_INSERTCOLUMNW LVM_INSERTCOLUMN;
4624 	alias LVM_GETITEMTEXTW LVM_GETITEMTEXT;
4625 	alias LVM_SETITEMTEXTW LVM_SETITEMTEXT;
4626 	alias LVM_GETISEARCHSTRINGW LVM_GETISEARCHSTRING;
4627 	alias LVN_BEGINLABELEDITW LVN_BEGINLABELEDIT;
4628 	alias LVN_ENDLABELEDITW LVN_ENDLABELEDIT;
4629 	alias LVN_GETDISPINFOW LVN_GETDISPINFO;
4630 	alias LVN_SETDISPINFOW LVN_SETDISPINFO;
4631 
4632 	static if (_WIN32_IE >= 0x400) {
4633 		alias LVN_GETINFOTIPW LVN_GETINFOTIP;
4634 		alias NMLVGETINFOTIPW NMLVGETINFOTIP;
4635 		alias LPNMLVGETINFOTIPW LPNMLVGETINFOTIP;
4636 	}
4637 
4638 	alias LV_DISPINFOW LV_DISPINFO;
4639 	alias NMLVDISPINFOW NMLVDISPINFO;
4640 	alias LPNMLVDISPINFOW LPNMLVDISPINFO;
4641 	alias TVM_INSERTITEMW TVM_INSERTITEM;
4642 	alias TVM_GETITEMW TVM_GETITEM;
4643 	alias TVM_SETITEMW TVM_SETITEM;
4644 	alias TVM_EDITLABELW TVM_EDITLABEL;
4645 	alias TVM_GETISEARCHSTRINGW TVM_GETISEARCHSTRING;
4646 	alias NMTVDISPINFOW TV_DISPINFO;
4647 	alias NMTVDISPINFOW NMTVDISPINFO;
4648 	alias LPNMTVDISPINFOW LPNMTVDISPINFO;
4649 
4650 	static if (_WIN32_IE >= 0x400) {
4651 		alias NMTVGETINFOTIPW NMTVGETINFOTIP;
4652 		alias LPNMTVGETINFOTIPW LPNMTVGETINFOTIP;
4653 		alias TVN_GETINFOTIPW TVN_GETINFOTIP;
4654 	}
4655 
4656 	alias TVN_SELCHANGINGW TVN_SELCHANGING;
4657 	alias TVN_SELCHANGEDW TVN_SELCHANGED;
4658 	alias TVN_GETDISPINFOW TVN_GETDISPINFO;
4659 	alias TVN_SETDISPINFOW TVN_SETDISPINFO;
4660 	alias TVN_ITEMEXPANDINGW TVN_ITEMEXPANDING;
4661 	alias TVN_ITEMEXPANDEDW TVN_ITEMEXPANDED;
4662 	alias TVN_BEGINDRAGW TVN_BEGINDRAG;
4663 	alias TVN_BEGINRDRAGW TVN_BEGINRDRAG;
4664 	alias TVN_DELETEITEMW TVN_DELETEITEM;
4665 	alias TVN_BEGINLABELEDITW TVN_BEGINLABELEDIT;
4666 	alias TVN_ENDLABELEDITW TVN_ENDLABELEDIT;
4667 	alias TC_ITEMHEADERW TC_ITEMHEADER;
4668 	alias TC_ITEMW TC_ITEM;
4669 	alias TCITEMW TCITEM;
4670 	alias LPTCITEMW LPTCITEM;
4671 	alias TCM_GETITEMW TCM_GETITEM;
4672 	alias TCM_SETITEMW TCM_SETITEM;
4673 	alias TCM_INSERTITEMW TCM_INSERTITEM;
4674 	alias CreateStatusWindowW CreateStatusWindow;
4675 	alias DrawStatusTextW DrawStatusText;
4676 	alias ImageList_LoadImageW ImageList_LoadImage;
4677 	alias DTM_SETFORMATW DTM_SETFORMAT;
4678 	alias DTN_USERSTRINGW DTN_USERSTRING;
4679 	alias DTN_WMKEYDOWNW DTN_WMKEYDOWN;
4680 	alias DTN_FORMATW DTN_FORMAT;
4681 	alias DTN_FORMATQUERYW DTN_FORMATQUERY;
4682 	alias REBARBANDINFOW REBARBANDINFO;
4683 	alias REBARBANDINFO* LPREBARBANDINFO;
4684 	alias LPCREBARBANDINFOW LPCREBARBANDINFO;
4685 	alias REBARBANDINFOW_V3_SIZE REBARBANDINFO_V3_SIZE;
4686 	alias RB_INSERTBANDW RB_INSERTBAND;
4687 	alias RB_SETBANDINFOW RB_SETBANDINFO;
4688 } else {
4689 	alias HDITEMA HDITEM;
4690 	alias LPHDITEMA LPHDITEM;
4691 	alias TOOLINFOA TOOLINFO;
4692 	alias TOOLINFOA* PTOOLINFO, LPTOOLINFO;
4693 	alias TTHITTESTINFOA TTHITTESTINFO;
4694 	alias TTHITTESTINFOA* LPHITTESTINFO, LPTTHITTESTINFO;
4695 	alias TOOLTIPTEXTA TOOLTIPTEXT;
4696 	alias TOOLTIPTEXTA* LPTOOLTIPTEXT;
4697 	alias NMTTDISPINFOA NMTTDISPINFO;
4698 	alias NMTTDISPINFOA* LPNMTTDISPINFO;
4699 	alias TV_ITEMA TV_ITEM;
4700 	alias TV_ITEMA* LPTV_ITEM;
4701 	alias TVITEMA TVITEM;
4702 	alias TVITEMA* LPTVITEM;
4703 
4704 	static if (_WIN32_IE >= 0x400) {
4705 		alias TVITEMEXA TVITEMEX;
4706 		alias TVITEMEXA* LPTVITEMEX;
4707 	}
4708 
4709 	alias TV_INSERTSTRUCTA TV_INSERTSTRUCT;
4710 	alias TV_INSERTSTRUCTA* LPTV_INSERTSTRUCT;
4711 	alias TVINSERTSTRUCTA TVINSERTSTRUCT;
4712 	alias TVINSERTSTRUCTA* LPTVINSERTSTRUCT;
4713 	alias NM_TREEVIEWA NM_TREEVIEW;
4714 	alias NM_TREEVIEWA* LPNM_TREEVIEW;
4715 	alias NMTREEVIEWA NMTREEVIEW;
4716 	alias NMTREEVIEWA* LPNMTREEVIEW;
4717 	alias NMHDDISPINFOW NMHDDISPINFO;
4718 	alias NMHDDISPINFOW* LPNMHDDISPINFO;
4719 
4720 	alias ACM_OPENA ACM_OPEN;
4721 	alias COMBOBOXEXITEMA COMBOBOXEXITEM;
4722 	alias PCOMBOBOXEXITEMA PCOMBOBOXEXITEM;
4723 	//alias PCCOMBOBOXEXITEMA PCCOMBOBOXEXITEM; fixme
4724 	alias CBEM_INSERTITEMA CBEM_INSERTITEM;
4725 	alias CBEM_SETITEMA CBEM_SETITEM;
4726 	alias CBEM_GETITEMA CBEM_GETITEM;
4727 	alias CBEN_ENDEDITA CBEN_ENDEDIT;
4728 	alias NMCBEENDEDITA NMCBEENDEDIT;
4729 	alias LPNMCBEENDEDITA LPNMCBEENDEDIT;
4730 	alias PNMCBEENDEDITA PNMCBEENDEDIT;
4731 
4732 	static if (_WIN32_IE >= 0x400) {
4733 		alias TB_GETBUTTONINFOA TB_GETBUTTONINFO;
4734 		alias TB_SETBUTTONINFOA TB_SETBUTTONINFO;
4735 		alias TB_INSERTBUTTONA TB_INSERTBUTTON;
4736 		alias TB_ADDBUTTONSA TB_ADDBUTTONS;
4737 		alias TB_MAPACCELERATORA TB_MAPACCELERATOR;
4738 		alias TB_GETSTRINGA TB_GETSTRING;
4739 		alias NMCOMBOBOXEXA NMCOMBOBOXEX;
4740 		alias PNMCOMBOBOXEXA PNMCOMBOBOXEX;
4741 		alias CBEN_DRAGBEGINA CBEN_DRAGBEGIN;
4742 		alias CBEN_GETDISPINFOA CBEN_GETDISPINFO;
4743 		alias NMCBEDRAGBEGINA NMCBEDRAGBEGIN;
4744 		alias LPNMCBEDRAGBEGINA LPNMCBEDRAGBEGIN;
4745 		alias PNMCBEDRAGBEGINA PNMCBEDRAGBEGIN;
4746 		alias TBN_GETDISPINFOA TBN_GETDISPINFO;
4747 		alias NMTBDISPINFOA NMTBDISPINFO;
4748 		alias LPNMTBDISPINFOA LPNMTBDISPINFO;
4749 		alias NMTBGETINFOTIPA NMTBGETINFOTIP;
4750 		alias LPNMTBGETINFOTIPA LPNMTBGETINFOTIP;
4751 	}
4752 
4753 	alias SB_GETTEXTA SB_GETTEXT;
4754 	alias SB_SETTEXTA SB_SETTEXT;
4755 	alias SB_GETTEXTLENGTHA SB_GETTEXTLENGTH;
4756 	alias HDM_INSERTITEMA HDM_INSERTITEM;
4757 	alias HDM_GETITEMA HDM_GETITEM;
4758 	alias HDM_SETITEMA HDM_SETITEM;
4759 	alias HDN_ITEMCHANGINGA HDN_ITEMCHANGING;
4760 	alias HDN_ITEMCHANGEDA HDN_ITEMCHANGED;
4761 	alias HDN_ITEMCLICKA HDN_ITEMCLICK;
4762 	alias HDN_ITEMDBLCLICKA HDN_ITEMDBLCLICK;
4763 	alias HDN_DIVIDERDBLCLICKA HDN_DIVIDERDBLCLICK;
4764 	alias HDN_BEGINTRACKA HDN_BEGINTRACK;
4765 	alias HDN_ENDTRACKA HDN_ENDTRACK;
4766 	alias HDN_TRACKA HDN_TRACK;
4767 
4768 	static if (_WIN32_IE >= 0x300) {
4769 		alias HDN_GETDISPINFOA HDN_GETDISPINFO;
4770 	}
4771 
4772 	alias HD_NOTIFYA HD_NOTIFY;
4773 	alias TBSAVEPARAMSA TBSAVEPARAMS;
4774 	alias TB_GETBUTTONTEXTA TB_GETBUTTONTEXT;
4775 	alias TB_SAVERESTOREA TB_SAVERESTORE;
4776 	alias TB_ADDSTRINGA TB_ADDSTRING;
4777 	alias TBN_GETBUTTONINFOA TBN_GETBUTTONINFO;
4778 
4779 	static if (_WIN32_IE >= 0x400) {
4780 		alias TBBUTTONINFOA TBBUTTONINFO;
4781 		alias LPTBBUTTONINFOA LPTBBUTTONINFO;
4782 	}
4783 
4784 	alias TBNOTIFYA TBNOTIFY;
4785 	alias LPTBNOTIFYA LPTBNOTIFY;
4786 	alias NMTOOLBARA NMTOOLBAR;
4787 	alias LPNMTOOLBARA LPNMTOOLBAR;
4788 	alias TTM_ADDTOOLA TTM_ADDTOOL;
4789 	alias TTM_DELTOOLA TTM_DELTOOL;
4790 	alias TTM_NEWTOOLRECTA TTM_NEWTOOLRECT;
4791 	alias TTM_GETTOOLINFOA TTM_GETTOOLINFO;
4792 	alias TTM_SETTOOLINFOA TTM_SETTOOLINFO;
4793 	alias TTM_HITTESTA TTM_HITTEST;
4794 	alias TTM_GETTEXTA TTM_GETTEXT;
4795 	alias TTM_UPDATETIPTEXTA TTM_UPDATETIPTEXT;
4796 	alias TTM_ENUMTOOLSA TTM_ENUMTOOLS;
4797 	alias TTM_GETCURRENTTOOLA TTM_GETCURRENTTOOL;
4798 	alias TTN_NEEDTEXTA TTN_NEEDTEXT;
4799 	alias TTN_GETDISPINFOA TTN_GETDISPINFO;
4800 	alias LV_ITEMA LV_ITEM;
4801 	alias LVITEMA LVITEM;
4802 	alias LVITEM* LPLVITEM;
4803 	alias LPSTR_TEXTCALLBACKA LPSTR_TEXTCALLBACK;
4804 
4805 	static if (_WIN32_IE >= 0x400) {
4806 		alias LVBKIMAGEA LVBKIMAGE;
4807 		alias LPLVBKIMAGEA LPLVBKIMAGE;
4808 		alias LVM_SETBKIMAGEA LVM_SETBKIMAGE;
4809 		alias LVM_GETBKIMAGEA LVM_GETBKIMAGE;
4810 	}
4811 
4812 	alias LVM_GETITEMA LVM_GETITEM;
4813 	alias LVM_SETITEMA LVM_SETITEM;
4814 	alias LVM_INSERTITEMA LVM_INSERTITEM;
4815 	alias LV_FINDINFOA LV_FINDINFO;
4816 	alias LVFINDINFOA LVFINDINFO;
4817 	alias LPFINDINFOA LPFINDINFO;
4818 	alias NMLVFINDITEMA NMLVFINDITEM;
4819 	alias PNMLVFINDITEMA PNMLVFINDITEM;
4820 	alias LPNMLVFINDITEMA LPNMLVFINDITEM;
4821 	alias LVM_FINDITEMA LVM_FINDITEM;
4822 	alias LVM_GETSTRINGWIDTHA LVM_GETSTRINGWIDTH;
4823 	alias LVM_EDITLABELA LVM_EDITLABEL;
4824 	alias LV_COLUMNA LV_COLUMN;
4825 	alias LVCOLUMNA LVCOLUMN;
4826 	alias LVCOLUMNA* LPLVCOLUMN;
4827 	alias LVM_GETCOLUMNA LVM_GETCOLUMN;
4828 	alias LVM_SETCOLUMNA LVM_SETCOLUMN;
4829 	alias LVM_INSERTCOLUMNA LVM_INSERTCOLUMN;
4830 	alias LVM_GETITEMTEXTA LVM_GETITEMTEXT;
4831 	alias LVM_SETITEMTEXTA LVM_SETITEMTEXT;
4832 	alias LVM_GETISEARCHSTRINGA LVM_GETISEARCHSTRING;
4833 	alias LVN_BEGINLABELEDITA LVN_BEGINLABELEDIT;
4834 	alias LVN_ENDLABELEDITA LVN_ENDLABELEDIT;
4835 	alias LVN_GETDISPINFOA LVN_GETDISPINFO;
4836 	alias LVN_SETDISPINFOA LVN_SETDISPINFO;
4837 
4838 	static if (_WIN32_IE >= 0x400) {
4839 		alias LVN_GETINFOTIPA LVN_GETINFOTIP;
4840 		alias NMLVGETINFOTIPA NMLVGETINFOTIP;
4841 		alias LPNMLVGETINFOTIPA LPNMLVGETINFOTIP;
4842 	}
4843 
4844 	alias LV_DISPINFOA LV_DISPINFO;
4845 	alias NMLVDISPINFOA NMLVDISPINFO;
4846 	alias LPNMLVDISPINFOA LPNMLVDISPINFO;
4847 	alias TVM_INSERTITEMA TVM_INSERTITEM;
4848 	alias TVM_GETITEMA TVM_GETITEM;
4849 	alias TVM_SETITEMA TVM_SETITEM;
4850 	alias TVM_EDITLABELA TVM_EDITLABEL;
4851 	alias TVM_GETISEARCHSTRINGA TVM_GETISEARCHSTRING;
4852 	alias NMTVDISPINFOA TV_DISPINFO;
4853 	alias NMTVDISPINFOA NMTVDISPINFO;
4854 	alias LPNMTVDISPINFOA LPNMTVDISPINFO;
4855 
4856 	static if (_WIN32_IE >= 0x400) {
4857 		alias NMTVGETINFOTIPA NMTVGETINFOTIP;
4858 		alias LPNMTVGETINFOTIPA LPNMTVGETINFOTIP;
4859 		alias TVN_GETINFOTIPA TVN_GETINFOTIP;
4860 	}
4861 
4862 	alias TVN_SELCHANGINGA TVN_SELCHANGING;
4863 	alias TVN_SELCHANGEDA TVN_SELCHANGED;
4864 	alias TVN_GETDISPINFOA TVN_GETDISPINFO;
4865 	alias TVN_SETDISPINFOA TVN_SETDISPINFO;
4866 	alias TVN_ITEMEXPANDINGA TVN_ITEMEXPANDING;
4867 	alias TVN_ITEMEXPANDEDA TVN_ITEMEXPANDED;
4868 	alias TVN_BEGINDRAGA TVN_BEGINDRAG;
4869 	alias TVN_BEGINRDRAGA TVN_BEGINRDRAG;
4870 	alias TVN_DELETEITEMA TVN_DELETEITEM;
4871 	alias TVN_BEGINLABELEDITA TVN_BEGINLABELEDIT;
4872 	alias TVN_ENDLABELEDITA TVN_ENDLABELEDIT;
4873 	alias TC_ITEMHEADERA TC_ITEMHEADER;
4874 	alias TC_ITEMA TC_ITEM;
4875 	alias TCITEMA TCITEM;
4876 	alias LPTCITEMA LPTCITEM;
4877 	alias TCM_GETITEMA TCM_GETITEM;
4878 	alias TCM_SETITEMA TCM_SETITEM;
4879 	alias TCM_INSERTITEMA TCM_INSERTITEM;
4880 	alias CreateStatusWindowA CreateStatusWindow;
4881 	alias DrawStatusTextA DrawStatusText;
4882 	alias ImageList_LoadImageA ImageList_LoadImage;
4883 	alias DTM_SETFORMATA DTM_SETFORMAT;
4884 	alias DTN_USERSTRINGA DTN_USERSTRING;
4885 	alias DTN_WMKEYDOWNA DTN_WMKEYDOWN;
4886 	alias DTN_FORMATA DTN_FORMAT;
4887 	alias DTN_FORMATQUERYA DTN_FORMATQUERY;
4888 	alias REBARBANDINFOA REBARBANDINFO;
4889 	alias REBARBANDINFOA* LPREBARBANDINFO;
4890 	alias LPCREBARBANDINFOA LPCREBARBANDINFO;
4891 	alias REBARBANDINFOA_V3_SIZE REBARBANDINFO_V3_SIZE;
4892 	alias RB_INSERTBANDA RB_INSERTBAND;
4893 	alias RB_SETBANDINFOA RB_SETBANDINFO;
4894 }
4895 
4896 
4897 alias INT function(PVOID, PVOID) PFNDPAENUMCALLBACK;
4898 alias INT function(PVOID, PVOID) PFNDSAENUMCALLBACK;
4899 alias INT function(PVOID, PVOID, LPARAM) PFNDPACOMPARE;
4900 
4901 static if (_WIN32_WINNT >= 0x501) {
4902 	extern (Windows)
4903 	alias LRESULT function(HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR)
4904 	  SUBCLASSPROC;
4905 
4906 	struct LITEM {
4907 		UINT mask;
4908 		int  iLink;
4909 		UINT state;
4910 		UINT stateMask;
4911 		WCHAR[MAX_LINKID_TEXT]  szID;
4912 		WCHAR[L_MAX_URL_LENGTH] szUrl;
4913 	}
4914 	alias LITEM* PLITEM;
4915 
4916 	struct LHITTESTINFO {
4917 		POINT pt;
4918 		LITEM item;
4919 	}
4920 	alias LHITTESTINFO* PLHITTESTINFO;
4921 
4922 	struct NMLINK {
4923 		NMHDR hdr;
4924 		LITEM item;
4925 	}
4926 	alias NMLINK* PNMLINK;
4927 }
4928 
4929 uint INDEXTOOVERLAYMASK(uint i) { return i << 8; }
4930 uint INDEXTOSTATEIMAGEMASK(uint i) { return i << 12; }
4931 
4932 template HANDLE_WM_NOTIFY(R) {
4933 	R HANDLE_WM_NOTIFY(HWND hwnd, WPARAM wParam, LPARAM lParam,
4934 		  R function(HWND, int, NMHDR*) nothrow fn) {
4935 		return fn(hwnd, wParam, cast(NMHDR*) lParam);
4936 	}
4937 }
4938 int FORWARD_WM_NOTIFY(HWND hwnd, int idFrom, NMHDR* pnmhdr,
4939 	 int function(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) nothrow fn) {
4940 	return fn(hwnd, WM_NOTIFY, idFrom, cast(LPARAM) pnmhdr);
4941 }
4942 
4943 //#define CCSIZEOF_STRUCT(s, m) (((int)((PBYTE)(&((s*)0)->m)-((PBYTE)((s*)0))))+sizeof(((s*)0)->m))
4944 
4945 LPARAM MAKEIPADDRESS(ubyte b1, ubyte b2, ubyte b3, ubyte b4) {
4946 	return (cast(DWORD) b1 << 24)
4947 	     | (cast(DWORD) b2 << 16)
4948 	     | (cast(DWORD) b3 << 8)
4949 	     | (cast(DWORD) b4);
4950 }
4951 
4952 LPARAM MAKEIPRANGE(ubyte low, ubyte high) {
4953 	return (cast(int) high << 8) | low;
4954 }
4955 
4956 ubyte FIRST_IPADDRESS(LPARAM x) {
4957 	return cast(ubyte) (x >> 24);
4958 }
4959 
4960 ubyte SECOND_IPADDRESS(LPARAM x) {
4961 	return cast(ubyte) (x >> 16);
4962 }
4963 
4964 ubyte THIRD_IPADDRESS(LPARAM x) {
4965 	return cast(ubyte) (x >> 8);
4966 }
4967 
4968 ubyte FOURTH_IPADDRESS(LPARAM x) {
4969 	return cast(ubyte) x;
4970 }
4971 
4972 HWND Animate_Create(HWND hwndP, UINT id, DWORD dwStyle,
4973 	  HINSTANCE hInstance) {
4974 	return CreateWindow(cast(TCHAR*)ANIMATE_CLASS.ptr, null, dwStyle, 0, 0, 0, 0, hwndP,
4975 	  cast(HMENU) id, hInstance, null);
4976 }
4977 
4978 BOOL Animate_Open(HWND hwnd, LPTSTR szName) {
4979 	return cast(BOOL) SendMessage(hwnd, ACM_OPEN, 0, cast(LPARAM) szName);
4980 }
4981 
4982 BOOL Animate_OpenEx(HWND hwnd, HINSTANCE hInst, LPTSTR szName) {
4983 	return cast(BOOL) SendMessage(hwnd, ACM_OPEN, cast(WPARAM) hInst,
4984 	  cast(LPARAM) szName);
4985 }
4986 
4987 BOOL Animate_Play(HWND hwnd, int from, int to, int rep) {
4988 	return cast(BOOL) SendMessage(hwnd, ACM_PLAY, rep,
4989 	  MAKELONG(cast(ushort) from, cast(ushort) to));
4990 }
4991 
4992 BOOL Animate_Stop(HWND hwnd) {
4993 	return cast(BOOL) SendMessage(hwnd, ACM_STOP, 0, 0);
4994 }
4995 
4996 BOOL Animate_Close(HWND hwnd) {
4997 	return Animate_Open(hwnd, null);
4998 }
4999 
5000 BOOL Animate_Seek(HWND hwnd, int frame) {
5001 	return Animate_Play(hwnd, frame, frame, 1);
5002 }
5003 
5004 extern (Windows) {
5005 	HBITMAP CreateMappedBitmap(HINSTANCE, INT_PTR, UINT, LPCOLORMAP, int);
5006 	HWND CreateStatusWindowA(LONG, LPCSTR, HWND, UINT);
5007 	HWND CreateStatusWindowW(LONG, LPCWSTR, HWND, UINT);
5008 	HWND CreateToolbarEx(HWND, DWORD, UINT, int, HINSTANCE, UINT_PTR,
5009 	  LPCTBBUTTON, int, int, int, int, int, UINT);
5010 	HWND CreateUpDownControl(DWORD, int, int, int, int, HWND, int, HINSTANCE,
5011 	  HWND, int, int, int);
5012 }
5013 
5014 HWND DateTime_GetMonthCal(HWND hwnd) {
5015 	return cast(HWND) SendMessage(hwnd, DTM_GETMONTHCAL, 0, 0);
5016 }
5017 
5018 COLORREF DateTime_GetMonthCalColor(HWND hwnd, int iColor) {
5019 	return cast(COLORREF) SendMessage(hwnd, DTM_GETMCCOLOR, iColor, 0);
5020 }
5021 
5022 HFONT DateTime_GetMonthCalFont(HWND hwnd) {
5023 	return cast(HFONT) SendMessage(hwnd, DTM_GETMCFONT, 0, 0);
5024 }
5025 
5026 DWORD DateTime_GetRange(HWND hwnd, LPSYSTEMTIME lpSysTimeArray) {
5027 	return cast(DWORD) SendMessage(hwnd, DTM_GETRANGE, 0, cast(LPARAM) lpSysTimeArray);
5028 }
5029 
5030 DWORD DateTime_GetSystemtime(HWND hwnd, LPSYSTEMTIME lpSysTime) {
5031 	return cast(DWORD) SendMessage(hwnd, DTM_GETSYSTEMTIME, 0, cast(LPARAM) lpSysTime);
5032 }
5033 
5034 BOOL DateTime_SetFormat(HWND hwnd, LPCTSTR lpszFormat) {
5035 	return cast(BOOL) SendMessage(hwnd, DTM_SETFORMAT, 0,
5036 	  cast(LPARAM) lpszFormat);
5037 }
5038 
5039 LRESULT DateTime_SetMonthCalColor(HWND hwnd, int iColor, COLORREF clr) {
5040 	return SendMessage(hwnd, DTM_SETMCCOLOR, cast(WPARAM) iColor,
5041 	  cast(LPARAM) clr);
5042 }
5043 
5044 void DateTime_SetMonthCalFont(HWND hwnd, HFONT hfont, BOOL fRedraw) {
5045 	SendMessage(hwnd, DTM_SETMCFONT, cast(WPARAM) hfont, fRedraw);
5046 }
5047 
5048 BOOL DateTime_SetRange(HWND hwnd, WPARAM flags, LPSYSTEMTIME lpSysTimeArray) {
5049 	return cast(BOOL) SendMessage(hwnd, DTM_SETRANGE, flags,
5050 	  cast(LPARAM) lpSysTimeArray);
5051 }
5052 
5053 BOOL DateTime_SetSystemtime(HWND hwnd, WPARAM flag, LPSYSTEMTIME lpSysTime) {
5054 	return cast(BOOL) SendMessage(hwnd, DTM_SETSYSTEMTIME, flag,
5055 	  cast(LPARAM) lpSysTime);
5056 }
5057 
5058 extern (Windows) {
5059 	void DrawInsert(HWND, HWND, int);
5060 	void DrawStatusTextA(HDC, LPRECT, LPCSTR, UINT);
5061 	void DrawStatusTextW(HDC, LPRECT, LPCWSTR, UINT);
5062 	void GetEffectiveClientRect(HWND, LPRECT, LPINT);
5063 }
5064 
5065 int Header_GetItemCount(HWND w) {
5066 	return cast(int) SendMessage(w, HDM_GETITEMCOUNT, 0, 0);
5067 }
5068 
5069 int Header_InsertItem(HWND w, int i, const(HDITEM)* phdi) {
5070 	return cast(int) SendMessage(w, HDM_INSERTITEM, i, cast(LPARAM) phdi);
5071 }
5072 
5073 BOOL Header_DeleteItem(HWND w, int i) {
5074 	return cast(BOOL) SendMessage(w, HDM_DELETEITEM, i, 0);
5075 }
5076 
5077 BOOL Header_GetItem(HWND w, int i, LPHDITEM phdi) {
5078 	return cast(BOOL) SendMessage(w, HDM_GETITEM, i, cast(LPARAM) phdi);
5079 }
5080 
5081 BOOL Header_SetItem(HWND w, int i, const(HDITEM)* phdi) {
5082 	return cast(BOOL) SendMessage(w, HDM_SETITEM, i, cast(LPARAM) phdi);
5083 }
5084 
5085 BOOL Header_Layout(HWND w, LPHDLAYOUT playout) {
5086 	return cast(BOOL) SendMessage(w, HDM_LAYOUT, 0, cast(LPARAM) playout);
5087 }
5088 
5089 static if (_WIN32_IE >= 0x300) {
5090 	int Header_OrderToIndex(HWND w, int i) {
5091 		return cast(int) SendMessage(w, HDM_ORDERTOINDEX, i, 0);
5092 	}
5093 
5094 	BOOL Header_GetItemRect(HWND w, int i, RECT* r) {
5095 		return cast(BOOL) SendMessage(w, HDM_GETITEMRECT, i, cast(LPARAM) r);
5096 	}
5097 
5098 	BOOL Header_GetOrderArray(HWND w, int iSize, LPINT lpiArray) {
5099 		return cast(BOOL) SendMessage(w, HDM_GETORDERARRAY, iSize,
5100 		  cast(LPARAM) lpiArray);
5101 	}
5102 
5103 	BOOL Header_SetOrderArray(HWND w, int iSize, LPINT lpiArray) {
5104 		return cast(BOOL) SendMessage(w, HDM_SETORDERARRAY, iSize,
5105 		  cast(LPARAM) lpiArray);
5106 	}
5107 
5108 	HIMAGELIST Header_CreateDragImage(HWND w, int i) {
5109 		return cast(HIMAGELIST) SendMessage(w, HDM_CREATEDRAGIMAGE, i, 0);
5110 	}
5111 
5112 	HIMAGELIST Header_SetImageList(HWND w, HIMAGELIST himl) {
5113 		return cast(HIMAGELIST) SendMessage(w, HDM_SETIMAGELIST, 0,
5114 		  cast(LPARAM) himl);
5115 	}
5116 
5117 	HIMAGELIST Header_GetImageList(HWND w) {
5118 		return cast(HIMAGELIST) SendMessage(w, HDM_GETIMAGELIST, 0, 0);
5119 	}
5120 }
5121 
5122 static if (_WIN32_IE >= 0x400) {
5123 	BOOL Header_GetUnicodeFormat(HWND w) {
5124 		return cast(BOOL) SendMessage(w, HDM_GETUNICODEFORMAT, 0, 0);
5125 	}
5126 
5127 	BOOL Header_SetUnicodeFormat(HWND w, BOOL fUnicode) {
5128 		return cast(BOOL) SendMessage(w, HDM_SETUNICODEFORMAT, fUnicode, 0);
5129 	}
5130 }
5131 
5132 extern (Windows) {
5133 	HDSA DSA_Create(INT, INT);
5134 	BOOL DSA_Destroy(HDSA);
5135 	VOID DSA_DestroyCallback(HDSA, PFNDSAENUMCALLBACK, PVOID);
5136 	PVOID DSA_GetItemPtr(HDSA, INT);
5137 	INT DSA_InsertItem(HDSA, INT, PVOID);
5138 	HDPA DPA_Create(INT);
5139 	BOOL DPA_Destroy(HDPA);
5140 	PVOID DPA_DeletePtr(HDPA, INT);
5141 	BOOL DPA_DeleteAllPtrs(HDPA);
5142 	VOID DPA_EnumCallback(HDPA, PFNDPAENUMCALLBACK, PVOID);
5143 	VOID DPA_DestroyCallback(HDPA, PFNDPAENUMCALLBACK, PVOID);
5144 	BOOL DPA_SetPtr(HDPA, INT, PVOID);
5145 	INT DPA_InsertPtr(HDPA, INT, PVOID);
5146 	PVOID DPA_GetPtr(HDPA, INT_PTR);
5147 	BOOL DPA_Sort(HDPA, PFNDPACOMPARE, LPARAM);
5148 	INT DPA_Search(HDPA, PVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
5149 	BOOL Str_SetPtrW(LPWSTR*, LPCWSTR);
5150 
5151 	static if (_WIN32_IE >= 0x400) {
5152 		BOOL FlatSB_EnableScrollBar(HWND, INT, UINT);
5153 		BOOL FlatSB_ShowScrollBar(HWND, INT, BOOL);
5154 		BOOL FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
5155 		BOOL FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
5156 		INT FlatSB_GetScrollPos(HWND, INT);
5157 		BOOL FlatSB_GetScrollProp(HWND, INT, LPINT);
5158 		version (Win64) {
5159 			BOOL FlatSB_GetScrollPropPtr(HWND, INT, PINT_PTR);
5160 		} else {
5161 			alias FlatSB_GetScrollProp FlatSB_GetScrollPropPtr;
5162 		}
5163 		INT FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
5164 		INT FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
5165 		INT FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
5166 		BOOL FlatSB_SetScrollProp(HWND, UINT, INT_PTR, BOOL);
5167 		alias FlatSB_SetScrollProp FlatSB_SetScrollPropPtr;
5168 		BOOL InitializeFlatSB(HWND);
5169 		HRESULT UninitializeFlatSB(HWND);
5170 	}
5171 
5172 	static if (_WIN32_WINNT >= 0x501) {
5173 		BOOL SetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
5174 		BOOL GetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR*);
5175 		BOOL RemoveWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR);
5176 		LRESULT DefSubclassProc(HWND, UINT, WPARAM, LPARAM);
5177 		INT DrawShadowText(HDC, LPCWSTR, UINT, RECT*, DWORD, COLORREF,
5178 		  COLORREF, INT, INT);
5179 	}
5180 
5181 	int ImageList_Add(HIMAGELIST, HBITMAP, HBITMAP);
5182 	int ImageList_AddMasked(HIMAGELIST, HBITMAP, COLORREF);
5183 	BOOL ImageList_BeginDrag(HIMAGELIST, int, int, int);
5184 	HIMAGELIST ImageList_Create(int, int, UINT, int, int);
5185 	BOOL ImageList_Destroy(HIMAGELIST);
5186 	BOOL ImageList_DragEnter(HWND, int, int);
5187 	BOOL ImageList_DragLeave(HWND);
5188 	BOOL ImageList_DragMove(int, int);
5189 	BOOL ImageList_DragShowNolock(BOOL);
5190 	BOOL ImageList_Draw(HIMAGELIST, int, HDC, int, int, UINT);
5191 	BOOL ImageList_DrawEx(HIMAGELIST, int, HDC, int, int, int, int, COLORREF,
5192 	  COLORREF, UINT);
5193 	void ImageList_EndDrag();
5194 	COLORREF ImageList_GetBkColor(HIMAGELIST);
5195 	HIMAGELIST ImageList_GetDragImage(LPPOINT, LPPOINT);
5196 	HICON ImageList_GetIcon(HIMAGELIST, int, UINT);
5197 	BOOL ImageList_GetIconSize(HIMAGELIST, int*, int*);
5198 	int ImageList_GetImageCount(HIMAGELIST);
5199 	BOOL ImageList_GetImageInfo(HIMAGELIST, int, IMAGEINFO*);
5200 	HIMAGELIST ImageList_LoadImageA(HINSTANCE, LPCSTR, int, int, COLORREF,
5201 	  UINT, UINT);
5202 	HIMAGELIST ImageList_LoadImageW(HINSTANCE, LPCWSTR, int, int, COLORREF,
5203 	  UINT, UINT);
5204 	HIMAGELIST ImageList_Merge(HIMAGELIST, int, HIMAGELIST, int, int, int);
5205 	BOOL ImageList_Remove(HIMAGELIST, int);
5206 	BOOL ImageList_Replace(HIMAGELIST, int, HBITMAP, HBITMAP);
5207 	int ImageList_ReplaceIcon(HIMAGELIST, int, HICON);
5208 	COLORREF ImageList_SetBkColor(HIMAGELIST, COLORREF);
5209 	BOOL ImageList_SetDragCursorImage(HIMAGELIST, int, int, int);
5210 	BOOL ImageList_SetIconSize(HIMAGELIST, int, int);
5211 	BOOL ImageList_SetOverlayImage(HIMAGELIST, int, int);
5212 
5213 	//#ifdef _OBJIDL_H
5214 	HIMAGELIST ImageList_Read(LPSTREAM);
5215 	BOOL ImageList_Write(HIMAGELIST, LPSTREAM);
5216 	//#endif
5217 
5218 	static if (_WIN32_IE >= 0x400) {
5219 		HIMAGELIST ImageList_Duplicate(HIMAGELIST himl);
5220 	}
5221 
5222 	void InitCommonControls();
5223 
5224 	static if (_WIN32_IE >= 0x300) {
5225 		BOOL InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
5226 	}
5227 
5228 	int LBItemFromPt(HWND, POINT, BOOL);
5229 }
5230 
5231 int ImageList_AddIcon(HIMAGELIST himl, HICON hicon) {
5232 	return ImageList_ReplaceIcon(himl, -1, hicon);
5233 }
5234 
5235 HICON ImageList_ExtractIcon(HINSTANCE hi, HIMAGELIST himl, int i) {
5236 	return ImageList_GetIcon(himl, i, 0);
5237 }
5238 
5239 HIMAGELIST ImageList_LoadBitmap(HINSTANCE hi, LPCTSTR lpbmp, int cx,
5240 	  int cGrow, COLORREF crMask) {
5241 	return ImageList_LoadImage(hi, lpbmp, cx, cGrow, crMask, IMAGE_BITMAP, 0);
5242 }
5243 
5244 BOOL ImageList_RemoveAll(HIMAGELIST himl) {
5245 	return ImageList_Remove(himl, -1);
5246 }
5247 
5248 COLORREF ListView_GetBkColor(HWND w) {
5249 	return cast(COLORREF) SendMessage(w, LVM_GETBKCOLOR, 0, 0);
5250 }
5251 
5252 HIMAGELIST ListView_GetImageList(HWND w, int i) {
5253 	return cast(HIMAGELIST) SendMessage(w, LVM_GETIMAGELIST, i, 0);
5254 }
5255 
5256 int ListView_GetItemCount(HWND w) {
5257 	return cast(int) SendMessage(w, LVM_GETITEMCOUNT, 0, 0);
5258 }
5259 
5260 BOOL ListView_GetItem(HWND w, LPLVITEM pitem) {
5261 	return cast(BOOL) SendMessage(w, LVM_GETITEM, 0, cast(LPARAM) pitem);
5262 }
5263 
5264 BOOL ListView_SetBkColor(HWND w, COLORREF c) {
5265 	return cast(BOOL) SendMessage(w, LVM_SETBKCOLOR, 0, cast(LPARAM) c);
5266 }
5267 
5268 HIMAGELIST ListView_SetImageList(HWND w, HIMAGELIST h, int i) {
5269 	return cast(HIMAGELIST) SendMessage(w, LVM_SETIMAGELIST, i,
5270 	  cast(LPARAM) h);
5271 }
5272 
5273 BOOL ListView_SetItem(HWND w, const(LV_ITEM)* i) {
5274 	return cast(BOOL) SendMessage(w, LVM_SETITEM, 0, cast(LPARAM) i);
5275 }
5276 
5277 int ListView_InsertItem(HWND w, const(LV_ITEM)* i) {
5278 	return cast(int) SendMessage(w, LVM_INSERTITEM, 0, cast(LPARAM) i);
5279 }
5280 
5281 BOOL ListView_DeleteItem(HWND w, int i) {
5282 	return cast(BOOL) SendMessage(w, LVM_DELETEITEM, i, 0);
5283 }
5284 
5285 BOOL ListView_DeleteAllItems(HWND w) {
5286 	return cast(BOOL) SendMessage(w, LVM_DELETEALLITEMS, 0, 0);
5287 }
5288 
5289 UINT ListView_GetCallbackMask(HWND w) {
5290 	return cast(UINT) SendMessage(w, LVM_GETCALLBACKMASK, 0, 0);
5291 }
5292 
5293 BOOL ListView_SetCallbackMask(HWND w, UINT m) {
5294 	return cast(BOOL) SendMessage(w, LVM_SETCALLBACKMASK, m, 0);
5295 }
5296 
5297 int ListView_GetNextItem(HWND w, int i, UINT f) {
5298 	return cast(int) SendMessage(w, LVM_GETNEXTITEM, i, MAKELPARAM(cast(ushort)f, 0));
5299 }
5300 
5301 int ListView_FindItem(HWND w, int i, const(LV_FINDINFO)* p) {
5302 	return cast(int) SendMessage(w, LVM_FINDITEM, i, cast(LPARAM) p);
5303 }
5304 
5305 BOOL ListView_GetItemRect(HWND w, int i, LPRECT p, int c) {
5306 	if (p) p.left = c;
5307 	return cast(BOOL) SendMessage(w, LVM_GETITEMRECT, i, p ? cast(LPARAM) p : 0);
5308 }
5309 
5310 BOOL ListView_SetItemPosition(HWND w, int i, int x, int y) {
5311 	return cast(BOOL) SendMessage(w, LVM_SETITEMPOSITION, i, MAKELPARAM(cast(ushort)x, cast(ushort)y));
5312 }
5313 
5314 BOOL ListView_GetItemPosition(HWND w, int i, POINT* p) {
5315 	return cast(BOOL) SendMessage(w, LVM_GETITEMPOSITION, i, cast(LPARAM) p);
5316 }
5317 
5318 DWORD ListView_GetItemSpacing(HWND w, BOOL f) {
5319 	return cast(DWORD) SendMessage(w, LVM_GETITEMSPACING, f, 0);
5320 }
5321 
5322 int ListView_GetStringWidth(HWND w, LPCSTR s) {
5323 	return cast(int) SendMessage(w, LVM_GETSTRINGWIDTH, 0, cast(LPARAM) s);
5324 }
5325 
5326 int ListView_HitTest(HWND w, LPLVHITTESTINFO p) {
5327 	return cast(int) SendMessage(w, LVM_HITTEST, 0, cast(LPARAM) p);
5328 }
5329 
5330 BOOL ListView_EnsureVisible(HWND w, int i, BOOL f) {
5331 	return cast(BOOL) SendMessage(w, LVM_ENSUREVISIBLE, i, MAKELPARAM(cast(ushort)f, 0));
5332 }
5333 
5334 BOOL ListView_Scroll(HWND w, int dx, int dy) {
5335 	return cast(BOOL) SendMessage(w, LVM_SCROLL, dx, dy);
5336 }
5337 
5338 BOOL ListView_RedrawItems(HWND w, int f, int l) {
5339 	return cast(BOOL) SendMessage(w, LVM_REDRAWITEMS, f, l);
5340 }
5341 
5342 BOOL ListView_Arrange(HWND w, UINT c) {
5343 	return cast(BOOL) SendMessage(w, LVM_ARRANGE, c, 0);
5344 }
5345 
5346 HWND ListView_EditLabel(HWND w, int i) {
5347 	return cast(HWND) SendMessage(w, LVM_EDITLABEL, i, 0);
5348 }
5349 
5350 HWND ListView_GetEditControl(HWND w) {
5351 	return cast(HWND) SendMessage(w, LVM_GETEDITCONTROL, 0, 0);
5352 }
5353 
5354 BOOL ListView_GetColumn(HWND w, int i, LPLVCOLUMN p) {
5355 	return cast(BOOL) SendMessage(w, LVM_GETCOLUMN, i, cast(LPARAM) p);
5356 }
5357 
5358 BOOL ListView_SetColumn(HWND w, int i, const(LV_COLUMN)* p) {
5359 	return cast(BOOL) SendMessage(w, LVM_SETCOLUMN, i, cast(LPARAM) p);
5360 }
5361 
5362 int ListView_InsertColumn(HWND w, int i, const(LV_COLUMN)* p) {
5363 	return cast(int) SendMessage(w, LVM_INSERTCOLUMN, i, cast(LPARAM) p);
5364 }
5365 
5366 BOOL ListView_DeleteColumn(HWND w, int i) {
5367 	return cast(BOOL) SendMessage(w, LVM_DELETECOLUMN, i, 0);
5368 }
5369 
5370 int ListView_GetColumnWidth(HWND w, int i) {
5371 	return cast(int) SendMessage(w, LVM_GETCOLUMNWIDTH, i, 0);
5372 }
5373 
5374 BOOL ListView_SetColumnWidth(HWND w, int i, int x) {
5375 	return cast(BOOL) SendMessage(w, LVM_SETCOLUMNWIDTH, i, MAKELPARAM(cast(ushort)x, 0));
5376 }
5377 
5378 HIMAGELIST ListView_CreateDragImage(HWND w, int i, LPPOINT p) {
5379 	return cast(HIMAGELIST) SendMessage(w, LVM_CREATEDRAGIMAGE, i,
5380 	  cast(LPARAM) p);
5381 }
5382 
5383 BOOL ListView_GetViewRect(HWND w, RECT* p) {
5384 	return cast(BOOL) SendMessage(w, LVM_GETVIEWRECT, 0, cast(LPARAM) p);
5385 }
5386 
5387 COLORREF ListView_GetTextColor(HWND w) {
5388 	return cast(COLORREF) SendMessage(w, LVM_GETTEXTCOLOR, 0, 0);
5389 }
5390 
5391 BOOL ListView_SetTextColor(HWND w, COLORREF c) {
5392 	return cast(BOOL) SendMessage(w, LVM_SETTEXTCOLOR, 0, cast(LPARAM) c);
5393 }
5394 
5395 COLORREF ListView_GetTextBkColor(HWND w) {
5396 	return cast(COLORREF) SendMessage(w, LVM_GETTEXTBKCOLOR, 0, 0);
5397 }
5398 
5399 BOOL ListView_SetTextBkColor(HWND w, COLORREF c) {
5400 	return cast(BOOL) SendMessage(w, LVM_SETTEXTBKCOLOR, 0, cast(LPARAM) c);
5401 }
5402 
5403 int ListView_GetTopIndex(HWND w) {
5404 	return cast(int) SendMessage(w, LVM_GETTOPINDEX, 0, 0);
5405 }
5406 
5407 int ListView_GetCountPerPage(HWND w) {
5408 	return cast(int) SendMessage(w, LVM_GETCOUNTPERPAGE, 0, 0);
5409 }
5410 
5411 BOOL ListView_GetOrigin(HWND w, LPPOINT p) {
5412 	return cast(BOOL) SendMessage(w, LVM_GETORIGIN, 0, cast(LPARAM) p);
5413 }
5414 
5415 BOOL ListView_Update(HWND w, WPARAM i) {
5416 	return cast(BOOL) SendMessage(w, LVM_UPDATE, i, 0);
5417 }
5418 
5419 void ListView_SetItemState(HWND w, int i, UINT d, UINT m) {
5420 	LV_ITEM _lvi;
5421 	_lvi.stateMask = m;
5422 	_lvi.state = d;
5423 	SendMessage(w, LVM_SETITEMSTATE, i, cast(LPARAM) &_lvi);
5424 }
5425 
5426 UINT ListView_GetItemState(HWND w, int i, UINT m) {
5427 	return cast(UINT) SendMessage(w, LVM_GETITEMSTATE, i, m);
5428 }
5429 
5430 void ListView_GetItemText(HWND w, int i, int iS, LPTSTR s, int n) {
5431 	LV_ITEM _lvi;
5432 	_lvi.iSubItem = iS;
5433 	_lvi.cchTextMax = n;
5434 	_lvi.pszText = s;
5435 	SendMessage(w, LVM_GETITEMTEXT, i, cast(LPARAM) &_lvi);
5436 }
5437 
5438 void ListView_SetItemText(HWND w, int i, int iS, LPTSTR s) {
5439 	LV_ITEM _lvi;
5440 	_lvi.iSubItem = iS;
5441 	_lvi.pszText = s;
5442 	SendMessage(w, LVM_SETITEMTEXT, i, cast(LPARAM) &_lvi);
5443 }
5444 
5445 void ListView_SetItemCount(HWND w, int n) {
5446 	SendMessage(w, LVM_SETITEMCOUNT, n, 0);
5447 }
5448 
5449 BOOL ListView_SortItems(HWND w, PFNLVCOMPARE f, LPARAM l) {
5450 	return cast(BOOL) SendMessage(w, LVM_SORTITEMS, l, cast(LPARAM) f);
5451 }
5452 
5453 void ListView_SetItemPosition32(HWND w, int i, int x, int y) {
5454 	POINT p;
5455 	p.x = x;
5456 	p.y = y;
5457 	SendMessage(w, LVM_SETITEMPOSITION32, i, cast(LPARAM) &p);
5458 }
5459 
5460 UINT ListView_GetSelectedCount(HWND w) {
5461 	return cast(UINT) SendMessage(w, LVM_GETSELECTEDCOUNT, 0, 0);
5462 }
5463 
5464 UINT ListView_GetCheckState(HWND w, UINT i) {
5465 	return ((cast(UINT) SendMessage(w, LVM_GETITEMSTATE, i, LVIS_STATEIMAGEMASK)) >> 12) - 1;
5466 }
5467 
5468 void ListView_SetCheckState(HWND w, UINT i, BOOL f) {
5469 	ListView_SetItemState(w, i, INDEXTOSTATEIMAGEMASK(f ? 2 : 1),
5470 	  LVIS_STATEIMAGEMASK);
5471 }
5472 
5473 BOOL ListView_GetISearchString(HWND w, LPSTR lpsz) {
5474 	return cast(BOOL) SendMessage(w, LVM_GETISEARCHSTRING, 0,
5475 	  cast(LPARAM) lpsz);
5476 }
5477 
5478 void ListView_CancelEditLabel(HWND w) {
5479 	SendMessage(w, LVM_CANCELEDITLABEL, 0, 0);
5480 }
5481 
5482 int ListView_EnableGroupView(HWND w, BOOL i) {
5483 	return cast(int) SendMessage(w, LVM_ENABLEGROUPVIEW, i, 0);
5484 }
5485 
5486 static if (_WIN32_WINNT >= 0x500 || _WIN32_IE >= 0x500) {
5487 	BOOL ListView_SortItemsEx(HWND w, PFNLVCOMPARE c, LPARAM p) {
5488 		return cast(BOOL) SendMessage(w, LVM_SORTITEMSEX, cast(WPARAM) p, cast(LPARAM)c);
5489 	}
5490 }
5491 
5492 static if (_WIN32_WINNT >= 0x501) {
5493 	int ListView_GetGroupInfo(HWND w, int i, PLVGROUP p) {
5494 		return cast(int) SendMessage(w, LVM_GETGROUPINFO, i, cast(LPARAM) p);
5495 	}
5496 
5497 	void ListView_GetGroupMetrics(HWND w, PLVGROUPMETRICS p) {
5498 		SendMessage(w, LVM_GETGROUPMETRICS, 0, cast(LPARAM) p);
5499 	}
5500 
5501 	BOOL ListView_GetInsertMark(HWND w, PLVINSERTMARK p) {
5502 		return cast(BOOL) SendMessage(w, LVM_GETINSERTMARK, 0, cast(LPARAM) p);
5503 	}
5504 
5505 	COLORREF ListView_GetInsertMarkColor(HWND w) {
5506 		return cast(COLORREF) SendMessage(w, LVM_GETINSERTMARKCOLOR, 0, 0);
5507 	}
5508 
5509 	int ListView_GetInsertMarkRect(HWND w, LPRECT p) {
5510 		return cast(int) SendMessage(w, LVM_GETINSERTMARKRECT, 0, cast(LPARAM) p);
5511 	}
5512 
5513 	COLORREF ListView_GetOutlineColor(HWND w) {
5514 		return cast(COLORREF) SendMessage(w, LVM_GETOUTLINECOLOR, 0, 0);
5515 	}
5516 
5517 	UINT ListView_GetSelectedColumn(HWND w) {
5518 		return cast(UINT) SendMessage(w, LVM_GETSELECTEDCOLUMN, 0, 0);
5519 	}
5520 
5521 	void ListView_GetTileInfo(HWND w, PLVTILEINFO p) {
5522 		SendMessage(w, LVM_GETTILEINFO, 0, cast(LPARAM) p);
5523 	}
5524 
5525 	void ListView_GetTileViewInfo(HWND w, PLVTILEVIEWINFO p) {
5526 		SendMessage(w, LVM_GETTILEVIEWINFO, 0, cast(LPARAM) p);
5527 	}
5528 
5529 	DWORD ListView_GetView(HWND w) {
5530 		return cast(DWORD) SendMessage(w, LVM_GETVIEW, 0, 0);
5531 	}
5532 
5533 	BOOL ListView_HasGroup(HWND w, int i) {
5534 		return cast(BOOL) SendMessage(w, LVM_HASGROUP, i, 0);
5535 	}
5536 
5537 	int ListView_InsertGroup(HWND w, int i, PLVGROUP p) {
5538 		return cast(int) SendMessage(w, LVM_INSERTGROUP, i, cast(LPARAM) p);
5539 	}
5540 
5541 	void ListView_InsertGroupSorted(HWND w, PLVINSERTGROUPSORTED p) {
5542 		SendMessage(w, LVM_INSERTGROUPSORTED, cast(WPARAM) p, 0);
5543 	}
5544 
5545 	BOOL ListView_InsertMarkHitTest(HWND w, LPPOINT p, PLVINSERTMARK t) {
5546 		return cast(BOOL) SendMessage(w, LVM_INSERTMARKHITTEST, cast(WPARAM) p, cast(LPARAM) t);
5547 	}
5548 
5549 	BOOL ListView_IsGroupViewEnabled(HWND w) {
5550 		return cast(BOOL) SendMessage(w, LVM_ISGROUPVIEWENABLED, 0, 0);
5551 	}
5552 
5553 	UINT ListView_MapIDToIndex(HWND w, UINT i) {
5554 		return cast(UINT) SendMessage(w, LVM_MAPIDTOINDEX, i, 0);
5555 	}
5556 
5557 	/*	??? MSDN documents this as "Not implemented", except in relation to
5558 	 *	Windows CE/Mobile.
5559 	 */
5560 	void ListView_MoveGroup(HWND w, int i, int t) {
5561 		SendMessage(w, LVM_MOVEGROUP, i, t);
5562 	}
5563 
5564 	void ListView_RemoveAllGroups(HWND w) {
5565 		SendMessage(w, LVM_REMOVEALLGROUPS, 0, 0);
5566 	}
5567 
5568 	int ListView_RemoveGroup(HWND w, int i) {
5569 		return cast(int) SendMessage(w, LVM_REMOVEGROUP, i, 0);
5570 	}
5571 
5572 	int ListView_SetGroupInfo(HWND w, int i, PLVGROUP p) {
5573 		return cast(int) SendMessage(w, LVM_SETGROUPINFO, i, cast(LPARAM) p);
5574 	}
5575 
5576 	void ListView_SetGroupMetrics(HWND w, PLVGROUPMETRICS p) {
5577 		SendMessage(w, LVM_SETGROUPMETRICS, 0, cast(LPARAM) p);
5578 	}
5579 
5580 	BOOL ListView_SetInfoTip(HWND w, PLVSETINFOTIP p) {
5581 		return cast(BOOL) SendMessage(w, LVM_SETINFOTIP, 0, cast(LPARAM) p);
5582 	}
5583 
5584 	BOOL ListView_SetInsertMark(HWND w, PLVINSERTMARK p) {
5585 		return cast(BOOL) SendMessage(w, LVM_SETINSERTMARK, 0, cast(LPARAM) p);
5586 	}
5587 
5588 	COLORREF ListView_SetInsertMarkColor(HWND w, COLORREF c) {
5589 		return cast(COLORREF) SendMessage(w, LVM_SETINSERTMARKCOLOR, 0, c);
5590 	}
5591 
5592 	COLORREF ListView_SetOutlineColor(HWND w, COLORREF c) {
5593 		return cast(COLORREF) SendMessage(w, LVM_SETOUTLINECOLOR, 0, c);
5594 	}
5595 
5596 	void ListView_SetSelectedColumn(HWND w, int i) {
5597 		SendMessage(w, LVM_SETSELECTEDCOLUMN, i, 0);
5598 	}
5599 
5600 	BOOL ListView_SetTileInfo(HWND w, PLVTILEINFO p) {
5601 		return cast(BOOL) SendMessage(w, LVM_SETTILEINFO, 0, cast(LPARAM) p);
5602 	}
5603 
5604 	BOOL ListView_SetTileViewInfo(HWND w, PLVTILEVIEWINFO p) {
5605 		return cast(BOOL) SendMessage(w, LVM_SETTILEVIEWINFO, 0, cast(LPARAM) p);
5606 	}
5607 
5608 	int ListView_SetView(HWND w, DWORD i) {
5609 		return cast(int) SendMessage(w, LVM_SETVIEW, i, 0);
5610 	}
5611 
5612 	int ListView_SortGroups(HWND w, PFNLVGROUPCOMPARE c, LPVOID p) {
5613 		return cast(int) SendMessage(w, LVM_SORTGROUPS, cast(WPARAM) c, cast(LPARAM) p);
5614 	}
5615 }
5616 
5617 static if (_WIN32_WINNT >= 0x501) {
5618 	enum {
5619 		CBM_FIRST        = 0x1700,
5620 		CB_SETMINVISIBLE = CBM_FIRST + 1,
5621 		CB_GETMINVISIBLE = CBM_FIRST + 2,
5622         CB_SETCUEBANNER = CBM_FIRST + 3,
5623         CB_GETCUEBANNER = CBM_FIRST + 4,
5624 	}
5625 
5626 	BOOL ComboBox_SetMinVisible(HWND w, INT i) {
5627 		return cast(BOOL) SendMessage(w, CB_SETMINVISIBLE, cast(WPARAM) i, 0);
5628 	}
5629 
5630 	int ComboBox_GetMinVisible(HWND w) {
5631 		return cast(int) SendMessage(w, CB_GETMINVISIBLE, 0, 0);
5632 	}
5633 }
5634 
5635 extern (Windows) BOOL MakeDragList(HWND);
5636 extern (Windows) void MenuHelp(UINT, WPARAM, LPARAM, HMENU, HINSTANCE, HWND,
5637   PUINT);
5638 
5639 COLORREF MonthCal_GetColor(HWND hwnd, INT icolor) {
5640 	return cast(COLORREF) SendMessage(hwnd, MCM_GETCOLOR,
5641 	  cast(WPARAM) icolor, 0);
5642 }
5643 
5644 BOOL MonthCal_GetCurSel(HWND hwnd, LPSYSTEMTIME lpsystime) {
5645 	return cast(BOOL) SendMessage(hwnd, MCM_GETCURSEL, 0,
5646 	  cast(LPARAM) lpsystime);
5647 }
5648 
5649 DWORD MonthCal_GetFirstDayOfWeek(HWND hwnd) {
5650 	return cast(DWORD) SendMessage(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0);
5651 }
5652 
5653 DWORD MonthCal_GetMaxSelCount(HWND hwnd) {
5654 	return cast(DWORD) SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
5655 }
5656 
5657 DWORD MonthCal_GetMaxTodayWidth(HWND hwnd) {
5658 	return cast(DWORD) SendMessage(hwnd, MCM_GETMAXTODAYWIDTH, 0, 0);
5659 }
5660 
5661 BOOL MonthCal_GetMinReqRect(HWND hwnd, LPRECT lpRectInfo) {
5662 	return cast(BOOL) SendMessage(hwnd, MCM_GETMINREQRECT, 0,
5663 	  cast(LPARAM) lpRectInfo);
5664 }
5665 
5666 INT MonthCal_GetMonthDelta(HWND hwnd) {
5667 	return cast(INT) SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0);
5668 }
5669 
5670 INT MonthCal_GetMonthRange(HWND hwnd, DWORD flag, LPSYSTEMTIME systimearray) {
5671 	return cast(INT) SendMessage(hwnd, MCM_GETMONTHRANGE, cast(WPARAM) flag,
5672 	  cast(LPARAM) systimearray);
5673 }
5674 
5675 DWORD MonthCal_GetRange(HWND hwnd, LPSYSTEMTIME systimearray) {
5676 	return cast(DWORD) SendMessage(hwnd, MCM_GETRANGE, 0,
5677 	  cast(LPARAM) systimearray);
5678 }
5679 
5680 BOOL MonthCal_GetSelRange(HWND hwnd, LPSYSTEMTIME systimearray) {
5681 	return cast(BOOL) SendMessage(hwnd, MCM_GETSELRANGE, 0,
5682 	  cast(LPARAM) systimearray);
5683 }
5684 
5685 BOOL MonthCal_GetToday(HWND hwnd, LPSYSTEMTIME systime) {
5686 	return cast(BOOL) SendMessage(hwnd, MCM_GETTODAY, 0,
5687 	  cast(LPARAM) systime);
5688 }
5689 
5690 BOOL MonthCal_GetUnicodeFormat(HWND hwnd) {
5691 	return cast(BOOL) SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0);
5692 }
5693 
5694 DWORD MonthCal_HitTest(HWND hwnd, PMCHITTESTINFO pmchittest) {
5695 	return cast(DWORD) SendMessage(hwnd, MCM_HITTEST, 0,
5696 	  cast(LPARAM) pmchittest);
5697 }
5698 
5699 COLORREF MonthCal_SetColor(HWND hwnd, INT icolor, COLORREF clr) {
5700 	return cast(COLORREF) SendMessage(hwnd, MCM_SETCOLOR, cast(WPARAM) icolor,
5701 	  cast(LPARAM) clr);
5702 }
5703 
5704 BOOL MonthCal_SetCurSel(HWND hwnd, LPSYSTEMTIME lpsystime) {
5705 	return cast(BOOL) SendMessage(hwnd, MCM_SETCURSEL, 0,
5706 	  cast(LPARAM) lpsystime);
5707 }
5708 
5709 BOOL MonthCal_SetDayState(HWND hwnd, INT imonths, LPMONTHDAYSTATE lpdatestatearray) {
5710 	return cast(BOOL) SendMessage(hwnd, MCM_SETDAYSTATE, cast(WPARAM) imonths,
5711 	  cast(LPARAM) lpdatestatearray);
5712 }
5713 
5714 DWORD MonthCal_SetFirstDayOfWeek(HWND hwnd, INT iday) {
5715 	return cast(DWORD) SendMessage(hwnd, MCM_SETFIRSTDAYOFWEEK, 0,
5716 	  cast(LPARAM) iday);
5717 }
5718 
5719 BOOL MonthCal_SetMaxSelCount(HWND hwnd, UINT imax) {
5720 	return cast(BOOL) SendMessage(hwnd, MCM_SETMAXSELCOUNT,
5721 	  cast(WPARAM) imax, 0);
5722 }
5723 
5724 INT MonthCal_SetMonthDelta(HWND hwnd, INT idelta) {
5725 	return cast(INT) SendMessage(hwnd, MCM_SETMONTHDELTA, cast(WPARAM) idelta, 0);
5726 }
5727 
5728 BOOL MonthCal_SetSelRange(HWND hwnd, LPSYSTEMTIME systimearray) {
5729 	return cast(BOOL) SendMessage(hwnd, MCM_SETSELRANGE, 0,
5730 	  cast(LPARAM) systimearray);
5731 }
5732 
5733 void MonthCal_SetToday(HWND hwnd, LPSYSTEMTIME systime) {
5734 	SendMessage(hwnd, MCM_SETTODAY, 0, cast(LPARAM) systime);
5735 }
5736 
5737 BOOL MonthCal_SetUnicodeFormat(HWND hwnd, BOOL unicode) {
5738 	return cast(BOOL) SendMessage(hwnd, MCM_SETUNICODEFORMAT,
5739 	  cast(WPARAM) unicode, 0);
5740 }
5741 
5742 BOOL MonthCal_SetRange(HWND w, DWORD f, LPSYSTEMTIME st) {
5743 	return cast(BOOL) SendMessage(w, MCM_SETRANGE, cast(WPARAM) f,
5744 	  cast(LPARAM) st);
5745 }
5746 
5747 extern (Windows) BOOL ShowHideMenuCtl(HWND, UINT_PTR, PINT);
5748 
5749 BOOL TabCtrl_GetItem(HWND w, int i, LPTCITEM p) {
5750 	return cast(BOOL) SendMessage(w, TCM_GETITEM, i, cast(LPARAM) p);
5751 }
5752 
5753 BOOL TabCtrl_SetItem(HWND w, int i, LPTCITEM p) {
5754 	return cast(BOOL) SendMessage(w, TCM_SETITEM, i, cast(LPARAM) p);
5755 }
5756 
5757 int TabCtrl_InsertItem(HWND w, int i, const(TC_ITEM)* p) {
5758 	return cast(int) SendMessage(w, TCM_INSERTITEM, i, cast(LPARAM) p);
5759 }
5760 
5761 BOOL TabCtrl_DeleteItem(HWND w, int i) {
5762 	return cast(BOOL) SendMessage(w, TCM_DELETEITEM, i, 0);
5763 }
5764 
5765 BOOL TabCtrl_DeleteAllItems(HWND w) {
5766 	return cast(BOOL) SendMessage(w, TCM_DELETEALLITEMS, 0, 0);
5767 }
5768 
5769 BOOL TabCtrl_GetItemRect(HWND w, int i, LPRECT p) {
5770 	return cast(BOOL) SendMessage(w, TCM_GETITEMRECT, i, cast(LPARAM) p);
5771 }
5772 
5773 int TabCtrl_GetCurSel(HWND w) {
5774 	return cast(int) SendMessage(w, TCM_GETCURSEL, 0, 0);
5775 }
5776 
5777 int TabCtrl_SetCurSel(HWND w, int i) {
5778 	return cast(int) SendMessage(w, TCM_SETCURSEL, i, 0);
5779 }
5780 
5781 int TabCtrl_HitTest(HWND w, LPTCHITTESTINFO p) {
5782 	return cast(int) SendMessage(w, TCM_HITTEST, 0, cast(LPARAM) p);
5783 }
5784 
5785 BOOL TabCtrl_SetItemExtra(HWND w, int c) {
5786 	return cast(BOOL) SendMessage(w, TCM_SETITEMEXTRA, c, 0);
5787 }
5788 
5789 int TabCtrl_AdjustRect(HWND w, BOOL b, LPRECT p) {
5790 	return cast(int) SendMessage(w, TCM_ADJUSTRECT, b, cast(LPARAM) p);
5791 }
5792 
5793 DWORD TabCtrl_SetItemSize(HWND w, int x, int y) {
5794 	return cast(DWORD) SendMessage(w, TCM_SETITEMSIZE, 0, MAKELPARAM(cast(ushort)x, cast(ushort)y));
5795 }
5796 
5797 void TabCtrl_RemoveImage(HWND w, int i) {
5798 	SendMessage(w, TCM_REMOVEIMAGE, i, 0);
5799 }
5800 
5801 void TabCtrl_SetPadding(HWND w, int x, int y) {
5802 	SendMessage(w, TCM_SETPADDING, 0, MAKELPARAM(cast(ushort)x, cast(ushort)y));
5803 }
5804 
5805 int TabCtrl_GetRowCount(HWND w) {
5806 	return cast(int) SendMessage(w, TCM_GETROWCOUNT, 0, 0);
5807 }
5808 
5809 HWND TabCtrl_GetToolTips(HWND w) {
5810 	return cast(HWND) SendMessage(w, TCM_GETTOOLTIPS, 0, 0);
5811 }
5812 
5813 void TabCtrl_SetToolTips(HWND w, HWND t) {
5814 	SendMessage(w, TCM_SETTOOLTIPS, cast(WPARAM) t, 0);
5815 }
5816 
5817 int TabCtrl_GetCurFocus(HWND w) {
5818 	return cast(int) SendMessage(w, TCM_GETCURFOCUS, 0, 0);
5819 }
5820 
5821 void TabCtrl_SetCurFocus(HWND w, int i) {
5822 	SendMessage(w, TCM_SETCURFOCUS, i, 0);
5823 }
5824 
5825 HIMAGELIST TabCtrl_GetImageList(HWND w) {
5826 	return cast(HIMAGELIST) SendMessage(w, TCM_GETIMAGELIST, 0, 0);
5827 }
5828 
5829 HIMAGELIST TabCtrl_SetImageList(HWND w, HIMAGELIST h) {
5830 	return cast(HIMAGELIST) SendMessage(w, TCM_SETIMAGELIST, 0,
5831 	  cast(LPARAM) h);
5832 }
5833 
5834 int TabCtrl_GetItemCount(HWND w) {
5835 	return cast(int) SendMessage(w, TCM_GETITEMCOUNT, 0, 0);
5836 }
5837 
5838 extern (Windows) BOOL _TrackMouseEvent(LPTRACKMOUSEEVENT);
5839 
5840 HTREEITEM TreeView_InsertItem(HWND w, LPTVINSERTSTRUCT i) {
5841 	return cast(HTREEITEM) SendMessage(w, TVM_INSERTITEM, 0, cast(LPARAM) i);
5842 }
5843 
5844 BOOL TreeView_DeleteItem(HWND w, HTREEITEM i) {
5845 	return cast(BOOL) SendMessage(w, TVM_DELETEITEM, 0, cast(LPARAM) i);
5846 }
5847 
5848 BOOL TreeView_DeleteAllItems(HWND w) {
5849 	return cast(BOOL) SendMessage(w, TVM_DELETEITEM, 0, cast(LPARAM) TVI_ROOT);
5850 }
5851 
5852 BOOL TreeView_Expand(HWND w, HTREEITEM i, UINT c) {
5853 	return cast(BOOL) SendMessage(w, TVM_EXPAND, c, cast(LPARAM) i);
5854 }
5855 
5856 BOOL TreeView_GetItemRect(HWND w, HTREEITEM i, LPRECT p, BOOL c) {
5857 	*cast(HTREEITEM*) p = i;
5858 	return cast(BOOL) SendMessage(w, TVM_GETITEMRECT, c, cast(LPARAM) p);
5859 }
5860 
5861 UINT TreeView_GetCount(HWND w) {
5862 	return cast(UINT) SendMessage(w, TVM_GETCOUNT, 0, 0);
5863 }
5864 
5865 UINT TreeView_GetIndent(HWND w) {
5866 	return cast(UINT) SendMessage(w, TVM_GETINDENT, 0, 0);
5867 }
5868 
5869 BOOL TreeView_SetIndent(HWND w, INT i) {
5870 	return cast(BOOL) SendMessage(w, TVM_SETINDENT, i, 0);
5871 }
5872 
5873 HIMAGELIST TreeView_GetImageList(HWND w, INT i) {
5874 	return cast(HIMAGELIST) SendMessage(w, TVM_GETIMAGELIST, i, 0);
5875 }
5876 
5877 HIMAGELIST TreeView_SetImageList(HWND w, HIMAGELIST h, INT i) {
5878 	return cast(HIMAGELIST) SendMessage(w, TVM_SETIMAGELIST, i,
5879 	  cast(LPARAM) h);
5880 }
5881 
5882 HTREEITEM TreeView_GetNextItem(HWND w, HTREEITEM i, UINT c) {
5883 	return cast(HTREEITEM) SendMessage(w, TVM_GETNEXTITEM, c, cast(LPARAM) i);
5884 }
5885 
5886 HTREEITEM TreeView_GetChild(HWND w, HTREEITEM i) {
5887 	return TreeView_GetNextItem(w, i, TVGN_CHILD);
5888 }
5889 
5890 HTREEITEM TreeView_GetNextSibling(HWND w, HTREEITEM i) {
5891 	return TreeView_GetNextItem(w, i, TVGN_NEXT);
5892 }
5893 
5894 HTREEITEM TreeView_GetPrevSibling(HWND w, HTREEITEM i) {
5895 	return TreeView_GetNextItem(w, i, TVGN_PREVIOUS);
5896 }
5897 
5898 HTREEITEM TreeView_GetParent(HWND w, HTREEITEM i) {
5899 	return TreeView_GetNextItem(w, i, TVGN_PARENT);
5900 }
5901 
5902 HTREEITEM TreeView_GetFirstVisible(HWND w) {
5903 	return TreeView_GetNextItem(w, null, TVGN_FIRSTVISIBLE);
5904 }
5905 
5906 HTREEITEM TreeView_GetNextVisible(HWND w, HTREEITEM i) {
5907 	return TreeView_GetNextItem(w, i, TVGN_NEXTVISIBLE);
5908 }
5909 
5910 HTREEITEM TreeView_GetPrevVisible(HWND w, HTREEITEM i) {
5911 	return TreeView_GetNextItem(w, i, TVGN_PREVIOUSVISIBLE);
5912 }
5913 
5914 HTREEITEM TreeView_GetSelection(HWND w) {
5915 	return TreeView_GetNextItem(w, null, TVGN_CARET);
5916 }
5917 
5918 HTREEITEM TreeView_GetDropHilight(HTREEITEM w) {
5919 	return TreeView_GetNextItem(w, null, TVGN_DROPHILITE);
5920 }
5921 
5922 HTREEITEM TreeView_GetRoot(HWND w) {
5923 	return TreeView_GetNextItem(w, null, TVGN_ROOT);
5924 }
5925 
5926 BOOL TreeView_Select(HWND w, HTREEITEM i, UINT c) {
5927 	return cast(BOOL) SendMessage(w, TVM_SELECTITEM, c, cast(LPARAM) i);
5928 }
5929 
5930 BOOL TreeView_SelectItem(HWND w, HTREEITEM i) {
5931 	return TreeView_Select(w, i, TVGN_CARET);
5932 }
5933 
5934 BOOL TreeView_SelectDropTarget(HWND w, HTREEITEM i) {
5935 	return TreeView_Select(w, i, TVGN_DROPHILITE);
5936 }
5937 
5938 BOOL TreeView_SelectSetFirstVisible(HWND w, HTREEITEM i) {
5939 	return TreeView_Select(w, i, TVGN_FIRSTVISIBLE);
5940 }
5941 
5942 BOOL TreeView_GetItem(HWND w, LPTVITEM i) {
5943  return cast(BOOL) SendMessage(w, TVM_GETITEM, 0, cast(LPARAM) i);
5944 }
5945 
5946 BOOL TreeView_SetItem(HWND w, const(TV_ITEM)* i) {
5947 	return cast(BOOL) SendMessage(w, TVM_SETITEM, 0, cast(LPARAM) i);
5948 }
5949 
5950 HWND TreeView_EditLabel(HWND w, HTREEITEM i) {
5951 	return cast(HWND) SendMessage(w, TVM_EDITLABEL, 0, cast(LPARAM) i);
5952 }
5953 
5954 HWND TreeView_GetEditControl(HWND w) {
5955 	return cast(HWND) SendMessage(w, TVM_GETEDITCONTROL, 0, 0);
5956 }
5957 
5958 UINT TreeView_GetVisibleCount(HWND w) {
5959 	return cast(UINT) SendMessage(w, TVM_GETVISIBLECOUNT, 0, 0);
5960 }
5961 
5962 HTREEITEM TreeView_HitTest(HWND w, LPTVHITTESTINFO p) {
5963 	return cast(HTREEITEM) SendMessage(w, TVM_HITTEST, 0, cast(LPARAM) p);
5964 }
5965 
5966 HIMAGELIST TreeView_CreateDragImage(HWND w, HTREEITEM i) {
5967 	return cast(HIMAGELIST) SendMessage(w, TVM_CREATEDRAGIMAGE, 0,
5968 	  cast(LPARAM) i);
5969 }
5970 
5971 BOOL TreeView_SortChildren(HWND w, HTREEITEM i, BOOL r) {
5972 	return cast(BOOL) SendMessage(w, TVM_SORTCHILDREN, r, cast(LPARAM) i);
5973 }
5974 
5975 BOOL TreeView_EnsureVisible(HWND w, HTREEITEM i) {
5976 	return cast(BOOL) SendMessage(w, TVM_ENSUREVISIBLE, 0, cast(LPARAM) i);
5977 }
5978 
5979 BOOL TreeView_SortChildrenCB(HWND w, LPTVSORTCB s, BOOL r) {
5980 	return cast(BOOL) SendMessage(w, TVM_SORTCHILDRENCB, r, cast(LPARAM) s);
5981 }
5982 
5983 BOOL TreeView_EndEditLabelNow(HWND w, BOOL f) {
5984 	return cast(BOOL) SendMessage(w, TVM_ENDEDITLABELNOW, f, 0);
5985 }
5986 
5987 BOOL TreeView_GetISearchString(HWND w, LPTSTR s) {
5988 	return cast(BOOL) SendMessage(w, TVM_GETISEARCHSTRING, 0, cast(LPARAM) s);
5989 }
5990 
5991 static if (_WIN32_IE >= 0x300) {
5992 	DWORD ListView_ApproximateViewRect(HWND w, int iw, int ih, int i) {
5993 		return cast(DWORD) SendMessage(w, LVM_APPROXIMATEVIEWRECT, i,
5994 		  MAKELPARAM(cast(ushort)iw, cast(ushort)ih));
5995 	}
5996 
5997 	DWORD ListView_SetExtendedListViewStyle(HWND w, DWORD s) {
5998 		return cast(DWORD) SendMessage(w, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, s);
5999 	}
6000 
6001 	DWORD ListView_GetExtendedListViewStyle(HWND w) {
6002 		return cast(DWORD) SendMessage(w, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
6003 	}
6004 
6005 	BOOL ListView_SetColumnOrderArray(HWND w, int i, int* a) {
6006 		return cast(BOOL) SendMessage(w, LVM_SETCOLUMNORDERARRAY,
6007 		  cast(WPARAM) i, cast(LPARAM) a);
6008 	}
6009 
6010 	BOOL ListView_GetColumnOrderArray(HWND w, int i, int* a) {
6011 		return cast(BOOL) SendMessage(w, LVM_GETCOLUMNORDERARRAY,
6012 		  cast(WPARAM) i, cast(LPARAM) a);
6013 	}
6014 
6015 	HWND ListView_GetHeader(HWND w) {
6016 		return cast(HWND) SendMessage(w, LVM_GETHEADER, 0, 0);
6017 	}
6018 
6019 	HCURSOR ListView_GetHotCursor(HWND w) {
6020 		return cast(HCURSOR) SendMessage(w, LVM_GETHOTCURSOR, 0, 0);
6021 	}
6022 
6023 	INT ListView_GetHotItem(HWND w) {
6024 		return cast(INT) SendMessage(w, LVM_GETHOTITEM, 0, 0);
6025 	}
6026 
6027 	BOOL ListView_GetSubItemRect(HWND w, int i, int isi, int c, LPRECT p) {
6028 		if (p) { p.left = c; p.top = isi; }
6029 		return cast(BOOL) SendMessage(w, LVM_GETSUBITEMRECT, i, p ? cast(LPARAM) p : 0);
6030 	}
6031 
6032 	HCURSOR ListView_SetHotCursor(HWND w, HCURSOR c) {
6033 		return cast(HCURSOR) SendMessage(w, LVM_SETHOTCURSOR, 0,
6034 		  cast(LPARAM) c);
6035 	}
6036 
6037 	INT ListView_SetHotItem(HWND w, INT i) {
6038 		return cast(INT) SendMessage(w, LVM_SETHOTITEM, cast(WPARAM) i, 0);
6039 	}
6040 
6041 	DWORD ListView_SetIconSpacing(HWND w, int x, int y) {
6042 		return cast(DWORD) SendMessage(w, LVM_SETICONSPACING, 0,
6043 		  MAKELONG(cast(ushort)x, cast(ushort)y));
6044 	}
6045 
6046 	INT ListView_SubItemHitTest(HWND w, LPLVHITTESTINFO p) {
6047 		return cast(INT) SendMessage(w, LVM_SUBITEMHITTEST, 0, cast(LPARAM) p);
6048 	}
6049 
6050 	BOOL ListView_SetItemCountEx(HWND w, int i, DWORD f) {
6051 		return cast(BOOL) SendMessage(w, LVM_SETITEMCOUNT, i, cast(LPARAM) f);
6052 	}
6053 
6054 	extern (Windows) {
6055 		WINBOOL ImageList_SetImageCount(HIMAGELIST, UINT);
6056 		WINBOOL ImageList_Copy(HIMAGELIST, int, HIMAGELIST, int, UINT);
6057 		WINBOOL ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
6058 	}
6059 
6060 	int TabCtrl_SetMinTabWidth(HWND hwnd, int x) {
6061 		return cast(int) SendMessage(hwnd, TCM_SETMINTABWIDTH, 0, x);
6062 	}
6063 
6064 	VOID TabCtrl_DeselectAll(HWND hwnd, UINT fExcludeFocus) {
6065 		SendMessage(hwnd, TCM_DESELECTALL, fExcludeFocus, 0);
6066 	}
6067 
6068 	HWND TreeView_GetToolTips(HWND w) {
6069 		return cast(HWND) SendMessage(w, TVM_GETTOOLTIPS, 0, 0);
6070 	}
6071 
6072 	HWND TreeView_SetToolTips(HWND w, HWND wt) {
6073 		return cast(HWND) SendMessage(w, TVM_SETTOOLTIPS, cast(WPARAM) wt, 0);
6074 	}
6075 }
6076 
6077 static if (_WIN32_IE >= 0x400) {
6078 	BOOL ListView_GetBkImage(HWND h, LPLVBKIMAGE plvbki) {
6079 		return cast(BOOL) SendMessage(h, LVM_GETBKIMAGE, 0,
6080 		  cast(LPARAM) plvbki);
6081 	}
6082 
6083 	BOOL ListView_SetBkImage(HWND h, LPLVBKIMAGE plvbki) {
6084 		return cast(BOOL) SendMessage(h, LVM_SETBKIMAGE, 0,
6085 		  cast(LPARAM) plvbki);
6086 	}
6087 
6088 	DWORD ListView_SetExtendedListViewStyleEx(HWND w, DWORD m, DWORD s) {
6089 		return cast(DWORD) SendMessage(w, LVM_SETEXTENDEDLISTVIEWSTYLE, m, s);
6090 	}
6091 
6092 	VOID ListView_SetWorkAreas(HWND w, INT n, LPRECT r) {
6093 		SendMessage(w, LVM_SETWORKAREAS, cast(WPARAM) n, cast(LPARAM) r);
6094 	}
6095 
6096 	VOID ListView_GetWorkAreas(HWND w, INT n, LPRECT r) {
6097 		SendMessage(w, LVM_GETWORKAREAS, cast(WPARAM) n, cast(LPARAM) r);
6098 	}
6099 
6100 	BOOL ListView_GetNumberOfWorkAreas(HWND w, LPUINT n) {
6101 		return cast(BOOL) SendMessage(w, LVM_GETNUMBEROFWORKAREAS, 0,
6102 		  cast(LPARAM) n);
6103 	}
6104 
6105 	DWORD ListView_SetHoverTime(HWND w, DWORD t) {
6106 		return cast(DWORD) SendMessage(w, LVM_SETHOVERTIME, 0,
6107 		  cast(LPARAM) t);
6108 	}
6109 
6110 	DWORD ListView_GetHoverTime(HWND w) {
6111 		return cast(DWORD) SendMessage(w, LVM_GETHOVERTIME, 0, 0);
6112 	}
6113 
6114 	INT ListView_GetSelectionMark(HWND w) {
6115 		return cast(INT) SendMessage(w, LVM_GETSELECTIONMARK, 0, 0);
6116 	}
6117 
6118 	INT ListView_SetSelectionMark(HWND w, INT i) {
6119 		return cast(INT) SendMessage(w, LVM_SETSELECTIONMARK, 0, cast(LPARAM) i);
6120 	}
6121 
6122 	HWND ListView_SetToolTips(HWND w, HWND n) {
6123 		return cast(HWND) SendMessage(w, LVM_SETTOOLTIPS, cast(WPARAM) n, 0);
6124 	}
6125 
6126 	HWND ListView_GetToolTips(HWND w) {
6127 		return cast(HWND) SendMessage(w, LVM_GETTOOLTIPS, 0, 0);
6128 	}
6129 
6130 	BOOL ListView_SetUnicodeFormat(HWND w, BOOL f) {
6131 		return cast(BOOL) SendMessage(w, LVM_SETUNICODEFORMAT,
6132 		  cast(WPARAM) f, 0);
6133 	}
6134 
6135 	BOOL ListView_GetUnicodeFormat(HWND w) {
6136 		return cast(BOOL) SendMessage(w, LVM_GETUNICODEFORMAT, 0, 0);
6137 	}
6138 
6139 	BOOL TabCtrl_HighlightItem(HWND hwnd, INT i, WORD fHighlight) {
6140 		return cast(BOOL) SendMessage(hwnd, TCM_HIGHLIGHTITEM,
6141 		  cast(WPARAM) i, cast(LPARAM) MAKELONG(fHighlight, 0));
6142 	}
6143 
6144 	DWORD TabCtrl_SetExtendedStyle(HWND hwnd, DWORD dw) {
6145 		return cast(DWORD) SendMessage(hwnd, TCM_SETEXTENDEDSTYLE, 0, dw);
6146 	}
6147 
6148 	DWORD TabCtrl_GetExtendedStyle(HWND hwnd) {
6149 		return cast(DWORD) SendMessage(hwnd, TCM_GETEXTENDEDSTYLE, 0, 0);
6150 	}
6151 
6152 	BOOL TabCtrl_SetUnicodeFormat(HWND hwnd, HWND fUnicode) {
6153 		return cast(BOOL) SendMessage(hwnd, TCM_SETUNICODEFORMAT,
6154 		  cast(WPARAM) fUnicode, 0);
6155 	}
6156 
6157 	BOOL TabCtrl_GetUnicodeFormat(HWND hwnd) {
6158 		return cast(BOOL) SendMessage(hwnd, TCM_GETUNICODEFORMAT, 0, 0);
6159 	}
6160 
6161 	COLORREF TreeView_GetBkColor(HWND w) {
6162 		return cast(COLORREF) SendMessage(w, TVM_GETBKCOLOR, 0, 0);
6163 	}
6164 
6165 	COLORREF TreeView_GetInsertMarkColor(HWND w) {
6166 		return cast(COLORREF) SendMessage(w, TVM_GETINSERTMARKCOLOR, 0, 0);
6167 	}
6168 
6169 	int TreeView_GetItemHeight(HWND w) {
6170 		return cast(int) SendMessage(w, TVM_GETITEMHEIGHT, 0, 0);
6171 	}
6172 
6173 	UINT TreeView_GetScrollTime(HWND w) {
6174 		return cast(UINT) SendMessage(w, TVM_GETSCROLLTIME, 0, 0);
6175 	}
6176 
6177 	COLORREF TreeView_GetTextColor(HWND w) {
6178 		return cast(COLORREF) SendMessage(w, TVM_GETTEXTCOLOR, 0, 0);
6179 	}
6180 
6181 	COLORREF TreeView_SetBkColor(HWND w, COLORREF c) {
6182 		return cast(COLORREF) SendMessage(w, TVM_SETBKCOLOR, 0,
6183 		  cast(LPARAM) c);
6184 	}
6185 
6186 	COLORREF TreeView_SetInsertMarkColor(HWND w, COLORREF c) {
6187 		return cast(COLORREF) SendMessage(w, TVM_SETINSERTMARKCOLOR, 0,
6188 		  cast(LPARAM) c);
6189 	}
6190 
6191 	int TreeView_SetItemHeight(HWND w, SHORT h) {
6192 		return cast(int) SendMessage(w, TVM_SETITEMHEIGHT, cast(WPARAM) h, 0);
6193 	}
6194 
6195 	UINT TreeView_SetScrollTime(HWND w, UINT t) {
6196 		return cast(UINT) SendMessage(w, TVM_SETSCROLLTIME, cast(WPARAM) t, 0);
6197 	}
6198 
6199 	COLORREF TreeView_SetTextColor(HWND w, COLORREF c) {
6200 		return cast(COLORREF) SendMessage(w, TVM_SETTEXTCOLOR, 0,
6201 		  cast(LPARAM) c);
6202 	}
6203 
6204 	BOOL TreeView_SetInsertMark(HWND w, HTREEITEM i, BOOL a) {
6205 		return cast(BOOL) SendMessage(w, TVM_SETINSERTMARK, cast(WPARAM) a,
6206 		  cast(LPARAM) i);
6207 	}
6208 
6209 	BOOL TreeView_SetUnicodeFormat(HWND w, BOOL u) {
6210 		return cast(BOOL) SendMessage(w, TVM_SETUNICODEFORMAT,
6211 		  cast(WPARAM) u, 0);
6212 	}
6213 
6214 	BOOL TreeView_GetUnicodeFormat(HWND w) {
6215 		return cast(BOOL) SendMessage(w, TVM_GETUNICODEFORMAT, 0, 0);
6216 	}
6217 
6218 	HTREEITEM TreeView_GetLastVisible(HWND w) {
6219 		return TreeView_GetNextItem(w, null, TVGN_LASTVISIBLE);
6220 	}
6221 }
6222 
6223 static if (_WIN32_IE >= 0x500) {
6224 	UINT TreeView_GetItemState(HWND w, HTREEITEM i, UINT m) {
6225 		return cast(UINT) SendMessage(w, TVM_GETITEMSTATE, cast(WPARAM) i,
6226 		  cast(LPARAM) m);
6227 	}
6228 
6229 	BOOL TreeView_SetItemState(HWND w, HTREEITEM i, UINT d, UINT m) {
6230 		TVITEM _tvi;
6231 		_tvi.mask = TVIF_STATE;
6232 		_tvi.hItem = i;
6233 		_tvi.stateMask = m;
6234 		_tvi.state = d;
6235 		return cast(BOOL) SendMessage(w, TVM_SETITEM, 0, cast(LPARAM) &_tvi);
6236 	}
6237 }
6238 
6239 
6240 //#ifdef _WIN32_WCE               // these are PPC only
6241 /+
6242 extern (Windows) {
6243 	HWND  CommandBar_Create(HINSTANCE, HWND, int);
6244 	BOOL  CommandBar_Show(HWND, BOOL);
6245 	int   CommandBar_AddBitmap(HWND, HINSTANCE, int, int, int, int);
6246 	HWND  CommandBar_InsertComboBox(HWND, HINSTANCE, int, UINT, WORD, WORD);
6247 	BOOL  CommandBar_InsertMenubar(HWND, HINSTANCE, WORD, WORD );
6248 	BOOL  CommandBar_InsertMenubarEx(HWND, HINSTANCE, LPTSTR, WORD);
6249 	BOOL  CommandBar_DrawMenuBar(HWND, WORD);
6250 	HMENU CommandBar_GetMenu(HWND, WORD);
6251 	BOOL  CommandBar_AddAdornments(HWND, DWORD, DWORD);
6252 	int   CommandBar_Height(HWND hwndCB);
6253 }
6254 
6255 // MinGW: These two are not in the DLL
6256 void CommandBar_InsertButton(HWND hwnd, int i, LPTBBUTTON lptbbutton) {
6257     SendMessage(hwnd, TB_INSERTBUTTON, i, lptbbutton);
6258 }
6259 alias DestroyWindow CommandBar_Destroy;
6260 +/
6261 //#endif // _WIN32_WCE
6262 
6263 
6264 static if (_WIN32_WINNT >= 0x501) {
6265     struct EDITBALLOONTIP
6266     {
6267         DWORD cbStruct;
6268         LPCWSTR pszTitle;
6269         LPCWSTR pszText;
6270         INT ttiIcon;
6271     }
6272     alias EDITBALLOONTIP* PEDITBALLOONTIP;
6273 
6274 	const EM_SETCUEBANNER = ECM_FIRST + 1;
6275 	const EM_GETCUEBANNER = ECM_FIRST + 2;
6276 	const EM_SHOWBALLOONTIP = ECM_FIRST + 3;
6277 	const EM_HIDEBALLOONTIP = ECM_FIRST + 4;
6278 }
6279 
6280 static if (_WIN32_WINNT >= 0x600) {
6281 	const EM_SETHILITE = ECM_FIRST + 5;
6282 	const EM_GETHILITE = ECM_FIRST + 6;
6283 }