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