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