xref: /reactos/sdk/include/psdk/commctrl.h (revision 7eead935)
1 /**
2  * This file has no copyright assigned and is placed in the Public Domain.
3  * This file is part of the w64 mingw-runtime package.
4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5  */
6 
7 #ifndef _INC_COMMCTRL
8 #define _INC_COMMCTRL
9 
10 #include <_mingw_unicode.h>
11 
12 #ifndef _WINRESRC_
13 #ifndef _WIN32_IE
14 #define _WIN32_IE 0x0501
15 #else
16 /* FIXME: This really must be 0x0501 !!! */
17 #if (_WIN32_IE < 0x0500)
18 #error _WIN32_IE setting conflicts
19 #endif
20 #endif /* !_WIN32_IE */
21 #endif /* !_WINRESRC_ */
22 
23 #ifndef _HRESULT_DEFINED
24 #define _HRESULT_DEFINED
25 typedef _Return_type_success_(return >= 0) LONG HRESULT;
26 #endif
27 
28 #ifndef NOUSER
29 
30 #ifndef WINCOMMCTRLAPI
31 #ifndef _COMCTL32_
32 #define WINCOMMCTRLAPI DECLSPEC_IMPORT
33 #else
34 #define WINCOMMCTRLAPI
35 #endif
36 #endif /* !WINCOMMCTRLAPI */
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 #include <prsht.h>
43 
44 #ifndef SNDMSG
45 #ifdef __cplusplus
46 #define SNDMSG ::SendMessage
47 #else
48 #define SNDMSG SendMessage
49 #endif
50 #endif /* !SNDMSG */
51 
52   WINCOMMCTRLAPI void WINAPI InitCommonControls(void);
53 
54   typedef struct tagINITCOMMONCONTROLSEX {
55     DWORD dwSize;
56     DWORD dwICC;
57   } INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
58 #define ICC_LISTVIEW_CLASSES 0x1
59 #define ICC_TREEVIEW_CLASSES 0x2
60 #define ICC_BAR_CLASSES 0x4
61 #define ICC_TAB_CLASSES 0x8
62 #define ICC_UPDOWN_CLASS 0x10
63 #define ICC_PROGRESS_CLASS 0x20
64 #define ICC_HOTKEY_CLASS 0x40
65 #define ICC_ANIMATE_CLASS 0x80
66 #define ICC_WIN95_CLASSES 0xff
67 #define ICC_DATE_CLASSES 0x100
68 #define ICC_USEREX_CLASSES 0x200
69 #define ICC_COOL_CLASSES 0x400
70 #define ICC_INTERNET_CLASSES 0x800
71 #define ICC_PAGESCROLLER_CLASS 0x1000
72 #define ICC_NATIVEFNTCTL_CLASS 0x2000
73 #define ICC_STANDARD_CLASSES 0x4000
74 #define ICC_LINK_CLASS 0x8000
75 
76   WINCOMMCTRLAPI BOOL WINAPI InitCommonControlsEx(_In_ const INITCOMMONCONTROLSEX *);
77 
78 #define ODT_HEADER 100
79 #define ODT_TAB 101
80 #define ODT_LISTVIEW 102
81 
82 #define LVM_FIRST 0x1000
83 #define TV_FIRST 0x1100
84 #define HDM_FIRST 0x1200
85 #define TCM_FIRST 0x1300
86 
87 #define PGM_FIRST 0x1400
88 #define ECM_FIRST 0x1500
89 #define BCM_FIRST 0x1600
90 #define CBM_FIRST 0x1700
91 #define CCM_FIRST 0x2000
92 #define CCM_LAST (CCM_FIRST+0x200)
93 #define CCM_SETBKCOLOR (CCM_FIRST+1)
94 #define CCM_SETCOLORSCHEME (CCM_FIRST+2)
95 #define CCM_GETCOLORSCHEME (CCM_FIRST+3)
96 #define CCM_GETDROPTARGET (CCM_FIRST+4)
97 #define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
98 #define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
99 
100   typedef struct tagCOLORSCHEME {
101     DWORD dwSize;
102     COLORREF clrBtnHighlight;
103     COLORREF clrBtnShadow;
104   } COLORSCHEME,*LPCOLORSCHEME;
105 
106 #if (_WIN32_IE >= 0x0500)
107 
108 #if (_WIN32_WINNT >= 0x0501)
109 #define COMCTL32_VERSION  6
110 #else
111 #define COMCTL32_VERSION  5
112 #endif
113 
114 #define CCM_SETVERSION (CCM_FIRST+0x7)
115 #define CCM_GETVERSION (CCM_FIRST+0x8)
116 #define CCM_SETNOTIFYWINDOW (CCM_FIRST+0x9)
117 #if (_WIN32_WINNT >= 0x0501)
118 #define CCM_SETWINDOWTHEME (CCM_FIRST+0xb)
119 #define CCM_DPISCALE (CCM_FIRST+0xc)
120 #endif
121 
122 #endif /* _WIN32_IE >= 0x0500 */
123 
124 #define INFOTIPSIZE 1024
125 
126 #define HANDLE_WM_NOTIFY(hwnd,wParam,lParam,fn) (fn)((hwnd),(int)(wParam),(NMHDR *)(lParam))
127 #define FORWARD_WM_NOTIFY(hwnd,idFrom,pnmhdr,fn) (LRESULT)(fn)((hwnd),WM_NOTIFY,(WPARAM)(int)(idFrom),(LPARAM)(NMHDR *)(pnmhdr))
128 
129 #define NM_OUTOFMEMORY (NM_FIRST-1)
130 #define NM_CLICK (NM_FIRST-2)
131 #define NM_DBLCLK (NM_FIRST-3)
132 #define NM_RETURN (NM_FIRST-4)
133 #define NM_RCLICK (NM_FIRST-5)
134 #define NM_RDBLCLK (NM_FIRST-6)
135 #define NM_SETFOCUS (NM_FIRST-7)
136 #define NM_KILLFOCUS (NM_FIRST-8)
137 #define NM_CUSTOMDRAW (NM_FIRST-12)
138 #define NM_HOVER (NM_FIRST-13)
139 #define NM_NCHITTEST (NM_FIRST-14)
140 #define NM_KEYDOWN (NM_FIRST-15)
141 #define NM_RELEASEDCAPTURE (NM_FIRST-16)
142 #define NM_SETCURSOR (NM_FIRST-17)
143 #define NM_CHAR (NM_FIRST-18)
144 #define NM_TOOLTIPSCREATED (NM_FIRST-19)
145 #define NM_LDOWN (NM_FIRST-20)
146 #define NM_RDOWN (NM_FIRST-21)
147 #define NM_THEMECHANGED (NM_FIRST-22)
148 
149 #ifndef CCSIZEOF_STRUCT
150 #define CCSIZEOF_STRUCT(structname,member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0))))+sizeof(((structname*)0)->member))
151 #endif
152 
153   typedef struct tagNMTOOLTIPSCREATED {
154     NMHDR hdr;
155     HWND hwndToolTips;
156   } NMTOOLTIPSCREATED,*LPNMTOOLTIPSCREATED;
157 
158   typedef struct tagNMMOUSE {
159     NMHDR hdr;
160     DWORD_PTR dwItemSpec;
161     DWORD_PTR dwItemData;
162     POINT pt;
163     LPARAM dwHitInfo;
164   } NMMOUSE,*LPNMMOUSE;
165 
166   typedef NMMOUSE NMCLICK;
167   typedef LPNMMOUSE LPNMCLICK;
168 
169   typedef struct tagNMOBJECTNOTIFY {
170     NMHDR hdr;
171     int iItem;
172 #ifdef __IID_DEFINED__
173     const IID *piid;
174 #else
175     const void *piid;
176 #endif
177     void *pObject;
178     HRESULT hResult;
179     DWORD dwFlags;
180   } NMOBJECTNOTIFY,*LPNMOBJECTNOTIFY;
181 
182   typedef struct tagNMKEY {
183     NMHDR hdr;
184     UINT nVKey;
185     UINT uFlags;
186   } NMKEY,*LPNMKEY;
187 
188   typedef struct tagNMCHAR {
189     NMHDR hdr;
190     UINT ch;
191     DWORD dwItemPrev;
192     DWORD dwItemNext;
193   } NMCHAR,*LPNMCHAR;
194 
195 #define NM_FIRST (0U- 0U)
196 #define NM_LAST (0U- 99U)
197 
198 #define LVN_FIRST (0U-100U)
199 #define LVN_LAST (0U-199U)
200 
201 #define HDN_FIRST (0U-300U)
202 #define HDN_LAST (0U-399U)
203 
204 #define TVN_FIRST (0U-400U)
205 #define TVN_LAST (0U-499U)
206 
207 #define TTN_FIRST (0U-520U)
208 #define TTN_LAST (0U-549U)
209 
210 #define TCN_FIRST (0U-550U)
211 #define TCN_LAST (0U-580U)
212 
213 #ifndef CDN_FIRST
214 #define CDN_FIRST (0U-601U)
215 #define CDN_LAST (0U-699U)
216 #endif
217 
218 #define TBN_FIRST (0U-700U)
219 #define TBN_LAST (0U-720U)
220 
221 #define UDN_FIRST (0U-721)
222 #define UDN_LAST (0U-740)
223 
224 #define MCN_FIRST (0U-750U)
225 #define MCN_LAST (0U-759U)
226 #define DTN_FIRST (0U-760U)
227 #define DTN_LAST (0U-799U)
228 #define CBEN_FIRST (0U-800U)
229 #define CBEN_LAST (0U-830U)
230 #define RBN_FIRST (0U-831U)
231 #define RBN_LAST (0U-859U)
232 
233 #define IPN_FIRST (0U-860U)
234 #define IPN_LAST (0U-879U)
235 #define SBN_FIRST (0U-880U)
236 #define SBN_LAST (0U-899U)
237 #define PGN_FIRST (0U-900U)
238 #define PGN_LAST (0U-950U)
239 
240 #ifndef WMN_FIRST
241 #define WMN_FIRST (0U-1000U)
242 #define WMN_LAST (0U-1200U)
243 #endif
244 
245 #define BCN_FIRST (0U-1250U)
246 #define BCN_LAST (0U-1350U)
247 
248 #define MSGF_COMMCTRL_BEGINDRAG 0x4200
249 #define MSGF_COMMCTRL_SIZEHEADER 0x4201
250 #define MSGF_COMMCTRL_DRAGSELECT 0x4202
251 #define MSGF_COMMCTRL_TOOLBARCUST 0x4203
252 
253 #define CDRF_DODEFAULT 0x0
254 #define CDRF_NEWFONT 0x2
255 #define CDRF_SKIPDEFAULT 0x4
256 #define CDRF_DOERASE 0x8
257 #define CDRF_SKIPPOSTPAINT 0x100
258 
259 #define CDRF_NOTIFYPOSTPAINT 0x10
260 #define CDRF_NOTIFYITEMDRAW 0x20
261 #define CDRF_NOTIFYSUBITEMDRAW 0x20
262 #define CDRF_NOTIFYPOSTERASE 0x40
263 #define CDRF_NOTIFYITEMERASE 0x00000080 /* obsolete ??? */
264 
265 #define CDDS_PREPAINT 0x1
266 #define CDDS_POSTPAINT 0x2
267 #define CDDS_PREERASE 0x3
268 #define CDDS_POSTERASE 0x4
269 #define CDDS_ITEM 0x10000
270 #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
271 #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
272 #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
273 #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
274 #define CDDS_SUBITEM 0x20000
275 
276 #define CDIS_SELECTED 0x1
277 #define CDIS_GRAYED 0x2
278 #define CDIS_DISABLED 0x4
279 #define CDIS_CHECKED 0x8
280 #define CDIS_FOCUS 0x10
281 #define CDIS_DEFAULT 0x20
282 #define CDIS_HOT 0x40
283 #define CDIS_MARKED 0x80
284 #define CDIS_INDETERMINATE 0x100
285 #define CDIS_SHOWKEYBOARDCUES 0x200
286 
287   typedef struct tagNMCUSTOMDRAWINFO {
288     NMHDR hdr;
289     DWORD dwDrawStage;
290     HDC hdc;
291     RECT rc;
292     DWORD_PTR dwItemSpec;
293     UINT uItemState;
294     LPARAM lItemlParam;
295   } NMCUSTOMDRAW,*LPNMCUSTOMDRAW;
296 
297   typedef struct tagNMTTCUSTOMDRAW {
298     NMCUSTOMDRAW nmcd;
299     UINT uDrawFlags;
300   } NMTTCUSTOMDRAW,*LPNMTTCUSTOMDRAW;
301 
302 #ifndef NOIMAGEAPIS
303 
304 #define CLR_NONE 0xffffffffL
305 #define CLR_DEFAULT 0xFF000000L
306 
307 #ifndef HIMAGELIST
308   struct _IMAGELIST;
309   typedef struct _IMAGELIST *HIMAGELIST;
310 #endif
311 
312 #ifndef IMAGELISTDRAWPARAMS
313   typedef struct _IMAGELISTDRAWPARAMS {
314     DWORD cbSize;
315     HIMAGELIST himl;
316     int i;
317     HDC hdcDst;
318     int x;
319     int y;
320     int cx;
321     int cy;
322     int xBitmap;
323     int yBitmap;
324     COLORREF rgbBk;
325     COLORREF rgbFg;
326     UINT fStyle;
327     DWORD dwRop;
328     DWORD fState;
329     DWORD Frame;
330     COLORREF crEffect;
331   } IMAGELISTDRAWPARAMS,*LPIMAGELISTDRAWPARAMS;
332 
333 #define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS,dwRop)
334 #endif
335 
336 #define ILC_MASK 0x1
337 #define ILC_COLOR 0x0
338 #define ILC_COLORDDB 0xfe
339 #define ILC_COLOR4 0x4
340 #define ILC_COLOR8 0x8
341 #define ILC_COLOR16 0x10
342 #define ILC_COLOR24 0x18
343 #define ILC_COLOR32 0x20
344 #define ILC_PALETTE 0x800
345 #define ILC_MIRROR 0x2000
346 #define ILC_PERITEMMIRROR 0x8000
347 
348   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Create(int cx,int cy,UINT flags,int cInitial,int cGrow);
349   WINCOMMCTRLAPI BOOL WINAPI ImageList_Destroy(_In_opt_ HIMAGELIST himl);
350   WINCOMMCTRLAPI int WINAPI ImageList_GetImageCount(_In_ HIMAGELIST himl);
351 
352   WINCOMMCTRLAPI
353   BOOL
354   WINAPI
355   ImageList_SetImageCount(
356     _In_ HIMAGELIST himl,
357     _In_ UINT uNewCount);
358 
359   WINCOMMCTRLAPI
360   int
361   WINAPI
362   ImageList_Add(
363     _In_ HIMAGELIST himl,
364     _In_ HBITMAP hbmImage,
365     _In_opt_ HBITMAP hbmMask);
366 
367   WINCOMMCTRLAPI
368   int
369   WINAPI
370   ImageList_ReplaceIcon(
371     _In_ HIMAGELIST himl,
372     _In_ int i,
373     _In_ HICON hicon);
374 
375   WINCOMMCTRLAPI
376   COLORREF
377   WINAPI
378   ImageList_SetBkColor(
379     _In_ HIMAGELIST himl,
380     _In_ COLORREF clrBk);
381 
382   WINCOMMCTRLAPI COLORREF WINAPI ImageList_GetBkColor(_In_ HIMAGELIST himl);
383 
384   WINCOMMCTRLAPI
385   BOOL
386   WINAPI
387   ImageList_SetOverlayImage(
388     _In_ HIMAGELIST himl,
389     _In_ int iImage,
390     _In_ int iOverlay);
391 
392   WINCOMMCTRLAPI
393   HRESULT
394   WINAPI
395   HIMAGELIST_QueryInterface(
396     _In_ HIMAGELIST,
397     _In_ REFIID,
398     _Outptr_ void **);
399 
400 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
401 
402 #define ILD_NORMAL 0x0
403 #define ILD_TRANSPARENT 0x1
404 #define ILD_MASK 0x10
405 #define ILD_IMAGE 0x20
406 #define ILD_ROP 0x40
407 #define ILD_BLEND25 0x2
408 #define ILD_BLEND50 0x4
409 #define ILD_OVERLAYMASK 0xf00
410 #define INDEXTOOVERLAYMASK(i) ((i) << 8)
411 #define ILD_PRESERVEALPHA 0x1000
412 #define ILD_SCALE 0x2000
413 #define ILD_DPISCALE 0x4000
414 
415 #define ILD_SELECTED ILD_BLEND50
416 #define ILD_FOCUS ILD_BLEND25
417 #define ILD_BLEND ILD_BLEND50
418 #define CLR_HILIGHT CLR_DEFAULT
419 
420 #define ILS_NORMAL 0x0
421 #define ILS_GLOW 0x1
422 #define ILS_SHADOW 0x2
423 #define ILS_SATURATE 0x4
424 #define ILS_ALPHA 0x8
425 
426   WINCOMMCTRLAPI
427   BOOL
428   WINAPI
429   ImageList_Draw(
430     _In_ HIMAGELIST himl,
431     _In_ int i,
432     _In_ HDC hdcDst,
433     _In_ int x,
434     _In_ int y,
435     _In_ UINT fStyle);
436 
437   WINCOMMCTRLAPI
438   BOOL
439   WINAPI
440   ImageList_Replace(
441     _In_ HIMAGELIST himl,
442     _In_ int i,
443     _In_ HBITMAP hbmImage,
444     _In_opt_ HBITMAP hbmMask);
445 
446   WINCOMMCTRLAPI
447   int
448   WINAPI
449   ImageList_AddMasked(
450     _In_ HIMAGELIST himl,
451     _In_ HBITMAP hbmImage,
452     _In_ COLORREF crMask);
453 
454   WINCOMMCTRLAPI
455   BOOL
456   WINAPI
457   ImageList_DrawEx(
458     _In_ HIMAGELIST himl,
459     _In_ int i,
460     _In_ HDC hdcDst,
461     _In_ int x,
462     _In_ int y,
463     _In_ int dx,
464     _In_ int dy,
465     _In_ COLORREF rgbBk,
466     _In_ COLORREF rgbFg,
467     _In_ UINT fStyle);
468 
469   WINCOMMCTRLAPI
470   BOOL
471   WINAPI
472   ImageList_DrawIndirect(
473     _In_ IMAGELISTDRAWPARAMS *pimldp);
474 
475   WINCOMMCTRLAPI
476   BOOL
477   WINAPI
478   ImageList_Remove(
479     _In_ HIMAGELIST himl,
480     _In_ int i);
481 
482   WINCOMMCTRLAPI
483   HICON
484   WINAPI
485   ImageList_GetIcon(
486     _In_ HIMAGELIST himl,
487     _In_ int i,
488     _In_ UINT flags);
489 
490   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE hi,LPCSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags);
491   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi,LPCWSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags);
492 
493 #define ImageList_LoadImage __MINGW_NAME_AW(ImageList_LoadImage)
494 
495 #define ILCF_MOVE 0x0
496 #define ILCF_SWAP 0x1
497 
498   WINCOMMCTRLAPI
499   BOOL
500   WINAPI
501   ImageList_Copy(
502     _In_ HIMAGELIST himlDst,
503     _In_ int iDst,
504     _In_ HIMAGELIST himlSrc,
505     _In_ int iSrc,
506     _In_ UINT uFlags);
507 
508   WINCOMMCTRLAPI
509   BOOL
510   WINAPI
511   ImageList_BeginDrag(
512     _In_ HIMAGELIST himlTrack,
513     _In_ int iTrack,
514     _In_ int dxHotspot,
515     _In_ int dyHotspot);
516 
517   WINCOMMCTRLAPI void WINAPI ImageList_EndDrag(void);
518   WINCOMMCTRLAPI BOOL WINAPI ImageList_DragEnter(HWND hwndLock,int x,int y);
519   WINCOMMCTRLAPI BOOL WINAPI ImageList_DragLeave(HWND hwndLock);
520   WINCOMMCTRLAPI BOOL WINAPI ImageList_DragMove(int x,int y);
521 
522   WINCOMMCTRLAPI
523   BOOL
524   WINAPI
525   ImageList_SetDragCursorImage(
526     _In_ HIMAGELIST himlDrag,
527     _In_ int iDrag,
528     _In_ int dxHotspot,
529     _In_ int dyHotspot);
530 
531   WINCOMMCTRLAPI BOOL WINAPI ImageList_DragShowNolock(BOOL fShow);
532 
533   _Success_(return != NULL)
534   WINCOMMCTRLAPI
535   HIMAGELIST
536   WINAPI
537   ImageList_GetDragImage(
538     _Out_opt_ POINT *ppt,
539     _Out_opt_ POINT *pptHotspot);
540 
541 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
542 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
543 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
544 
545 #ifdef __IStream_INTERFACE_DEFINED__
546   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Read(_In_ LPSTREAM pstm);
547   WINCOMMCTRLAPI BOOL WINAPI ImageList_Write(_In_ HIMAGELIST himl, _In_ LPSTREAM pstm);
548 #define ILP_NORMAL 0
549 #define ILP_DOWNLEVEL 1
550   WINCOMMCTRLAPI HRESULT WINAPI ImageList_ReadEx(_In_ DWORD dwFlags, _In_ LPSTREAM pstm, _In_ REFIID riid, _Outptr_ PVOID *ppv);
551   WINCOMMCTRLAPI HRESULT WINAPI ImageList_WriteEx(_In_ HIMAGELIST himl, _In_ DWORD dwFlags, _In_ LPSTREAM pstm);
552 #endif
553 
554 #ifndef IMAGEINFO
555   typedef struct _IMAGEINFO {
556     HBITMAP hbmImage;
557     HBITMAP hbmMask;
558     int Unused1;
559     int Unused2;
560     RECT rcImage;
561   } IMAGEINFO,*LPIMAGEINFO;
562 #endif
563 
564   _Success_(return != 0)
565   WINCOMMCTRLAPI
566   BOOL
567   WINAPI
568   ImageList_GetIconSize(
569     _In_ HIMAGELIST himl,
570     _Out_opt_ int *cx,
571     _Out_opt_ int *cy);
572 
573   _Success_(return != 0)
574   WINCOMMCTRLAPI
575   BOOL
576   WINAPI
577   ImageList_SetIconSize(
578     _In_ HIMAGELIST himl,
579     _In_ int cx,
580     _In_ int cy);
581 
582   _Success_(return != 0)
583   WINCOMMCTRLAPI
584   BOOL
585   WINAPI
586   ImageList_GetImageInfo(
587     _In_ HIMAGELIST himl,
588     _In_ int i,
589     _Out_ IMAGEINFO *pImageInfo);
590 
591   WINCOMMCTRLAPI
592   HIMAGELIST
593   WINAPI
594   ImageList_Merge(
595     _In_ HIMAGELIST himl1,
596     _In_ int i1,
597     _In_ HIMAGELIST himl2,
598     _In_ int i2,
599     _In_ int dx,
600     _In_ int dy);
601 
602   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Duplicate(_In_ HIMAGELIST himl);
603 
604 #endif /* !NOIMAGEAPIS */
605 
606 #ifndef NOHEADER
607 
608 #define WC_HEADERA "SysHeader32"
609 #define WC_HEADERW L"SysHeader32"
610 
611 #define WC_HEADER __MINGW_NAME_AW(WC_HEADER)
612 
613 #define HDS_HORZ 0x0
614 #define HDS_BUTTONS 0x2
615 #define HDS_HOTTRACK 0x4
616 #define HDS_HIDDEN 0x8
617 #define HDS_DRAGDROP 0x40
618 #define HDS_FULLDRAG 0x80
619 #define HDS_FILTERBAR 0x100
620 #define HDS_FLAT 0x200
621 #if (_WIN32_WINNT >= 0x0600)
622 #define HDS_CHECKBOXES 0x400
623 #define HDS_NOSIZING 0x800
624 #define HDS_OVERFLOW 0x1000
625 #endif
626 
627 #define HDFT_ISSTRING 0x0
628 #define HDFT_ISNUMBER 0x1
629 
630 #define HDFT_HASNOVALUE 0x8000
631 
632 #define HD_TEXTFILTER __MINGW_NAME_AW(HD_TEXTFILTER)
633 #define HDTEXTFILTER __MINGW_NAME_AW(HD_TEXTFILTER)
634 #define LPHD_TEXTFILTER __MINGW_NAME_AW(LPHD_TEXTFILTER)
635 #define LPHDTEXTFILTER __MINGW_NAME_AW(LPHD_TEXTFILTER)
636 
637   typedef struct _HD_TEXTFILTERA {
638     LPSTR pszText;
639     INT cchTextMax;
640   } HD_TEXTFILTERA,*LPHD_TEXTFILTERA;
641 
642   typedef struct _HD_TEXTFILTERW {
643     LPWSTR pszText;
644     INT cchTextMax;
645   } HD_TEXTFILTERW,*LPHD_TEXTFILTERW;
646 
647 #define HD_ITEMA HDITEMA
648 #define HD_ITEMW HDITEMW
649 #define HD_ITEM HDITEM
650 
651   typedef struct _HD_ITEMA {
652     UINT mask;
653     int cxy;
654     LPSTR pszText;
655     HBITMAP hbm;
656     int cchTextMax;
657     int fmt;
658     LPARAM lParam;
659     int iImage;
660     int iOrder;
661     UINT type;
662     void  *pvFilter;
663   } HDITEMA,*LPHDITEMA;
664 
665 #define HDITEMA_V1_SIZE CCSIZEOF_STRUCT(HDITEMA,lParam)
666 #define HDITEMW_V1_SIZE CCSIZEOF_STRUCT(HDITEMW,lParam)
667 
668   typedef struct _HD_ITEMW {
669     UINT mask;
670     int cxy;
671     LPWSTR pszText;
672     HBITMAP hbm;
673     int cchTextMax;
674     int fmt;
675     LPARAM lParam;
676     int iImage;
677     int iOrder;
678     UINT type;
679     void *pvFilter;
680   } HDITEMW,*LPHDITEMW;
681 
682 #define HDITEM __MINGW_NAME_AW(HDITEM)
683 #define LPHDITEM __MINGW_NAME_AW(LPHDITEM)
684 
685 #define HDITEM_V1_SIZE __MINGW_NAME_AW_EXT(HDITEM,_V1_SIZE)
686 
687 #define HDI_WIDTH 0x1
688 #define HDI_HEIGHT HDI_WIDTH
689 #define HDI_TEXT 0x2
690 #define HDI_FORMAT 0x4
691 #define HDI_LPARAM 0x8
692 #define HDI_BITMAP 0x10
693 #define HDI_IMAGE 0x20
694 #define HDI_DI_SETITEM 0x40
695 #define HDI_ORDER 0x80
696 #define HDI_FILTER 0x100
697 
698 #define HDF_LEFT 0x0
699 #define HDF_RIGHT 0x1
700 #define HDF_CENTER 0x2
701 #define HDF_JUSTIFYMASK 0x3
702 #define HDF_RTLREADING 0x4
703 
704 #define HDF_OWNERDRAW 0x8000
705 #define HDF_STRING 0x4000
706 #define HDF_BITMAP 0x2000
707 #define HDF_BITMAP_ON_RIGHT 0x1000
708 #define HDF_IMAGE 0x800
709 #define HDF_SORTUP 0x400
710 #define HDF_SORTDOWN 0x200
711 #if (_WIN32_WINNT >= 0x0600)
712 #define HDF_CHECKBOX 0x40
713 #define HDF_CHECKED 0x80
714 #define HDF_FIXEDWIDTH 0x100
715 #define HDF_SPLITBUTTON 0x1000000
716 #endif
717 
718 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
719 #define Header_GetItemCount(hwndHD) (int)SNDMSG((hwndHD),HDM_GETITEMCOUNT,0,0L)
720 
721 #define HDM_INSERTITEMA (HDM_FIRST+1)
722 #define HDM_INSERTITEMW (HDM_FIRST+10)
723 
724 #define HDM_INSERTITEM __MINGW_NAME_AW(HDM_INSERTITEM)
725 
726 #define Header_InsertItem(hwndHD,i,phdi) (int)SNDMSG((hwndHD),HDM_INSERTITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM *)(phdi))
727 
728 #define HDM_DELETEITEM (HDM_FIRST+2)
729 #define Header_DeleteItem(hwndHD,i) (BOOL)SNDMSG((hwndHD),HDM_DELETEITEM,(WPARAM)(int)(i),0L)
730 
731 #define HDM_GETITEMA (HDM_FIRST+3)
732 #define HDM_GETITEMW (HDM_FIRST+11)
733 
734 #define HDM_GETITEM __MINGW_NAME_AW(HDM_GETITEM)
735 
736 #define Header_GetItem(hwndHD,i,phdi) (BOOL)SNDMSG((hwndHD),HDM_GETITEM,(WPARAM)(int)(i),(LPARAM)(HD_ITEM *)(phdi))
737 
738 #define HDM_SETITEMA (HDM_FIRST+4)
739 #define HDM_SETITEMW (HDM_FIRST+12)
740 
741 #define HDM_SETITEM __MINGW_NAME_AW(HDM_SETITEM)
742 
743 #define Header_SetItem(hwndHD,i,phdi) (BOOL)SNDMSG((hwndHD),HDM_SETITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM *)(phdi))
744 
745 #define HD_LAYOUT HDLAYOUT
746 
747   typedef struct _HD_LAYOUT {
748     RECT *prc;
749     WINDOWPOS *pwpos;
750   } HDLAYOUT,*LPHDLAYOUT;
751 
752 #define HDM_LAYOUT (HDM_FIRST+5)
753 #define Header_Layout(hwndHD,playout) (BOOL)SNDMSG((hwndHD),HDM_LAYOUT,0,(LPARAM)(HD_LAYOUT *)(playout))
754 
755 #define HHT_NOWHERE 0x1
756 #define HHT_ONHEADER 0x2
757 #define HHT_ONDIVIDER 0x4
758 #define HHT_ONDIVOPEN 0x8
759 #define HHT_ONFILTER 0x10
760 #define HHT_ONFILTERBUTTON 0x20
761 #define HHT_ABOVE 0x100
762 #define HHT_BELOW 0x200
763 #define HHT_TORIGHT 0x400
764 #define HHT_TOLEFT 0x800
765 
766 #define HD_HITTESTINFO HDHITTESTINFO
767 
768   typedef struct _HD_HITTESTINFO {
769     POINT pt;
770     UINT flags;
771     int iItem;
772   } HDHITTESTINFO,*LPHDHITTESTINFO;
773 
774 #define HDM_HITTEST (HDM_FIRST+6)
775 
776 #define HDM_GETITEMRECT (HDM_FIRST+7)
777 #define Header_GetItemRect(hwnd,iItem,lprc) (BOOL)SNDMSG((hwnd),HDM_GETITEMRECT,(WPARAM)(iItem),(LPARAM)(lprc))
778 
779 #define HDM_SETIMAGELIST (HDM_FIRST+8)
780 #define Header_SetImageList(hwnd,himl) (HIMAGELIST)SNDMSG((hwnd),HDM_SETIMAGELIST,0,(LPARAM)(himl))
781 
782 #define HDM_GETIMAGELIST (HDM_FIRST+9)
783 #define Header_GetImageList(hwnd) (HIMAGELIST)SNDMSG((hwnd),HDM_GETIMAGELIST,0,0)
784 
785 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
786 #define Header_OrderToIndex(hwnd,i) (int)SNDMSG((hwnd),HDM_ORDERTOINDEX,(WPARAM)(i),0)
787 
788 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
789 #define Header_CreateDragImage(hwnd,i) (HIMAGELIST)SNDMSG((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)(i),0)
790 
791 #define HDM_GETORDERARRAY (HDM_FIRST+17)
792 #define Header_GetOrderArray(hwnd,iCount,lpi) (BOOL)SNDMSG((hwnd),HDM_GETORDERARRAY,(WPARAM)(iCount),(LPARAM)(lpi))
793 
794 #define HDM_SETORDERARRAY (HDM_FIRST+18)
795 #define Header_SetOrderArray(hwnd,iCount,lpi) (BOOL)SNDMSG((hwnd),HDM_SETORDERARRAY,(WPARAM)(iCount),(LPARAM)(lpi))
796 
797 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
798 #define Header_SetHotDivider(hwnd,fPos,dw) (int)SNDMSG((hwnd),HDM_SETHOTDIVIDER,(WPARAM)(fPos),(LPARAM)(dw))
799 
800 #define HDM_SETBITMAPMARGIN (HDM_FIRST+20)
801 #define Header_SetBitmapMargin(hwnd,iWidth) (int)SNDMSG((hwnd),HDM_SETBITMAPMARGIN,(WPARAM)(iWidth),0)
802 
803 #define HDM_GETBITMAPMARGIN (HDM_FIRST+21)
804 #define Header_GetBitmapMargin(hwnd) (int)SNDMSG((hwnd),HDM_GETBITMAPMARGIN,0,0)
805 
806 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
807 #define Header_SetUnicodeFormat(hwnd,fUnicode) (BOOL)SNDMSG((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
808 
809 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
810 #define Header_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd),HDM_GETUNICODEFORMAT,0,0)
811 
812 #define HDM_SETFILTERCHANGETIMEOUT (HDM_FIRST+22)
813 #define Header_SetFilterChangeTimeout(hwnd,i) (int)SNDMSG((hwnd),HDM_SETFILTERCHANGETIMEOUT,0,(LPARAM)(i))
814 
815 #define HDM_EDITFILTER (HDM_FIRST+23)
816 #define Header_EditFilter(hwnd,i,fDiscardChanges) (int)SNDMSG((hwnd),HDM_EDITFILTER,(WPARAM)(i),MAKELPARAM(fDiscardChanges,0))
817 
818 #define HDM_CLEARFILTER (HDM_FIRST+24)
819 #define Header_ClearFilter(hwnd,i) (int)SNDMSG((hwnd),HDM_CLEARFILTER,(WPARAM)(i),0)
820 #define Header_ClearAllFilters(hwnd) (int)SNDMSG((hwnd),HDM_CLEARFILTER,(WPARAM)-1,0)
821 
822 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
823 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
824 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
825 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
826 #define HDN_ITEMCLICKA (HDN_FIRST-2)
827 #define HDN_ITEMCLICKW (HDN_FIRST-22)
828 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
829 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
830 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
831 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
832 #define HDN_BEGINTRACKA (HDN_FIRST-6)
833 #define HDN_BEGINTRACKW (HDN_FIRST-26)
834 #define HDN_ENDTRACKA (HDN_FIRST-7)
835 #define HDN_ENDTRACKW (HDN_FIRST-27)
836 #define HDN_TRACKA (HDN_FIRST-8)
837 #define HDN_TRACKW (HDN_FIRST-28)
838 #define HDN_GETDISPINFOA (HDN_FIRST-9)
839 #define HDN_GETDISPINFOW (HDN_FIRST-29)
840 #define HDN_BEGINDRAG (HDN_FIRST-10)
841 #define HDN_ENDDRAG (HDN_FIRST-11)
842 #define HDN_FILTERCHANGE (HDN_FIRST-12)
843 #define HDN_FILTERBTNCLICK (HDN_FIRST-13)
844 #define HDN_BEGINFILTEREDIT (HDN_FIRST-14)
845 #define HDN_ENDFILTEREDIT (HDN_FIRST-15)
846 #define HDN_ITEMSTATEICONCLICK (HDN_FIRST-16)
847 #define HDN_ITEMKEYDOWN (HDN_FIRST-17)
848 #define HDN_DROPDOWN (HDN_FIRST-18)
849 #define HDN_OVERFLOWCLICK (HDN_FIRST-19)
850 
851 #define HDN_ITEMCHANGING __MINGW_NAME_AW(HDN_ITEMCHANGING)
852 #define HDN_ITEMCHANGED __MINGW_NAME_AW(HDN_ITEMCHANGED)
853 #define HDN_ITEMCLICK __MINGW_NAME_AW(HDN_ITEMCLICK)
854 #define HDN_ITEMDBLCLICK __MINGW_NAME_AW(HDN_ITEMDBLCLICK)
855 #define HDN_DIVIDERDBLCLICK __MINGW_NAME_AW(HDN_DIVIDERDBLCLICK)
856 #define HDN_BEGINTRACK __MINGW_NAME_AW(HDN_BEGINTRACK)
857 #define HDN_ENDTRACK __MINGW_NAME_AW(HDN_ENDTRACK)
858 #define HDN_TRACK __MINGW_NAME_AW(HDN_TRACK)
859 #define HDN_GETDISPINFO __MINGW_NAME_AW(HDN_GETDISPINFO)
860 
861 #define HD_NOTIFYA NMHEADERA
862 #define HD_NOTIFYW NMHEADERW
863 #define HD_NOTIFY NMHEADER
864 
865   typedef struct tagNMHEADERA {
866     NMHDR hdr;
867     int iItem;
868     int iButton;
869     HDITEMA *pitem;
870   } NMHEADERA,*LPNMHEADERA;
871 
872   typedef struct tagNMHEADERW {
873     NMHDR hdr;
874     int iItem;
875     int iButton;
876     HDITEMW *pitem;
877   } NMHEADERW,*LPNMHEADERW;
878 
879 #define NMHEADER __MINGW_NAME_AW(NMHEADER)
880 #define LPNMHEADER __MINGW_NAME_AW(LPNMHEADER)
881 
882   typedef struct tagNMHDDISPINFOW {
883     NMHDR hdr;
884     int iItem;
885     UINT mask;
886     LPWSTR pszText;
887     int cchTextMax;
888     int iImage;
889     LPARAM lParam;
890   } NMHDDISPINFOW,*LPNMHDDISPINFOW;
891 
892   typedef struct tagNMHDDISPINFOA {
893     NMHDR hdr;
894     int iItem;
895     UINT mask;
896     LPSTR pszText;
897     int cchTextMax;
898     int iImage;
899     LPARAM lParam;
900   } NMHDDISPINFOA,*LPNMHDDISPINFOA;
901 
902 #define NMHDDISPINFO __MINGW_NAME_AW(NMHDDISPINFO)
903 #define LPNMHDDISPINFO __MINGW_NAME_AW(LPNMHDDISPINFO)
904 
905   typedef struct tagNMHDFILTERBTNCLICK {
906     NMHDR hdr;
907     INT iItem;
908     RECT rc;
909   } NMHDFILTERBTNCLICK,*LPNMHDFILTERBTNCLICK;
910 
911 #endif /* !NOHEADER */
912 
913 #ifndef NOTOOLBAR
914 
915 #define TOOLBARCLASSNAMEW L"ToolbarWindow32"
916 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
917 
918 #define TOOLBARCLASSNAME __MINGW_NAME_AW(TOOLBARCLASSNAME)
919 
920   typedef struct _TBBUTTON {
921     int iBitmap;
922     int idCommand;
923     BYTE fsState;
924     BYTE fsStyle;
925 #ifdef _WIN64
926     BYTE bReserved[6];
927 #else
928     BYTE bReserved[2];
929 #endif
930     DWORD_PTR dwData;
931     INT_PTR iString;
932   } TBBUTTON,NEAR *PTBBUTTON,*LPTBBUTTON;
933   typedef const TBBUTTON *LPCTBBUTTON;
934 
935   typedef struct _COLORMAP {
936     COLORREF from;
937     COLORREF to;
938   } COLORMAP,*LPCOLORMAP;
939 
940   WINCOMMCTRLAPI HWND WINAPI CreateToolbarEx(HWND hwnd,DWORD ws,UINT wID,int nBitmaps,HINSTANCE hBMInst,UINT_PTR wBMID,LPCTBBUTTON lpButtons,int iNumButtons,int dxButton,int dyButton,int dxBitmap,int dyBitmap,UINT uStructSize);
941   WINCOMMCTRLAPI HBITMAP WINAPI CreateMappedBitmap(HINSTANCE hInstance,INT_PTR idBitmap,UINT wFlags,LPCOLORMAP lpColorMap,int iNumMaps);
942 
943 #define CMB_MASKED 0x2
944 #define TBSTATE_CHECKED 0x1
945 #define TBSTATE_PRESSED 0x2
946 #define TBSTATE_ENABLED 0x4
947 #define TBSTATE_HIDDEN 0x8
948 #define TBSTATE_INDETERMINATE 0x10
949 #define TBSTATE_WRAP 0x20
950 #define TBSTATE_ELLIPSES 0x40
951 #define TBSTATE_MARKED 0x80
952 
953 #define TBSTYLE_BUTTON 0x0
954 #define TBSTYLE_SEP 0x1
955 #define TBSTYLE_CHECK 0x2
956 #define TBSTYLE_GROUP 0x4
957 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
958 #define TBSTYLE_DROPDOWN 0x8
959 #define TBSTYLE_AUTOSIZE 0x10
960 #define TBSTYLE_NOPREFIX 0x20
961 #define TBSTYLE_TOOLTIPS 0x100
962 #define TBSTYLE_WRAPABLE 0x200
963 #define TBSTYLE_ALTDRAG 0x400
964 #define TBSTYLE_FLAT 0x800
965 #define TBSTYLE_LIST 0x1000
966 #define TBSTYLE_CUSTOMERASE 0x2000
967 #define TBSTYLE_REGISTERDROP 0x4000
968 #define TBSTYLE_TRANSPARENT 0x8000
969 
970 #define BTNS_BUTTON TBSTYLE_BUTTON
971 #define BTNS_SEP TBSTYLE_SEP
972 #define BTNS_CHECK TBSTYLE_CHECK
973 #define BTNS_GROUP TBSTYLE_GROUP
974 #define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP
975 #define BTNS_DROPDOWN TBSTYLE_DROPDOWN
976 #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE
977 #define BTNS_NOPREFIX TBSTYLE_NOPREFIX
978 #define BTNS_SHOWTEXT 0x40
979 #define BTNS_WHOLEDROPDOWN 0x80
980 
981 #define TBSTYLE_EX_DRAWDDARROWS         0x00000001
982 #define TBSTYLE_EX_MULTICOLUMN          0x00000002
983 #define TBSTYLE_EX_VERTICAL             0x00000004
984 #define TBSTYLE_EX_MIXEDBUTTONS         0x00000008
985 #define TBSTYLE_EX_HIDECLIPPEDBUTTONS   0x00000010 /* don't show partially obscured buttons */
986 #define TBSTYLE_EX_DOUBLEBUFFER         0x00000080 /* Double Buffer the toolbar */
987 
988   typedef struct _NMTBCUSTOMDRAW {
989     NMCUSTOMDRAW nmcd;
990     HBRUSH hbrMonoDither;
991     HBRUSH hbrLines;
992     HPEN hpenLines;
993     COLORREF clrText;
994     COLORREF clrMark;
995     COLORREF clrTextHighlight;
996     COLORREF clrBtnFace;
997     COLORREF clrBtnHighlight;
998     COLORREF clrHighlightHotTrack;
999     RECT rcText;
1000     int nStringBkMode;
1001     int nHLStringBkMode;
1002     int iListGap;
1003   } NMTBCUSTOMDRAW,*LPNMTBCUSTOMDRAW;
1004 
1005 #define TBCDRF_NOEDGES 0x10000
1006 #define TBCDRF_HILITEHOTTRACK 0x20000
1007 #define TBCDRF_NOOFFSET 0x40000
1008 #define TBCDRF_NOMARK 0x80000
1009 #define TBCDRF_NOETCHEDEFFECT 0x100000
1010 
1011 #define TBCDRF_BLENDICON 0x200000
1012 #define TBCDRF_NOBACKGROUND 0x400000
1013 
1014 #define TB_ENABLEBUTTON (WM_USER+1)
1015 #define TB_CHECKBUTTON (WM_USER+2)
1016 #define TB_PRESSBUTTON (WM_USER+3)
1017 #define TB_HIDEBUTTON (WM_USER+4)
1018 #define TB_INDETERMINATE (WM_USER+5)
1019 #define TB_MARKBUTTON (WM_USER+6)
1020 #define TB_ISBUTTONENABLED (WM_USER+9)
1021 #define TB_ISBUTTONCHECKED (WM_USER+10)
1022 #define TB_ISBUTTONPRESSED (WM_USER+11)
1023 #define TB_ISBUTTONHIDDEN (WM_USER+12)
1024 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
1025 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
1026 #define TB_SETSTATE (WM_USER+17)
1027 #define TB_GETSTATE (WM_USER+18)
1028 #define TB_ADDBITMAP (WM_USER+19)
1029 
1030   typedef struct tagTBADDBITMAP {
1031     HINSTANCE hInst;
1032     UINT_PTR nID;
1033   } TBADDBITMAP,*LPTBADDBITMAP;
1034 
1035 #define HINST_COMMCTRL ((HINSTANCE)-1)
1036 #define IDB_STD_SMALL_COLOR 0
1037 #define IDB_STD_LARGE_COLOR 1
1038 #define IDB_VIEW_SMALL_COLOR 4
1039 #define IDB_VIEW_LARGE_COLOR 5
1040 #define IDB_HIST_SMALL_COLOR 8
1041 #define IDB_HIST_LARGE_COLOR 9
1042 
1043 #define STD_CUT 0
1044 #define STD_COPY 1
1045 #define STD_PASTE 2
1046 #define STD_UNDO 3
1047 #define STD_REDOW 4
1048 #define STD_DELETE 5
1049 #define STD_FILENEW 6
1050 #define STD_FILEOPEN 7
1051 #define STD_FILESAVE 8
1052 #define STD_PRINTPRE 9
1053 #define STD_PROPERTIES 10
1054 #define STD_HELP 11
1055 #define STD_FIND 12
1056 #define STD_REPLACE 13
1057 #define STD_PRINT 14
1058 
1059 #define VIEW_LARGEICONS 0
1060 #define VIEW_SMALLICONS 1
1061 #define VIEW_LIST 2
1062 #define VIEW_DETAILS 3
1063 #define VIEW_SORTNAME 4
1064 #define VIEW_SORTSIZE 5
1065 #define VIEW_SORTDATE 6
1066 #define VIEW_SORTTYPE 7
1067 #define VIEW_PARENTFOLDER 8
1068 #define VIEW_NETCONNECT 9
1069 #define VIEW_NETDISCONNECT 10
1070 #define VIEW_NEWFOLDER 11
1071 #define VIEW_VIEWMENU 12
1072 #define HIST_BACK 0
1073 #define HIST_FORWARD 1
1074 #define HIST_FAVORITES 2
1075 #define HIST_ADDTOFAVORITES 3
1076 #define HIST_VIEWTREE 4
1077 
1078 #define TB_ADDBUTTONSA (WM_USER+20)
1079 #define TB_INSERTBUTTONA (WM_USER+21)
1080 #define TB_DELETEBUTTON (WM_USER+22)
1081 #define TB_GETBUTTON (WM_USER+23)
1082 #define TB_BUTTONCOUNT (WM_USER+24)
1083 #define TB_COMMANDTOINDEX (WM_USER+25)
1084 
1085   typedef struct tagTBSAVEPARAMSA {
1086     HKEY hkr;
1087     LPCSTR pszSubKey;
1088     LPCSTR pszValueName;
1089   } TBSAVEPARAMSA,*LPTBSAVEPARAMSA;
1090 
1091   typedef struct tagTBSAVEPARAMSW {
1092     HKEY hkr;
1093     LPCWSTR pszSubKey;
1094     LPCWSTR pszValueName;
1095   } TBSAVEPARAMSW,*LPTBSAVEPARAMW;
1096 
1097 #define TBSAVEPARAMS __MINGW_NAME_AW(TBSAVEPARAMS)
1098 #define LPTBSAVEPARAMS __MINGW_NAME_AW(LPTBSAVEPARAMS)
1099 
1100 #define TB_SAVERESTOREA (WM_USER+26)
1101 #define TB_SAVERESTOREW (WM_USER+76)
1102 #define TB_CUSTOMIZE (WM_USER+27)
1103 #define TB_ADDSTRINGA (WM_USER+28)
1104 #define TB_ADDSTRINGW (WM_USER+77)
1105 #define TB_GETITEMRECT (WM_USER+29)
1106 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
1107 #define TB_SETBUTTONSIZE (WM_USER+31)
1108 #define TB_SETBITMAPSIZE (WM_USER+32)
1109 #define TB_AUTOSIZE (WM_USER+33)
1110 #define TB_GETTOOLTIPS (WM_USER+35)
1111 #define TB_SETTOOLTIPS (WM_USER+36)
1112 #define TB_SETPARENT (WM_USER+37)
1113 #define TB_SETROWS (WM_USER+39)
1114 #define TB_GETROWS (WM_USER+40)
1115 #define TB_SETCMDID (WM_USER+42)
1116 #define TB_CHANGEBITMAP (WM_USER+43)
1117 #define TB_GETBITMAP (WM_USER+44)
1118 #define TB_GETBUTTONTEXTA (WM_USER+45)
1119 #define TB_GETBUTTONTEXTW (WM_USER+75)
1120 #define TB_REPLACEBITMAP (WM_USER+46)
1121 #define TB_SETINDENT (WM_USER+47)
1122 #define TB_SETIMAGELIST (WM_USER+48)
1123 #define TB_GETIMAGELIST (WM_USER+49)
1124 #define TB_LOADIMAGES (WM_USER+50)
1125 #define TB_GETRECT (WM_USER+51)
1126 #define TB_SETHOTIMAGELIST (WM_USER+52)
1127 #define TB_GETHOTIMAGELIST (WM_USER+53)
1128 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
1129 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
1130 #define TB_SETSTYLE (WM_USER+56)
1131 #define TB_GETSTYLE (WM_USER+57)
1132 #define TB_GETBUTTONSIZE (WM_USER+58)
1133 #define TB_SETBUTTONWIDTH (WM_USER+59)
1134 #define TB_SETMAXTEXTROWS (WM_USER+60)
1135 #define TB_GETTEXTROWS (WM_USER+61)
1136 
1137 #define TB_GETBUTTONTEXT __MINGW_NAME_AW(TB_GETBUTTONTEXT)
1138 #define TB_SAVERESTORE __MINGW_NAME_AW(TB_SAVERESTORE)
1139 #define TB_ADDSTRING __MINGW_NAME_AW(TB_ADDSTRING)
1140 
1141 #define TB_GETOBJECT (WM_USER+62)
1142 #define TB_GETHOTITEM (WM_USER+71)
1143 #define TB_SETHOTITEM (WM_USER+72)
1144 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
1145 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
1146 #define TB_MAPACCELERATORA (WM_USER+78)
1147 
1148 #define TB_SETBOUNDINGSIZE (WM_USER+93)
1149 
1150   typedef struct {
1151     int iButton;
1152     DWORD dwFlags;
1153   } TBINSERTMARK,*LPTBINSERTMARK;
1154 #define TBIMHT_AFTER 0x1
1155 #define TBIMHT_BACKGROUND 0x2
1156 
1157 #define TB_GETINSERTMARK (WM_USER+79)
1158 #define TB_SETINSERTMARK (WM_USER+80)
1159 #define TB_INSERTMARKHITTEST (WM_USER+81)
1160 #define TB_MOVEBUTTON (WM_USER+82)
1161 #define TB_GETMAXSIZE (WM_USER+83)
1162 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
1163 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
1164 #define TB_GETPADDING (WM_USER+86)
1165 #define TB_SETPADDING (WM_USER+87)
1166 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
1167 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
1168 
1169 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1170 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1171 
1172 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1173 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1174 
1175 #define TB_MAPACCELERATORW (WM_USER+90)
1176 
1177 #define TB_MAPACCELERATOR __MINGW_NAME_AW(TB_MAPACCELERATOR)
1178 
1179   typedef struct {
1180     HINSTANCE hInstOld;
1181     UINT_PTR nIDOld;
1182     HINSTANCE hInstNew;
1183     UINT_PTR nIDNew;
1184     int nButtons;
1185   } TBREPLACEBITMAP,*LPTBREPLACEBITMAP;
1186 
1187 #define TBBF_LARGE 0x1
1188 
1189 #define TB_GETBITMAPFLAGS (WM_USER+41)
1190 
1191 #define TBIF_IMAGE 0x1
1192 #define TBIF_TEXT 0x2
1193 #define TBIF_STATE 0x4
1194 #define TBIF_STYLE 0x8
1195 #define TBIF_LPARAM 0x10
1196 #define TBIF_COMMAND 0x20
1197 #define TBIF_SIZE 0x40
1198 #define TBIF_BYINDEX 0x80000000
1199 
1200   typedef struct {
1201     UINT cbSize;
1202     DWORD dwMask;
1203     int idCommand;
1204     int iImage;
1205     BYTE fsState;
1206     BYTE fsStyle;
1207     WORD cx;
1208     DWORD_PTR lParam;
1209     LPSTR pszText;
1210     int cchText;
1211   } TBBUTTONINFOA,*LPTBBUTTONINFOA;
1212 
1213   typedef struct {
1214     UINT cbSize;
1215     DWORD dwMask;
1216     int idCommand;
1217     int iImage;
1218     BYTE fsState;
1219     BYTE fsStyle;
1220     WORD cx;
1221     DWORD_PTR lParam;
1222     LPWSTR pszText;
1223     int cchText;
1224   } TBBUTTONINFOW,*LPTBBUTTONINFOW;
1225 
1226 #define TBBUTTONINFO __MINGW_NAME_AW(TBBUTTONINFO)
1227 #define LPTBBUTTONINFO __MINGW_NAME_AW(LPTBBUTTONINFO)
1228 
1229 #define TB_GETBUTTONINFOW (WM_USER+63)
1230 #define TB_SETBUTTONINFOW (WM_USER+64)
1231 #define TB_GETBUTTONINFOA (WM_USER+65)
1232 #define TB_SETBUTTONINFOA (WM_USER+66)
1233 
1234 #define TB_GETBUTTONINFO __MINGW_NAME_AW(TB_GETBUTTONINFO)
1235 #define TB_SETBUTTONINFO __MINGW_NAME_AW(TB_SETBUTTONINFO)
1236 
1237 #define TB_INSERTBUTTONW (WM_USER+67)
1238 #define TB_ADDBUTTONSW (WM_USER+68)
1239 
1240 #define TB_HITTEST (WM_USER+69)
1241 
1242 #define TB_INSERTBUTTON __MINGW_NAME_AW(TB_INSERTBUTTON)
1243 #define TB_ADDBUTTONS __MINGW_NAME_AW(TB_ADDBUTTONS)
1244 
1245 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
1246 
1247 #define TB_GETSTRINGW (WM_USER+91)
1248 #define TB_GETSTRINGA (WM_USER+92)
1249 
1250 #define TB_GETSTRING __MINGW_NAME_AW(TB_GETSTRING)
1251 
1252 #define TB_SETHOTITEM2 (WM_USER+94)
1253 #define TB_HASACCELERATOR (WM_USER+95)
1254 #define TB_SETLISTGAP (WM_USER+96)
1255 #define TB_GETIMAGELISTCOUNT (WM_USER+98)
1256 #define TB_GETIDEALSIZE (WM_USER+99)
1257 #define TB_TRANSLATEACCELERATOR CCM_TRANSLATEACCELERATOR
1258 
1259 #define TBMF_PAD 0x1
1260 #define TBMF_BARPAD 0x2
1261 #define TBMF_BUTTONSPACING 0x4
1262 
1263   typedef struct {
1264     UINT cbSize;
1265     DWORD dwMask;
1266     int cxPad;
1267     int cyPad;
1268     int cxBarPad;
1269     int cyBarPad;
1270     int cxButtonSpacing;
1271     int cyButtonSpacing;
1272   } TBMETRICS,*LPTBMETRICS;
1273 
1274 #define TB_GETMETRICS (WM_USER+101)
1275 #define TB_SETMETRICS (WM_USER+102)
1276 #define TB_SETWINDOWTHEME CCM_SETWINDOWTHEME
1277 
1278 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
1279 #define TBN_BEGINDRAG (TBN_FIRST-1)
1280 #define TBN_ENDDRAG (TBN_FIRST-2)
1281 #define TBN_BEGINADJUST (TBN_FIRST-3)
1282 #define TBN_ENDADJUST (TBN_FIRST-4)
1283 #define TBN_RESET (TBN_FIRST-5)
1284 #define TBN_QUERYINSERT (TBN_FIRST-6)
1285 #define TBN_QUERYDELETE (TBN_FIRST-7)
1286 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
1287 #define TBN_CUSTHELP (TBN_FIRST-9)
1288 #define TBN_DROPDOWN (TBN_FIRST - 10)
1289 #define TBN_GETOBJECT (TBN_FIRST - 12)
1290   typedef struct tagNMTBHOTITEM {
1291     NMHDR hdr;
1292     int idOld;
1293     int idNew;
1294     DWORD dwFlags;
1295   } NMTBHOTITEM,*LPNMTBHOTITEM;
1296 
1297 #define HICF_OTHER 0x0
1298 #define HICF_MOUSE 0x1
1299 #define HICF_ARROWKEYS 0x2
1300 #define HICF_ACCELERATOR 0x4
1301 #define HICF_DUPACCEL 0x8
1302 #define HICF_ENTERING 0x10
1303 #define HICF_LEAVING 0x20
1304 #define HICF_RESELECT 0x40
1305 #define HICF_LMOUSE 0x80
1306 #define HICF_TOGGLEDROPDOWN 0x100
1307 
1308 #define TBN_HOTITEMCHANGE (TBN_FIRST - 13)
1309 #define TBN_DRAGOUT (TBN_FIRST - 14)
1310 #define TBN_DELETINGBUTTON (TBN_FIRST - 15)
1311 #define TBN_GETDISPINFOA (TBN_FIRST - 16)
1312 #define TBN_GETDISPINFOW (TBN_FIRST - 17)
1313 #define TBN_GETINFOTIPA (TBN_FIRST - 18)
1314 #define TBN_GETINFOTIPW (TBN_FIRST - 19)
1315 #define TBN_GETBUTTONINFOW (TBN_FIRST - 20)
1316 #define TBN_RESTORE (TBN_FIRST - 21)
1317 #define TBN_SAVE (TBN_FIRST - 22)
1318 #define TBN_INITCUSTOMIZE (TBN_FIRST - 23)
1319 #define TBN_WRAPHOTITEM (TBN_FIRST - 24)
1320 #define TBN_DUPACCELERATOR (TBN_FIRST - 25)
1321 #define TBN_WRAPACCELERATOR (TBN_FIRST - 26)
1322 #define TBN_DRAGOVER (TBN_FIRST - 27)
1323 #define TBN_MAPACCELERATOR (TBN_FIRST - 28)
1324 #define TBNRF_HIDEHELP 0x1
1325 #define TBNRF_ENDCUSTOMIZE 0x2
1326 
1327   typedef struct tagNMTBSAVE {
1328     NMHDR hdr;
1329     DWORD *pData;
1330     DWORD *pCurrent;
1331     UINT cbData;
1332     int iItem;
1333     int cButtons;
1334     TBBUTTON tbButton;
1335   } NMTBSAVE,*LPNMTBSAVE;
1336 
1337   typedef struct tagNMTBRESTORE {
1338     NMHDR hdr;
1339     DWORD *pData;
1340     DWORD *pCurrent;
1341     UINT cbData;
1342     int iItem;
1343     int cButtons;
1344     int cbBytesPerRecord;
1345     TBBUTTON tbButton;
1346   } NMTBRESTORE,*LPNMTBRESTORE;
1347 
1348   typedef struct tagNMTBGETINFOTIPA {
1349     NMHDR hdr;
1350     LPSTR pszText;
1351     int cchTextMax;
1352     int iItem;
1353     LPARAM lParam;
1354   } NMTBGETINFOTIPA,*LPNMTBGETINFOTIPA;
1355 
1356   typedef struct tagNMTBGETINFOTIPW {
1357     NMHDR hdr;
1358     LPWSTR pszText;
1359     int cchTextMax;
1360     int iItem;
1361     LPARAM lParam;
1362   } NMTBGETINFOTIPW,*LPNMTBGETINFOTIPW;
1363 
1364 #define TBN_GETINFOTIP __MINGW_NAME_AW(TBN_GETINFOTIP)
1365 #define NMTBGETINFOTIP __MINGW_NAME_AW(NMTBGETINFOTIP)
1366 #define LPNMTBGETINFOTIP __MINGW_NAME_AW(LPNMTBGETINFOTIP)
1367 
1368 #define TBNF_IMAGE 0x1
1369 #define TBNF_TEXT 0x2
1370 #define TBNF_DI_SETITEM 0x10000000
1371 
1372   typedef struct {
1373     NMHDR hdr;
1374     DWORD dwMask;
1375     int idCommand;
1376     DWORD_PTR lParam;
1377     int iImage;
1378     LPSTR pszText;
1379     int cchText;
1380   } NMTBDISPINFOA,*LPNMTBDISPINFOA;
1381 
1382   typedef struct {
1383     NMHDR hdr;
1384     DWORD dwMask;
1385     int idCommand;
1386     DWORD_PTR lParam;
1387     int iImage;
1388     LPWSTR pszText;
1389     int cchText;
1390   } NMTBDISPINFOW,*LPNMTBDISPINFOW;
1391 
1392 #define TBN_GETDISPINFO __MINGW_NAME_AW(TBN_GETDISPINFO)
1393 #define NMTBDISPINFO __MINGW_NAME_AW(NMTBDISPINFO)
1394 #define LPNMTBDISPINFO __MINGW_NAME_AW(LPNMTBDISPINFO)
1395 
1396 #define TBDDRET_DEFAULT 0
1397 #define TBDDRET_NODEFAULT 1
1398 #define TBDDRET_TREATPRESSED 2
1399 
1400 #define TBN_GETBUTTONINFO __MINGW_NAME_AW(TBN_GETBUTTONINFO)
1401 
1402 #define TBNOTIFYA NMTOOLBARA
1403 #define TBNOTIFYW NMTOOLBARW
1404 #define LPTBNOTIFYA LPNMTOOLBARA
1405 #define LPTBNOTIFYW LPNMTOOLBARW
1406 
1407 #define TBNOTIFY NMTOOLBAR
1408 #define LPTBNOTIFY LPNMTOOLBAR
1409 
1410   typedef struct tagNMTOOLBARA {
1411     NMHDR hdr;
1412     int iItem;
1413     TBBUTTON tbButton;
1414     int cchText;
1415     LPSTR pszText;
1416     RECT rcButton;
1417   } NMTOOLBARA,*LPNMTOOLBARA;
1418 
1419   typedef struct tagNMTOOLBARW {
1420     NMHDR hdr;
1421     int iItem;
1422     TBBUTTON tbButton;
1423     int cchText;
1424     LPWSTR pszText;
1425     RECT rcButton;
1426   } NMTOOLBARW,*LPNMTOOLBARW;
1427 
1428 #define NMTOOLBAR __MINGW_NAME_AW(NMTOOLBAR)
1429 #define LPNMTOOLBAR __MINGW_NAME_AW(LPNMTOOLBAR)
1430 
1431 #endif /* !NOTOOLBAR */
1432 
1433 #ifndef NOREBAR
1434 
1435 #define REBARCLASSNAMEW L"ReBarWindow32"
1436 #define REBARCLASSNAMEA "ReBarWindow32"
1437 
1438 #define REBARCLASSNAME __MINGW_NAME_AW(REBARCLASSNAME)
1439 
1440 #define RBIM_IMAGELIST 0x1
1441 
1442 #define RBS_TOOLTIPS 0x100
1443 #define RBS_VARHEIGHT 0x200
1444 #define RBS_BANDBORDERS 0x400
1445 #define RBS_FIXEDORDER 0x800
1446 #define RBS_REGISTERDROP 0x1000
1447 #define RBS_AUTOSIZE 0x2000
1448 #define RBS_VERTICALGRIPPER 0x4000
1449 #define RBS_DBLCLKTOGGLE 0x8000
1450 
1451   typedef struct tagREBARINFO {
1452     UINT cbSize;
1453     UINT fMask;
1454 #ifndef NOIMAGEAPIS
1455     HIMAGELIST himl;
1456 #else
1457     HANDLE himl;
1458 #endif
1459   } REBARINFO,*LPREBARINFO;
1460 
1461 #define RBBS_BREAK 0x1
1462 #define RBBS_FIXEDSIZE 0x2
1463 #define RBBS_CHILDEDGE 0x4
1464 #define RBBS_HIDDEN 0x8
1465 #define RBBS_NOVERT 0x10
1466 #define RBBS_FIXEDBMP 0x20
1467 #define RBBS_VARIABLEHEIGHT 0x40
1468 #define RBBS_GRIPPERALWAYS 0x80
1469 #define RBBS_NOGRIPPER 0x100
1470 #define RBBS_USECHEVRON 0x200
1471 #define RBBS_HIDETITLE 0x400
1472 #define RBBS_TOPALIGN 0x800
1473 
1474 #define RBBIM_STYLE 0x1
1475 #define RBBIM_COLORS 0x2
1476 #define RBBIM_TEXT 0x4
1477 #define RBBIM_IMAGE 0x8
1478 #define RBBIM_CHILD 0x10
1479 #define RBBIM_CHILDSIZE 0x20
1480 #define RBBIM_SIZE 0x40
1481 #define RBBIM_BACKGROUND 0x80
1482 #define RBBIM_ID 0x100
1483 #define RBBIM_IDEALSIZE 0x200
1484 #define RBBIM_LPARAM 0x400
1485 #define RBBIM_HEADERSIZE 0x800
1486 
1487   typedef struct tagREBARBANDINFOA {
1488     UINT cbSize;
1489     UINT fMask;
1490     UINT fStyle;
1491     COLORREF clrFore;
1492     COLORREF clrBack;
1493     LPSTR lpText;
1494     UINT cch;
1495     int iImage;
1496     HWND hwndChild;
1497     UINT cxMinChild;
1498     UINT cyMinChild;
1499     UINT cx;
1500     HBITMAP hbmBack;
1501     UINT wID;
1502     UINT cyChild;
1503     UINT cyMaxChild;
1504     UINT cyIntegral;
1505     UINT cxIdeal;
1506     LPARAM lParam;
1507     UINT cxHeader;
1508   } REBARBANDINFOA,*LPREBARBANDINFOA;
1509   typedef REBARBANDINFOA CONST *LPCREBARBANDINFOA;
1510 
1511 #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA,wID)
1512 #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW,wID)
1513 #define REBARBANDINFOA_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA,cxHeader)
1514 #define REBARBANDINFOW_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW,cxHeader)
1515 
1516   typedef struct tagREBARBANDINFOW {
1517     UINT cbSize;
1518     UINT fMask;
1519     UINT fStyle;
1520     COLORREF clrFore;
1521     COLORREF clrBack;
1522     LPWSTR lpText;
1523     UINT cch;
1524     int iImage;
1525     HWND hwndChild;
1526     UINT cxMinChild;
1527     UINT cyMinChild;
1528     UINT cx;
1529     HBITMAP hbmBack;
1530     UINT wID;
1531     UINT cyChild;
1532     UINT cyMaxChild;
1533     UINT cyIntegral;
1534     UINT cxIdeal;
1535     LPARAM lParam;
1536     UINT cxHeader;
1537   } REBARBANDINFOW,*LPREBARBANDINFOW;
1538 
1539   typedef REBARBANDINFOW CONST *LPCREBARBANDINFOW;
1540 
1541 #define REBARBANDINFO __MINGW_NAME_AW(REBARBANDINFO)
1542 #define LPREBARBANDINFO __MINGW_NAME_AW(LPREBARBANDINFO)
1543 #define LPCREBARBANDINFO __MINGW_NAME_AW(LPCREBARBANDINFO)
1544 
1545 #define REBARBANDINFO_V3_SIZE __MINGW_NAME_AW_EXT(REBARBANDINFO,_V3_SIZE)
1546 
1547 #define RB_INSERTBANDA (WM_USER+1)
1548 #define RB_DELETEBAND (WM_USER+2)
1549 #define RB_GETBARINFO (WM_USER+3)
1550 #define RB_SETBARINFO (WM_USER+4)
1551 #define RB_SETBANDINFOA (WM_USER+6)
1552 #define RB_SETPARENT (WM_USER+7)
1553 #define RB_HITTEST (WM_USER+8)
1554 #define RB_GETRECT (WM_USER+9)
1555 #define RB_INSERTBANDW (WM_USER+10)
1556 #define RB_SETBANDINFOW (WM_USER+11)
1557 #define RB_GETBANDCOUNT (WM_USER+12)
1558 #define RB_GETROWCOUNT (WM_USER+13)
1559 #define RB_GETROWHEIGHT (WM_USER+14)
1560 #define RB_IDTOINDEX (WM_USER+16)
1561 #define RB_GETTOOLTIPS (WM_USER+17)
1562 #define RB_SETTOOLTIPS (WM_USER+18)
1563 #define RB_SETBKCOLOR (WM_USER+19)
1564 #define RB_GETBKCOLOR (WM_USER+20)
1565 #define RB_SETTEXTCOLOR (WM_USER+21)
1566 #define RB_GETTEXTCOLOR (WM_USER+22)
1567 
1568 #define RBSTR_CHANGERECT 0x1
1569 
1570 #define RB_SIZETORECT (WM_USER+23)
1571 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1572 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1573 
1574 #define RB_INSERTBAND __MINGW_NAME_AW(RB_INSERTBAND)
1575 #define RB_SETBANDINFO __MINGW_NAME_AW(RB_SETBANDINFO)
1576 
1577 #define RB_BEGINDRAG (WM_USER+24)
1578 #define RB_ENDDRAG (WM_USER+25)
1579 #define RB_DRAGMOVE (WM_USER+26)
1580 #define RB_GETBARHEIGHT (WM_USER+27)
1581 #define RB_GETBANDINFOW (WM_USER+28)
1582 #define RB_GETBANDINFOA (WM_USER+29)
1583 
1584 #define RB_GETBANDINFO __MINGW_NAME_AW(RB_GETBANDINFO)
1585 
1586 #define RB_MINIMIZEBAND (WM_USER+30)
1587 #define RB_MAXIMIZEBAND (WM_USER+31)
1588 #define RB_GETDROPTARGET (CCM_GETDROPTARGET)
1589 #define RB_GETBANDBORDERS (WM_USER+34)
1590 #define RB_SHOWBAND (WM_USER+35)
1591 #define RB_SETPALETTE (WM_USER+37)
1592 #define RB_GETPALETTE (WM_USER+38)
1593 #define RB_MOVEBAND (WM_USER+39)
1594 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1595 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1596 #define RB_GETBANDMARGINS (WM_USER+40)
1597 #define RB_SETWINDOWTHEME CCM_SETWINDOWTHEME
1598 #define RB_PUSHCHEVRON (WM_USER+43)
1599 
1600 #define RBN_HEIGHTCHANGE (RBN_FIRST - 0)
1601 #define RBN_GETOBJECT (RBN_FIRST - 1)
1602 #define RBN_LAYOUTCHANGED (RBN_FIRST - 2)
1603 #define RBN_AUTOSIZE (RBN_FIRST - 3)
1604 #define RBN_BEGINDRAG (RBN_FIRST - 4)
1605 #define RBN_ENDDRAG (RBN_FIRST - 5)
1606 #define RBN_DELETINGBAND (RBN_FIRST - 6)
1607 #define RBN_DELETEDBAND (RBN_FIRST - 7)
1608 #define RBN_CHILDSIZE (RBN_FIRST - 8)
1609 #define RBN_CHEVRONPUSHED (RBN_FIRST - 10)
1610 #define RBN_MINMAX (RBN_FIRST - 21)
1611 #define RBN_AUTOBREAK (RBN_FIRST - 22)
1612 
1613   typedef struct tagNMREBARCHILDSIZE {
1614     NMHDR hdr;
1615     UINT uBand;
1616     UINT wID;
1617     RECT rcChild;
1618     RECT rcBand;
1619   } NMREBARCHILDSIZE,*LPNMREBARCHILDSIZE;
1620 
1621   typedef struct tagNMREBAR {
1622     NMHDR hdr;
1623     DWORD dwMask;
1624     UINT uBand;
1625     UINT fStyle;
1626     UINT wID;
1627     LPARAM lParam;
1628   } NMREBAR,*LPNMREBAR;
1629 
1630 #define RBNM_ID 0x1
1631 #define RBNM_STYLE 0x2
1632 #define RBNM_LPARAM 0x4
1633 
1634   typedef struct tagNMRBAUTOSIZE {
1635     NMHDR hdr;
1636     BOOL fChanged;
1637     RECT rcTarget;
1638     RECT rcActual;
1639   } NMRBAUTOSIZE,*LPNMRBAUTOSIZE;
1640 
1641   typedef struct tagNMREBARCHEVRON {
1642     NMHDR hdr;
1643     UINT uBand;
1644     UINT wID;
1645     LPARAM lParam;
1646     RECT rc;
1647     LPARAM lParamNM;
1648   } NMREBARCHEVRON,*LPNMREBARCHEVRON;
1649 
1650 #define RBAB_AUTOSIZE 0x1
1651 #define RBAB_ADDBAND 0x2
1652 
1653   typedef struct tagNMREBARAUTOBREAK {
1654     NMHDR hdr;
1655     UINT uBand;
1656     UINT wID;
1657     LPARAM lParam;
1658     UINT uMsg;
1659     UINT fStyleCurrent;
1660     BOOL fAutoBreak;
1661   } NMREBARAUTOBREAK,*LPNMREBARAUTOBREAK;
1662 
1663 #define RBHT_NOWHERE 0x1
1664 #define RBHT_CAPTION 0x2
1665 #define RBHT_CLIENT 0x3
1666 #define RBHT_GRABBER 0x4
1667 #define RBHT_CHEVRON 0x8
1668 
1669   typedef struct _RB_HITTESTINFO {
1670     POINT pt;
1671     UINT flags;
1672     int iBand;
1673   } RBHITTESTINFO,*LPRBHITTESTINFO;
1674 
1675 #endif /* !NOREBAR */
1676 
1677 #ifndef NOTOOLTIPS
1678 
1679 #define TOOLTIPS_CLASSW L"tooltips_class32"
1680 #define TOOLTIPS_CLASSA "tooltips_class32"
1681 
1682 #define TOOLTIPS_CLASS __MINGW_NAME_AW(TOOLTIPS_CLASS)
1683 
1684 #define LPTOOLINFOA LPTTTOOLINFOA
1685 #define LPTOOLINFOW LPTTTOOLINFOW
1686 #define TOOLINFOA TTTOOLINFOA
1687 #define TOOLINFOW TTTOOLINFOW
1688 
1689 #define LPTOOLINFO LPTTTOOLINFO
1690 #define TOOLINFO TTTOOLINFO
1691 
1692 #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA,lpszText)
1693 #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW,lpszText)
1694 #define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA,lParam)
1695 #define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW,lParam)
1696 #define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA,lpReserved)
1697 #define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW,lpReserved)
1698 
1699   typedef struct tagTOOLINFOA {
1700     UINT cbSize;
1701     UINT uFlags;
1702     HWND hwnd;
1703     UINT_PTR uId;
1704     RECT rect;
1705     HINSTANCE hinst;
1706     LPSTR lpszText;
1707     LPARAM lParam;
1708     void *lpReserved;
1709   } TTTOOLINFOA,NEAR *PTOOLINFOA,*LPTTTOOLINFOA;
1710 
1711   typedef struct tagTOOLINFOW {
1712     UINT cbSize;
1713     UINT uFlags;
1714     HWND hwnd;
1715     UINT_PTR uId;
1716     RECT rect;
1717     HINSTANCE hinst;
1718     LPWSTR lpszText;
1719     LPARAM lParam;
1720     void *lpReserved;
1721   } TTTOOLINFOW,NEAR *PTOOLINFOW,*LPTTTOOLINFOW;
1722 
1723 #define TTTOOLINFO __MINGW_NAME_AW(TTTOOLINFO)
1724 #define PTOOLINFO __MINGW_NAME_AW(PTOOLINFO)
1725 #define LPTTTOOLINFO __MINGW_NAME_AW(LPTTTOOLINFO)
1726 
1727 #define TTTOOLINFO_V1_SIZE __MINGW_NAME_AW_EXT(TTTOOLINFO,_V1_SIZE)
1728 
1729 #define TTS_ALWAYSTIP 0x1
1730 #define TTS_NOPREFIX 0x2
1731 #define TTS_NOANIMATE 0x10
1732 #define TTS_NOFADE 0x20
1733 #define TTS_BALLOON 0x40
1734 #define TTS_CLOSE 0x80
1735 
1736 #define TTF_IDISHWND 0x1
1737 #define TTF_CENTERTIP 0x2
1738 #define TTF_RTLREADING 0x4
1739 #define TTF_SUBCLASS 0x10
1740 #define TTF_TRACK 0x20
1741 #define TTF_ABSOLUTE 0x80
1742 #define TTF_TRANSPARENT 0x100
1743 #define TTF_PARSELINKS 0x1000
1744 #define TTF_DI_SETITEM 0x8000
1745 
1746 #define TTDT_AUTOMATIC 0
1747 #define TTDT_RESHOW 1
1748 #define TTDT_AUTOPOP 2
1749 #define TTDT_INITIAL 3
1750 
1751 #define TTI_NONE 0
1752 #define TTI_INFO 1
1753 #define TTI_WARNING 2
1754 #define TTI_ERROR 3
1755 
1756 #define TTM_ACTIVATE (WM_USER+1)
1757 #define TTM_SETDELAYTIME (WM_USER+3)
1758 #define TTM_ADDTOOLA (WM_USER+4)
1759 #define TTM_ADDTOOLW (WM_USER+50)
1760 #define TTM_DELTOOLA (WM_USER+5)
1761 #define TTM_DELTOOLW (WM_USER+51)
1762 #define TTM_NEWTOOLRECTA (WM_USER+6)
1763 #define TTM_NEWTOOLRECTW (WM_USER+52)
1764 #define TTM_RELAYEVENT (WM_USER+7)
1765 
1766 #define TTM_GETTOOLINFOA (WM_USER+8)
1767 #define TTM_GETTOOLINFOW (WM_USER+53)
1768 
1769 #define TTM_SETTOOLINFOA (WM_USER+9)
1770 #define TTM_SETTOOLINFOW (WM_USER+54)
1771 
1772 #define TTM_HITTESTA (WM_USER +10)
1773 #define TTM_HITTESTW (WM_USER +55)
1774 #define TTM_GETTEXTA (WM_USER +11)
1775 #define TTM_GETTEXTW (WM_USER +56)
1776 #define TTM_UPDATETIPTEXTA (WM_USER +12)
1777 #define TTM_UPDATETIPTEXTW (WM_USER +57)
1778 #define TTM_GETTOOLCOUNT (WM_USER +13)
1779 #define TTM_ENUMTOOLSA (WM_USER +14)
1780 #define TTM_ENUMTOOLSW (WM_USER +58)
1781 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1782 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1783 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1784 #define TTM_TRACKACTIVATE (WM_USER+17)
1785 #define TTM_TRACKPOSITION (WM_USER+18)
1786 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1787 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1788 #define TTM_GETDELAYTIME (WM_USER+21)
1789 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1790 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1791 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1792 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1793 #define TTM_SETMARGIN (WM_USER+26)
1794 #define TTM_GETMARGIN (WM_USER+27)
1795 #define TTM_POP (WM_USER+28)
1796 #define TTM_UPDATE (WM_USER+29)
1797 #define TTM_GETBUBBLESIZE (WM_USER+30)
1798 #define TTM_ADJUSTRECT (WM_USER+31)
1799 #define TTM_SETTITLEA (WM_USER+32)
1800 #define TTM_SETTITLEW (WM_USER+33)
1801 
1802 #define TTM_POPUP (WM_USER+34)
1803 #define TTM_GETTITLE (WM_USER+35)
1804   typedef struct _TTGETTITLE {
1805     DWORD dwSize;
1806     UINT uTitleBitmap;
1807     UINT cch;
1808     WCHAR *pszTitle;
1809   } TTGETTITLE,*PTTGETTITLE;
1810 
1811 #define TTM_ADDTOOL __MINGW_NAME_AW(TTM_ADDTOOL)
1812 #define TTM_DELTOOL __MINGW_NAME_AW(TTM_DELTOOL)
1813 #define TTM_NEWTOOLRECT __MINGW_NAME_AW(TTM_NEWTOOLRECT)
1814 #define TTM_GETTOOLINFO __MINGW_NAME_AW(TTM_GETTOOLINFO)
1815 #define TTM_SETTOOLINFO __MINGW_NAME_AW(TTM_SETTOOLINFO)
1816 #define TTM_HITTEST __MINGW_NAME_AW(TTM_HITTEST)
1817 #define TTM_GETTEXT __MINGW_NAME_AW(TTM_GETTEXT)
1818 #define TTM_UPDATETIPTEXT __MINGW_NAME_AW(TTM_UPDATETIPTEXT)
1819 #define TTM_ENUMTOOLS __MINGW_NAME_AW(TTM_ENUMTOOLS)
1820 #define TTM_GETCURRENTTOOL __MINGW_NAME_AW(TTM_GETCURRENTTOOL)
1821 #define TTM_SETTITLE __MINGW_NAME_AW(TTM_SETTITLE)
1822 
1823 #define TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME
1824 
1825 #define LPHITTESTINFOW LPTTHITTESTINFOW
1826 #define LPHITTESTINFOA LPTTHITTESTINFOA
1827 #define LPHITTESTINFO LPTTHITTESTINFO
1828 
1829   typedef struct _TT_HITTESTINFOA {
1830     HWND hwnd;
1831     POINT pt;
1832     TTTOOLINFOA ti;
1833   } TTHITTESTINFOA,*LPTTHITTESTINFOA;
1834 
1835   typedef struct _TT_HITTESTINFOW {
1836     HWND hwnd;
1837     POINT pt;
1838     TTTOOLINFOW ti;
1839   } TTHITTESTINFOW,*LPTTHITTESTINFOW;
1840 
1841 #define TTHITTESTINFO __MINGW_NAME_AW(TTHITTESTINFO)
1842 #define LPTTHITTESTINFO __MINGW_NAME_AW(LPTTHITTESTINFO)
1843 
1844 #define TTN_GETDISPINFOA (TTN_FIRST - 0)
1845 #define TTN_GETDISPINFOW (TTN_FIRST - 10)
1846 #define TTN_SHOW (TTN_FIRST - 1)
1847 #define TTN_POP (TTN_FIRST - 2)
1848 #define TTN_LINKCLICK (TTN_FIRST - 3)
1849 
1850 #define TTN_GETDISPINFO __MINGW_NAME_AW(TTN_GETDISPINFO)
1851 
1852 #define TTN_NEEDTEXT TTN_GETDISPINFO
1853 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1854 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1855 
1856 #define TOOLTIPTEXTW NMTTDISPINFOW
1857 #define TOOLTIPTEXTA NMTTDISPINFOA
1858 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1859 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1860 
1861 #define TOOLTIPTEXT NMTTDISPINFO
1862 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1863 
1864 #define NMTTDISPINFOA_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOA,uFlags)
1865 #define NMTTDISPINFOW_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOW,uFlags)
1866 
1867   typedef struct tagNMTTDISPINFOA {
1868     NMHDR hdr;
1869     LPSTR lpszText;
1870     char szText[80];
1871     HINSTANCE hinst;
1872     UINT uFlags;
1873     LPARAM lParam;
1874   } NMTTDISPINFOA,*LPNMTTDISPINFOA;
1875 
1876   typedef struct tagNMTTDISPINFOW {
1877     NMHDR hdr;
1878     LPWSTR lpszText;
1879     WCHAR szText[80];
1880     HINSTANCE hinst;
1881     UINT uFlags;
1882     LPARAM lParam;
1883   } NMTTDISPINFOW,*LPNMTTDISPINFOW;
1884 
1885 
1886 #define NMTTDISPINFO __MINGW_NAME_AW(NMTTDISPINFO)
1887 #define LPNMTTDISPINFO __MINGW_NAME_AW(LPNMTTDISPINFO)
1888 
1889 #define NMTTDISPINFO_V1_SIZE __MINGW_NAME_AW_EXT(NMTTDISPINFO,_V1_SIZE)
1890 
1891 #endif /* !NOTOOLTIPS */
1892 
1893 #ifndef NOSTATUSBAR
1894 
1895 #define SBARS_SIZEGRIP 0x100
1896 #define SBARS_TOOLTIPS 0x800
1897 #define SBT_TOOLTIPS 0x800
1898 
1899   WINCOMMCTRLAPI void WINAPI DrawStatusTextA(HDC hDC,LPCRECT lprc,LPCSTR pszText,UINT uFlags);
1900   WINCOMMCTRLAPI void WINAPI DrawStatusTextW(HDC hDC,LPCRECT lprc,LPCWSTR pszText,UINT uFlags);
1901 
1902   WINCOMMCTRLAPI HWND WINAPI CreateStatusWindowA(LONG style,LPCSTR lpszText,HWND hwndParent,UINT wID);
1903   WINCOMMCTRLAPI HWND WINAPI CreateStatusWindowW(LONG style,LPCWSTR lpszText,HWND hwndParent,UINT wID);
1904 
1905 #define CreateStatusWindow __MINGW_NAME_AW(CreateStatusWindow)
1906 #define DrawStatusText __MINGW_NAME_AW(DrawStatusText)
1907 
1908 #define STATUSCLASSNAMEW L"msctls_statusbar32"
1909 #define STATUSCLASSNAMEA "msctls_statusbar32"
1910 
1911 #define STATUSCLASSNAME __MINGW_NAME_AW(STATUSCLASSNAME)
1912 
1913 #define SB_SETTEXTA (WM_USER+1)
1914 #define SB_SETTEXTW (WM_USER+11)
1915 #define SB_GETTEXTA (WM_USER+2)
1916 #define SB_GETTEXTW (WM_USER+13)
1917 #define SB_GETTEXTLENGTHA (WM_USER+3)
1918 #define SB_GETTEXTLENGTHW (WM_USER+12)
1919 
1920 #define SB_GETTEXT __MINGW_NAME_AW(SB_GETTEXT)
1921 #define SB_SETTEXT __MINGW_NAME_AW(SB_SETTEXT)
1922 #define SB_GETTEXTLENGTH __MINGW_NAME_AW(SB_GETTEXTLENGTH)
1923 #define SB_SETTIPTEXT __MINGW_NAME_AW(SB_SETTIPTEXT)
1924 #define SB_GETTIPTEXT __MINGW_NAME_AW(SB_GETTIPTEXT)
1925 
1926 #define SB_SETPARTS (WM_USER+4)
1927 #define SB_GETPARTS (WM_USER+6)
1928 #define SB_GETBORDERS (WM_USER+7)
1929 #define SB_SETMINHEIGHT (WM_USER+8)
1930 #define SB_SIMPLE (WM_USER+9)
1931 #define SB_GETRECT (WM_USER+10)
1932 #define SB_ISSIMPLE (WM_USER+14)
1933 #define SB_SETICON (WM_USER+15)
1934 #define SB_SETTIPTEXTA (WM_USER+16)
1935 #define SB_SETTIPTEXTW (WM_USER+17)
1936 #define SB_GETTIPTEXTA (WM_USER+18)
1937 #define SB_GETTIPTEXTW (WM_USER+19)
1938 #define SB_GETICON (WM_USER+20)
1939 #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1940 #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1941 
1942 #define SBT_OWNERDRAW 0x1000
1943 #define SBT_NOBORDERS 0x100
1944 #define SBT_POPOUT 0x200
1945 #define SBT_RTLREADING 0x400
1946 #define SBT_NOTABPARSING 0x800
1947 
1948 #define SB_SETBKCOLOR CCM_SETBKCOLOR
1949 
1950 #define SBN_SIMPLEMODECHANGE (SBN_FIRST - 0)
1951 
1952 #define SB_SIMPLEID 0xff
1953 
1954 #endif /* !NOSTATUSBAR */
1955 
1956 #ifndef NOMENUHELP
1957 
1958   WINCOMMCTRLAPI void WINAPI MenuHelp(UINT uMsg,WPARAM wParam,LPARAM lParam,HMENU hMainMenu,HINSTANCE hInst,HWND hwndStatus,UINT *lpwIDs);
1959 
1960   WINCOMMCTRLAPI
1961   BOOL
1962   WINAPI
1963   ShowHideMenuCtl(
1964     _In_ HWND hWnd,
1965     _In_ UINT_PTR uFlags,
1966     _In_z_ LPINT lpInfo);
1967 
1968   WINCOMMCTRLAPI
1969   void
1970   WINAPI
1971   GetEffectiveClientRect(
1972     _In_ HWND hWnd,
1973     _Out_ LPRECT lprc,
1974     _In_z_ const INT *lpInfo);
1975 
1976 #define MINSYSCOMMAND SC_SIZE
1977 
1978 #endif /* !NOMENUHELP */
1979 
1980 #ifndef NOTRACKBAR
1981 
1982 #define TRACKBAR_CLASSA "msctls_trackbar32"
1983 #define TRACKBAR_CLASSW L"msctls_trackbar32"
1984 
1985 #define TRACKBAR_CLASS __MINGW_NAME_AW(TRACKBAR_CLASS)
1986 
1987 #define TBS_AUTOTICKS 0x1
1988 #define TBS_VERT 0x2
1989 #define TBS_HORZ 0x0
1990 #define TBS_TOP 0x4
1991 #define TBS_BOTTOM 0x0
1992 #define TBS_LEFT 0x4
1993 #define TBS_RIGHT 0x0
1994 #define TBS_BOTH 0x8
1995 #define TBS_NOTICKS 0x10
1996 #define TBS_ENABLESELRANGE 0x20
1997 #define TBS_FIXEDLENGTH 0x40
1998 #define TBS_NOTHUMB 0x80
1999 #define TBS_TOOLTIPS 0x100
2000 #define TBS_REVERSED 0x200
2001 #define TBS_DOWNISLEFT 0x400
2002 
2003 #define TBM_GETPOS (WM_USER)
2004 #define TBM_GETRANGEMIN (WM_USER+1)
2005 #define TBM_GETRANGEMAX (WM_USER+2)
2006 #define TBM_GETTIC (WM_USER+3)
2007 #define TBM_SETTIC (WM_USER+4)
2008 #define TBM_SETPOS (WM_USER+5)
2009 #define TBM_SETRANGE (WM_USER+6)
2010 #define TBM_SETRANGEMIN (WM_USER+7)
2011 #define TBM_SETRANGEMAX (WM_USER+8)
2012 #define TBM_CLEARTICS (WM_USER+9)
2013 #define TBM_SETSEL (WM_USER+10)
2014 #define TBM_SETSELSTART (WM_USER+11)
2015 #define TBM_SETSELEND (WM_USER+12)
2016 #define TBM_GETPTICS (WM_USER+14)
2017 #define TBM_GETTICPOS (WM_USER+15)
2018 #define TBM_GETNUMTICS (WM_USER+16)
2019 #define TBM_GETSELSTART (WM_USER+17)
2020 #define TBM_GETSELEND (WM_USER+18)
2021 #define TBM_CLEARSEL (WM_USER+19)
2022 #define TBM_SETTICFREQ (WM_USER+20)
2023 #define TBM_SETPAGESIZE (WM_USER+21)
2024 #define TBM_GETPAGESIZE (WM_USER+22)
2025 #define TBM_SETLINESIZE (WM_USER+23)
2026 #define TBM_GETLINESIZE (WM_USER+24)
2027 #define TBM_GETTHUMBRECT (WM_USER+25)
2028 #define TBM_GETCHANNELRECT (WM_USER+26)
2029 #define TBM_SETTHUMBLENGTH (WM_USER+27)
2030 #define TBM_GETTHUMBLENGTH (WM_USER+28)
2031 #define TBM_SETTOOLTIPS (WM_USER+29)
2032 #define TBM_GETTOOLTIPS (WM_USER+30)
2033 #define TBM_SETTIPSIDE (WM_USER+31)
2034 
2035 #define TBTS_TOP 0
2036 #define TBTS_LEFT 1
2037 #define TBTS_BOTTOM 2
2038 #define TBTS_RIGHT 3
2039 
2040 #define TBM_SETBUDDY (WM_USER+32)
2041 #define TBM_GETBUDDY (WM_USER+33)
2042 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2043 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2044 
2045 #define TB_LINEUP 0
2046 #define TB_LINEDOWN 1
2047 #define TB_PAGEUP 2
2048 #define TB_PAGEDOWN 3
2049 #define TB_THUMBPOSITION 4
2050 #define TB_THUMBTRACK 5
2051 #define TB_TOP 6
2052 #define TB_BOTTOM 7
2053 #define TB_ENDTRACK 8
2054 
2055 #define TBCD_TICS 0x1
2056 #define TBCD_THUMB 0x2
2057 #define TBCD_CHANNEL 0x3
2058 
2059 #endif /* !NOTRACKBAR */
2060 
2061 #ifndef NODRAGLIST
2062 
2063   typedef struct tagDRAGLISTINFO {
2064     UINT uNotification;
2065     HWND hWnd;
2066     POINT ptCursor;
2067   } DRAGLISTINFO,*LPDRAGLISTINFO;
2068 
2069 #define DL_BEGINDRAG (WM_USER+133)
2070 #define DL_DRAGGING (WM_USER+134)
2071 #define DL_DROPPED (WM_USER+135)
2072 #define DL_CANCELDRAG (WM_USER+136)
2073 
2074 #define DL_CURSORSET 0
2075 #define DL_STOPCURSOR 1
2076 #define DL_COPYCURSOR 2
2077 #define DL_MOVECURSOR 3
2078 
2079 #define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
2080 
2081   WINCOMMCTRLAPI BOOL WINAPI MakeDragList(HWND hLB);
2082   WINCOMMCTRLAPI void WINAPI DrawInsert(HWND handParent,HWND hLB,int nItem);
2083 
2084   WINCOMMCTRLAPI int WINAPI LBItemFromPt(HWND hLB,POINT pt,BOOL bAutoScroll);
2085 
2086 #endif /* !NODRAGLIST */
2087 
2088 #ifndef NOUPDOWN
2089 
2090 #define UPDOWN_CLASSA "msctls_updown32"
2091 #define UPDOWN_CLASSW L"msctls_updown32"
2092 
2093 #define UPDOWN_CLASS __MINGW_NAME_AW(UPDOWN_CLASS)
2094 
2095   typedef struct _UDACCEL {
2096     UINT nSec;
2097     UINT nInc;
2098   } UDACCEL,*LPUDACCEL;
2099 
2100 #define UD_MAXVAL 0x7fff
2101 #define UD_MINVAL (-UD_MAXVAL)
2102 
2103 #define UDS_WRAP 0x1
2104 #define UDS_SETBUDDYINT 0x2
2105 #define UDS_ALIGNRIGHT 0x4
2106 #define UDS_ALIGNLEFT 0x8
2107 #define UDS_AUTOBUDDY 0x10
2108 #define UDS_ARROWKEYS 0x20
2109 #define UDS_HORZ 0x40
2110 #define UDS_NOTHOUSANDS 0x80
2111 #define UDS_HOTTRACK 0x100
2112 
2113 #define UDM_SETRANGE (WM_USER+101)
2114 #define UDM_GETRANGE (WM_USER+102)
2115 #define UDM_SETPOS (WM_USER+103)
2116 #define UDM_GETPOS (WM_USER+104)
2117 #define UDM_SETBUDDY (WM_USER+105)
2118 #define UDM_GETBUDDY (WM_USER+106)
2119 #define UDM_SETACCEL (WM_USER+107)
2120 #define UDM_GETACCEL (WM_USER+108)
2121 #define UDM_SETBASE (WM_USER+109)
2122 #define UDM_GETBASE (WM_USER+110)
2123 #define UDM_SETRANGE32 (WM_USER+111)
2124 #define UDM_GETRANGE32 (WM_USER+112)
2125 #define UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2126 #define UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2127 #define UDM_SETPOS32 (WM_USER+113)
2128 #define UDM_GETPOS32 (WM_USER+114)
2129 
2130   WINCOMMCTRLAPI HWND WINAPI CreateUpDownControl(DWORD dwStyle,int x,int y,int cx,int cy,HWND hParent,int nID,HINSTANCE hInst,HWND hBuddy,int nUpper,int nLower,int nPos);
2131 
2132 #define NM_UPDOWN NMUPDOWN
2133 #define LPNM_UPDOWN LPNMUPDOWN
2134 
2135   typedef struct _NM_UPDOWN {
2136     NMHDR hdr;
2137     int iPos;
2138     int iDelta;
2139   } NMUPDOWN,*LPNMUPDOWN;
2140 
2141 #define UDN_DELTAPOS (UDN_FIRST - 1)
2142 
2143 #endif /* !NOUPDOWN */
2144 
2145 #ifndef NOPROGRESS
2146 
2147 #define PROGRESS_CLASSA "msctls_progress32"
2148 #define PROGRESS_CLASSW L"msctls_progress32"
2149 
2150 #define PROGRESS_CLASS __MINGW_NAME_AW(PROGRESS_CLASS)
2151 
2152 #define PBS_SMOOTH 0x1
2153 #define PBS_VERTICAL 0x4
2154 
2155 #define PBM_SETRANGE (WM_USER+1)
2156 #define PBM_SETPOS (WM_USER+2)
2157 #define PBM_DELTAPOS (WM_USER+3)
2158 #define PBM_SETSTEP (WM_USER+4)
2159 #define PBM_STEPIT (WM_USER+5)
2160 #define PBM_SETRANGE32 (WM_USER+6)
2161   typedef struct {
2162     int iLow;
2163     int iHigh;
2164   } PBRANGE,*PPBRANGE;
2165 #define PBM_GETRANGE (WM_USER+7)
2166 #define PBM_GETPOS (WM_USER+8)
2167 #define PBM_SETBARCOLOR (WM_USER+9)
2168 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
2169 
2170 #define PBS_MARQUEE 0x8
2171 #define PBM_SETMARQUEE (WM_USER+10)
2172 
2173 #if (_WIN32_WINNT >= 0x0600)
2174 #define PBM_GETSTEP (WM_USER+13)
2175 #define PBM_GETBKCOLOR (WM_USER+14)
2176 #define PBM_GETBARCOLOR (WM_USER+15)
2177 #define PBM_SETSTATE (WM_USER+16)
2178 #define PBM_GETSTATE (WM_USER+17)
2179 #define PBS_SMOOTHREVERSE 0x10
2180 #define PBST_NORMAL 1
2181 #define PBST_ERROR 2
2182 #define PBST_PAUSED 3
2183 #endif /* (_WIN32_WINNT >= 0x0600) */
2184 
2185 #endif /* !NOPROGRESS */
2186 
2187 
2188 #ifndef NOHOTKEY
2189 
2190 #define HOTKEYF_SHIFT 0x1
2191 #define HOTKEYF_CONTROL 0x2
2192 #define HOTKEYF_ALT 0x4
2193 #define HOTKEYF_EXT 0x8
2194 #define HKCOMB_NONE 0x1
2195 #define HKCOMB_S 0x2
2196 #define HKCOMB_C 0x4
2197 #define HKCOMB_A 0x8
2198 #define HKCOMB_SC 0x10
2199 #define HKCOMB_SA 0x20
2200 #define HKCOMB_CA 0x40
2201 #define HKCOMB_SCA 0x80
2202 
2203 #define HKM_SETHOTKEY (WM_USER+1)
2204 #define HKM_GETHOTKEY (WM_USER+2)
2205 #define HKM_SETRULES (WM_USER+3)
2206 
2207 #define HOTKEY_CLASSA "msctls_hotkey32"
2208 #define HOTKEY_CLASSW L"msctls_hotkey32"
2209 
2210 #define HOTKEY_CLASS __MINGW_NAME_AW(HOTKEY_CLASS)
2211 
2212 #endif /* !NOHOTKEY */
2213 
2214 #define CCS_TOP 0x1L
2215 #define CCS_NOMOVEY 0x2L
2216 #define CCS_BOTTOM 0x3L
2217 #define CCS_NORESIZE 0x4L
2218 #define CCS_NOPARENTALIGN 0x8L
2219 #define CCS_ADJUSTABLE 0x20L
2220 #define CCS_NODIVIDER 0x40L
2221 #define CCS_VERT 0x80L
2222 #define CCS_LEFT (CCS_VERT | CCS_TOP)
2223 #define CCS_RIGHT (CCS_VERT | CCS_BOTTOM)
2224 #define CCS_NOMOVEX (CCS_VERT | CCS_NOMOVEY)
2225 
2226 #ifndef NOLISTVIEW
2227 
2228 #define WC_LISTVIEWA "SysListView32"
2229 #define WC_LISTVIEWW L"SysListView32"
2230 
2231 #define WC_LISTVIEW __MINGW_NAME_AW(WC_LISTVIEW)
2232 
2233 #define LVS_ICON 0x0
2234 #define LVS_REPORT 0x1
2235 #define LVS_SMALLICON 0x2
2236 #define LVS_LIST 0x3
2237 #define LVS_TYPEMASK 0x3
2238 #define LVS_SINGLESEL 0x4
2239 #define LVS_SHOWSELALWAYS 0x8
2240 #define LVS_SORTASCENDING 0x10
2241 #define LVS_SORTDESCENDING 0x20
2242 #define LVS_SHAREIMAGELISTS 0x40
2243 #define LVS_NOLABELWRAP 0x80
2244 #define LVS_AUTOARRANGE 0x100
2245 #define LVS_EDITLABELS 0x200
2246 #define LVS_OWNERDATA 0x1000
2247 #define LVS_NOSCROLL 0x2000
2248 
2249 #define LVS_TYPESTYLEMASK 0xfc00
2250 
2251 #define LVS_ALIGNTOP 0x0
2252 #define LVS_ALIGNLEFT 0x800
2253 #define LVS_ALIGNMASK 0xc00
2254 
2255 #define LVS_OWNERDRAWFIXED 0x400
2256 #define LVS_NOCOLUMNHEADER 0x4000
2257 #define LVS_NOSORTHEADER 0x8000
2258 
2259 #define LVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2260 #define ListView_SetUnicodeFormat(hwnd,fUnicode) (BOOL)SNDMSG((hwnd),LVM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
2261 #define LVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2262 #define ListView_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd),LVM_GETUNICODEFORMAT,0,0)
2263 #define LVM_GETBKCOLOR (LVM_FIRST+0)
2264 #define ListView_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETBKCOLOR,0,0L)
2265 #define LVM_SETBKCOLOR (LVM_FIRST+1)
2266 #define ListView_SetBkColor(hwnd,clrBk) (BOOL)SNDMSG((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
2267 #define LVM_GETIMAGELIST (LVM_FIRST+2)
2268 #define ListView_GetImageList(hwnd,iImageList) (HIMAGELIST)SNDMSG((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
2269 
2270 #define LVSIL_NORMAL            0
2271 #define LVSIL_SMALL             1
2272 #define LVSIL_STATE             2
2273 #define LVSIL_GROUPHEADER       3
2274 
2275 #define LVM_SETIMAGELIST (LVM_FIRST+3)
2276 #define ListView_SetImageList(hwnd,himl,iImageList) (HIMAGELIST)SNDMSG((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(HIMAGELIST)(himl))
2277 
2278 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
2279 #define ListView_GetItemCount(hwnd) (int)SNDMSG((hwnd),LVM_GETITEMCOUNT,0,0L)
2280 
2281 #define LVIF_TEXT 0x1
2282 #define LVIF_IMAGE 0x2
2283 #define LVIF_PARAM 0x4
2284 #define LVIF_STATE 0x8
2285 #define LVIF_INDENT 0x10
2286 #define LVIF_NORECOMPUTE 0x800
2287 #define LVIF_GROUPID 0x100
2288 #define LVIF_COLUMNS 0x200
2289 
2290 #define LVIS_FOCUSED 0x1
2291 #define LVIS_SELECTED 0x2
2292 #define LVIS_CUT 0x4
2293 #define LVIS_DROPHILITED 0x8
2294 #define LVIS_GLOW 0x10
2295 #define LVIS_ACTIVATING 0x20
2296 
2297 #define LVIS_OVERLAYMASK 0xf00
2298 #define LVIS_STATEIMAGEMASK 0xF000
2299 
2300 #define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
2301 
2302 #define I_INDENTCALLBACK (-1)
2303 #define LV_ITEMA LVITEMA
2304 #define LV_ITEMW LVITEMW
2305 
2306 #define I_GROUPIDCALLBACK (-1)
2307 #define I_GROUPIDNONE (-2)
2308 
2309 #define LV_ITEM LVITEM
2310 
2311 #define LVITEMA_V1_SIZE CCSIZEOF_STRUCT(LVITEMA,lParam)
2312 #define LVITEMW_V1_SIZE CCSIZEOF_STRUCT(LVITEMW,lParam)
2313 
2314   typedef struct tagLVITEMA {
2315     UINT mask;
2316     int iItem;
2317     int iSubItem;
2318     UINT state;
2319     UINT stateMask;
2320     LPSTR pszText;
2321     int cchTextMax;
2322     int iImage;
2323     LPARAM lParam;
2324     int iIndent;
2325     int iGroupId;
2326     UINT cColumns;
2327     PUINT puColumns;
2328   } LVITEMA,*LPLVITEMA;
2329 
2330   typedef struct tagLVITEMW
2331   {
2332     UINT mask;
2333     int iItem;
2334     int iSubItem;
2335     UINT state;
2336     UINT stateMask;
2337     LPWSTR pszText;
2338     int cchTextMax;
2339     int iImage;
2340     LPARAM lParam;
2341     int iIndent;
2342     int iGroupId;
2343     UINT cColumns;
2344     PUINT puColumns;
2345   } LVITEMW,*LPLVITEMW;
2346 
2347 #define LVITEM __MINGW_NAME_AW(LVITEM)
2348 #define LPLVITEM __MINGW_NAME_AW(LPLVITEM)
2349 
2350 #define LVITEM_V1_SIZE __MINGW_NAME_AW_EXT(LVITEM,_V1_SIZE)
2351 
2352 #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
2353 #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
2354 
2355 #define LPSTR_TEXTCALLBACK __MINGW_NAME_AW(LPSTR_TEXTCALLBACK)
2356 
2357 #define I_IMAGECALLBACK (-1)
2358 #define I_IMAGENONE (-2)
2359 #define I_COLUMNSCALLBACK ((UINT)-1)
2360 
2361 #define LVM_GETITEMA (LVM_FIRST+5)
2362 #define LVM_GETITEMW (LVM_FIRST+75)
2363 
2364 #define LVM_GETITEM __MINGW_NAME_AW(LVM_GETITEM)
2365 
2366 #define ListView_GetItem(hwnd,pitem) (BOOL)SNDMSG((hwnd),LVM_GETITEM,0,(LPARAM)(LV_ITEM *)(pitem))
2367 
2368 #define LVM_SETITEMA (LVM_FIRST+6)
2369 #define LVM_SETITEMW (LVM_FIRST+76)
2370 
2371 #define LVM_SETITEM __MINGW_NAME_AW(LVM_SETITEM)
2372 
2373 #define ListView_SetItem(hwnd,pitem) (BOOL)SNDMSG((hwnd),LVM_SETITEM,0,(LPARAM)(const LV_ITEM *)(pitem))
2374 
2375 #define LVM_INSERTITEMA (LVM_FIRST+7)
2376 #define LVM_INSERTITEMW (LVM_FIRST+77)
2377 
2378 #define LVM_INSERTITEM __MINGW_NAME_AW(LVM_INSERTITEM)
2379 
2380 #define ListView_InsertItem(hwnd,pitem) (int)SNDMSG((hwnd),LVM_INSERTITEM,0,(LPARAM)(const LV_ITEM *)(pitem))
2381 
2382 #define LVM_DELETEITEM (LVM_FIRST+8)
2383 #define ListView_DeleteItem(hwnd,i) (BOOL)SNDMSG((hwnd),LVM_DELETEITEM,(WPARAM)(int)(i),0L)
2384 
2385 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
2386 #define ListView_DeleteAllItems(hwnd) (BOOL)SNDMSG((hwnd),LVM_DELETEALLITEMS,0,0L)
2387 
2388 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
2389 #define ListView_GetCallbackMask(hwnd) (BOOL)SNDMSG((hwnd),LVM_GETCALLBACKMASK,0,0)
2390 
2391 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
2392 #define ListView_SetCallbackMask(hwnd,mask) (BOOL)SNDMSG((hwnd),LVM_SETCALLBACKMASK,(WPARAM)(UINT)(mask),0)
2393 
2394 #define LVNI_ALL 0x0
2395 #define LVNI_FOCUSED 0x1
2396 #define LVNI_SELECTED 0x2
2397 #define LVNI_CUT 0x4
2398 #define LVNI_DROPHILITED 0x8
2399 
2400 #define LVNI_ABOVE 0x100
2401 #define LVNI_BELOW 0x200
2402 #define LVNI_TOLEFT 0x400
2403 #define LVNI_TORIGHT 0x800
2404 
2405 #define LVM_GETNEXTITEM (LVM_FIRST+12)
2406 #define ListView_GetNextItem(hwnd,i,flags) (int)SNDMSG((hwnd),LVM_GETNEXTITEM,(WPARAM)(int)(i),MAKELPARAM((flags),0))
2407 
2408 #define LVFI_PARAM              0x0001
2409 #define LVFI_STRING             0x0002
2410 #define LVFI_SUBSTRING          0x0004
2411 #define LVFI_PARTIAL            0x0008
2412 #define LVFI_WRAP               0x0020
2413 #define LVFI_NEARESTXY          0x0040
2414 
2415 #define LV_FINDINFOA LVFINDINFOA
2416 #define LV_FINDINFOW LVFINDINFOW
2417 #define LV_FINDINFO LVFINDINFO
2418 
2419   typedef struct tagLVFINDINFOA {
2420     UINT flags;
2421     LPCSTR psz;
2422     LPARAM lParam;
2423     POINT pt;
2424     UINT vkDirection;
2425   } LVFINDINFOA,*LPFINDINFOA;
2426 
2427   typedef struct tagLVFINDINFOW {
2428     UINT flags;
2429     LPCWSTR psz;
2430     LPARAM lParam;
2431     POINT pt;
2432     UINT vkDirection;
2433   } LVFINDINFOW,*LPFINDINFOW;
2434 
2435 #define LVFINDINFO __MINGW_NAME_AW(LVFINDINFO)
2436 
2437 #define LVM_FINDITEMA (LVM_FIRST+13)
2438 #define LVM_FINDITEMW (LVM_FIRST+83)
2439 
2440 #define LVM_FINDITEM __MINGW_NAME_AW(LVM_FINDITEM)
2441 
2442 #define ListView_FindItem(hwnd,iStart,plvfi) (int)SNDMSG((hwnd),LVM_FINDITEM,(WPARAM)(int)(iStart),(LPARAM)(const LV_FINDINFO *)(plvfi))
2443 
2444 #define LVIR_BOUNDS 0
2445 #define LVIR_ICON 1
2446 #define LVIR_LABEL 2
2447 #define LVIR_SELECTBOUNDS 3
2448 
2449 #define LVM_GETITEMRECT (LVM_FIRST+14)
2450 #define ListView_GetItemRect(hwnd,i,prc,code) (BOOL)SNDMSG((hwnd),LVM_GETITEMRECT,(WPARAM)(int)(i),((prc) ? (((RECT *)(prc))->left = (code),(LPARAM)(RECT *)(prc)) : (LPARAM)(RECT *)NULL))
2451 
2452 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
2453 #define ListView_SetItemPosition(hwndLV,i,x,y) (BOOL)SNDMSG((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(int)(i),MAKELPARAM((x),(y)))
2454 
2455 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
2456 #define ListView_GetItemPosition(hwndLV,i,ppt) (BOOL)SNDMSG((hwndLV),LVM_GETITEMPOSITION,(WPARAM)(int)(i),(LPARAM)(POINT *)(ppt))
2457 
2458 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
2459 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
2460 
2461 #define LVM_GETSTRINGWIDTH __MINGW_NAME_AW(LVM_GETSTRINGWIDTH)
2462 
2463 #define ListView_GetStringWidth(hwndLV,psz) (int)SNDMSG((hwndLV),LVM_GETSTRINGWIDTH,0,(LPARAM)(LPCTSTR)(psz))
2464 
2465 #define LVHT_NOWHERE 0x1
2466 #define LVHT_ONITEMICON 0x2
2467 #define LVHT_ONITEMLABEL 0x4
2468 #define LVHT_ONITEMSTATEICON 0x8
2469 #define LVHT_ONITEM (LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON)
2470 
2471 #define LVHT_ABOVE 0x8
2472 #define LVHT_BELOW 0x10
2473 #define LVHT_TORIGHT 0x20
2474 #define LVHT_TOLEFT 0x40
2475 
2476 #define LV_HITTESTINFO LVHITTESTINFO
2477 
2478 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
2479 
2480   typedef struct tagLVHITTESTINFO {
2481     POINT pt;
2482     UINT flags;
2483     int iItem;
2484     int iSubItem;
2485   } LVHITTESTINFO,*LPLVHITTESTINFO;
2486 
2487 #define LVM_HITTEST (LVM_FIRST+18)
2488 #define ListView_HitTest(hwndLV,pinfo) (int)SNDMSG((hwndLV),LVM_HITTEST,0,(LPARAM)(LV_HITTESTINFO *)(pinfo))
2489 
2490 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
2491 #define ListView_EnsureVisible(hwndLV,i,fPartialOK) (BOOL)SNDMSG((hwndLV),LVM_ENSUREVISIBLE,(WPARAM)(int)(i),MAKELPARAM((fPartialOK),0))
2492 
2493 #define LVM_SCROLL (LVM_FIRST+20)
2494 #define ListView_Scroll(hwndLV,dx,dy) (BOOL)SNDMSG((hwndLV),LVM_SCROLL,(WPARAM)(int)(dx),(LPARAM)(int)(dy))
2495 
2496 #define LVM_REDRAWITEMS (LVM_FIRST+21)
2497 #define ListView_RedrawItems(hwndLV,iFirst,iLast) (BOOL)SNDMSG((hwndLV),LVM_REDRAWITEMS,(WPARAM)(int)(iFirst),(LPARAM)(int)(iLast))
2498 
2499 #define LVA_DEFAULT 0x0
2500 #define LVA_ALIGNLEFT 0x1
2501 #define LVA_ALIGNTOP 0x2
2502 #define LVA_SNAPTOGRID 0x5
2503 
2504 #define LVM_ARRANGE (LVM_FIRST+22)
2505 #define ListView_Arrange(hwndLV,code) (BOOL)SNDMSG((hwndLV),LVM_ARRANGE,(WPARAM)(UINT)(code),0L)
2506 
2507 #define LVM_EDITLABELA (LVM_FIRST+23)
2508 #define LVM_EDITLABELW (LVM_FIRST+118)
2509 
2510 #define LVM_EDITLABEL __MINGW_NAME_AW(LVM_EDITLABEL)
2511 
2512 #define ListView_EditLabel(hwndLV,i) (HWND)SNDMSG((hwndLV),LVM_EDITLABEL,(WPARAM)(int)(i),0L)
2513 
2514 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
2515 #define ListView_GetEditControl(hwndLV) (HWND)SNDMSG((hwndLV),LVM_GETEDITCONTROL,0,0L)
2516 
2517 #define LV_COLUMNA LVCOLUMNA
2518 #define LV_COLUMNW LVCOLUMNW
2519 #define LV_COLUMN LVCOLUMN
2520 
2521 #define LVCOLUMNA_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNA,iSubItem)
2522 #define LVCOLUMNW_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNW,iSubItem)
2523 
2524   typedef struct tagLVCOLUMNA {
2525     UINT mask;
2526     int fmt;
2527     int cx;
2528     LPSTR pszText;
2529     int cchTextMax;
2530     int iSubItem;
2531     int iImage;
2532     int iOrder;
2533   } LVCOLUMNA,*LPLVCOLUMNA;
2534 
2535   typedef struct tagLVCOLUMNW {
2536     UINT mask;
2537     int fmt;
2538     int cx;
2539     LPWSTR pszText;
2540     int cchTextMax;
2541     int iSubItem;
2542 # if (_WIN32_IE >= 0x0300)
2543     int iImage;
2544     int iOrder;
2545 # endif
2546 # if (_WIN32_WINNT >= 0x0600)
2547     int cxMin;
2548     int cxDefault;
2549     int cxIdeal;
2550 # endif
2551   } LVCOLUMNW,*LPLVCOLUMNW;
2552 
2553 #define LVCOLUMN __MINGW_NAME_AW(LVCOLUMN)
2554 #define LPLVCOLUMN __MINGW_NAME_AW(LPLVCOLUMN)
2555 
2556 #define LVCOLUMN_V1_SIZE __MINGW_NAME_AW_EXT(LVCOLUMN,_V1_SIZE)
2557 
2558 #define LVCF_FMT 0x1
2559 #define LVCF_WIDTH 0x2
2560 #define LVCF_TEXT 0x4
2561 #define LVCF_SUBITEM 0x8
2562 #define LVCF_IMAGE 0x10
2563 #define LVCF_ORDER 0x20
2564 #if (_WIN32_WINNT >= 0x0600)
2565 #define LVCF_MINWIDTH 0x40
2566 #define LVCF_DEFAULTWIDTH 0x80
2567 #define LVCF_IDEALWIDTH 0x100
2568 #endif /* (_WIN32_WINNT >= 0x0600) */
2569 
2570 #define LVCFMT_LEFT 0x0
2571 #define LVCFMT_RIGHT 0x1
2572 #define LVCFMT_CENTER 0x2
2573 #define LVCFMT_JUSTIFYMASK 0x3
2574 #define LVCFMT_IMAGE 0x800
2575 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2576 #define LVCFMT_COL_HAS_IMAGES 0x8000
2577 #if (_WIN32_WINNT >= 0x0600)
2578 #define LVCFMT_FIXED_WIDTH 0x100
2579 #define LVCFMT_NO_DPI_SCALE 0x40000
2580 #define LVCFMT_FIXED_RATIO 0x80000
2581 #define LVCFMT_LINE_BREAK 0x100000
2582 #define LVCFMT_FILL 0x200000
2583 #define LVCFMT_WRAP 0x400000
2584 #define LVCFMT_NO_TITLE 0x800000
2585 #define LVCFMT_SPLITBUTTON 0x1000000
2586 #define LVCFMT_TILE_PLACEMENTMASK (LVCFMT_LINE_BREAK|LVCFMT_FILL)
2587 #endif /* (_WIN32_WINNT >= 0x0600) */
2588 
2589 #define LVM_GETCOLUMNA (LVM_FIRST+25)
2590 #define LVM_GETCOLUMNW (LVM_FIRST+95)
2591 
2592 #define LVM_GETCOLUMN __MINGW_NAME_AW(LVM_GETCOLUMN)
2593 
2594 #define ListView_GetColumn(hwnd,iCol,pcol) (BOOL)SNDMSG((hwnd),LVM_GETCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(LV_COLUMN *)(pcol))
2595 
2596 #define LVM_SETCOLUMNA (LVM_FIRST+26)
2597 #define LVM_SETCOLUMNW (LVM_FIRST+96)
2598 
2599 #define LVM_SETCOLUMN __MINGW_NAME_AW(LVM_SETCOLUMN)
2600 
2601 #define ListView_SetColumn(hwnd,iCol,pcol) (BOOL)SNDMSG((hwnd),LVM_SETCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(const LV_COLUMN *)(pcol))
2602 
2603 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
2604 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
2605 
2606 #define LVM_INSERTCOLUMN __MINGW_NAME_AW(LVM_INSERTCOLUMN)
2607 
2608 #define ListView_InsertColumn(hwnd,iCol,pcol) (int)SNDMSG((hwnd),LVM_INSERTCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(const LV_COLUMN *)(pcol))
2609 
2610 #define LVM_DELETECOLUMN (LVM_FIRST+28)
2611 #define ListView_DeleteColumn(hwnd,iCol) (BOOL)SNDMSG((hwnd),LVM_DELETECOLUMN,(WPARAM)(int)(iCol),0)
2612 
2613 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
2614 #define ListView_GetColumnWidth(hwnd,iCol) (int)SNDMSG((hwnd),LVM_GETCOLUMNWIDTH,(WPARAM)(int)(iCol),0)
2615 
2616 #define LVSCW_AUTOSIZE -1
2617 #define LVSCW_AUTOSIZE_USEHEADER -2
2618 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
2619 
2620 #define ListView_SetColumnWidth(hwnd,iCol,cx) (BOOL)SNDMSG((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(int)(iCol),MAKELPARAM((cx),0))
2621 
2622 #define LVM_GETHEADER (LVM_FIRST+31)
2623 #define ListView_GetHeader(hwnd) (HWND)SNDMSG((hwnd),LVM_GETHEADER,0,0L)
2624 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
2625 #define ListView_CreateDragImage(hwnd,i,lpptUpLeft) (HIMAGELIST)SNDMSG((hwnd),LVM_CREATEDRAGIMAGE,(WPARAM)(int)(i),(LPARAM)(LPPOINT)(lpptUpLeft))
2626 #define LVM_GETVIEWRECT (LVM_FIRST+34)
2627 #define ListView_GetViewRect(hwnd,prc) (BOOL)SNDMSG((hwnd),LVM_GETVIEWRECT,0,(LPARAM)(RECT *)(prc))
2628 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
2629 #define ListView_GetTextColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETTEXTCOLOR,0,0L)
2630 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
2631 #define ListView_SetTextColor(hwnd,clrText) (BOOL)SNDMSG((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrText))
2632 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
2633 #define ListView_GetTextBkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETTEXTBKCOLOR,0,0L)
2634 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
2635 #define ListView_SetTextBkColor(hwnd,clrTextBk) (BOOL)SNDMSG((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrTextBk))
2636 #define LVM_GETTOPINDEX (LVM_FIRST+39)
2637 #define ListView_GetTopIndex(hwndLV) (int)SNDMSG((hwndLV),LVM_GETTOPINDEX,0,0)
2638 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
2639 #define ListView_GetCountPerPage(hwndLV) (int)SNDMSG((hwndLV),LVM_GETCOUNTPERPAGE,0,0)
2640 #define LVM_GETORIGIN (LVM_FIRST+41)
2641 #define ListView_GetOrigin(hwndLV,ppt) (BOOL)SNDMSG((hwndLV),LVM_GETORIGIN,(WPARAM)0,(LPARAM)(POINT *)(ppt))
2642 #define LVM_UPDATE (LVM_FIRST+42)
2643 #define ListView_Update(hwndLV,i) (BOOL)SNDMSG((hwndLV),LVM_UPDATE,(WPARAM)(i),0L)
2644 #define LVM_SETITEMSTATE (LVM_FIRST+43)
2645 #define ListView_SetItemState(hwndLV,i,data,mask) { LV_ITEM _ms_lvi; _ms_lvi.stateMask = mask; _ms_lvi.state = data; SNDMSG((hwndLV),LVM_SETITEMSTATE,(WPARAM)(i),(LPARAM)(LV_ITEM *)&_ms_lvi);}
2646 #define ListView_SetCheckState(hwndLV,i,fCheck) ListView_SetItemState(hwndLV,i,INDEXTOSTATEIMAGEMASK((fCheck)?2:1),LVIS_STATEIMAGEMASK)
2647 #define LVM_GETITEMSTATE (LVM_FIRST+44)
2648 #define ListView_GetItemState(hwndLV,i,mask) (UINT)SNDMSG((hwndLV),LVM_GETITEMSTATE,(WPARAM)(i),(LPARAM)(mask))
2649 #define ListView_GetCheckState(hwndLV,i) ((((UINT)(SNDMSG((hwndLV),LVM_GETITEMSTATE,(WPARAM)(i),LVIS_STATEIMAGEMASK))) >> 12) -1)
2650 
2651 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
2652 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
2653 
2654 #define LVM_GETITEMTEXT __MINGW_NAME_AW(LVM_GETITEMTEXT)
2655 
2656 #define ListView_GetItemText(hwndLV,i,iSubItem_,pszText_,cchTextMax_) { LV_ITEM _ms_lvi; _ms_lvi.iSubItem = iSubItem_; _ms_lvi.cchTextMax = cchTextMax_; _ms_lvi.pszText = pszText_; SNDMSG((hwndLV),LVM_GETITEMTEXT,(WPARAM)(i),(LPARAM)(LV_ITEM *)&_ms_lvi);}
2657 
2658 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
2659 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
2660 
2661 #define LVM_SETITEMTEXT __MINGW_NAME_AW(LVM_SETITEMTEXT)
2662 
2663 #define ListView_SetItemText(hwndLV,i,iSubItem_,pszText_) { LV_ITEM _ms_lvi; _ms_lvi.iSubItem = iSubItem_; _ms_lvi.pszText = pszText_; SNDMSG((hwndLV),LVM_SETITEMTEXT,(WPARAM)(i),(LPARAM)(LV_ITEM *)&_ms_lvi);}
2664 
2665 #define LVSICF_NOINVALIDATEALL 0x1
2666 #define LVSICF_NOSCROLL 0x2
2667 
2668 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
2669 #define ListView_SetItemCount(hwndLV,cItems) SNDMSG((hwndLV),LVM_SETITEMCOUNT,(WPARAM)(cItems),0)
2670 #define ListView_SetItemCountEx(hwndLV,cItems,dwFlags) SNDMSG((hwndLV),LVM_SETITEMCOUNT,(WPARAM)(cItems),(LPARAM)(dwFlags))
2671 
2672   typedef int (CALLBACK *PFNLVCOMPARE)(LPARAM,LPARAM,LPARAM);
2673 
2674 #define LVM_SORTITEMS (LVM_FIRST+48)
2675 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) (BOOL)SNDMSG((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)(_lPrm),(LPARAM)(PFNLVCOMPARE)(_pfnCompare))
2676 
2677 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
2678 #define ListView_SetItemPosition32(hwndLV,i,x0,y0) { POINT ptNewPos; ptNewPos.x = x0; ptNewPos.y = y0; SNDMSG((hwndLV),LVM_SETITEMPOSITION32,(WPARAM)(int)(i),(LPARAM)&ptNewPos); }
2679 
2680 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
2681 #define ListView_GetSelectedCount(hwndLV) (UINT)SNDMSG((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
2682 
2683 #define LVM_GETITEMSPACING (LVM_FIRST+51)
2684 #define ListView_GetItemSpacing(hwndLV,fSmall) (DWORD)SNDMSG((hwndLV),LVM_GETITEMSPACING,fSmall,0L)
2685 
2686 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
2687 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
2688 
2689 #define LVM_GETISEARCHSTRING __MINGW_NAME_AW(LVM_GETISEARCHSTRING)
2690 
2691 #define ListView_GetISearchString(hwndLV,lpsz) (BOOL)SNDMSG((hwndLV),LVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz))
2692 
2693 #define LVM_SETICONSPACING (LVM_FIRST+53)
2694 
2695 #define ListView_SetIconSpacing(hwndLV,cx,cy) (DWORD)SNDMSG((hwndLV),LVM_SETICONSPACING,0,MAKELONG(cx,cy))
2696 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
2697 #define ListView_SetExtendedListViewStyle(hwndLV,dw) (DWORD)SNDMSG((hwndLV),LVM_SETEXTENDEDLISTVIEWSTYLE,0,dw)
2698 #define ListView_SetExtendedListViewStyleEx(hwndLV,dwMask,dw) (DWORD)SNDMSG((hwndLV),LVM_SETEXTENDEDLISTVIEWSTYLE,dwMask,dw)
2699 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
2700 #define ListView_GetExtendedListViewStyle(hwndLV) (DWORD)SNDMSG((hwndLV),LVM_GETEXTENDEDLISTVIEWSTYLE,0,0)
2701 #define LVS_EX_GRIDLINES 0x1
2702 #define LVS_EX_SUBITEMIMAGES 0x2
2703 #define LVS_EX_CHECKBOXES 0x4
2704 #define LVS_EX_TRACKSELECT 0x8
2705 #define LVS_EX_HEADERDRAGDROP 0x10
2706 #define LVS_EX_FULLROWSELECT 0x20
2707 #define LVS_EX_ONECLICKACTIVATE 0x40
2708 #define LVS_EX_TWOCLICKACTIVATE 0x80
2709 #define LVS_EX_FLATSB 0x100
2710 #define LVS_EX_REGIONAL 0x200
2711 #define LVS_EX_INFOTIP 0x400
2712 #define LVS_EX_UNDERLINEHOT 0x800
2713 #define LVS_EX_UNDERLINECOLD 0x1000
2714 #define LVS_EX_MULTIWORKAREAS 0x2000
2715 #define LVS_EX_LABELTIP 0x4000
2716 #define LVS_EX_BORDERSELECT 0x8000
2717 #define LVS_EX_DOUBLEBUFFER 0x10000
2718 #define LVS_EX_HIDELABELS 0x20000
2719 #define LVS_EX_SINGLEROW 0x40000
2720 #define LVS_EX_SNAPTOGRID 0x80000
2721 #define LVS_EX_SIMPLESELECT 0x100000
2722 #if _WIN32_WINNT >= 0x0600
2723 #define LVS_EX_JUSTIFYCOLUMNS 0x200000
2724 #define LVS_EX_TRANSPARENTBKGND 0x400000
2725 #define LVS_EX_TRANSPARENTSHADOWTEXT 0x800000
2726 #define LVS_EX_AUTOAUTOARRANGE 0x1000000
2727 #define LVS_EX_HEADERINALLVIEWS 0x2000000
2728 #define LVS_EX_AUTOCHECKSELECT 0x8000000
2729 #define LVS_EX_AUTOSIZECOLUMNS 0x10000000
2730 #define LVS_EX_COLUMNSNAPPOINTS 0x40000000
2731 #define LVS_EX_COLUMNOVERFLOW 0x80000000
2732 #endif
2733 
2734 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
2735 #define ListView_GetSubItemRect(hwnd,iItem,iSubItem,code,prc) (BOOL)SNDMSG((hwnd),LVM_GETSUBITEMRECT,(WPARAM)(int)(iItem),((prc) ? ((((LPRECT)(prc))->top = iSubItem),(((LPRECT)(prc))->left = code),(LPARAM)(prc)) : (LPARAM)(LPRECT)NULL))
2736 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
2737 #define ListView_SubItemHitTest(hwnd,plvhti) (int)SNDMSG((hwnd),LVM_SUBITEMHITTEST,0,(LPARAM)(LPLVHITTESTINFO)(plvhti))
2738 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
2739 #define ListView_SetColumnOrderArray(hwnd,iCount,pi) (BOOL)SNDMSG((hwnd),LVM_SETCOLUMNORDERARRAY,(WPARAM)(iCount),(LPARAM)(LPINT)(pi))
2740 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
2741 #define ListView_GetColumnOrderArray(hwnd,iCount,pi) (BOOL)SNDMSG((hwnd),LVM_GETCOLUMNORDERARRAY,(WPARAM)(iCount),(LPARAM)(LPINT)(pi))
2742 #define LVM_SETHOTITEM (LVM_FIRST+60)
2743 #define ListView_SetHotItem(hwnd,i) (int)SNDMSG((hwnd),LVM_SETHOTITEM,(WPARAM)(i),0)
2744 #define LVM_GETHOTITEM (LVM_FIRST+61)
2745 #define ListView_GetHotItem(hwnd) (int)SNDMSG((hwnd),LVM_GETHOTITEM,0,0)
2746 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
2747 #define ListView_SetHotCursor(hwnd,hcur) (HCURSOR)SNDMSG((hwnd),LVM_SETHOTCURSOR,0,(LPARAM)(hcur))
2748 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
2749 #define ListView_GetHotCursor(hwnd) (HCURSOR)SNDMSG((hwnd),LVM_GETHOTCURSOR,0,0)
2750 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
2751 #define ListView_ApproximateViewRect(hwnd,iWidth,iHeight,iCount) (DWORD)SNDMSG((hwnd),LVM_APPROXIMATEVIEWRECT,iCount,MAKELPARAM(iWidth,iHeight))
2752 
2753 #define LV_MAX_WORKAREAS 16
2754 #define LVM_SETWORKAREAS (LVM_FIRST+65)
2755 #define ListView_SetWorkAreas(hwnd,nWorkAreas,prc) (BOOL)SNDMSG((hwnd),LVM_SETWORKAREAS,(WPARAM)(int)(nWorkAreas),(LPARAM)(RECT *)(prc))
2756 #define LVM_GETWORKAREAS (LVM_FIRST+70)
2757 #define ListView_GetWorkAreas(hwnd,nWorkAreas,prc) (BOOL)SNDMSG((hwnd),LVM_GETWORKAREAS,(WPARAM)(int)(nWorkAreas),(LPARAM)(RECT *)(prc))
2758 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
2759 #define ListView_GetNumberOfWorkAreas(hwnd,pnWorkAreas) (BOOL)SNDMSG((hwnd),LVM_GETNUMBEROFWORKAREAS,0,(LPARAM)(UINT *)(pnWorkAreas))
2760 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
2761 #define ListView_GetSelectionMark(hwnd) (int)SNDMSG((hwnd),LVM_GETSELECTIONMARK,0,0)
2762 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
2763 #define ListView_SetSelectionMark(hwnd,i) (int)SNDMSG((hwnd),LVM_SETSELECTIONMARK,0,(LPARAM)(i))
2764 #define LVM_SETHOVERTIME (LVM_FIRST+71)
2765 #define ListView_SetHoverTime(hwndLV,dwHoverTimeMs) (DWORD)SNDMSG((hwndLV),LVM_SETHOVERTIME,0,(LPARAM)(dwHoverTimeMs))
2766 #define LVM_GETHOVERTIME (LVM_FIRST+72)
2767 #define ListView_GetHoverTime(hwndLV) (DWORD)SNDMSG((hwndLV),LVM_GETHOVERTIME,0,0)
2768 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
2769 #define ListView_SetToolTips(hwndLV,hwndNewHwnd) (HWND)SNDMSG((hwndLV),LVM_SETTOOLTIPS,(WPARAM)(hwndNewHwnd),0)
2770 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
2771 #define ListView_GetToolTips(hwndLV) (HWND)SNDMSG((hwndLV),LVM_GETTOOLTIPS,0,0)
2772 #define LVM_SORTITEMSEX (LVM_FIRST+81)
2773 #define ListView_SortItemsEx(hwndLV,_pfnCompare,_lPrm) (BOOL)SNDMSG((hwndLV),LVM_SORTITEMSEX,(WPARAM)(LPARAM)(_lPrm),(LPARAM)(PFNLVCOMPARE)(_pfnCompare))
2774 
2775   typedef struct tagLVBKIMAGEA {
2776     ULONG ulFlags;
2777     HBITMAP hbm;
2778     LPSTR pszImage;
2779     UINT cchImageMax;
2780     int xOffsetPercent;
2781     int yOffsetPercent;
2782   } LVBKIMAGEA,*LPLVBKIMAGEA;
2783 
2784   typedef struct tagLVBKIMAGEW {
2785     ULONG ulFlags;
2786     HBITMAP hbm;
2787     LPWSTR pszImage;
2788     UINT cchImageMax;
2789     int xOffsetPercent;
2790     int yOffsetPercent;
2791   } LVBKIMAGEW,*LPLVBKIMAGEW;
2792 
2793 #define LVBKIF_SOURCE_NONE 0x0
2794 #define LVBKIF_SOURCE_HBITMAP 0x1
2795 #define LVBKIF_SOURCE_URL 0x2
2796 #define LVBKIF_SOURCE_MASK 0x3
2797 #define LVBKIF_STYLE_NORMAL 0x0
2798 #define LVBKIF_STYLE_TILE 0x10
2799 #define LVBKIF_STYLE_MASK 0x10
2800 #define LVBKIF_FLAG_TILEOFFSET 0x100
2801 #define LVBKIF_TYPE_WATERMARK 0x10000000
2802 
2803 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
2804 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
2805 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
2806 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
2807 
2808 #define LVM_SETSELECTEDCOLUMN (LVM_FIRST+140)
2809 #define ListView_SetSelectedColumn(hwnd,iCol) SNDMSG((hwnd),LVM_SETSELECTEDCOLUMN,(WPARAM)iCol,0)
2810 #define LVM_SETTILEWIDTH (LVM_FIRST+141)
2811 #define ListView_SetTileWidth(hwnd,cpWidth) SNDMSG((hwnd),LVM_SETTILEWIDTH,(WPARAM)cpWidth,0)
2812 #define LV_VIEW_ICON 0x0
2813 #define LV_VIEW_DETAILS 0x1
2814 #define LV_VIEW_SMALLICON 0x2
2815 #define LV_VIEW_LIST 0x3
2816 #define LV_VIEW_TILE 0x4
2817 #define LV_VIEW_MAX 0x4
2818 #define LVM_SETVIEW (LVM_FIRST+142)
2819 #define ListView_SetView(hwnd,iView) (DWORD)SNDMSG((hwnd),LVM_SETVIEW,(WPARAM)(DWORD)iView,0)
2820 #define LVM_GETVIEW (LVM_FIRST+143)
2821 #define ListView_GetView(hwnd) (DWORD)SNDMSG((hwnd),LVM_GETVIEW,0,0)
2822 #define LVGF_NONE 0x0
2823 #define LVGF_HEADER 0x1
2824 #define LVGF_FOOTER 0x2
2825 #define LVGF_STATE 0x4
2826 #define LVGF_ALIGN 0x8
2827 #define LVGF_GROUPID 0x10
2828 
2829 #define LVGS_NORMAL 0x0
2830 #define LVGS_COLLAPSED 0x1
2831 #define LVGS_HIDDEN 0x2
2832 
2833 #define LVGA_HEADER_LEFT 0x1
2834 #define LVGA_HEADER_CENTER 0x2
2835 #define LVGA_HEADER_RIGHT 0x4
2836 #define LVGA_FOOTER_LEFT 0x8
2837 #define LVGA_FOOTER_CENTER 0x10
2838 #define LVGA_FOOTER_RIGHT 0x20
2839 
2840   typedef struct tagLVGROUP {
2841     UINT cbSize;
2842     UINT mask;
2843     LPWSTR pszHeader;
2844     int cchHeader;
2845     LPWSTR pszFooter;
2846     int cchFooter;
2847     int iGroupId;
2848     UINT stateMask;
2849     UINT state;
2850     UINT uAlign;
2851   } LVGROUP,*PLVGROUP;
2852 
2853 #define LVM_INSERTGROUP (LVM_FIRST+145)
2854 #define ListView_InsertGroup(hwnd,index,pgrp) SNDMSG((hwnd),LVM_INSERTGROUP,(WPARAM)index,(LPARAM)pgrp)
2855 #define LVM_SETGROUPINFO (LVM_FIRST+147)
2856 #define ListView_SetGroupInfo(hwnd,iGroupId,pgrp) SNDMSG((hwnd),LVM_SETGROUPINFO,(WPARAM)iGroupId,(LPARAM)pgrp)
2857 #define LVM_GETGROUPINFO (LVM_FIRST+149)
2858 #define ListView_GetGroupInfo(hwnd,iGroupId,pgrp) SNDMSG((hwnd),LVM_GETGROUPINFO,(WPARAM)iGroupId,(LPARAM)pgrp)
2859 #define LVM_REMOVEGROUP (LVM_FIRST+150)
2860 #define ListView_RemoveGroup(hwnd,iGroupId) SNDMSG((hwnd),LVM_REMOVEGROUP,(WPARAM)iGroupId,0)
2861 #define LVM_MOVEGROUP (LVM_FIRST+151)
2862 #define ListView_MoveGroup(hwnd,iGroupId,toIndex) SNDMSG((hwnd),LVM_MOVEGROUP,(WPARAM)iGroupId,(LPARAM)toIndex)
2863 #define LVM_MOVEITEMTOGROUP (LVM_FIRST+154)
2864 #define ListView_MoveItemToGroup(hwnd,idItemFrom,idGroupTo) SNDMSG((hwnd),LVM_MOVEITEMTOGROUP,(WPARAM)idItemFrom,(LPARAM)idGroupTo)
2865 #define LVGMF_NONE 0x0
2866 #define LVGMF_BORDERSIZE 0x1
2867 #define LVGMF_BORDERCOLOR 0x2
2868 #define LVGMF_TEXTCOLOR 0x4
2869 
2870   typedef struct tagLVGROUPMETRICS {
2871     UINT cbSize;
2872     UINT mask;
2873     UINT Left;
2874     UINT Top;
2875     UINT Right;
2876     UINT Bottom;
2877     COLORREF crLeft;
2878     COLORREF crTop;
2879     COLORREF crRight;
2880     COLORREF crBottom;
2881     COLORREF crHeader;
2882     COLORREF crFooter;
2883   } LVGROUPMETRICS,*PLVGROUPMETRICS;
2884 
2885 #define LVM_SETGROUPMETRICS (LVM_FIRST+155)
2886 #define ListView_SetGroupMetrics(hwnd,pGroupMetrics) SNDMSG((hwnd),LVM_SETGROUPMETRICS,0,(LPARAM)pGroupMetrics)
2887 #define LVM_GETGROUPMETRICS (LVM_FIRST+156)
2888 #define ListView_GetGroupMetrics(hwnd,pGroupMetrics) SNDMSG((hwnd),LVM_GETGROUPMETRICS,0,(LPARAM)pGroupMetrics)
2889 #define LVM_ENABLEGROUPVIEW (LVM_FIRST+157)
2890 #define ListView_EnableGroupView(hwnd,fEnable) SNDMSG((hwnd),LVM_ENABLEGROUPVIEW,(WPARAM)fEnable,0)
2891 
2892   typedef int (CALLBACK *PFNLVGROUPCOMPARE)(int,int,void *);
2893 
2894 #define LVM_SORTGROUPS (LVM_FIRST+158)
2895 #define ListView_SortGroups(hwnd,_pfnGroupCompate,_plv) SNDMSG((hwnd),LVM_SORTGROUPS,(WPARAM)_pfnGroupCompate,(LPARAM)_plv)
2896 
2897   typedef struct tagLVINSERTGROUPSORTED {
2898     PFNLVGROUPCOMPARE pfnGroupCompare;
2899     void *pvData;
2900     LVGROUP lvGroup;
2901   } LVINSERTGROUPSORTED,*PLVINSERTGROUPSORTED;
2902 
2903 #define LVM_INSERTGROUPSORTED (LVM_FIRST+159)
2904 #define ListView_InsertGroupSorted(hwnd,structInsert) SNDMSG((hwnd),LVM_INSERTGROUPSORTED,(WPARAM)structInsert,0)
2905 #define LVM_REMOVEALLGROUPS (LVM_FIRST+160)
2906 #define ListView_RemoveAllGroups(hwnd) SNDMSG((hwnd),LVM_REMOVEALLGROUPS,0,0)
2907 #define LVM_HASGROUP (LVM_FIRST+161)
2908 #define ListView_HasGroup(hwnd,dwGroupId) SNDMSG((hwnd),LVM_HASGROUP,dwGroupId,0)
2909 
2910 #define LVTVIF_AUTOSIZE 0x0
2911 #define LVTVIF_FIXEDWIDTH 0x1
2912 #define LVTVIF_FIXEDHEIGHT 0x2
2913 #define LVTVIF_FIXEDSIZE 0x3
2914 
2915 #define LVTVIM_TILESIZE 0x1
2916 #define LVTVIM_COLUMNS 0x2
2917 #define LVTVIM_LABELMARGIN 0x4
2918 
2919   typedef struct tagLVTILEVIEWINFO {
2920     UINT cbSize;
2921     DWORD dwMask;
2922     DWORD dwFlags;
2923     SIZE sizeTile;
2924     int cLines;
2925     RECT rcLabelMargin;
2926   } LVTILEVIEWINFO,*PLVTILEVIEWINFO;
2927 
2928   typedef struct tagLVTILEINFO {
2929     UINT cbSize;
2930     int iItem;
2931     UINT cColumns;
2932     PUINT puColumns;
2933   } LVTILEINFO,*PLVTILEINFO;
2934 
2935 #define LVM_SETTILEVIEWINFO (LVM_FIRST+162)
2936 #define ListView_SetTileViewInfo(hwnd,ptvi) SNDMSG((hwnd),LVM_SETTILEVIEWINFO,0,(LPARAM)ptvi)
2937 #define LVM_GETTILEVIEWINFO (LVM_FIRST+163)
2938 #define ListView_GetTileViewInfo(hwnd,ptvi) SNDMSG((hwnd),LVM_GETTILEVIEWINFO,0,(LPARAM)ptvi)
2939 #define LVM_SETTILEINFO (LVM_FIRST+164)
2940 #define ListView_SetTileInfo(hwnd,pti) SNDMSG((hwnd),LVM_SETTILEINFO,0,(LPARAM)pti)
2941 #define LVM_GETTILEINFO (LVM_FIRST+165)
2942 #define ListView_GetTileInfo(hwnd,pti) SNDMSG((hwnd),LVM_GETTILEINFO,0,(LPARAM)pti)
2943 
2944   typedef struct {
2945     UINT cbSize;
2946     DWORD dwFlags;
2947     int iItem;
2948     DWORD dwReserved;
2949   } LVINSERTMARK,*LPLVINSERTMARK;
2950 
2951 #define LVIM_AFTER 0x1
2952 
2953 #define LVM_SETINSERTMARK (LVM_FIRST+166)
2954 #define ListView_SetInsertMark(hwnd,lvim) (BOOL)SNDMSG((hwnd),LVM_SETINSERTMARK,(WPARAM) 0,(LPARAM) (lvim))
2955 #define LVM_GETINSERTMARK (LVM_FIRST+167)
2956 #define ListView_GetInsertMark(hwnd,lvim) (BOOL)SNDMSG((hwnd),LVM_GETINSERTMARK,(WPARAM) 0,(LPARAM) (lvim))
2957 #define LVM_INSERTMARKHITTEST (LVM_FIRST+168)
2958 #define ListView_InsertMarkHitTest(hwnd,point,lvim) (int)SNDMSG((hwnd),LVM_INSERTMARKHITTEST,(WPARAM)(LPPOINT)(point),(LPARAM)(LPLVINSERTMARK)(lvim))
2959 #define LVM_GETINSERTMARKRECT (LVM_FIRST+169)
2960 #define ListView_GetInsertMarkRect(hwnd,rc) (int)SNDMSG((hwnd),LVM_GETINSERTMARKRECT,(WPARAM)0,(LPARAM)(LPRECT)(rc))
2961 #define LVM_SETINSERTMARKCOLOR (LVM_FIRST+170)
2962 #define ListView_SetInsertMarkColor(hwnd,color) (COLORREF)SNDMSG((hwnd),LVM_SETINSERTMARKCOLOR,(WPARAM)0,(LPARAM)(COLORREF)(color))
2963 #define LVM_GETINSERTMARKCOLOR (LVM_FIRST+171)
2964 #define ListView_GetInsertMarkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETINSERTMARKCOLOR,(WPARAM)0,(LPARAM)0)
2965 
2966   typedef struct tagLVSETINFOTIP {
2967     UINT cbSize;
2968     DWORD dwFlags;
2969     LPWSTR pszText;
2970     int iItem;
2971     int iSubItem;
2972   } LVSETINFOTIP,*PLVSETINFOTIP;
2973 
2974 #define LVM_SETINFOTIP (LVM_FIRST+173)
2975 #define ListView_SetInfoTip(hwndLV,plvInfoTip) (BOOL)SNDMSG((hwndLV),LVM_SETINFOTIP,(WPARAM)0,(LPARAM)plvInfoTip)
2976 #define LVM_GETSELECTEDCOLUMN (LVM_FIRST+174)
2977 #define ListView_GetSelectedColumn(hwnd) (UINT)SNDMSG((hwnd),LVM_GETSELECTEDCOLUMN,0,0)
2978 #define LVM_ISGROUPVIEWENABLED (LVM_FIRST+175)
2979 #define ListView_IsGroupViewEnabled(hwnd) (BOOL)SNDMSG((hwnd),LVM_ISGROUPVIEWENABLED,0,0)
2980 #define LVM_GETOUTLINECOLOR (LVM_FIRST+176)
2981 #define ListView_GetOutlineColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETOUTLINECOLOR,0,0)
2982 #define LVM_SETOUTLINECOLOR (LVM_FIRST+177)
2983 #define ListView_SetOutlineColor(hwnd,color) (COLORREF)SNDMSG((hwnd),LVM_SETOUTLINECOLOR,(WPARAM)0,(LPARAM)(COLORREF)(color))
2984 #define LVM_CANCELEDITLABEL (LVM_FIRST+179)
2985 #define ListView_CancelEditLabel(hwnd) (VOID)SNDMSG((hwnd),LVM_CANCELEDITLABEL,(WPARAM)0,(LPARAM)0)
2986 #define LVM_MAPINDEXTOID (LVM_FIRST+180)
2987 #define ListView_MapIndexToID(hwnd,index) (UINT)SNDMSG((hwnd),LVM_MAPINDEXTOID,(WPARAM)index,(LPARAM)0)
2988 #define LVM_MAPIDTOINDEX (LVM_FIRST+181)
2989 #define ListView_MapIDToIndex(hwnd,id) (UINT)SNDMSG((hwnd),LVM_MAPIDTOINDEX,(WPARAM)id,(LPARAM)0)
2990 #define LVM_ISITEMVISIBLE (LVM_FIRST+182)
2991 #define ListView_IsItemVisible(hwnd,index) (UINT)SNDMSG((hwnd),LVM_ISITEMVISIBLE,(WPARAM)(index),(LPARAM)0)
2992 
2993 #define LVBKIMAGE __MINGW_NAME_AW(LVBKIMAGE)
2994 #define LPLVBKIMAGE __MINGW_NAME_AW(LPLVBKIMAGE)
2995 #define LVM_SETBKIMAGE __MINGW_NAME_AW(LVM_SETBKIMAGE)
2996 #define LVM_GETBKIMAGE __MINGW_NAME_AW(LVM_GETBKIMAGE)
2997 
2998 #define ListView_SetBkImage(hwnd,plvbki) (BOOL)SNDMSG((hwnd),LVM_SETBKIMAGE,0,(LPARAM)(plvbki))
2999 #define ListView_GetBkImage(hwnd,plvbki) (BOOL)SNDMSG((hwnd),LVM_GETBKIMAGE,0,(LPARAM)(plvbki))
3000 
3001 #define LPNM_LISTVIEW LPNMLISTVIEW
3002 #define NM_LISTVIEW NMLISTVIEW
3003 
3004   typedef struct tagNMLISTVIEW {
3005     NMHDR hdr;
3006     int iItem;
3007     int iSubItem;
3008     UINT uNewState;
3009     UINT uOldState;
3010     UINT uChanged;
3011     POINT ptAction;
3012     LPARAM lParam;
3013   } NMLISTVIEW,*LPNMLISTVIEW;
3014 
3015   typedef struct tagNMITEMACTIVATE {
3016     NMHDR hdr;
3017     int iItem;
3018     int iSubItem;
3019     UINT uNewState;
3020     UINT uOldState;
3021     UINT uChanged;
3022     POINT ptAction;
3023     LPARAM lParam;
3024     UINT uKeyFlags;
3025   } NMITEMACTIVATE,*LPNMITEMACTIVATE;
3026 
3027 #define LVKF_ALT 0x1
3028 #define LVKF_CONTROL 0x2
3029 #define LVKF_SHIFT 0x4
3030 
3031 #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLVCUSTOMDRW,clrTextBk)
3032 
3033   typedef struct tagNMLVCUSTOMDRAW {
3034     NMCUSTOMDRAW nmcd;
3035     COLORREF clrText;
3036     COLORREF clrTextBk;
3037     int iSubItem;
3038     DWORD dwItemType;
3039     COLORREF clrFace;
3040     int iIconEffect;
3041     int iIconPhase;
3042     int iPartId;
3043     int iStateId;
3044     RECT rcText;
3045     UINT uAlign;
3046   } NMLVCUSTOMDRAW,*LPNMLVCUSTOMDRAW;
3047 
3048 #define LVCDI_ITEM 0x0
3049 #define LVCDI_GROUP 0x1
3050 
3051 #define LVCDRF_NOSELECT 0x10000
3052 #define LVCDRF_NOGROUPFRAME 0x20000
3053 
3054   typedef struct tagNMLVCACHEHINT {
3055     NMHDR hdr;
3056     int iFrom;
3057     int iTo;
3058   } NMLVCACHEHINT,*LPNMLVCACHEHINT;
3059 
3060 #define LPNM_CACHEHINT LPNMLVCACHEHINT
3061 #define PNM_CACHEHINT LPNMLVCACHEHINT
3062 #define NM_CACHEHINT NMLVCACHEHINT
3063 
3064   typedef struct tagNMLVFINDITEMA {
3065     NMHDR hdr;
3066     int iStart;
3067     LVFINDINFOA lvfi;
3068   } NMLVFINDITEMA,*LPNMLVFINDITEMA;
3069 
3070   typedef struct tagNMLVFINDITEMW {
3071     NMHDR hdr;
3072     int iStart;
3073     LVFINDINFOW lvfi;
3074   } NMLVFINDITEMW,*LPNMLVFINDITEMW;
3075 
3076 #define PNM_FINDITEMA LPNMLVFINDITEMA
3077 #define LPNM_FINDITEMA LPNMLVFINDITEMA
3078 #define NM_FINDITEMA NMLVFINDITEMA
3079 
3080 #define PNM_FINDITEMW LPNMLVFINDITEMW
3081 #define LPNM_FINDITEMW LPNMLVFINDITEMW
3082 #define NM_FINDITEMW NMLVFINDITEMW
3083 
3084 #define PNM_FINDITEM __MINGW_NAME_AW(PNM_FINDITEM)
3085 #define LPNM_FINDITEM __MINGW_NAME_AW(LPNM_FINDITEM)
3086 #define NM_FINDITEM __MINGW_NAME_AW(NM_FINDITEM)
3087 #define NMLVFINDITEM __MINGW_NAME_AW(NMLVFINDITEM)
3088 #define LPNMLVFINDITEM __MINGW_NAME_AW(LPNMLVFINDITEM)
3089 
3090   typedef struct tagNMLVODSTATECHANGE {
3091     NMHDR hdr;
3092     int iFrom;
3093     int iTo;
3094     UINT uNewState;
3095     UINT uOldState;
3096   } NMLVODSTATECHANGE,*LPNMLVODSTATECHANGE;
3097 
3098 #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3099 #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3100 #define NM_ODSTATECHANGE NMLVODSTATECHANGE
3101 
3102 #define LVN_ITEMCHANGING (LVN_FIRST-0)
3103 #define LVN_ITEMCHANGED (LVN_FIRST-1)
3104 #define LVN_INSERTITEM (LVN_FIRST-2)
3105 #define LVN_DELETEITEM (LVN_FIRST-3)
3106 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
3107 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
3108 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
3109 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
3110 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
3111 #define LVN_COLUMNCLICK (LVN_FIRST-8)
3112 #define LVN_BEGINDRAG (LVN_FIRST-9)
3113 #define LVN_BEGINRDRAG (LVN_FIRST-11)
3114 
3115 #define LVN_ODCACHEHINT (LVN_FIRST-13)
3116 #define LVN_ODFINDITEMA (LVN_FIRST-52)
3117 #define LVN_ODFINDITEMW (LVN_FIRST-79)
3118 
3119 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
3120 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
3121 
3122 #define LVN_ODFINDITEM __MINGW_NAME_AW(LVN_ODFINDITEM)
3123 
3124 #define LVN_HOTTRACK (LVN_FIRST-21)
3125 #define LVN_GETDISPINFOA (LVN_FIRST-50)
3126 #define LVN_GETDISPINFOW (LVN_FIRST-77)
3127 #define LVN_SETDISPINFOA (LVN_FIRST-51)
3128 #define LVN_SETDISPINFOW (LVN_FIRST-78)
3129 
3130 #define LVN_BEGINLABELEDIT __MINGW_NAME_AW(LVN_BEGINLABELEDIT)
3131 #define LVN_ENDLABELEDIT __MINGW_NAME_AW(LVN_ENDLABELEDIT)
3132 #define LVN_GETDISPINFO __MINGW_NAME_AW(LVN_GETDISPINFO)
3133 #define LVN_SETDISPINFO __MINGW_NAME_AW(LVN_SETDISPINFO)
3134 
3135 #define LVN_INCREMENTALSEARCHA  (LVN_FIRST-62)
3136 #define LVN_INCREMENTALSEARCHW  (LVN_FIRST-63)
3137 
3138 #define LVIF_DI_SETITEM 0x1000
3139 
3140 #define LV_DISPINFOA NMLVDISPINFOA
3141 #define LV_DISPINFOW NMLVDISPINFOW
3142 #define LV_DISPINFO NMLVDISPINFO
3143 
3144   typedef struct tagLVDISPINFO {
3145     NMHDR hdr;
3146     LVITEMA item;
3147   } NMLVDISPINFOA,*LPNMLVDISPINFOA;
3148 
3149   typedef struct tagLVDISPINFOW {
3150     NMHDR hdr;
3151     LVITEMW item;
3152   } NMLVDISPINFOW,*LPNMLVDISPINFOW;
3153 
3154 #define NMLVDISPINFO __MINGW_NAME_AW(NMLVDISPINFO)
3155 
3156 #define LVN_KEYDOWN (LVN_FIRST-55)
3157 
3158 #define LV_KEYDOWN NMLVKEYDOWN
3159 
3160 #include <pshpack1.h>
3161 
3162   typedef struct tagLVKEYDOWN {
3163     NMHDR hdr;
3164     WORD wVKey;
3165     UINT flags;
3166   } NMLVKEYDOWN,*LPNMLVKEYDOWN;
3167 
3168 #include <poppack.h>
3169 
3170 #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
3171 
3172   typedef struct tagNMLVGETINFOTIPA {
3173     NMHDR hdr;
3174     DWORD dwFlags;
3175     LPSTR pszText;
3176     int cchTextMax;
3177     int iItem;
3178     int iSubItem;
3179     LPARAM lParam;
3180   } NMLVGETINFOTIPA,*LPNMLVGETINFOTIPA;
3181 
3182   typedef struct tagNMLVGETINFOTIPW {
3183     NMHDR hdr;
3184     DWORD dwFlags;
3185     LPWSTR pszText;
3186     int cchTextMax;
3187     int iItem;
3188     int iSubItem;
3189     LPARAM lParam;
3190   } NMLVGETINFOTIPW,*LPNMLVGETINFOTIPW;
3191 
3192 #define LVGIT_UNFOLDED 0x1
3193 
3194 #define LVN_GETINFOTIPA (LVN_FIRST-57)
3195 #define LVN_GETINFOTIPW (LVN_FIRST-58)
3196 
3197 #define LVN_GETINFOTIP __MINGW_NAME_AW(LVN_GETINFOTIP)
3198 #define NMLVGETINFOTIP __MINGW_NAME_AW(NMLVGETINFOTIP)
3199 #define LPNMLVGETINFOTIP __MINGW_NAME_AW(LPNMLVGETINFOTIP)
3200 
3201   typedef struct tagNMLVSCROLL {
3202     NMHDR hdr;
3203     int dx;
3204     int dy;
3205   } NMLVSCROLL,*LPNMLVSCROLL;
3206 
3207 #define LVN_BEGINSCROLL (LVN_FIRST-80)
3208 #define LVN_ENDSCROLL (LVN_FIRST-81)
3209 
3210 #endif /* !NOLISTVIEW */
3211 
3212 #ifndef NOTREEVIEW
3213 
3214 #define WC_TREEVIEWA "SysTreeView32"
3215 #define WC_TREEVIEWW L"SysTreeView32"
3216 
3217 #define WC_TREEVIEW __MINGW_NAME_AW(WC_TREEVIEW)
3218 
3219 #define TVS_HASBUTTONS 0x1
3220 #define TVS_HASLINES 0x2
3221 #define TVS_LINESATROOT 0x4
3222 #define TVS_EDITLABELS 0x8
3223 #define TVS_DISABLEDRAGDROP 0x10
3224 #define TVS_SHOWSELALWAYS 0x20
3225 #define TVS_RTLREADING 0x40
3226 #define TVS_NOTOOLTIPS 0x80
3227 #define TVS_CHECKBOXES 0x100
3228 #define TVS_TRACKSELECT 0x200
3229 #define TVS_SINGLEEXPAND 0x400
3230 #define TVS_INFOTIP 0x800
3231 #define TVS_FULLROWSELECT 0x1000
3232 #define TVS_NOSCROLL 0x2000
3233 #define TVS_NONEVENHEIGHT 0x4000
3234 #define TVS_NOHSCROLL 0x8000
3235 
3236   typedef struct _TREEITEM *HTREEITEM;
3237 
3238 #define TVIF_TEXT 0x1
3239 #define TVIF_IMAGE 0x2
3240 #define TVIF_PARAM 0x4
3241 #define TVIF_STATE 0x8
3242 #define TVIF_HANDLE 0x10
3243 #define TVIF_SELECTEDIMAGE 0x20
3244 #define TVIF_CHILDREN 0x40
3245 #if(_WIN32_IE >= 0x0400)
3246 #define TVIF_INTEGRAL 0x80
3247 #endif
3248 #if(_WIN32_IE >= 0x0600)
3249 #define TVIF_STATEEX 0x100
3250 #endif
3251 #define TVIF_EXPANDEDIMAGE 0x200
3252 #define TVIS_SELECTED 0x2
3253 #define TVIS_CUT 0x4
3254 #define TVIS_DROPHILITED 0x8
3255 #define TVIS_BOLD 0x10
3256 #define TVIS_EXPANDED 0x20
3257 #define TVIS_EXPANDEDONCE 0x40
3258 #define TVIS_EXPANDPARTIAL 0x80
3259 #define TVIS_OVERLAYMASK 0xf00
3260 #define TVIS_STATEIMAGEMASK 0xF000
3261 #define TVIS_USERMASK 0xF000
3262 
3263 #define TVIS_FOCUSED 0x0001
3264 
3265 #define I_CHILDRENCALLBACK (-1)
3266 
3267 #define LPTV_ITEMW LPTVITEMW
3268 #define LPTV_ITEMA LPTVITEMA
3269 #define TV_ITEMW TVITEMW
3270 #define TV_ITEMA TVITEMA
3271 #define LPTV_ITEM LPTVITEM
3272 #define TV_ITEM TVITEM
3273 
3274   typedef struct tagTVITEMA {
3275     UINT mask;
3276     HTREEITEM hItem;
3277     UINT state;
3278     UINT stateMask;
3279     LPSTR pszText;
3280     int cchTextMax;
3281     int iImage;
3282     int iSelectedImage;
3283     int cChildren;
3284     LPARAM lParam;
3285   } TVITEMA,*LPTVITEMA;
3286 
3287   typedef struct tagTVITEMW {
3288     UINT mask;
3289     HTREEITEM hItem;
3290     UINT state;
3291     UINT stateMask;
3292     LPWSTR pszText;
3293     int cchTextMax;
3294     int iImage;
3295     int iSelectedImage;
3296     int cChildren;
3297     LPARAM lParam;
3298   } TVITEMW,*LPTVITEMW;
3299 
3300   typedef struct tagTVITEMEXA {
3301     UINT mask;
3302     HTREEITEM hItem;
3303     UINT state;
3304     UINT stateMask;
3305     LPSTR pszText;
3306     int cchTextMax;
3307     int iImage;
3308     int iSelectedImage;
3309     int cChildren;
3310     LPARAM lParam;
3311     int iIntegral;
3312     UINT uStateEx;        /* _WIN32_IE >= 0x600 */
3313     HWND hwnd;            /* _WIN32_IE >= 0x600 */
3314     int iExpandedImage;   /* _WIN32_IE >= 0x600 */
3315   } TVITEMEXA, *LPTVITEMEXA;
3316 
3317   typedef struct tagTVITEMEXW {
3318     UINT mask;
3319     HTREEITEM hItem;
3320     UINT state;
3321     UINT stateMask;
3322     LPWSTR pszText;
3323     int cchTextMax;
3324     int iImage;
3325     int iSelectedImage;
3326     int cChildren;
3327     LPARAM lParam;
3328     int iIntegral;
3329     UINT uStateEx;        /* _WIN32_IE >= 0x600 */
3330     HWND hwnd;            /* _WIN32_IE >= 0x600 */
3331     int iExpandedImage;   /* _WIN32_IE >= 0x600 */
3332   } TVITEMEXW, *LPTVITEMEXW;
3333 
3334   __MINGW_TYPEDEF_AW(TVITEMEX)
3335   __MINGW_TYPEDEF_AW(LPTVITEMEX)
3336 
3337 #define TVITEM __MINGW_NAME_AW(TVITEM)
3338 #define LPTVITEM __MINGW_NAME_AW(LPTVITEM)
3339 
3340 #define TVI_ROOT ((HTREEITEM)(ULONG_PTR)-0x10000)
3341 #define TVI_FIRST ((HTREEITEM)(ULONG_PTR)-0xffff)
3342 #define TVI_LAST ((HTREEITEM)(ULONG_PTR)-0xfffe)
3343 #define TVI_SORT ((HTREEITEM)(ULONG_PTR)-0xfffd)
3344 
3345 #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
3346 #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
3347 #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
3348 #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
3349 #define TV_INSERTSTRUCT TVINSERTSTRUCT
3350 #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
3351 
3352 #define TVINSERTSTRUCTA_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTA,item)
3353 #define TVINSERTSTRUCTW_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTW,item)
3354 
3355   typedef struct tagTVINSERTSTRUCTA {
3356     HTREEITEM hParent;
3357     HTREEITEM hInsertAfter;
3358     __C89_NAMELESS union {
3359       TVITEMEXA itemex;
3360       TV_ITEMA item;
3361     } DUMMYUNIONNAME;
3362   } TVINSERTSTRUCTA,*LPTVINSERTSTRUCTA;
3363 
3364   typedef struct tagTVINSERTSTRUCTW {
3365     HTREEITEM hParent;
3366     HTREEITEM hInsertAfter;
3367     __C89_NAMELESS union {
3368       TVITEMEXW itemex;
3369       TV_ITEMW item;
3370     } DUMMYUNIONNAME;
3371   } TVINSERTSTRUCTW,*LPTVINSERTSTRUCTW;
3372 
3373 
3374 #define TVINSERTSTRUCT __MINGW_NAME_AW(TVINSERTSTRUCT)
3375 #define LPTVINSERTSTRUCT __MINGW_NAME_AW(LPTVINSERTSTRUCT)
3376 
3377 #define TVINSERTSTRUCT_V1_SIZE __MINGW_NAME_AW_EXT(TVINSERTSTRUCT,_V1_SIZE)
3378 
3379 #define TVM_INSERTITEMA (TV_FIRST+0)
3380 #define TVM_INSERTITEMW (TV_FIRST+50)
3381 
3382 #define TVM_INSERTITEM __MINGW_NAME_AW(TVM_INSERTITEM)
3383 
3384 #define TreeView_InsertItem(hwnd,lpis) (HTREEITEM)SNDMSG((hwnd),TVM_INSERTITEM,0,(LPARAM)(LPTV_INSERTSTRUCT)(lpis))
3385 
3386 #define TVM_DELETEITEM (TV_FIRST+1)
3387 #define TreeView_DeleteItem(hwnd,hitem) (BOOL)SNDMSG((hwnd),TVM_DELETEITEM,0,(LPARAM)(HTREEITEM)(hitem))
3388 
3389 #define TreeView_DeleteAllItems(hwnd) (BOOL)SNDMSG((hwnd),TVM_DELETEITEM,0,(LPARAM)TVI_ROOT)
3390 
3391 #define TVM_EXPAND (TV_FIRST+2)
3392 #define TreeView_Expand(hwnd,hitem,code) (BOOL)SNDMSG((hwnd),TVM_EXPAND,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
3393 
3394 #define TVE_COLLAPSE 0x1
3395 #define TVE_EXPAND 0x2
3396 #define TVE_TOGGLE 0x3
3397 #define TVE_EXPANDPARTIAL 0x4000
3398 #define TVE_COLLAPSERESET 0x8000
3399 
3400 #define TVM_GETITEMRECT (TV_FIRST+4)
3401 #define TreeView_GetItemRect(hwnd,hitem,prc,code) (*(HTREEITEM *)prc = (hitem),(BOOL)SNDMSG((hwnd),TVM_GETITEMRECT,(WPARAM)(code),(LPARAM)(RECT *)(prc)))
3402 
3403 #define TVM_GETCOUNT (TV_FIRST+5)
3404 #define TreeView_GetCount(hwnd) (UINT)SNDMSG((hwnd),TVM_GETCOUNT,0,0)
3405 
3406 #define TVM_GETINDENT (TV_FIRST+6)
3407 #define TreeView_GetIndent(hwnd) (UINT)SNDMSG((hwnd),TVM_GETINDENT,0,0)
3408 
3409 #define TVM_SETINDENT (TV_FIRST+7)
3410 #define TreeView_SetIndent(hwnd,indent) (BOOL)SNDMSG((hwnd),TVM_SETINDENT,(WPARAM)(indent),0)
3411 
3412 #define TVM_GETIMAGELIST (TV_FIRST+8)
3413 #define TreeView_GetImageList(hwnd,iImage) (HIMAGELIST)SNDMSG((hwnd),TVM_GETIMAGELIST,iImage,0)
3414 
3415 #define TVSIL_NORMAL 0
3416 #define TVSIL_STATE 2
3417 
3418 #define TVM_SETIMAGELIST (TV_FIRST+9)
3419 #define TreeView_SetImageList(hwnd,himl,iImage) (HIMAGELIST)SNDMSG((hwnd),TVM_SETIMAGELIST,iImage,(LPARAM)(HIMAGELIST)(himl))
3420 
3421 #define TVM_GETNEXTITEM (TV_FIRST+10)
3422 #define TreeView_GetNextItem(hwnd,hitem,code) (HTREEITEM)SNDMSG((hwnd),TVM_GETNEXTITEM,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
3423 
3424 #define TVGN_ROOT 0x0
3425 #define TVGN_NEXT 0x1
3426 #define TVGN_PREVIOUS 0x2
3427 #define TVGN_PARENT 0x3
3428 #define TVGN_CHILD 0x4
3429 #define TVGN_FIRSTVISIBLE 0x5
3430 #define TVGN_NEXTVISIBLE 0x6
3431 #define TVGN_PREVIOUSVISIBLE 0x7
3432 #define TVGN_DROPHILITE 0x8
3433 #define TVGN_CARET 0x9
3434 #define TVGN_LASTVISIBLE 0xa
3435 
3436 #define TVSI_NOSINGLEEXPAND 0x8000
3437 
3438 #define TreeView_GetChild(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_CHILD)
3439 #define TreeView_GetNextSibling(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_NEXT)
3440 #define TreeView_GetPrevSibling(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PREVIOUS)
3441 #define TreeView_GetParent(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PARENT)
3442 #define TreeView_GetFirstVisible(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_FIRSTVISIBLE)
3443 #define TreeView_GetNextVisible(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_NEXTVISIBLE)
3444 #define TreeView_GetPrevVisible(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PREVIOUSVISIBLE)
3445 #define TreeView_GetSelection(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_CARET)
3446 #define TreeView_GetDropHilight(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_DROPHILITE)
3447 #define TreeView_GetRoot(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_ROOT)
3448 #define TreeView_GetLastVisible(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_LASTVISIBLE)
3449 
3450 #define TVM_SELECTITEM (TV_FIRST+11)
3451 #define TreeView_Select(hwnd,hitem,code) (BOOL)SNDMSG((hwnd),TVM_SELECTITEM,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
3452 
3453 #define TreeView_SelectItem(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_CARET)
3454 #define TreeView_SelectDropTarget(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_DROPHILITE)
3455 #define TreeView_SelectSetFirstVisible(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_FIRSTVISIBLE)
3456 
3457 #define TVM_GETITEMA (TV_FIRST+12)
3458 #define TVM_GETITEMW (TV_FIRST+62)
3459 
3460 #define TVM_GETITEM __MINGW_NAME_AW(TVM_GETITEM)
3461 
3462 #define TreeView_GetItem(hwnd,pitem) (BOOL)SNDMSG((hwnd),TVM_GETITEM,0,(LPARAM)(TV_ITEM *)(pitem))
3463 
3464 #define TVM_SETITEMA (TV_FIRST+13)
3465 #define TVM_SETITEMW (TV_FIRST+63)
3466 
3467 #define TVM_SETITEM __MINGW_NAME_AW(TVM_SETITEM)
3468 
3469 #define TreeView_SetItem(hwnd,pitem) (BOOL)SNDMSG((hwnd),TVM_SETITEM,0,(LPARAM)(const TV_ITEM *)(pitem))
3470 
3471 #define TVM_EDITLABELA (TV_FIRST+14)
3472 #define TVM_EDITLABELW (TV_FIRST+65)
3473 
3474 #define TVM_EDITLABEL __MINGW_NAME_AW(TVM_EDITLABEL)
3475 
3476 #define TreeView_EditLabel(hwnd,hitem) (HWND)SNDMSG((hwnd),TVM_EDITLABEL,0,(LPARAM)(HTREEITEM)(hitem))
3477 
3478 #define TVM_GETEDITCONTROL (TV_FIRST+15)
3479 #define TreeView_GetEditControl(hwnd) (HWND)SNDMSG((hwnd),TVM_GETEDITCONTROL,0,0)
3480 
3481 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
3482 #define TreeView_GetVisibleCount(hwnd) (UINT)SNDMSG((hwnd),TVM_GETVISIBLECOUNT,0,0)
3483 
3484 #define TVM_HITTEST (TV_FIRST+17)
3485 #define TreeView_HitTest(hwnd,lpht) (HTREEITEM)SNDMSG((hwnd),TVM_HITTEST,0,(LPARAM)(LPTV_HITTESTINFO)(lpht))
3486 
3487 #define LPTV_HITTESTINFO LPTVHITTESTINFO
3488 #define TV_HITTESTINFO TVHITTESTINFO
3489 
3490   typedef struct tagTVHITTESTINFO {
3491     POINT pt;
3492     UINT flags;
3493     HTREEITEM hItem;
3494   } TVHITTESTINFO,*LPTVHITTESTINFO;
3495 
3496 #define TVHT_NOWHERE 0x1
3497 #define TVHT_ONITEMICON 0x2
3498 #define TVHT_ONITEMLABEL 0x4
3499 #define TVHT_ONITEM (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON)
3500 #define TVHT_ONITEMINDENT 0x8
3501 #define TVHT_ONITEMBUTTON 0x10
3502 #define TVHT_ONITEMRIGHT 0x20
3503 #define TVHT_ONITEMSTATEICON 0x40
3504 
3505 #define TVHT_ABOVE 0x100
3506 #define TVHT_BELOW 0x200
3507 #define TVHT_TORIGHT 0x400
3508 #define TVHT_TOLEFT 0x800
3509 
3510 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
3511 #define TreeView_CreateDragImage(hwnd,hitem) (HIMAGELIST)SNDMSG((hwnd),TVM_CREATEDRAGIMAGE,0,(LPARAM)(HTREEITEM)(hitem))
3512 
3513 #define TVM_SORTCHILDREN (TV_FIRST+19)
3514 #define TreeView_SortChildren(hwnd,hitem,recurse) (BOOL)SNDMSG((hwnd),TVM_SORTCHILDREN,(WPARAM)(recurse),(LPARAM)(HTREEITEM)(hitem))
3515 
3516 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
3517 #define TreeView_EnsureVisible(hwnd,hitem) (BOOL)SNDMSG((hwnd),TVM_ENSUREVISIBLE,0,(LPARAM)(HTREEITEM)(hitem))
3518 
3519 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
3520 #define TreeView_SortChildrenCB(hwnd,psort,recurse) (BOOL)SNDMSG((hwnd),TVM_SORTCHILDRENCB,(WPARAM)(recurse),(LPARAM)(LPTV_SORTCB)(psort))
3521 
3522 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
3523 #define TreeView_EndEditLabelNow(hwnd,fCancel) (BOOL)SNDMSG((hwnd),TVM_ENDEDITLABELNOW,(WPARAM)(fCancel),0)
3524 
3525 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
3526 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
3527 
3528 #define TVM_GETISEARCHSTRING __MINGW_NAME_AW(TVM_GETISEARCHSTRING)
3529 
3530 #define TVM_SETTOOLTIPS (TV_FIRST+24)
3531 #define TreeView_SetToolTips(hwnd,hwndTT) (HWND)SNDMSG((hwnd),TVM_SETTOOLTIPS,(WPARAM)(hwndTT),0)
3532 #define TVM_GETTOOLTIPS (TV_FIRST+25)
3533 #define TreeView_GetToolTips(hwnd) (HWND)SNDMSG((hwnd),TVM_GETTOOLTIPS,0,0)
3534 #define TreeView_GetISearchString(hwndTV,lpsz) (BOOL)SNDMSG((hwndTV),TVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz))
3535 
3536 #define TVM_SETINSERTMARK (TV_FIRST+26)
3537 #define TreeView_SetInsertMark(hwnd,hItem,fAfter) (BOOL)SNDMSG((hwnd),TVM_SETINSERTMARK,(WPARAM) (fAfter),(LPARAM) (hItem))
3538 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3539 #define TreeView_SetUnicodeFormat(hwnd,fUnicode) (BOOL)SNDMSG((hwnd),TVM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
3540 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3541 #define TreeView_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd),TVM_GETUNICODEFORMAT,0,0)
3542 
3543 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
3544 #define TreeView_SetItemHeight(hwnd,iHeight) (int)SNDMSG((hwnd),TVM_SETITEMHEIGHT,(WPARAM)(iHeight),0)
3545 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
3546 #define TreeView_GetItemHeight(hwnd) (int)SNDMSG((hwnd),TVM_GETITEMHEIGHT,0,0)
3547 #define TVM_SETBKCOLOR (TV_FIRST+29)
3548 #define TreeView_SetBkColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETBKCOLOR,0,(LPARAM)(clr))
3549 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
3550 #define TreeView_SetTextColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETTEXTCOLOR,0,(LPARAM)(clr))
3551 #define TVM_GETBKCOLOR (TV_FIRST+31)
3552 #define TreeView_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETBKCOLOR,0,0)
3553 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
3554 #define TreeView_GetTextColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETTEXTCOLOR,0,0)
3555 #define TVM_SETSCROLLTIME (TV_FIRST+33)
3556 #define TreeView_SetScrollTime(hwnd,uTime) (UINT)SNDMSG((hwnd),TVM_SETSCROLLTIME,uTime,0)
3557 #define TVM_GETSCROLLTIME (TV_FIRST+34)
3558 #define TreeView_GetScrollTime(hwnd) (UINT)SNDMSG((hwnd),TVM_GETSCROLLTIME,0,0)
3559 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
3560 #define TreeView_SetInsertMarkColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETINSERTMARKCOLOR,0,(LPARAM)(clr))
3561 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
3562 #define TreeView_GetInsertMarkColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETINSERTMARKCOLOR,0,0)
3563 
3564 #define TreeView_SetItemState(hwndTV,hti,data,_mask) { TVITEM _ms_TVi; _ms_TVi.mask = TVIF_STATE; _ms_TVi.hItem = hti; _ms_TVi.stateMask = _mask; _ms_TVi.state = data; SNDMSG((hwndTV),TVM_SETITEM,0,(LPARAM)(TV_ITEM *)&_ms_TVi);}
3565 #define TreeView_SetCheckState(hwndTV,hti,fCheck) TreeView_SetItemState(hwndTV,hti,INDEXTOSTATEIMAGEMASK((fCheck)?2:1),TVIS_STATEIMAGEMASK)
3566 #define TVM_GETITEMSTATE (TV_FIRST+39)
3567 #define TreeView_GetItemState(hwndTV,hti,mask) (UINT)SNDMSG((hwndTV),TVM_GETITEMSTATE,(WPARAM)(hti),(LPARAM)(mask))
3568 #define TreeView_GetCheckState(hwndTV,hti) ((((UINT)(SNDMSG((hwndTV),TVM_GETITEMSTATE,(WPARAM)(hti),TVIS_STATEIMAGEMASK))) >> 12) -1)
3569 #define TVM_SETLINECOLOR (TV_FIRST+40)
3570 #define TreeView_SetLineColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETLINECOLOR,0,(LPARAM)(clr))
3571 #define TVM_GETLINECOLOR (TV_FIRST+41)
3572 #define TreeView_GetLineColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETLINECOLOR,0,0)
3573 
3574 #define TVM_MAPACCIDTOHTREEITEM (TV_FIRST+42)
3575 #define TreeView_MapAccIDToHTREEITEM(hwnd,id) (HTREEITEM)SNDMSG((hwnd),TVM_MAPACCIDTOHTREEITEM,id,0)
3576 
3577 #define TVM_MAPHTREEITEMTOACCID (TV_FIRST+43)
3578 #define TreeView_MapHTREEITEMToAccID(hwnd,htreeitem) (UINT)SNDMSG((hwnd),TVM_MAPHTREEITEMTOACCID,(WPARAM)htreeitem,0)
3579 
3580   typedef int (CALLBACK *PFNTVCOMPARE)(LPARAM lParam1,LPARAM lParam2,LPARAM lParamSort);
3581 
3582 #define LPTV_SORTCB LPTVSORTCB
3583 #define TV_SORTCB TVSORTCB
3584 
3585   typedef struct tagTVSORTCB {
3586     HTREEITEM hParent;
3587     PFNTVCOMPARE lpfnCompare;
3588     LPARAM lParam;
3589   } TVSORTCB,*LPTVSORTCB;
3590 
3591 #define LPNM_TREEVIEWA LPNMTREEVIEWA
3592 #define LPNM_TREEVIEWW LPNMTREEVIEWW
3593 #define NM_TREEVIEWW NMTREEVIEWW
3594 #define NM_TREEVIEWA NMTREEVIEWA
3595 #define LPNM_TREEVIEW LPNMTREEVIEW
3596 #define NM_TREEVIEW NMTREEVIEW
3597 
3598   typedef struct tagNMTREEVIEWA {
3599     NMHDR hdr;
3600     UINT action;
3601     TVITEMA itemOld;
3602     TVITEMA itemNew;
3603     POINT ptDrag;
3604   } NMTREEVIEWA,*LPNMTREEVIEWA;
3605 
3606   typedef struct tagNMTREEVIEWW {
3607     NMHDR hdr;
3608     UINT action;
3609     TVITEMW itemOld;
3610     TVITEMW itemNew;
3611     POINT ptDrag;
3612   } NMTREEVIEWW,*LPNMTREEVIEWW;
3613 
3614 #define NMTREEVIEW __MINGW_NAME_AW(NMTREEVIEW)
3615 #define LPNMTREEVIEW __MINGW_NAME_AW(LPNMTREEVIEW)
3616 
3617 #define TVN_SELCHANGINGA (TVN_FIRST-1)
3618 #define TVN_SELCHANGINGW (TVN_FIRST-50)
3619 #define TVN_SELCHANGEDA (TVN_FIRST-2)
3620 #define TVN_SELCHANGEDW (TVN_FIRST-51)
3621 
3622 #define TVC_UNKNOWN 0x0
3623 #define TVC_BYMOUSE 0x1
3624 #define TVC_BYKEYBOARD 0x2
3625 
3626 #define TVN_GETDISPINFOA (TVN_FIRST-3)
3627 #define TVN_GETDISPINFOW (TVN_FIRST-52)
3628 #define TVN_SETDISPINFOA (TVN_FIRST-4)
3629 #define TVN_SETDISPINFOW (TVN_FIRST-53)
3630 
3631 #define TVIF_DI_SETITEM 0x1000
3632 
3633 #define TV_DISPINFOA NMTVDISPINFOA
3634 #define TV_DISPINFOW NMTVDISPINFOW
3635 #define TV_DISPINFO NMTVDISPINFO
3636 
3637   typedef struct tagTVDISPINFOA {
3638     NMHDR hdr;
3639     TVITEMA item;
3640   } NMTVDISPINFOA,*LPNMTVDISPINFOA;
3641 
3642   typedef struct tagTVDISPINFOW {
3643     NMHDR hdr;
3644     TVITEMW item;
3645   } NMTVDISPINFOW,*LPNMTVDISPINFOW;
3646 
3647 #define NMTVDISPINFO __MINGW_NAME_AW(NMTVDISPINFO)
3648 #define LPNMTVDISPINFO __MINGW_NAME_AW(LPNMTVDISPINFO)
3649 
3650 #if (_WIN32_IE >= 0x0600)
3651 
3652 typedef struct tagTVDISPINFOEXA {
3653     NMHDR hdr;
3654     TVITEMEXA item;
3655 } NMTVDISPINFOEXA, *LPNMTVDISPINFOEXA;
3656 
3657 typedef struct tagTVDISPINFOEXW {
3658     NMHDR hdr;
3659     TVITEMEXW item;
3660 } NMTVDISPINFOEXW, *LPNMTVDISPINFOEXW;
3661 
3662 #define NMTVDISPINFOEX   __MINGW_NAME_AW(NMTVDISPINFOEX)
3663 #define LPNMTVDISPINFOEX __MINGW_NAME_AW(LPNMTVDISPINFOEX)
3664 
3665 #define TV_DISPINFOEXA NMTVDISPINFOEXA
3666 #define TV_DISPINFOEXW NMTVDISPINFOEXW
3667 #define TV_DISPINFOEX  NMTVDISPINFOEX
3668 
3669 #endif /* (_WIN32_IE >= 0x0600) */
3670 
3671 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
3672 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
3673 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
3674 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
3675 #define TVN_BEGINDRAGA (TVN_FIRST-7)
3676 #define TVN_BEGINDRAGW (TVN_FIRST-56)
3677 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
3678 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
3679 #define TVN_DELETEITEMA (TVN_FIRST-9)
3680 #define TVN_DELETEITEMW (TVN_FIRST-58)
3681 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
3682 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
3683 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
3684 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
3685 #define TVN_KEYDOWN (TVN_FIRST-12)
3686 #define TVN_GETINFOTIPA (TVN_FIRST-13)
3687 #define TVN_GETINFOTIPW (TVN_FIRST-14)
3688 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
3689 
3690 #define TVNRET_DEFAULT 0
3691 #define TVNRET_SKIPOLD 1
3692 #define TVNRET_SKIPNEW 2
3693 
3694 #define TV_KEYDOWN NMTVKEYDOWN
3695 
3696 #include <pshpack1.h>
3697 
3698   typedef struct tagTVKEYDOWN {
3699     NMHDR hdr;
3700     WORD wVKey;
3701     UINT flags;
3702   } NMTVKEYDOWN,*LPNMTVKEYDOWN;
3703 
3704 #include <poppack.h>
3705 
3706 #define TVN_SELCHANGING __MINGW_NAME_AW(TVN_SELCHANGING)
3707 #define TVN_SELCHANGED __MINGW_NAME_AW(TVN_SELCHANGED)
3708 #define TVN_GETDISPINFO __MINGW_NAME_AW(TVN_GETDISPINFO)
3709 #define TVN_SETDISPINFO __MINGW_NAME_AW(TVN_SETDISPINFO)
3710 #define TVN_ITEMEXPANDING __MINGW_NAME_AW(TVN_ITEMEXPANDING)
3711 #define TVN_ITEMEXPANDED __MINGW_NAME_AW(TVN_ITEMEXPANDED)
3712 #define TVN_BEGINDRAG __MINGW_NAME_AW(TVN_BEGINDRAG)
3713 #define TVN_BEGINRDRAG __MINGW_NAME_AW(TVN_BEGINRDRAG)
3714 #define TVN_DELETEITEM __MINGW_NAME_AW(TVN_DELETEITEM)
3715 #define TVN_BEGINLABELEDIT __MINGW_NAME_AW(TVN_BEGINLABELEDIT)
3716 #define TVN_ENDLABELEDIT __MINGW_NAME_AW(TVN_ENDLABELEDIT)
3717 
3718 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW,clrTextBk)
3719 
3720   typedef struct tagNMTVCUSTOMDRAW {
3721     NMCUSTOMDRAW nmcd;
3722     COLORREF clrText;
3723     COLORREF clrTextBk;
3724     int iLevel;
3725   } NMTVCUSTOMDRAW,*LPNMTVCUSTOMDRAW;
3726 
3727   typedef struct tagNMTVGETINFOTIPA {
3728     NMHDR hdr;
3729     LPSTR pszText;
3730     int cchTextMax;
3731     HTREEITEM hItem;
3732     LPARAM lParam;
3733   } NMTVGETINFOTIPA,*LPNMTVGETINFOTIPA;
3734 
3735   typedef struct tagNMTVGETINFOTIPW {
3736     NMHDR hdr;
3737     LPWSTR pszText;
3738     int cchTextMax;
3739     HTREEITEM hItem;
3740     LPARAM lParam;
3741   } NMTVGETINFOTIPW,*LPNMTVGETINFOTIPW;
3742 
3743 #define TVN_GETINFOTIP __MINGW_NAME_AW(TVN_GETINFOTIP)
3744 #define NMTVGETINFOTIP __MINGW_NAME_AW(NMTVGETINFOTIP)
3745 #define LPNMTVGETINFOTIP __MINGW_NAME_AW(LPNMTVGETINFOTIP)
3746 
3747 #define TVCDRF_NOIMAGES 0x10000
3748 
3749 #endif /* !NOTREEVIEW */
3750 
3751 #ifndef NOUSEREXCONTROLS
3752 
3753 #define WC_COMBOBOXEXW L"ComboBoxEx32"
3754 #define WC_COMBOBOXEXA "ComboBoxEx32"
3755 
3756 #define WC_COMBOBOXEX __MINGW_NAME_AW(WC_COMBOBOXEX)
3757 
3758 #define CBEIF_TEXT 0x1
3759 #define CBEIF_IMAGE 0x2
3760 #define CBEIF_SELECTEDIMAGE 0x4
3761 #define CBEIF_OVERLAY 0x8
3762 #define CBEIF_INDENT 0x10
3763 #define CBEIF_LPARAM 0x20
3764 
3765 #define CBEIF_DI_SETITEM 0x10000000
3766 
3767   typedef struct tagCOMBOBOXEXITEMA {
3768     UINT mask;
3769     INT_PTR iItem;
3770     LPSTR pszText;
3771     int cchTextMax;
3772     int iImage;
3773     int iSelectedImage;
3774     int iOverlay;
3775     int iIndent;
3776     LPARAM lParam;
3777   } COMBOBOXEXITEMA,*PCOMBOBOXEXITEMA;
3778   typedef COMBOBOXEXITEMA CONST *PCCOMBOEXITEMA;
3779 
3780   typedef struct tagCOMBOBOXEXITEMW
3781   {
3782     UINT mask;
3783     INT_PTR iItem;
3784     LPWSTR pszText;
3785     int cchTextMax;
3786     int iImage;
3787     int iSelectedImage;
3788     int iOverlay;
3789     int iIndent;
3790     LPARAM lParam;
3791   } COMBOBOXEXITEMW,*PCOMBOBOXEXITEMW;
3792   typedef COMBOBOXEXITEMW CONST *PCCOMBOEXITEMW;
3793 
3794 #define COMBOBOXEXITEM __MINGW_NAME_AW(COMBOBOXEXITEM)
3795 #define PCOMBOBOXEXITEM __MINGW_NAME_AW(PCOMBOBOXEXITEM)
3796 #define PCCOMBOBOXEXITEM __MINGW_NAME_AW(PCCOMBOBOXEXITEM)
3797 
3798 #define CBEM_INSERTITEMA (WM_USER+1)
3799 #define CBEM_SETIMAGELIST (WM_USER+2)
3800 #define CBEM_GETIMAGELIST (WM_USER+3)
3801 #define CBEM_GETITEMA (WM_USER+4)
3802 #define CBEM_SETITEMA (WM_USER+5)
3803 #define CBEM_DELETEITEM CB_DELETESTRING
3804 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
3805 #define CBEM_GETEDITCONTROL (WM_USER+7)
3806 #define CBEM_SETEXSTYLE (WM_USER+8)
3807 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
3808 #define CBEM_GETEXSTYLE (WM_USER+9)
3809 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
3810 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3811 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3812 #define CBEM_HASEDITCHANGED (WM_USER+10)
3813 #define CBEM_INSERTITEMW (WM_USER+11)
3814 #define CBEM_SETITEMW (WM_USER+12)
3815 #define CBEM_GETITEMW (WM_USER+13)
3816 
3817 #define CBEM_INSERTITEM __MINGW_NAME_AW(CBEM_INSERTITEM)
3818 #define CBEM_SETITEM __MINGW_NAME_AW(CBEM_SETITEM)
3819 #define CBEM_GETITEM __MINGW_NAME_AW(CBEM_GETITEM)
3820 
3821 #define CBEM_SETWINDOWTHEME CCM_SETWINDOWTHEME
3822 
3823 #define CBES_EX_NOEDITIMAGE 0x1
3824 #define CBES_EX_NOEDITIMAGEINDENT 0x2
3825 #define CBES_EX_PATHWORDBREAKPROC 0x4
3826 #define CBES_EX_NOSIZELIMIT 0x8
3827 #define CBES_EX_CASESENSITIVE 0x10
3828 
3829   typedef struct {
3830     NMHDR hdr;
3831     COMBOBOXEXITEMA ceItem;
3832   } NMCOMBOBOXEXA,*PNMCOMBOBOXEXA;
3833 
3834   typedef struct {
3835     NMHDR hdr;
3836     COMBOBOXEXITEMW ceItem;
3837   } NMCOMBOBOXEXW,*PNMCOMBOBOXEXW;
3838 
3839 #define NMCOMBOBOXEX __MINGW_NAME_AW(NMCOMBOBOXEX)
3840 #define PNMCOMBOBOXEX __MINGW_NAME_AW(PNMCOMBOBOXEX)
3841 #define CBEN_GETDISPINFO __MINGW_NAME_AW(CBEN_GETDISPINFO)
3842 
3843 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
3844 #define CBEN_INSERTITEM (CBEN_FIRST - 1)
3845 #define CBEN_DELETEITEM (CBEN_FIRST - 2)
3846 #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
3847 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
3848 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
3849 
3850 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
3851 
3852 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
3853 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
3854 
3855 #define CBEN_DRAGBEGIN __MINGW_NAME_AW(CBEN_DRAGBEGIN)
3856 
3857 #define CBEN_ENDEDIT __MINGW_NAME_AW(CBEN_ENDEDIT)
3858 
3859 #define CBENF_KILLFOCUS 1
3860 #define CBENF_RETURN 2
3861 #define CBENF_ESCAPE 3
3862 #define CBENF_DROPDOWN 4
3863 
3864 #define CBEMAXSTRLEN 260
3865 
3866   typedef struct {
3867     NMHDR hdr;
3868     int iItemid;
3869     WCHAR szText[CBEMAXSTRLEN];
3870   }NMCBEDRAGBEGINW,*LPNMCBEDRAGBEGINW,*PNMCBEDRAGBEGINW;
3871 
3872   typedef struct {
3873     NMHDR hdr;
3874     int iItemid;
3875     char szText[CBEMAXSTRLEN];
3876   }NMCBEDRAGBEGINA,*LPNMCBEDRAGBEGINA,*PNMCBEDRAGBEGINA;
3877 
3878 #define NMCBEDRAGBEGIN __MINGW_NAME_AW(NMCBEDRAGBEGIN)
3879 #define LPNMCBEDRAGBEGIN __MINGW_NAME_AW(LPNMCBEDRAGBEGIN)
3880 #define PNMCBEDRAGBEGIN __MINGW_NAME_AW(PNMCBEDRAGBEGIN)
3881 
3882   typedef struct {
3883     NMHDR hdr;
3884     BOOL fChanged;
3885     int iNewSelection;
3886     WCHAR szText[CBEMAXSTRLEN];
3887     int iWhy;
3888   } NMCBEENDEDITW,*LPNMCBEENDEDITW,*PNMCBEENDEDITW;
3889 
3890   typedef struct {
3891     NMHDR hdr;
3892     BOOL fChanged;
3893     int iNewSelection;
3894     char szText[CBEMAXSTRLEN];
3895     int iWhy;
3896   } NMCBEENDEDITA,*LPNMCBEENDEDITA,*PNMCBEENDEDITA;
3897 
3898 #define NMCBEENDEDIT __MINGW_NAME_AW(NMCBEENDEDIT)
3899 #define LPNMCBEENDEDIT __MINGW_NAME_AW(LPNMCBEENDEDIT)
3900 #define PNMCBEENDEDIT __MINGW_NAME_AW(PNMCBEENDEDIT)
3901 
3902 #endif /* !NOUSEREXCONTROLS */
3903 
3904 #ifndef NOTABCONTROL
3905 
3906 #define WC_TABCONTROLA "SysTabControl32"
3907 #define WC_TABCONTROLW L"SysTabControl32"
3908 #define WC_TABCONTROL __MINGW_NAME_AW(WC_TABCONTROL)
3909 
3910 #define TCS_SCROLLOPPOSITE 0x1
3911 #define TCS_BOTTOM 0x2
3912 #define TCS_RIGHT 0x2
3913 #define TCS_MULTISELECT 0x4
3914 #define TCS_FLATBUTTONS 0x8
3915 #define TCS_FORCEICONLEFT 0x10
3916 #define TCS_FORCELABELLEFT 0x20
3917 #define TCS_HOTTRACK 0x40
3918 #define TCS_VERTICAL 0x80
3919 #define TCS_TABS 0x0
3920 #define TCS_BUTTONS 0x100
3921 #define TCS_SINGLELINE 0x0
3922 #define TCS_MULTILINE 0x200
3923 #define TCS_RIGHTJUSTIFY 0x0
3924 #define TCS_FIXEDWIDTH 0x400
3925 #define TCS_RAGGEDRIGHT 0x800
3926 #define TCS_FOCUSONBUTTONDOWN 0x1000
3927 #define TCS_OWNERDRAWFIXED 0x2000
3928 #define TCS_TOOLTIPS 0x4000
3929 #define TCS_FOCUSNEVER 0x8000
3930 
3931 #define TCS_EX_FLATSEPARATORS 0x1
3932 #define TCS_EX_REGISTERDROP 0x2
3933 
3934 #define TCM_GETIMAGELIST (TCM_FIRST+2)
3935 #define TabCtrl_GetImageList(hwnd) (HIMAGELIST)SNDMSG((hwnd),TCM_GETIMAGELIST,0,0L)
3936 
3937 #define TCM_SETIMAGELIST (TCM_FIRST+3)
3938 #define TabCtrl_SetImageList(hwnd,himl) (HIMAGELIST)SNDMSG((hwnd),TCM_SETIMAGELIST,0,(LPARAM)(HIMAGELIST)(himl))
3939 
3940 #define TCM_GETITEMCOUNT (TCM_FIRST+4)
3941 #define TabCtrl_GetItemCount(hwnd) (int)SNDMSG((hwnd),TCM_GETITEMCOUNT,0,0L)
3942 
3943 #define TCIF_TEXT 0x1
3944 #define TCIF_IMAGE 0x2
3945 #define TCIF_RTLREADING 0x4
3946 #define TCIF_PARAM 0x8
3947 #define TCIF_STATE 0x10
3948 
3949 #define TCIS_BUTTONPRESSED 0x1
3950 #define TCIS_HIGHLIGHTED 0x2
3951 
3952 #define TC_ITEMHEADERA TCITEMHEADERA
3953 #define TC_ITEMHEADERW TCITEMHEADERW
3954 #define TC_ITEMHEADER TCITEMHEADER
3955 
3956   typedef struct tagTCITEMHEADERA {
3957     UINT mask;
3958     UINT lpReserved1;
3959     UINT lpReserved2;
3960     LPSTR pszText;
3961     int cchTextMax;
3962     int iImage;
3963   } TCITEMHEADERA,*LPTCITEMHEADERA;
3964 
3965   typedef struct tagTCITEMHEADERW {
3966     UINT mask;
3967     UINT lpReserved1;
3968     UINT lpReserved2;
3969     LPWSTR pszText;
3970     int cchTextMax;
3971     int iImage;
3972   } TCITEMHEADERW,*LPTCITEMHEADERW;
3973 
3974 #define TCITEMHEADER __MINGW_NAME_AW(TCITEMHEADER)
3975 #define LPTCITEMHEADER __MINGW_NAME_AW(LPTCITEMHEADER)
3976 
3977 #define TC_ITEMA TCITEMA
3978 #define TC_ITEMW TCITEMW
3979 #define TC_ITEM TCITEM
3980 
3981   typedef struct tagTCITEMA {
3982     UINT mask;
3983     DWORD dwState;
3984     DWORD dwStateMask;
3985     LPSTR pszText;
3986     int cchTextMax;
3987     int iImage;
3988     LPARAM lParam;
3989   } TCITEMA,*LPTCITEMA;
3990 
3991   typedef struct tagTCITEMW {
3992     UINT mask;
3993     DWORD dwState;
3994     DWORD dwStateMask;
3995     LPWSTR pszText;
3996     int cchTextMax;
3997     int iImage;
3998     LPARAM lParam;
3999   } TCITEMW,*LPTCITEMW;
4000 
4001 #define TCITEM __MINGW_NAME_AW(TCITEM)
4002 #define LPTCITEM __MINGW_NAME_AW(LPTCITEM)
4003 
4004 #define TCM_GETITEMA (TCM_FIRST+5)
4005 #define TCM_GETITEMW (TCM_FIRST+60)
4006 
4007 #define TCM_GETITEM __MINGW_NAME_AW(TCM_GETITEM)
4008 
4009 #define TabCtrl_GetItem(hwnd,iItem,pitem) (BOOL)SNDMSG((hwnd),TCM_GETITEM,(WPARAM)(int)(iItem),(LPARAM)(TC_ITEM *)(pitem))
4010 
4011 #define TCM_SETITEMA (TCM_FIRST+6)
4012 #define TCM_SETITEMW (TCM_FIRST+61)
4013 
4014 #define TCM_SETITEM __MINGW_NAME_AW(TCM_SETITEM)
4015 
4016 #define TabCtrl_SetItem(hwnd,iItem,pitem) (BOOL)SNDMSG((hwnd),TCM_SETITEM,(WPARAM)(int)(iItem),(LPARAM)(TC_ITEM *)(pitem))
4017 
4018 #define TCM_INSERTITEMA (TCM_FIRST+7)
4019 #define TCM_INSERTITEMW (TCM_FIRST+62)
4020 
4021 #define TCM_INSERTITEM __MINGW_NAME_AW(TCM_INSERTITEM)
4022 
4023 #define TabCtrl_InsertItem(hwnd,iItem,pitem) (int)SNDMSG((hwnd),TCM_INSERTITEM,(WPARAM)(int)(iItem),(LPARAM)(const TC_ITEM *)(pitem))
4024 
4025 #define TCM_DELETEITEM (TCM_FIRST+8)
4026 #define TabCtrl_DeleteItem(hwnd,i) (BOOL)SNDMSG((hwnd),TCM_DELETEITEM,(WPARAM)(int)(i),0L)
4027 
4028 #define TCM_DELETEALLITEMS (TCM_FIRST+9)
4029 #define TabCtrl_DeleteAllItems(hwnd) (BOOL)SNDMSG((hwnd),TCM_DELETEALLITEMS,0,0L)
4030 
4031 #define TCM_GETITEMRECT (TCM_FIRST+10)
4032 #define TabCtrl_GetItemRect(hwnd,i,prc) (BOOL)SNDMSG((hwnd),TCM_GETITEMRECT,(WPARAM)(int)(i),(LPARAM)(RECT *)(prc))
4033 
4034 #define TCM_GETCURSEL (TCM_FIRST+11)
4035 #define TabCtrl_GetCurSel(hwnd) (int)SNDMSG((hwnd),TCM_GETCURSEL,0,0)
4036 
4037 #define TCM_SETCURSEL (TCM_FIRST+12)
4038 #define TabCtrl_SetCurSel(hwnd,i) (int)SNDMSG((hwnd),TCM_SETCURSEL,(WPARAM)(i),0)
4039 
4040 #define TCHT_NOWHERE 0x1
4041 #define TCHT_ONITEMICON 0x2
4042 #define TCHT_ONITEMLABEL 0x4
4043 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
4044 
4045 #define LPTC_HITTESTINFO LPTCHITTESTINFO
4046 #define TC_HITTESTINFO TCHITTESTINFO
4047 
4048   typedef struct tagTCHITTESTINFO {
4049     POINT pt;
4050     UINT flags;
4051   } TCHITTESTINFO,*LPTCHITTESTINFO;
4052 
4053 #define TCM_HITTEST (TCM_FIRST+13)
4054 #define TabCtrl_HitTest(hwndTC,pinfo) (int)SNDMSG((hwndTC),TCM_HITTEST,0,(LPARAM)(TC_HITTESTINFO *)(pinfo))
4055 #define TCM_SETITEMEXTRA (TCM_FIRST+14)
4056 #define TabCtrl_SetItemExtra(hwndTC,cb) (BOOL)SNDMSG((hwndTC),TCM_SETITEMEXTRA,(WPARAM)(cb),0L)
4057 #define TCM_ADJUSTRECT (TCM_FIRST+40)
4058 #define TabCtrl_AdjustRect(hwnd,bLarger,prc) (int)SNDMSG(hwnd,TCM_ADJUSTRECT,(WPARAM)(BOOL)(bLarger),(LPARAM)(RECT *)prc)
4059 #define TCM_SETITEMSIZE (TCM_FIRST+41)
4060 #define TabCtrl_SetItemSize(hwnd,x,y) (DWORD)SNDMSG((hwnd),TCM_SETITEMSIZE,0,MAKELPARAM(x,y))
4061 #define TCM_REMOVEIMAGE (TCM_FIRST+42)
4062 #define TabCtrl_RemoveImage(hwnd,i) (void)SNDMSG((hwnd),TCM_REMOVEIMAGE,i,0L)
4063 #define TCM_SETPADDING (TCM_FIRST+43)
4064 #define TabCtrl_SetPadding(hwnd,cx,cy) (void)SNDMSG((hwnd),TCM_SETPADDING,0,MAKELPARAM(cx,cy))
4065 #define TCM_GETROWCOUNT (TCM_FIRST+44)
4066 #define TabCtrl_GetRowCount(hwnd) (int)SNDMSG((hwnd),TCM_GETROWCOUNT,0,0L)
4067 #define TCM_GETTOOLTIPS (TCM_FIRST+45)
4068 #define TabCtrl_GetToolTips(hwnd) (HWND)SNDMSG((hwnd),TCM_GETTOOLTIPS,0,0L)
4069 #define TCM_SETTOOLTIPS (TCM_FIRST+46)
4070 #define TabCtrl_SetToolTips(hwnd,hwndTT) (void)SNDMSG((hwnd),TCM_SETTOOLTIPS,(WPARAM)(hwndTT),0L)
4071 #define TCM_GETCURFOCUS (TCM_FIRST+47)
4072 #define TabCtrl_GetCurFocus(hwnd) (int)SNDMSG((hwnd),TCM_GETCURFOCUS,0,0)
4073 #define TCM_SETCURFOCUS (TCM_FIRST+48)
4074 #define TabCtrl_SetCurFocus(hwnd,i) SNDMSG((hwnd),TCM_SETCURFOCUS,i,0)
4075 #define TCM_SETMINTABWIDTH (TCM_FIRST+49)
4076 #define TabCtrl_SetMinTabWidth(hwnd,x) (int)SNDMSG((hwnd),TCM_SETMINTABWIDTH,0,x)
4077 #define TCM_DESELECTALL (TCM_FIRST+50)
4078 #define TabCtrl_DeselectAll(hwnd,fExcludeFocus) (void)SNDMSG((hwnd),TCM_DESELECTALL,fExcludeFocus,0)
4079 #define TCM_HIGHLIGHTITEM (TCM_FIRST+51)
4080 #define TabCtrl_HighlightItem(hwnd,i,fHighlight) (BOOL)SNDMSG((hwnd),TCM_HIGHLIGHTITEM,(WPARAM)(i),(LPARAM)MAKELONG (fHighlight,0))
4081 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST+52)
4082 #define TabCtrl_SetExtendedStyle(hwnd,dw) (DWORD)SNDMSG((hwnd),TCM_SETEXTENDEDSTYLE,0,dw)
4083 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST+53)
4084 #define TabCtrl_GetExtendedStyle(hwnd) (DWORD)SNDMSG((hwnd),TCM_GETEXTENDEDSTYLE,0,0)
4085 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4086 #define TabCtrl_SetUnicodeFormat(hwnd,fUnicode) (BOOL)SNDMSG((hwnd),TCM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
4087 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4088 #define TabCtrl_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd),TCM_GETUNICODEFORMAT,0,0)
4089 
4090 #define TCN_KEYDOWN (TCN_FIRST - 0)
4091 
4092 #define TC_KEYDOWN NMTCKEYDOWN
4093 
4094 #include <pshpack1.h>
4095 
4096   typedef struct tagTCKEYDOWN {
4097     NMHDR hdr;
4098     WORD wVKey;
4099     UINT flags;
4100   } NMTCKEYDOWN;
4101 
4102 #include <poppack.h>
4103 
4104 #define TCN_SELCHANGE (TCN_FIRST - 1)
4105 #define TCN_SELCHANGING (TCN_FIRST - 2)
4106 #define TCN_GETOBJECT (TCN_FIRST - 3)
4107 #define TCN_FOCUSCHANGE (TCN_FIRST - 4)
4108 
4109 #endif /* !NOTABCONTROL */
4110 
4111 #ifndef NOANIMATE
4112 
4113 #define ANIMATE_CLASSW L"SysAnimate32"
4114 #define ANIMATE_CLASSA "SysAnimate32"
4115 
4116 #define ANIMATE_CLASS __MINGW_NAME_AW(ANIMATE_CLASS)
4117 
4118 #define ACS_CENTER 0x1
4119 #define ACS_TRANSPARENT 0x2
4120 #define ACS_AUTOPLAY 0x4
4121 #define ACS_TIMER 0x8
4122 
4123 #define ACM_OPENA (WM_USER+100)
4124 #define ACM_OPENW (WM_USER+103)
4125 
4126 #define ACM_OPEN __MINGW_NAME_AW(ACM_OPEN)
4127 
4128 #define ACM_PLAY (WM_USER+101)
4129 #define ACM_STOP (WM_USER+102)
4130 
4131 #define ACN_START 1
4132 #define ACN_STOP 2
4133 
4134 #define Animate_Create(hwndP,id,dwStyle,hInstance) CreateWindow(ANIMATE_CLASS,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
4135 
4136 #define Animate_Open(hwnd,szName) (BOOL)SNDMSG(hwnd,ACM_OPEN,0,(LPARAM)(LPTSTR)(szName))
4137 #define Animate_OpenEx(hwnd,hInst,szName) (BOOL)SNDMSG(hwnd,ACM_OPEN,(WPARAM)(hInst),(LPARAM)(LPTSTR)(szName))
4138 #define Animate_Play(hwnd,from,to,rep) (BOOL)SNDMSG(hwnd,ACM_PLAY,(WPARAM)(rep),(LPARAM)MAKELONG(from,to))
4139 #define Animate_Stop(hwnd) (BOOL)SNDMSG(hwnd,ACM_STOP,0,0)
4140 #define Animate_Close(hwnd) Animate_Open(hwnd,NULL)
4141 #define Animate_Seek(hwnd,frame) Animate_Play(hwnd,frame,frame,1)
4142 
4143 #endif /* !NOANIMATE */
4144 
4145 #ifndef NOMONTHCAL
4146 
4147 #define MONTHCAL_CLASSW L"SysMonthCal32"
4148 #define MONTHCAL_CLASSA "SysMonthCal32"
4149 
4150 #define MONTHCAL_CLASS __MINGW_NAME_AW(MONTHCAL_CLASS)
4151 
4152   typedef DWORD MONTHDAYSTATE,*LPMONTHDAYSTATE;
4153 
4154 #define MCM_FIRST 0x1000
4155 
4156 #define MCM_GETCURSEL (MCM_FIRST+1)
4157 #define MonthCal_GetCurSel(hmc,pst) (BOOL)SNDMSG(hmc,MCM_GETCURSEL,0,(LPARAM)(pst))
4158 #define MCM_SETCURSEL (MCM_FIRST+2)
4159 #define MonthCal_SetCurSel(hmc,pst) (BOOL)SNDMSG(hmc,MCM_SETCURSEL,0,(LPARAM)(pst))
4160 #define MCM_GETMAXSELCOUNT (MCM_FIRST+3)
4161 #define MonthCal_GetMaxSelCount(hmc) (DWORD)SNDMSG(hmc,MCM_GETMAXSELCOUNT,0,0L)
4162 #define MCM_SETMAXSELCOUNT (MCM_FIRST+4)
4163 #define MonthCal_SetMaxSelCount(hmc,n) (BOOL)SNDMSG(hmc,MCM_SETMAXSELCOUNT,(WPARAM)(n),0L)
4164 #define MCM_GETSELRANGE (MCM_FIRST+5)
4165 #define MonthCal_GetSelRange(hmc,rgst) SNDMSG(hmc,MCM_GETSELRANGE,0,(LPARAM)(rgst))
4166 #define MCM_SETSELRANGE (MCM_FIRST+6)
4167 #define MonthCal_SetSelRange(hmc,rgst) SNDMSG(hmc,MCM_SETSELRANGE,0,(LPARAM)(rgst))
4168 #define MCM_GETMONTHRANGE (MCM_FIRST+7)
4169 #define MonthCal_GetMonthRange(hmc,gmr,rgst) (DWORD)SNDMSG(hmc,MCM_GETMONTHRANGE,(WPARAM)(gmr),(LPARAM)(rgst))
4170 #define MCM_SETDAYSTATE (MCM_FIRST+8)
4171 #define MonthCal_SetDayState(hmc,cbds,rgds) SNDMSG(hmc,MCM_SETDAYSTATE,(WPARAM)(cbds),(LPARAM)(rgds))
4172 #define MCM_GETMINREQRECT (MCM_FIRST+9)
4173 #define MonthCal_GetMinReqRect(hmc,prc) SNDMSG(hmc,MCM_GETMINREQRECT,0,(LPARAM)(prc))
4174 #define MCM_SETCOLOR (MCM_FIRST+10)
4175 #define MonthCal_SetColor(hmc,iColor,clr) SNDMSG(hmc,MCM_SETCOLOR,iColor,clr)
4176 #define MCM_GETCOLOR (MCM_FIRST+11)
4177 #define MonthCal_GetColor(hmc,iColor) SNDMSG(hmc,MCM_GETCOLOR,iColor,0)
4178 
4179 #define MCSC_BACKGROUND 0
4180 #define MCSC_TEXT 1
4181 #define MCSC_TITLEBK 2
4182 #define MCSC_TITLETEXT 3
4183 #define MCSC_MONTHBK 4
4184 #define MCSC_TRAILINGTEXT 5
4185 
4186 #define MCM_SETTODAY (MCM_FIRST+12)
4187 #define MonthCal_SetToday(hmc,pst) SNDMSG(hmc,MCM_SETTODAY,0,(LPARAM)(pst))
4188 #define MCM_GETTODAY (MCM_FIRST+13)
4189 #define MonthCal_GetToday(hmc,pst) (BOOL)SNDMSG(hmc,MCM_GETTODAY,0,(LPARAM)(pst))
4190 #define MCM_HITTEST (MCM_FIRST+14)
4191 #define MonthCal_HitTest(hmc,pinfo) SNDMSG(hmc,MCM_HITTEST,0,(LPARAM)(PMCHITTESTINFO)(pinfo))
4192 
4193 typedef struct {
4194   UINT cbSize;
4195   POINT pt;
4196   UINT uHit;
4197   SYSTEMTIME st;
4198 #if(NTDDI_VERSION >= NTDDI_VISTA)
4199   RECT rc;
4200   int iOffset;
4201   int iRow;
4202   int iCol;
4203 #endif
4204 } MCHITTESTINFO, *PMCHITTESTINFO;
4205 
4206 #define MCHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(MCHITTESTINFO, st)
4207 
4208 #define MCHT_TITLE 0x10000
4209 #define MCHT_CALENDAR 0x20000
4210 #define MCHT_TODAYLINK 0x30000
4211 
4212 #define MCHT_NEXT 0x1000000
4213 #define MCHT_PREV 0x2000000
4214 
4215 #define MCHT_NOWHERE 0x0
4216 
4217 #define MCHT_TITLEBK (MCHT_TITLE)
4218 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x1)
4219 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x2)
4220 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x3)
4221 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x3)
4222 
4223 #define MCHT_CALENDARBK (MCHT_CALENDAR)
4224 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x1)
4225 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
4226 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
4227 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x2)
4228 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x3)
4229 
4230 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST+15)
4231 #define MonthCal_SetFirstDayOfWeek(hmc,iDay) SNDMSG(hmc,MCM_SETFIRSTDAYOFWEEK,0,iDay)
4232 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST+16)
4233 #define MonthCal_GetFirstDayOfWeek(hmc) (DWORD)SNDMSG(hmc,MCM_GETFIRSTDAYOFWEEK,0,0)
4234 #define MCM_GETRANGE (MCM_FIRST+17)
4235 #define MonthCal_GetRange(hmc,rgst) (DWORD)SNDMSG(hmc,MCM_GETRANGE,0,(LPARAM)(rgst))
4236 #define MCM_SETRANGE (MCM_FIRST+18)
4237 #define MonthCal_SetRange(hmc,gd,rgst) (BOOL)SNDMSG(hmc,MCM_SETRANGE,(WPARAM)(gd),(LPARAM)(rgst))
4238 #define MCM_GETMONTHDELTA (MCM_FIRST+19)
4239 #define MonthCal_GetMonthDelta(hmc) (int)SNDMSG(hmc,MCM_GETMONTHDELTA,0,0)
4240 #define MCM_SETMONTHDELTA (MCM_FIRST+20)
4241 #define MonthCal_SetMonthDelta(hmc,n) (int)SNDMSG(hmc,MCM_SETMONTHDELTA,n,0)
4242 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST+21)
4243 #define MonthCal_GetMaxTodayWidth(hmc) (DWORD)SNDMSG(hmc,MCM_GETMAXTODAYWIDTH,0,0)
4244 #define MCM_GETCURRENTVIEW (MCM_FIRST + 22)
4245 #define MonthCal_GetCurrentView(hmc) (DWORD)SNDMSG(hmc, MCM_GETCURRENTVIEW, 0, 0)
4246 #define MCM_GETCALENDARCOUNT (MCM_FIRST + 23)
4247 #define MonthCal_GetCalendarCount(hmc) (DWORD)SNDMSG(hmc, MCM_GETCALENDARCOUNT, 0, 0)
4248 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4249 #define MonthCal_SetUnicodeFormat(hwnd,fUnicode) (BOOL)SNDMSG((hwnd),MCM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
4250 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4251 #define MonthCal_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd),MCM_GETUNICODEFORMAT,0,0)
4252 #define MCM_SIZERECTTOMIN (MCM_FIRST + 29)
4253 #define MonthCal_SizeRectToMin(hmc, prc) SNDMSG(hmc, MCM_SIZERECTTOMIN, 0, (LPARAM)(prc))
4254 #define MCM_SETCALENDARBORDER (MCM_FIRST + 30)
4255 #define MCM_GETCALENDARBORDER (MCM_FIRST + 31)
4256 
4257   typedef struct tagNMSELCHANGE {
4258     NMHDR nmhdr;
4259     SYSTEMTIME stSelStart;
4260     SYSTEMTIME stSelEnd;
4261   } NMSELCHANGE,*LPNMSELCHANGE;
4262 
4263 #define MCN_SELCHANGE (MCN_FIRST+1)
4264 
4265   typedef struct tagNMDAYSTATE {
4266     NMHDR nmhdr;
4267     SYSTEMTIME stStart;
4268     int cDayState;
4269 
4270     LPMONTHDAYSTATE prgDayState;
4271   } NMDAYSTATE,*LPNMDAYSTATE;
4272 
4273 #define MCN_GETDAYSTATE (MCN_FIRST+3)
4274 
4275   typedef NMSELCHANGE NMSELECT,*LPNMSELECT;
4276 
4277 #define MCN_SELECT (MCN_FIRST+4)
4278 
4279 #define MCS_DAYSTATE           0x0001
4280 #define MCS_MULTISELECT        0x0002
4281 #define MCS_WEEKNUMBERS        0x0004
4282 #define MCS_NOTODAYCIRCLE      0x0008
4283 #define MCS_NOTODAY            0x0010
4284 #define MCS_NOTRAILINGDATES    0x0040
4285 #define MCS_SHORTDAYSOFWEEK    0x0080
4286 
4287 #define GMR_VISIBLE 0
4288 #define GMR_DAYSTATE 1
4289 
4290 #endif /* !NOMONTHCAL */
4291 
4292 #ifndef NODATETIMEPICK
4293 
4294 #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
4295 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
4296 
4297 #define DATETIMEPICK_CLASS __MINGW_NAME_AW(DATETIMEPICK_CLASS)
4298 
4299 #define DTM_FIRST 0x1000
4300 
4301 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
4302 #define DateTime_GetSystemtime(hdp,pst) (DWORD)SNDMSG(hdp,DTM_GETSYSTEMTIME,0,(LPARAM)(pst))
4303 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
4304 #define DateTime_SetSystemtime(hdp,gd,pst) (BOOL)SNDMSG(hdp,DTM_SETSYSTEMTIME,(WPARAM)(gd),(LPARAM)(pst))
4305 #define DTM_GETRANGE (DTM_FIRST+3)
4306 #define DateTime_GetRange(hdp,rgst) (DWORD)SNDMSG(hdp,DTM_GETRANGE,0,(LPARAM)(rgst))
4307 #define DTM_SETRANGE (DTM_FIRST+4)
4308 #define DateTime_SetRange(hdp,gd,rgst) (BOOL)SNDMSG(hdp,DTM_SETRANGE,(WPARAM)(gd),(LPARAM)(rgst))
4309 #define DTM_SETFORMATA (DTM_FIRST+5)
4310 #define DTM_SETFORMATW (DTM_FIRST+50)
4311 
4312 #define DTM_SETFORMAT __MINGW_NAME_AW(DTM_SETFORMAT)
4313 
4314 #define DateTime_SetFormat(hdp,sz) (BOOL)SNDMSG(hdp,DTM_SETFORMAT,0,(LPARAM)(sz))
4315 
4316 #define DTM_SETMCCOLOR (DTM_FIRST+6)
4317 #define DateTime_SetMonthCalColor(hdp,iColor,clr) SNDMSG(hdp,DTM_SETMCCOLOR,iColor,clr)
4318 #define DTM_GETMCCOLOR (DTM_FIRST+7)
4319 #define DateTime_GetMonthCalColor(hdp,iColor) SNDMSG(hdp,DTM_GETMCCOLOR,iColor,0)
4320 #define DTM_GETMONTHCAL (DTM_FIRST+8)
4321 #define DateTime_GetMonthCal(hdp) (HWND)SNDMSG(hdp,DTM_GETMONTHCAL,0,0)
4322 #define DTM_SETMCFONT (DTM_FIRST+9)
4323 #define DateTime_SetMonthCalFont(hdp,hfont,fRedraw) SNDMSG(hdp,DTM_SETMCFONT,(WPARAM)(hfont),(LPARAM)(fRedraw))
4324 #define DTM_GETMCFONT (DTM_FIRST+10)
4325 #define DateTime_GetMonthCalFont(hdp) SNDMSG(hdp,DTM_GETMCFONT,0,0)
4326 
4327 #define DTM_GETIDEALSIZE (DTM_FIRST+15)
4328 
4329 #define DTS_UPDOWN 0x1
4330 #define DTS_SHOWNONE 0x2
4331 #define DTS_SHORTDATEFORMAT 0x0
4332 #define DTS_LONGDATEFORMAT 0x4
4333 #define DTS_SHORTDATECENTURYFORMAT 0xc
4334 #define DTS_TIMEFORMAT 0x9
4335 #define DTS_APPCANPARSE 0x10
4336 #define DTS_RIGHTALIGN 0x20
4337 
4338 #define DTN_DATETIMECHANGE (DTN_FIRST+1)
4339   typedef struct tagNMDATETIMECHANGE {
4340     NMHDR nmhdr;
4341     DWORD dwFlags;
4342     SYSTEMTIME st;
4343   } NMDATETIMECHANGE,*LPNMDATETIMECHANGE;
4344 
4345 #define DTN_USERSTRINGA (DTN_FIRST+2)
4346 #define DTN_USERSTRINGW (DTN_FIRST+15)
4347   typedef struct tagNMDATETIMESTRINGA {
4348     NMHDR nmhdr;
4349     LPCSTR pszUserString;
4350     SYSTEMTIME st;
4351     DWORD dwFlags;
4352   } NMDATETIMESTRINGA,*LPNMDATETIMESTRINGA;
4353 
4354   typedef struct tagNMDATETIMESTRINGW {
4355     NMHDR nmhdr;
4356     LPCWSTR pszUserString;
4357     SYSTEMTIME st;
4358     DWORD dwFlags;
4359   } NMDATETIMESTRINGW,*LPNMDATETIMESTRINGW;
4360 
4361 #define DTN_USERSTRING __MINGW_NAME_AW(DTN_USERSTRING)
4362 #define NMDATETIMESTRING __MINGW_NAME_AW(NMDATETIMESTRING)
4363 #define LPNMDATETIMESTRING __MINGW_NAME_AW(LPNMDATETIMESTRING)
4364 
4365 #define DTN_WMKEYDOWNA (DTN_FIRST+3)
4366 #define DTN_WMKEYDOWNW (DTN_FIRST+16)
4367   typedef struct tagNMDATETIMEWMKEYDOWNA {
4368     NMHDR nmhdr;
4369     int nVirtKey;
4370     LPCSTR pszFormat;
4371     SYSTEMTIME st;
4372   } NMDATETIMEWMKEYDOWNA,*LPNMDATETIMEWMKEYDOWNA;
4373 
4374   typedef struct tagNMDATETIMEWMKEYDOWNW {
4375     NMHDR nmhdr;
4376     int nVirtKey;
4377     LPCWSTR pszFormat;
4378     SYSTEMTIME st;
4379   } NMDATETIMEWMKEYDOWNW,*LPNMDATETIMEWMKEYDOWNW;
4380 
4381 #define DTN_WMKEYDOWN __MINGW_NAME_AW(DTN_WMKEYDOWN)
4382 #define NMDATETIMEWMKEYDOWN __MINGW_NAME_AW(NMDATETIMEWMKEYDOWN)
4383 #define LPNMDATETIMEWMKEYDOWN __MINGW_NAME_AW(LPNMDATETIMEWMKEYDOWN)
4384 
4385 #define DTN_FORMATA (DTN_FIRST+4)
4386 #define DTN_FORMATW (DTN_FIRST+17)
4387   typedef struct tagNMDATETIMEFORMATA {
4388     NMHDR nmhdr;
4389     LPCSTR pszFormat;
4390     SYSTEMTIME st;
4391     LPCSTR pszDisplay;
4392     CHAR szDisplay[64];
4393   } NMDATETIMEFORMATA,*LPNMDATETIMEFORMATA;
4394 
4395   typedef struct tagNMDATETIMEFORMATW {
4396     NMHDR nmhdr;
4397     LPCWSTR pszFormat;
4398     SYSTEMTIME st;
4399     LPCWSTR pszDisplay;
4400     WCHAR szDisplay[64];
4401   } NMDATETIMEFORMATW,*LPNMDATETIMEFORMATW;
4402 
4403 #define DTN_FORMAT __MINGW_NAME_AW(DTN_FORMAT)
4404 #define NMDATETIMEFORMAT __MINGW_NAME_AW(NMDATETIMEFORMAT)
4405 #define LPNMDATETIMEFORMAT __MINGW_NAME_AW(LPNMDATETIMEFORMAT)
4406 
4407 #define DTN_FORMATQUERYA (DTN_FIRST+5)
4408 #define DTN_FORMATQUERYW (DTN_FIRST+18)
4409   typedef struct tagNMDATETIMEFORMATQUERYA {
4410     NMHDR nmhdr;
4411     LPCSTR pszFormat;
4412     SIZE szMax;
4413   } NMDATETIMEFORMATQUERYA,*LPNMDATETIMEFORMATQUERYA;
4414 
4415   typedef struct tagNMDATETIMEFORMATQUERYW {
4416     NMHDR nmhdr;
4417     LPCWSTR pszFormat;
4418     SIZE szMax;
4419   } NMDATETIMEFORMATQUERYW,*LPNMDATETIMEFORMATQUERYW;
4420 
4421 #define DTN_FORMATQUERY __MINGW_NAME_AW(DTN_FORMATQUERY)
4422 #define NMDATETIMEFORMATQUERY __MINGW_NAME_AW(NMDATETIMEFORMATQUERY)
4423 #define LPNMDATETIMEFORMATQUERY __MINGW_NAME_AW(LPNMDATETIMEFORMATQUERY)
4424 
4425 #define DTN_DROPDOWN (DTN_FIRST+6)
4426 #define DTN_CLOSEUP (DTN_FIRST+7)
4427 
4428 #define GDTR_MIN 0x1
4429 #define GDTR_MAX 0x2
4430 
4431 #define GDT_ERROR -1
4432 #define GDT_VALID 0
4433 #define GDT_NONE 1
4434 
4435 #ifndef NOIPADDRESS
4436 
4437 #define IPM_CLEARADDRESS (WM_USER+100)
4438 #define IPM_SETADDRESS (WM_USER+101)
4439 #define IPM_GETADDRESS (WM_USER+102)
4440 #define IPM_SETRANGE (WM_USER+103)
4441 #define IPM_SETFOCUS (WM_USER+104)
4442 #define IPM_ISBLANK (WM_USER+105)
4443 
4444 #define WC_IPADDRESSW L"SysIPAddress32"
4445 #define WC_IPADDRESSA "SysIPAddress32"
4446 
4447 #define WC_IPADDRESS __MINGW_NAME_AW(WC_IPADDRESS)
4448 
4449 #define IPN_FIELDCHANGED (IPN_FIRST - 0)
4450   typedef struct tagNMIPADDRESS {
4451     NMHDR hdr;
4452     int iField;
4453     int iValue;
4454   } NMIPADDRESS,*LPNMIPADDRESS;
4455 
4456 #define MAKEIPRANGE(low,high) ((LPARAM)(WORD)(((BYTE)(high) << 8)+(BYTE)(low)))
4457 
4458 #define MAKEIPADDRESS(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
4459 
4460 #define FIRST_IPADDRESS(x) ((x>>24) & 0xff)
4461 #define SECOND_IPADDRESS(x) ((x>>16) & 0xff)
4462 #define THIRD_IPADDRESS(x) ((x>>8) & 0xff)
4463 #define FOURTH_IPADDRESS(x) (x & 0xff)
4464 
4465 #endif /* !NOIPADDRESS */
4466 
4467 #ifndef NOPAGESCROLLER
4468 
4469 #define WC_PAGESCROLLERW L"SysPager"
4470 #define WC_PAGESCROLLERA "SysPager"
4471 
4472 #define WC_PAGESCROLLER __MINGW_NAME_AW(WC_PAGESCROLLER)
4473 
4474 #define PGS_VERT 0x0
4475 #define PGS_HORZ 0x1
4476 #define PGS_AUTOSCROLL 0x2
4477 #define PGS_DRAGNDROP 0x4
4478 
4479 #define PGF_INVISIBLE 0
4480 #define PGF_NORMAL 1
4481 #define PGF_GRAYED 2
4482 #define PGF_DEPRESSED 4
4483 #define PGF_HOT 8
4484 
4485 #define PGB_TOPORLEFT 0
4486 #define PGB_BOTTOMORRIGHT 1
4487 
4488 #define PGM_SETCHILD (PGM_FIRST+1)
4489 #define Pager_SetChild(hwnd,hwndChild) (void)SNDMSG((hwnd),PGM_SETCHILD,0,(LPARAM)(hwndChild))
4490 
4491 #define PGM_RECALCSIZE (PGM_FIRST+2)
4492 #define Pager_RecalcSize(hwnd) (void)SNDMSG((hwnd),PGM_RECALCSIZE,0,0)
4493 
4494 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
4495 #define Pager_ForwardMouse(hwnd,bForward) (void)SNDMSG((hwnd),PGM_FORWARDMOUSE,(WPARAM)(bForward),0)
4496 
4497 #define PGM_SETBKCOLOR (PGM_FIRST+4)
4498 #define Pager_SetBkColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),PGM_SETBKCOLOR,0,(LPARAM)(clr))
4499 
4500 #define PGM_GETBKCOLOR (PGM_FIRST+5)
4501 #define Pager_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd),PGM_GETBKCOLOR,0,0)
4502 
4503 #define PGM_SETBORDER (PGM_FIRST+6)
4504 #define Pager_SetBorder(hwnd,iBorder) (int)SNDMSG((hwnd),PGM_SETBORDER,0,(LPARAM)(iBorder))
4505 
4506 #define PGM_GETBORDER (PGM_FIRST+7)
4507 #define Pager_GetBorder(hwnd) (int)SNDMSG((hwnd),PGM_GETBORDER,0,0)
4508 
4509 #define PGM_SETPOS (PGM_FIRST+8)
4510 #define Pager_SetPos(hwnd,iPos) (int)SNDMSG((hwnd),PGM_SETPOS,0,(LPARAM)(iPos))
4511 
4512 #define PGM_GETPOS (PGM_FIRST+9)
4513 #define Pager_GetPos(hwnd) (int)SNDMSG((hwnd),PGM_GETPOS,0,0)
4514 
4515 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
4516 #define Pager_SetButtonSize(hwnd,iSize) (int)SNDMSG((hwnd),PGM_SETBUTTONSIZE,0,(LPARAM)(iSize))
4517 
4518 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
4519 #define Pager_GetButtonSize(hwnd) (int)SNDMSG((hwnd),PGM_GETBUTTONSIZE,0,0)
4520 
4521 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
4522 #define Pager_GetButtonState(hwnd,iButton) (DWORD)SNDMSG((hwnd),PGM_GETBUTTONSTATE,0,(LPARAM)(iButton))
4523 
4524 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
4525 #define Pager_GetDropTarget(hwnd,ppdt) (void)SNDMSG((hwnd),PGM_GETDROPTARGET,0,(LPARAM)(ppdt))
4526 
4527 #define PGN_SCROLL (PGN_FIRST-1)
4528 
4529 #define PGF_SCROLLUP 1
4530 #define PGF_SCROLLDOWN 2
4531 #define PGF_SCROLLLEFT 4
4532 #define PGF_SCROLLRIGHT 8
4533 
4534 #define PGK_SHIFT 1
4535 #define PGK_CONTROL 2
4536 #define PGK_MENU 4
4537 
4538 #include <pshpack1.h>
4539 
4540   typedef struct {
4541     NMHDR hdr;
4542     WORD fwKeys;
4543     RECT rcParent;
4544     int iDir;
4545     int iXpos;
4546     int iYpos;
4547     int iScroll;
4548   }NMPGSCROLL,*LPNMPGSCROLL;
4549 
4550 #include <poppack.h>
4551 
4552 #define PGN_CALCSIZE (PGN_FIRST-2)
4553 
4554 #define PGF_CALCWIDTH 1
4555 #define PGF_CALCHEIGHT 2
4556 
4557   typedef struct {
4558     NMHDR hdr;
4559     DWORD dwFlag;
4560     int iWidth;
4561     int iHeight;
4562   }NMPGCALCSIZE,*LPNMPGCALCSIZE;
4563 
4564 #define PGN_HOTITEMCHANGE (PGN_FIRST-3)
4565 
4566   typedef struct tagNMPGHOTITEM
4567   {
4568     NMHDR hdr;
4569     int idOld;
4570     int idNew;
4571     DWORD dwFlags;
4572   } NMPGHOTITEM,*LPNMPGHOTITEM;
4573 
4574 #endif /* !NOPAGESCROLLER */
4575 
4576 #ifndef NONATIVEFONTCTL
4577 
4578 #define WC_NATIVEFONTCTLW L"NativeFontCtl"
4579 #define WC_NATIVEFONTCTLA "NativeFontCtl"
4580 
4581 #define WC_NATIVEFONTCTL __MINGW_NAME_AW(WC_NATIVEFONTCTL)
4582 
4583 #define NFS_EDIT 0x1
4584 #define NFS_STATIC 0x2
4585 #define NFS_LISTCOMBO 0x4
4586 #define NFS_BUTTON 0x8
4587 #define NFS_ALL 0x10
4588 #define NFS_USEFONTASSOC 0x20
4589 
4590 #endif /* !NONATIVEFONTCTL */
4591 
4592 #ifndef NOBUTTON
4593 
4594 #define WC_BUTTONA "Button"
4595 #define WC_BUTTONW L"Button"
4596 
4597 #define WC_BUTTON __MINGW_NAME_AW(WC_BUTTON)
4598 
4599 #define BUTTON_IMAGELIST_ALIGN_LEFT 0
4600 #define BUTTON_IMAGELIST_ALIGN_RIGHT 1
4601 #define BUTTON_IMAGELIST_ALIGN_TOP 2
4602 #define BUTTON_IMAGELIST_ALIGN_BOTTOM 3
4603 #define BUTTON_IMAGELIST_ALIGN_CENTER 4
4604 
4605   typedef struct {
4606     HIMAGELIST himl;
4607     RECT margin;
4608     UINT uAlign;
4609   } BUTTON_IMAGELIST,*PBUTTON_IMAGELIST;
4610 
4611 #define BCM_GETIDEALSIZE (BCM_FIRST+0x1)
4612 #define Button_GetIdealSize(hwnd,psize) (BOOL)SNDMSG((hwnd),BCM_GETIDEALSIZE,0,(LPARAM)(psize))
4613 
4614 #define BCM_SETIMAGELIST (BCM_FIRST+0x2)
4615 #define Button_SetImageList(hwnd,pbuttonImagelist) (BOOL)SNDMSG((hwnd),BCM_SETIMAGELIST,0,(LPARAM)(pbuttonImagelist))
4616 
4617 #define BCM_GETIMAGELIST (BCM_FIRST+0x3)
4618 #define Button_GetImageList(hwnd,pbuttonImagelist) (BOOL)SNDMSG((hwnd),BCM_GETIMAGELIST,0,(LPARAM)(pbuttonImagelist))
4619 
4620 #define BCM_SETTEXTMARGIN (BCM_FIRST+0x4)
4621 #define Button_SetTextMargin(hwnd,pmargin) (BOOL)SNDMSG((hwnd),BCM_SETTEXTMARGIN,0,(LPARAM)(pmargin))
4622 #define BCM_GETTEXTMARGIN (BCM_FIRST+0x5)
4623 #define Button_GetTextMargin(hwnd,pmargin) (BOOL)SNDMSG((hwnd),BCM_GETTEXTMARGIN,0,(LPARAM)(pmargin))
4624 
4625 #define BCM_SETSHIELD (BCM_FIRST+0xC)
4626 #define Button_SetElevationRequiredState(hwnd,frequired) (BOOL)SNDMSG((hwnd),BCM_SETSHIELD,0,(LPARAM)(frequired))
4627 
4628 #define BCM_SETNOTE (BCM_FIRST + 9)
4629 #define BCM_GETNOTE (BCM_FIRST + 10)
4630 #define BCM_GETNOTELENGTH (BCM_FIRST + 11)
4631 
4632   typedef struct tagNMBCHOTITEM {
4633     NMHDR hdr;
4634     DWORD dwFlags;
4635   } NMBCHOTITEM,*LPNMBCHOTITEM;
4636 
4637 #define BCN_HOTITEMCHANGE (BCN_FIRST+0x1)
4638 
4639 #define BST_HOT 0x200
4640 
4641 #define BS_SPLITBUTTON    0x0000000C
4642 #define BS_DEFSPLITBUTTON 0x0000000D
4643 #define BS_COMMANDLINK    0x0000000E
4644 #define BS_DEFCOMMANDLINK 0x0000000F
4645 
4646 #endif /* !NOBUTTON */
4647 
4648 #ifndef NOSTATIC
4649 
4650 #define WC_STATICA "Static"
4651 #define WC_STATICW L"Static"
4652 
4653 #define WC_STATIC __MINGW_NAME_AW(WC_STATIC)
4654 
4655 #ifndef NOEDIT
4656 
4657 #define WC_EDITA "Edit"
4658 #define WC_EDITW L"Edit"
4659 
4660 #define WC_EDIT __MINGW_NAME_AW(WC_EDIT)
4661 
4662 #define EM_SETCUEBANNER (ECM_FIRST+1)
4663 #define Edit_SetCueBannerText(hwnd,lpcwText) (BOOL)SNDMSG((hwnd),EM_SETCUEBANNER,0,(LPARAM)(lpcwText))
4664 #define EM_GETCUEBANNER (ECM_FIRST+2)
4665 #define Edit_GetCueBannerText(hwnd,lpwText,cchText) (BOOL)SNDMSG((hwnd),EM_GETCUEBANNER,(WPARAM)(lpwText),(LPARAM)(cchText))
4666 
4667   typedef struct _tagEDITBALLOONTIP {
4668     DWORD cbStruct;
4669     LPCWSTR pszTitle;
4670     LPCWSTR pszText;
4671     INT ttiIcon;
4672   } EDITBALLOONTIP,*PEDITBALLOONTIP;
4673 #define EM_SHOWBALLOONTIP (ECM_FIRST+3)
4674 #define Edit_ShowBalloonTip(hwnd,peditballoontip) (BOOL)SNDMSG((hwnd),EM_SHOWBALLOONTIP,0,(LPARAM)(peditballoontip))
4675 #define EM_HIDEBALLOONTIP (ECM_FIRST+4)
4676 #define Edit_HideBalloonTip(hwnd) (BOOL)SNDMSG((hwnd),EM_HIDEBALLOONTIP,0,0)
4677 
4678 #endif /* !NOEDIT */
4679 
4680 #ifndef NOLISTBOX
4681 #define WC_LISTBOXA "ListBox"
4682 #define WC_LISTBOXW L"ListBox"
4683 #define WC_LISTBOX __MINGW_NAME_AW(WC_LISTBOX)
4684 #endif /* !NOLISTBOX */
4685 
4686 #ifndef NOCOMBOBOX
4687 #define WC_COMBOBOXA "ComboBox"
4688 #define WC_COMBOBOXW L"ComboBox"
4689 #define WC_COMBOBOX __MINGW_NAME_AW(WC_COMBOBOX)
4690 #endif /* !NOCOMBOBOX */
4691 
4692 #define CB_SETMINVISIBLE (CBM_FIRST+1)
4693 #define CB_GETMINVISIBLE (CBM_FIRST+2)
4694 
4695 #define ComboBox_SetMinVisible(hwnd,iMinVisible) (BOOL)SNDMSG((hwnd),CB_SETMINVISIBLE,(WPARAM)iMinVisible,0)
4696 #define ComboBox_GetMinVisible(hwnd) (int)SNDMSG((hwnd),CB_GETMINVISIBLE,0,0)
4697 
4698 #ifndef NOSCROLLBAR
4699 #define WC_SCROLLBARA "ScrollBar"
4700 #define WC_SCROLLBARW L"ScrollBar"
4701 #define WC_SCROLLBAR __MINGW_NAME_AW(WC_SCROLLBAR)
4702 #endif /* !NOSCROLLBAR */
4703 
4704 #define INVALID_LINK_INDEX (-1)
4705 #define MAX_LINKID_TEXT 48
4706 #define L_MAX_URL_LENGTH (2048+32+sizeof("://"))
4707 
4708 #define WC_LINK L"SysLink"
4709 
4710 #define LWS_TRANSPARENT 0x1
4711 #define LWS_IGNORERETURN 0x2
4712 
4713 #define LIF_ITEMINDEX 0x1
4714 #define LIF_STATE 0x2
4715 #define LIF_ITEMID 0x4
4716 #define LIF_URL 0x8
4717 
4718 #define LIS_FOCUSED 0x1
4719 #define LIS_ENABLED 0x2
4720 #define LIS_VISITED 0x4
4721 
4722   typedef struct tagLITEM {
4723     UINT mask;
4724     int iLink;
4725     UINT state;
4726     UINT stateMask;
4727     WCHAR szID[MAX_LINKID_TEXT];
4728     WCHAR szUrl[L_MAX_URL_LENGTH];
4729   } LITEM,*PLITEM;
4730 
4731   typedef struct tagLHITTESTINFO {
4732     POINT pt;
4733     LITEM item;
4734   } LHITTESTINFO,*PLHITTESTINFO;
4735 
4736   typedef struct tagNMLINK {
4737     NMHDR hdr;
4738     LITEM item;
4739   } NMLINK,*PNMLINK;
4740 
4741 #define LM_HITTEST (WM_USER+0x300)
4742 #define LM_GETIDEALHEIGHT (WM_USER+0x301)
4743 #define LM_GETIDEALSIZE (LM_GETIDEALHEIGHT)
4744 #define LM_SETITEM (WM_USER+0x302)
4745 #define LM_GETITEM (WM_USER+0x303)
4746 
4747 #ifndef NOMUI
4748   void WINAPI InitMUILanguage(LANGID uiLang);
4749   LANGID WINAPI GetMUILanguage(void);
4750 #endif
4751 
4752 #endif /* !NOSTATIC */
4753 
4754 #define DA_LAST (0x7fffffff)
4755 #define DPA_APPEND (0x7fffffff)
4756 #define DPA_ERR (-1)
4757 
4758 #define DSA_APPEND (0x7fffffff)
4759 #define DSA_ERR (-1)
4760 
4761   typedef struct _DSA *HDSA;
4762 
4763   typedef int (CALLBACK *PFNDPAENUMCALLBACK)(void *p,void *pData);
4764   typedef int (CALLBACK *PFNDSAENUMCALLBACK)(void *p,void *pData);
4765 
4766   WINCOMMCTRLAPI HDSA WINAPI DSA_Create(int cbItem,int cItemGrow);
4767   WINCOMMCTRLAPI BOOL WINAPI DSA_Destroy(_Inout_opt_ HDSA hdsa);
4768 
4769   WINCOMMCTRLAPI
4770   void
4771   WINAPI
4772   DSA_DestroyCallback(
4773     _Inout_opt_ HDSA hdsa,
4774     _In_ PFNDSAENUMCALLBACK pfnCB,
4775     _In_opt_ void *pData);
4776 
4777   WINCOMMCTRLAPI
4778   VOID
4779   WINAPI
4780   DSA_EnumCallback(
4781     _In_ HDSA hdsa,
4782     _In_ PFNDSAENUMCALLBACK enumProc,
4783     _In_opt_ LPVOID lParam);
4784 
4785   WINCOMMCTRLAPI PVOID WINAPI DSA_GetItemPtr(_In_ HDSA hdsa, int i);
4786 
4787   WINCOMMCTRLAPI BOOL WINAPI DSA_DeleteAllItems(_In_ HDSA hdsa);
4788 
4789   WINCOMMCTRLAPI
4790   int
4791   WINAPI
4792   DSA_InsertItem(
4793     _Inout_ HDSA hdsa,
4794     _In_ int i,
4795     _In_ void *pitem);
4796 
4797   #define DSA_GetItemCount(hdsa) (*(int *) (hdsa))
4798   #define DSA_AppendItem(hdsa, pitem) DSA_InsertItem (hdsa, DA_LAST, pitem)
4799 
4800   typedef struct _DPA *HDPA;
4801 
4802   WINCOMMCTRLAPI HDPA WINAPI DPA_Create(int cItemGrow);
4803   WINCOMMCTRLAPI BOOL WINAPI DPA_Destroy(_Inout_opt_ HDPA hdpa);
4804   WINCOMMCTRLAPI PVOID WINAPI DPA_DeletePtr(_Inout_ HDPA hdpa, _In_ int i);
4805   WINCOMMCTRLAPI BOOL WINAPI DPA_DeleteAllPtrs(_Inout_ HDPA hdpa);
4806 
4807   WINCOMMCTRLAPI
4808   void
4809   WINAPI
4810   DPA_EnumCallback(
4811     _In_opt_ HDPA hdpa,
4812     _In_opt_ PFNDPAENUMCALLBACK pfnCB,
4813     _In_opt_ void *pData);
4814 
4815   WINCOMMCTRLAPI
4816   void
4817   WINAPI
4818   DPA_DestroyCallback(
4819     _Inout_opt_ HDPA hdpa,
4820     _In_ PFNDPAENUMCALLBACK pfnCB,
4821     _In_opt_ void *pData);
4822 
4823   typedef int (CALLBACK *PFNDPACOMPARE)(void *p1,void *p2,LPARAM lParam);
4824 
4825   WINCOMMCTRLAPI
4826   BOOL
4827   WINAPI
4828   DPA_Sort(
4829     _Inout_ HDPA hdpa,
4830     _In_ PFNDPACOMPARE pfnCompare,
4831     _In_ LPARAM lParam);
4832 
4833 #define DPAS_SORTED 0x1
4834 #define DPAS_INSERTBEFORE 0x2
4835 #define DPAS_INSERTAFTER 0x4
4836 
4837   WINCOMMCTRLAPI
4838   int
4839   WINAPI
4840   DPA_Search(
4841     _In_ HDPA hdpa,
4842     _In_opt_ void *pFind,
4843     _In_ int iStart,
4844     _In_ PFNDPACOMPARE pfnCompare,
4845     _In_ LPARAM lParam,
4846     _In_ UINT options);
4847 
4848   WINCOMMCTRLAPI
4849   BOOL
4850   WINAPI Str_SetPtrW(
4851     _Inout_ LPWSTR *ppsz,
4852     _In_opt_ LPCWSTR psz);
4853 
4854 typedef struct _DPASTREAMINFO {
4855   int iPos;
4856   void *pvItem;
4857 } DPASTREAMINFO;
4858 
4859 struct IStream;
4860 
4861 typedef HRESULT
4862 (CALLBACK *PFNDPASTREAM)(
4863   _In_ DPASTREAMINFO*,
4864   _In_ struct IStream*,
4865   _In_opt_ void*);
4866 
4867 typedef void*
4868 (CALLBACK *PFNDPAMERGE)(
4869   _In_ UINT,
4870   _In_ void*,
4871   _In_ void*,
4872   _In_ LPARAM);
4873 
4874 typedef const void*
4875 (CALLBACK *PFNDPAMERGECONST)(
4876   _In_ UINT,
4877   _In_ const void*,
4878   _In_ const void*,
4879   _In_ LPARAM);
4880 
4881   WINCOMMCTRLAPI
4882   HRESULT
4883   WINAPI
4884   DPA_LoadStream(
4885     _Outptr_ HDPA * phdpa,
4886     _In_ PFNDPASTREAM pfn,
4887     _In_ struct IStream * pstream,
4888     _In_opt_ void *pvInstData);
4889 
4890   WINCOMMCTRLAPI
4891   HRESULT
4892   WINAPI
4893   DPA_SaveStream(
4894     _In_ HDPA hdpa,
4895     _In_ PFNDPASTREAM pfn,
4896     _In_ struct IStream * pstream,
4897     _In_opt_ void *pvInstData);
4898 
4899   WINCOMMCTRLAPI BOOL WINAPI DPA_Grow(_Inout_ HDPA pdpa, _In_ int cp);
4900 
4901   WINCOMMCTRLAPI
4902   int
4903   WINAPI
4904   DPA_InsertPtr(
4905     _Inout_ HDPA hdpa,
4906     _In_ int i,
4907     _In_opt_ void *p);
4908 
4909   WINCOMMCTRLAPI PVOID WINAPI DPA_GetPtr(_In_ HDPA hdpa, _In_ INT_PTR i);
4910 
4911   WINCOMMCTRLAPI
4912   BOOL
4913   WINAPI
4914   DPA_SetPtr(
4915     _Inout_ HDPA hdpa,
4916     _In_ int i,
4917     _In_opt_ void *p);
4918 
4919   WINCOMMCTRLAPI
4920   int
4921   WINAPI
4922   DPA_GetPtrIndex(
4923     _In_ HDPA hdpa,
4924     _In_opt_ const void *p);
4925 
4926 #define DPA_GetPtrCount(hdpa) (*(int *)(hdpa))
4927 #define DPA_SetPtrCount(hdpa, cItems) (*(int *)(hdpa) = (cItems))
4928 #define DPA_GetPtrPtr(hdpa) (*((void * **)((BYTE *)(hdpa) + sizeof(void *))))
4929 #define DPA_AppendPtr(hdpa, pitem) DPA_InsertPtr(hdpa, DA_LAST, pitem)
4930 #define DPA_FastDeleteLastPtr(hdpa) (--*(int *)(hdpa))
4931 #define DPA_FastGetPtr(hdpa, i) (DPA_GetPtrPtr(hdpa)[i])
4932 
4933 #define DPAM_SORTED    1
4934 #define DPAM_NORMAL    2
4935 #define DPAM_UNION     4
4936 #define DPAM_INTERSECT 8
4937 
4938 #define DPAMM_MERGE    1
4939 #define DPAMM_DELETE   2
4940 #define DPAMM_INSERT   3
4941 
4942 #ifndef NOTRACKMOUSEEVENT
4943 
4944 #ifndef WM_MOUSEHOVER
4945 #define WM_MOUSEHOVER 0x2a1
4946 #define WM_MOUSELEAVE 0x2a3
4947 #endif
4948 
4949 #ifndef TME_HOVER
4950 
4951 #define TME_HOVER 0x1
4952 #define TME_LEAVE 0x2
4953 #define TME_NONCLIENT 0x10
4954 #define TME_QUERY 0x40000000
4955 #define TME_CANCEL 0x80000000
4956 
4957 #define HOVER_DEFAULT 0xffffffff
4958 
4959   typedef struct tagTRACKMOUSEEVENT {
4960     DWORD cbSize;
4961     DWORD dwFlags;
4962     HWND hwndTrack;
4963     DWORD dwHoverTime;
4964   } TRACKMOUSEEVENT,*LPTRACKMOUSEEVENT;
4965 
4966 #endif /* !TME_HOVER */
4967 
4968   WINCOMMCTRLAPI
4969   BOOL
4970   WINAPI
4971   _TrackMouseEvent(
4972     _Inout_ LPTRACKMOUSEEVENT lpEventTrack);
4973 
4974 #endif /* !NOTRACKMOUSEEVENT */
4975 
4976 #ifndef NOFLATSBAPIS
4977 
4978 #define WSB_PROP_CYVSCROLL 0x1L
4979 #define WSB_PROP_CXHSCROLL 0x2L
4980 #define WSB_PROP_CYHSCROLL 0x4L
4981 #define WSB_PROP_CXVSCROLL 0x8L
4982 #define WSB_PROP_CXHTHUMB 0x10L
4983 #define WSB_PROP_CYVTHUMB 0x20L
4984 #define WSB_PROP_VBKGCOLOR 0x40L
4985 #define WSB_PROP_HBKGCOLOR 0x80L
4986 #define WSB_PROP_VSTYLE 0x100L
4987 #define WSB_PROP_HSTYLE 0x200L
4988 #define WSB_PROP_WINSTYLE 0x400L
4989 #define WSB_PROP_PALETTE 0x800L
4990 #define WSB_PROP_MASK 0xfffL
4991 
4992 #define FSB_FLAT_MODE 2
4993 #define FSB_ENCARTA_MODE 1
4994 #define FSB_REGULAR_MODE 0
4995 
4996   WINCOMMCTRLAPI BOOL WINAPI FlatSB_EnableScrollBar(HWND,int,UINT);
4997   WINCOMMCTRLAPI BOOL WINAPI FlatSB_ShowScrollBar(HWND,int code,BOOL);
4998   WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollRange(HWND,int code,LPINT,LPINT);
4999   WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollInfo(HWND,int code,LPSCROLLINFO);
5000   WINCOMMCTRLAPI int WINAPI FlatSB_GetScrollPos(HWND,int code);
5001   WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollProp(HWND,int propIndex,LPINT);
5002 #ifdef _WIN64
5003   WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollPropPtr(HWND,int propIndex,PINT_PTR);
5004 #else
5005 #define FlatSB_GetScrollPropPtr FlatSB_GetScrollProp
5006 #endif
5007 
5008   WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollPos(HWND,int code,int pos,BOOL fRedraw);
5009   WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollInfo(HWND,int code,LPSCROLLINFO,BOOL fRedraw);
5010   WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollRange(HWND,int code,int min,int max,BOOL fRedraw);
5011   WINCOMMCTRLAPI BOOL WINAPI FlatSB_SetScrollProp(HWND,UINT index,INT_PTR newValue,BOOL);
5012 #define FlatSB_SetScrollPropPtr FlatSB_SetScrollProp
5013   WINCOMMCTRLAPI BOOL WINAPI InitializeFlatSB(HWND);
5014   WINCOMMCTRLAPI HRESULT WINAPI UninitializeFlatSB(HWND);
5015 
5016 #endif /* !NOFLATSBAPIS */
5017 
5018 #endif /* !NODATETIMEPICK */
5019 
5020   typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam,UINT_PTR uIdSubclass,DWORD_PTR dwRefData);
5021 
5022   _Success_(return != 0)
5023   BOOL
5024   WINAPI
5025   SetWindowSubclass(
5026     _In_ HWND hWnd,
5027     _In_ SUBCLASSPROC pfnSubclass,
5028     _In_ UINT_PTR uIdSubclass,
5029     _In_ DWORD_PTR dwRefData);
5030 
5031   _Success_(return != 0)
5032   BOOL
5033   WINAPI
5034   GetWindowSubclass(
5035     _In_ HWND hWnd,
5036     _In_ SUBCLASSPROC pfnSubclass,
5037     _In_ UINT_PTR uIdSubclass,
5038     _Out_opt_ DWORD_PTR *pdwRefData);
5039 
5040   _Success_(return != 0)
5041   BOOL
5042   WINAPI
5043   RemoveWindowSubclass(
5044     _In_ HWND hWnd,
5045     _In_ SUBCLASSPROC pfnSubclass,
5046     _In_ UINT_PTR uIdSubclass);
5047 
5048   LRESULT WINAPI DefSubclassProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
5049 
5050   int
5051   WINAPI
5052   DrawShadowText(
5053     _In_ HDC hdc,
5054     _In_reads_(cch) LPCWSTR pszText,
5055     _In_ UINT cch,
5056     _In_ RECT *prc,
5057     _In_ DWORD dwFlags,
5058     _In_ COLORREF crText,
5059     _In_ COLORREF crShadow,
5060     _In_ int ixOffset,
5061     _In_ int iyOffset);
5062 
5063 #ifndef NOTASKDIALOG
5064 
5065 #include <pshpack1.h>
5066 
5067 enum _TASKDIALOG_FLAGS
5068 {
5069     TDF_ENABLE_HYPERLINKS           = 0x0001,
5070     TDF_USE_HICON_MAIN              = 0x0002,
5071     TDF_USE_HICON_FOOTER            = 0x0004,
5072     TDF_ALLOW_DIALOG_CANCELLATION   = 0x0008,
5073     TDF_USE_COMMAND_LINKS           = 0x0010,
5074     TDF_USE_COMMAND_LINKS_NO_ICON   = 0x0020,
5075     TDF_EXPAND_FOOTER_AREA          = 0x0040,
5076     TDF_EXPANDED_BY_DEFAULT         = 0x0080,
5077     TDF_VERIFICATION_FLAG_CHECKED   = 0x0100,
5078     TDF_SHOW_PROGRESS_BAR           = 0x0200,
5079     TDF_SHOW_MARQUEE_PROGRESS_BAR   = 0x0400,
5080     TDF_CALLBACK_TIMER              = 0x0800,
5081     TDF_POSITION_RELATIVE_TO_WINDOW = 0x1000,
5082     TDF_RTL_LAYOUT                  = 0x2000,
5083     TDF_NO_DEFAULT_RADIO_BUTTON     = 0x4000,
5084     TDF_CAN_BE_MINIMIZED            = 0x8000,
5085     TDF_NO_SET_FOREGROUND           = 0x10000,
5086     TDF_SIZE_TO_CONTENT             = 0x01000000
5087 };
5088 typedef int TASKDIALOG_FLAGS;
5089 
5090 typedef enum _TASKDIALOG_MESSAGES
5091 {
5092     TDM_NAVIGATE_PAGE                       = WM_USER + 101,
5093     TDM_CLICK_BUTTON                        = WM_USER + 102,
5094     TDM_SET_MARQUEE_PROGRESS_BAR            = WM_USER + 103,
5095     TDM_SET_PROGRESS_BAR_STATE              = WM_USER + 104,
5096     TDM_SET_PROGRESS_BAR_RANGE              = WM_USER + 105,
5097     TDM_SET_PROGRESS_BAR_POS                = WM_USER + 106,
5098     TDM_SET_PROGRESS_BAR_MARQUEE            = WM_USER + 107,
5099     TDM_SET_ELEMENT_TEXT                    = WM_USER + 108,
5100     TDM_CLICK_RADIO_BUTTON                  = WM_USER + 110,
5101     TDM_ENABLE_BUTTON                       = WM_USER + 111,
5102     TDM_ENABLE_RADIO_BUTTON                 = WM_USER + 112,
5103     TDM_CLICK_VERIFICATION                  = WM_USER + 113,
5104     TDM_UPDATE_ELEMENT_TEXT                 = WM_USER + 114,
5105     TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = WM_USER + 115,
5106     TDM_UPDATE_ICON                         = WM_USER + 116,
5107 } TASKDIALOG_MESSAGES;
5108 
5109 typedef enum _TASKDIALOG_NOTIFICATIONS
5110 {
5111     TDN_CREATED,
5112     TDN_NAVIGATED,
5113     TDN_BUTTON_CLICKED,
5114     TDN_HYPERLINK_CLICKED,
5115     TDN_TIMER,
5116     TDN_DESTROYED,
5117     TDN_RADIO_BUTTON_CLICKED,
5118     TDN_DIALOG_CONSTRUCTED,
5119     TDN_VERIFICATION_CLICKED,
5120     TDN_HELP,
5121     TDN_EXPANDO_BUTTON_CLICKED,
5122 } TASKDIALOG_NOTIFICATIONS;
5123 
5124 typedef enum _TASKDIALOG_ELEMENTS
5125 {
5126     TDE_CONTENT,
5127     TDE_EXPANDED_INFORMATION,
5128     TDE_FOOTER,
5129     TDE_MAIN_INSTRUCTION,
5130 } TASKDIALOG_ELEMENTS;
5131 
5132 typedef enum _TASKDIALOG_ICON_ELEMENTS
5133 {
5134     TDIE_ICON_MAIN,
5135     TDIE_ICON_FOOTER,
5136 } TASKDIALOG_ICON_ELEMENTS;
5137 
5138 #define TD_WARNING_ICON        MAKEINTRESOURCEW(-1)
5139 #define TD_ERROR_ICON          MAKEINTRESOURCEW(-2)
5140 #define TD_INFORMATION_ICON    MAKEINTRESOURCEW(-3)
5141 #define TD_SHIELD_ICON         MAKEINTRESOURCEW(-4)
5142 
5143 enum _TASKDIALOG_COMMON_BUTTON_FLAGS
5144 {
5145     TDCBF_OK_BUTTON     = 0x0001,
5146     TDCBF_YES_BUTTON    = 0x0002,
5147     TDCBF_NO_BUTTON     = 0x0004,
5148     TDCBF_CANCEL_BUTTON = 0x0008,
5149     TDCBF_RETRY_BUTTON  = 0x0010,
5150     TDCBF_CLOSE_BUTTON  = 0x0020
5151 };
5152 typedef int TASKDIALOG_COMMON_BUTTON_FLAGS;
5153 
5154 typedef struct _TASKDIALOG_BUTTON
5155 {
5156     int     nButtonID;
5157     PCWSTR  pszButtonText;
5158 } TASKDIALOG_BUTTON;
5159 
5160 typedef HRESULT
5161 (CALLBACK *PFTASKDIALOGCALLBACK)(
5162   _In_ HWND,
5163   _In_ UINT,
5164   _In_ WPARAM,
5165   _In_ LPARAM,
5166   _In_ LONG_PTR);
5167 
5168 typedef struct _TASKDIALOGCONFIG
5169 {
5170     UINT        cbSize;
5171     HWND        hwndParent;
5172     HINSTANCE   hInstance;
5173     TASKDIALOG_FLAGS    dwFlags;
5174     TASKDIALOG_COMMON_BUTTON_FLAGS  dwCommonButtons;
5175     PCWSTR      pszWindowTitle;
5176     union
5177     {
5178         HICON   hMainIcon;
5179         PCWSTR  pszMainIcon;
5180     } DUMMYUNIONNAME;
5181     PCWSTR      pszMainInstruction;
5182     PCWSTR      pszContent;
5183     UINT        cButtons;
5184     const TASKDIALOG_BUTTON *pButtons;
5185     int         nDefaultButton;
5186     UINT        cRadioButtons;
5187     const TASKDIALOG_BUTTON *pRadioButtons;
5188     int         nDefaultRadioButton;
5189     PCWSTR      pszVerificationText;
5190     PCWSTR      pszExpandedInformation;
5191     PCWSTR      pszExpandedControlText;
5192     PCWSTR      pszCollapsedControlText;
5193     union
5194     {
5195         HICON   hFooterIcon;
5196         PCWSTR  pszFooterIcon;
5197     } DUMMYUNIONNAME2;
5198     PCWSTR      pszFooter;
5199     PFTASKDIALOGCALLBACK pfCallback;
5200     LONG_PTR    lpCallbackData;
5201     UINT        cxWidth;
5202 } TASKDIALOGCONFIG;
5203 
5204 HRESULT
5205 WINAPI
5206 TaskDialogIndirect(
5207   _In_ const TASKDIALOGCONFIG *,
5208   _Out_opt_ int *,
5209   _Out_opt_ int *,
5210   _Out_opt_ BOOL *);
5211 
5212 #include <poppack.h>
5213 
5214 #endif /* !NOTASKDIALOG */
5215 
5216 #if (NTDDI_VERSION >= NTDDI_VISTA)
5217 enum _LI_METRIC
5218 {
5219    LIM_SMALL,
5220    LIM_LARGE,
5221 };
5222 #endif
5223 
5224 #ifdef __cplusplus
5225 }
5226 #endif
5227 
5228 #endif /* !NOUSER */
5229 
5230 #endif /* _INC_COMMCTRL */
5231