[PSDK]
[reactos.git] / reactos / include / psdk / commctrl.h
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6
7 #ifndef _INC_COMMCTRL
8 #define _INC_COMMCTRL
9
10 #include <_mingw_unicode.h>
11
12 #ifndef _WINRESRC_
13 #ifndef _WIN32_IE
14 #define _WIN32_IE 0x0501
15 #else
16 /* FIXME: This really must be 0x0501 !!! */
17 #if (_WIN32_IE < 0x0500)
18 #error _WIN32_IE setting conflicts
19 #endif
20 #endif /* !_WIN32_IE */
21 #endif /* !_WINRESRC_ */
22
23 #ifndef _HRESULT_DEFINED
24 #define _HRESULT_DEFINED
25 typedef _Return_type_success_(return >= 0) LONG HRESULT;
26 #endif
27
28 #ifndef NOUSER
29
30 #ifndef WINCOMMCTRLAPI
31 #ifndef _COMCTL32_
32 #define WINCOMMCTRLAPI DECLSPEC_IMPORT
33 #else
34 #define WINCOMMCTRLAPI
35 #endif
36 #endif /* !WINCOMMCTRLAPI */
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 #include <prsht.h>
43
44 #ifndef SNDMSG
45 #ifdef __cplusplus
46 #define SNDMSG ::SendMessage
47 #else
48 #define SNDMSG SendMessage
49 #endif
50 #endif /* !SNDMSG */
51
52 WINCOMMCTRLAPI void WINAPI InitCommonControls(void);
53
54 typedef struct tagINITCOMMONCONTROLSEX {
55 DWORD dwSize;
56 DWORD dwICC;
57 } INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
58 #define ICC_LISTVIEW_CLASSES 0x1
59 #define ICC_TREEVIEW_CLASSES 0x2
60 #define ICC_BAR_CLASSES 0x4
61 #define ICC_TAB_CLASSES 0x8
62 #define ICC_UPDOWN_CLASS 0x10
63 #define ICC_PROGRESS_CLASS 0x20
64 #define ICC_HOTKEY_CLASS 0x40
65 #define ICC_ANIMATE_CLASS 0x80
66 #define ICC_WIN95_CLASSES 0xff
67 #define ICC_DATE_CLASSES 0x100
68 #define ICC_USEREX_CLASSES 0x200
69 #define ICC_COOL_CLASSES 0x400
70 #define ICC_INTERNET_CLASSES 0x800
71 #define ICC_PAGESCROLLER_CLASS 0x1000
72 #define ICC_NATIVEFNTCTL_CLASS 0x2000
73 #define ICC_STANDARD_CLASSES 0x4000
74 #define ICC_LINK_CLASS 0x8000
75
76 WINCOMMCTRLAPI BOOL WINAPI InitCommonControlsEx(_In_ const INITCOMMONCONTROLSEX *);
77
78 #define ODT_HEADER 100
79 #define ODT_TAB 101
80 #define ODT_LISTVIEW 102
81
82 #define LVM_FIRST 0x1000
83 #define TV_FIRST 0x1100
84 #define HDM_FIRST 0x1200
85 #define TCM_FIRST 0x1300
86
87 #define PGM_FIRST 0x1400
88 #define ECM_FIRST 0x1500
89 #define BCM_FIRST 0x1600
90 #define CBM_FIRST 0x1700
91 #define CCM_FIRST 0x2000
92 #define CCM_LAST (CCM_FIRST+0x200)
93 #define CCM_SETBKCOLOR (CCM_FIRST+1)
94 #define CCM_SETCOLORSCHEME (CCM_FIRST+2)
95 #define CCM_GETCOLORSCHEME (CCM_FIRST+3)
96 #define CCM_GETDROPTARGET (CCM_FIRST+4)
97 #define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
98 #define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
99
100 typedef struct tagCOLORSCHEME {
101 DWORD dwSize;
102 COLORREF clrBtnHighlight;
103 COLORREF clrBtnShadow;
104 } COLORSCHEME,*LPCOLORSCHEME;
105
106 #if (_WIN32_IE >= 0x0500)
107
108 #if (_WIN32_WINNT >= 0x0501)
109 #define COMCTL32_VERSION 6
110 #else
111 #define COMCTL32_VERSION 5
112 #endif
113
114 #define CCM_SETVERSION (CCM_FIRST+0x7)
115 #define CCM_GETVERSION (CCM_FIRST+0x8)
116 #define CCM_SETNOTIFYWINDOW (CCM_FIRST+0x9)
117 #if (_WIN32_WINNT >= 0x0501)
118 #define CCM_SETWINDOWTHEME (CCM_FIRST+0xb)
119 #define CCM_DPISCALE (CCM_FIRST+0xc)
120 #endif
121
122 #endif /* _WIN32_IE >= 0x0500 */
123
124 #define INFOTIPSIZE 1024
125
126 #define HANDLE_WM_NOTIFY(hwnd,wParam,lParam,fn) (fn)((hwnd),(int)(wParam),(NMHDR *)(lParam))
127 #define FORWARD_WM_NOTIFY(hwnd,idFrom,pnmhdr,fn) (LRESULT)(fn)((hwnd),WM_NOTIFY,(WPARAM)(int)(idFrom),(LPARAM)(NMHDR *)(pnmhdr))
128
129 #define NM_OUTOFMEMORY (NM_FIRST-1)
130 #define NM_CLICK (NM_FIRST-2)
131 #define NM_DBLCLK (NM_FIRST-3)
132 #define NM_RETURN (NM_FIRST-4)
133 #define NM_RCLICK (NM_FIRST-5)
134 #define NM_RDBLCLK (NM_FIRST-6)
135 #define NM_SETFOCUS (NM_FIRST-7)
136 #define NM_KILLFOCUS (NM_FIRST-8)
137 #define NM_CUSTOMDRAW (NM_FIRST-12)
138 #define NM_HOVER (NM_FIRST-13)
139 #define NM_NCHITTEST (NM_FIRST-14)
140 #define NM_KEYDOWN (NM_FIRST-15)
141 #define NM_RELEASEDCAPTURE (NM_FIRST-16)
142 #define NM_SETCURSOR (NM_FIRST-17)
143 #define NM_CHAR (NM_FIRST-18)
144 #define NM_TOOLTIPSCREATED (NM_FIRST-19)
145 #define NM_LDOWN (NM_FIRST-20)
146 #define NM_RDOWN (NM_FIRST-21)
147 #define NM_THEMECHANGED (NM_FIRST-22)
148
149 #ifndef CCSIZEOF_STRUCT
150 #define CCSIZEOF_STRUCT(structname,member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0))))+sizeof(((structname*)0)->member))
151 #endif
152
153 typedef struct tagNMTOOLTIPSCREATED {
154 NMHDR hdr;
155 HWND hwndToolTips;
156 } NMTOOLTIPSCREATED,*LPNMTOOLTIPSCREATED;
157
158 typedef struct tagNMMOUSE {
159 NMHDR hdr;
160 DWORD_PTR dwItemSpec;
161 DWORD_PTR dwItemData;
162 POINT pt;
163 LPARAM dwHitInfo;
164 } NMMOUSE,*LPNMMOUSE;
165
166 typedef NMMOUSE NMCLICK;
167 typedef LPNMMOUSE LPNMCLICK;
168
169 typedef struct tagNMOBJECTNOTIFY {
170 NMHDR hdr;
171 int iItem;
172 #ifdef __IID_DEFINED__
173 const IID *piid;
174 #else
175 const void *piid;
176 #endif
177 void *pObject;
178 HRESULT hResult;
179 DWORD dwFlags;
180 } NMOBJECTNOTIFY,*LPNMOBJECTNOTIFY;
181
182 typedef struct tagNMKEY {
183 NMHDR hdr;
184 UINT nVKey;
185 UINT uFlags;
186 } NMKEY,*LPNMKEY;
187
188 typedef struct tagNMCHAR {
189 NMHDR hdr;
190 UINT ch;
191 DWORD dwItemPrev;
192 DWORD dwItemNext;
193 } NMCHAR,*LPNMCHAR;
194
195 #define NM_FIRST (0U- 0U)
196 #define NM_LAST (0U- 99U)
197
198 #define LVN_FIRST (0U-100U)
199 #define LVN_LAST (0U-199U)
200
201 #define HDN_FIRST (0U-300U)
202 #define HDN_LAST (0U-399U)
203
204 #define TVN_FIRST (0U-400U)
205 #define TVN_LAST (0U-499U)
206
207 #define TTN_FIRST (0U-520U)
208 #define TTN_LAST (0U-549U)
209
210 #define TCN_FIRST (0U-550U)
211 #define TCN_LAST (0U-580U)
212
213 #ifndef CDN_FIRST
214 #define CDN_FIRST (0U-601U)
215 #define CDN_LAST (0U-699U)
216 #endif
217
218 #define TBN_FIRST (0U-700U)
219 #define TBN_LAST (0U-720U)
220
221 #define UDN_FIRST (0U-721)
222 #define UDN_LAST (0U-740)
223
224 #define MCN_FIRST (0U-750U)
225 #define MCN_LAST (0U-759U)
226 #define DTN_FIRST (0U-760U)
227 #define DTN_LAST (0U-799U)
228 #define CBEN_FIRST (0U-800U)
229 #define CBEN_LAST (0U-830U)
230 #define RBN_FIRST (0U-831U)
231 #define RBN_LAST (0U-859U)
232
233 #define IPN_FIRST (0U-860U)
234 #define IPN_LAST (0U-879U)
235 #define SBN_FIRST (0U-880U)
236 #define SBN_LAST (0U-899U)
237 #define PGN_FIRST (0U-900U)
238 #define PGN_LAST (0U-950U)
239
240 #ifndef WMN_FIRST
241 #define WMN_FIRST (0U-1000U)
242 #define WMN_LAST (0U-1200U)
243 #endif
244
245 #define BCN_FIRST (0U-1250U)
246 #define BCN_LAST (0U-1350U)
247
248 #define MSGF_COMMCTRL_BEGINDRAG 0x4200
249 #define MSGF_COMMCTRL_SIZEHEADER 0x4201
250 #define MSGF_COMMCTRL_DRAGSELECT 0x4202
251 #define MSGF_COMMCTRL_TOOLBARCUST 0x4203
252
253 #define CDRF_DODEFAULT 0x0
254 #define CDRF_NEWFONT 0x2
255 #define CDRF_SKIPDEFAULT 0x4
256
257 #define CDRF_NOTIFYPOSTPAINT 0x10
258 #define CDRF_NOTIFYITEMDRAW 0x20
259 #define CDRF_NOTIFYSUBITEMDRAW 0x20
260 #define CDRF_NOTIFYPOSTERASE 0x40
261 #define CDRF_NOTIFYITEMERASE 0x00000080 /* obsolete ??? */
262
263 #define CDDS_PREPAINT 0x1
264 #define CDDS_POSTPAINT 0x2
265 #define CDDS_PREERASE 0x3
266 #define CDDS_POSTERASE 0x4
267 #define CDDS_ITEM 0x10000
268 #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
269 #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
270 #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
271 #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
272 #define CDDS_SUBITEM 0x20000
273
274 #define CDIS_SELECTED 0x1
275 #define CDIS_GRAYED 0x2
276 #define CDIS_DISABLED 0x4
277 #define CDIS_CHECKED 0x8
278 #define CDIS_FOCUS 0x10
279 #define CDIS_DEFAULT 0x20
280 #define CDIS_HOT 0x40
281 #define CDIS_MARKED 0x80
282 #define CDIS_INDETERMINATE 0x100
283 #define CDIS_SHOWKEYBOARDCUES 0x200
284
285 typedef struct tagNMCUSTOMDRAWINFO {
286 NMHDR hdr;
287 DWORD dwDrawStage;
288 HDC hdc;
289 RECT rc;
290 DWORD_PTR dwItemSpec;
291 UINT uItemState;
292 LPARAM lItemlParam;
293 } NMCUSTOMDRAW,*LPNMCUSTOMDRAW;
294
295 typedef struct tagNMTTCUSTOMDRAW {
296 NMCUSTOMDRAW nmcd;
297 UINT uDrawFlags;
298 } NMTTCUSTOMDRAW,*LPNMTTCUSTOMDRAW;
299
300 #ifndef NOIMAGEAPIS
301
302 #define CLR_NONE 0xffffffffL
303 #define CLR_DEFAULT 0xFF000000L
304
305 #ifndef HIMAGELIST
306 struct _IMAGELIST;
307 typedef struct _IMAGELIST *HIMAGELIST;
308 #endif
309
310 #ifndef IMAGELISTDRAWPARAMS
311 typedef struct _IMAGELISTDRAWPARAMS {
312 DWORD cbSize;
313 HIMAGELIST himl;
314 int i;
315 HDC hdcDst;
316 int x;
317 int y;
318 int cx;
319 int cy;
320 int xBitmap;
321 int yBitmap;
322 COLORREF rgbBk;
323 COLORREF rgbFg;
324 UINT fStyle;
325 DWORD dwRop;
326 DWORD fState;
327 DWORD Frame;
328 COLORREF crEffect;
329 } IMAGELISTDRAWPARAMS,*LPIMAGELISTDRAWPARAMS;
330
331 #define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS,dwRop)
332 #endif
333
334 #define ILC_MASK 0x1
335 #define ILC_COLOR 0x0
336 #define ILC_COLORDDB 0xfe
337 #define ILC_COLOR4 0x4
338 #define ILC_COLOR8 0x8
339 #define ILC_COLOR16 0x10
340 #define ILC_COLOR24 0x18
341 #define ILC_COLOR32 0x20
342 #define ILC_PALETTE 0x800
343 #define ILC_MIRROR 0x2000
344 #define ILC_PERITEMMIRROR 0x8000
345
346 WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Create(int cx,int cy,UINT flags,int cInitial,int cGrow);
347 WINCOMMCTRLAPI BOOL WINAPI ImageList_Destroy(_In_opt_ HIMAGELIST himl);
348 WINCOMMCTRLAPI int WINAPI ImageList_GetImageCount(_In_ HIMAGELIST himl);
349
350 WINCOMMCTRLAPI
351 BOOL
352 WINAPI
353 ImageList_SetImageCount(
354 _In_ HIMAGELIST himl,
355 _In_ UINT uNewCount);
356
357 WINCOMMCTRLAPI
358 int
359 WINAPI
360 ImageList_Add(
361 _In_ HIMAGELIST himl,
362 _In_ HBITMAP hbmImage,
363 _In_opt_ HBITMAP hbmMask);
364
365 WINCOMMCTRLAPI
366 int
367 WINAPI
368 ImageList_ReplaceIcon(
369 _In_ HIMAGELIST himl,
370 _In_ int i,
371 _In_ HICON hicon);
372
373 WINCOMMCTRLAPI
374 COLORREF
375 WINAPI
376 ImageList_SetBkColor(
377 _In_ HIMAGELIST himl,
378 _In_ COLORREF clrBk);
379
380 WINCOMMCTRLAPI COLORREF WINAPI ImageList_GetBkColor(_In_ HIMAGELIST himl);
381
382 WINCOMMCTRLAPI
383 BOOL
384 WINAPI
385 ImageList_SetOverlayImage(
386 _In_ HIMAGELIST himl,
387 _In_ int iImage,
388 _In_ int iOverlay);
389
390 WINCOMMCTRLAPI
391 HRESULT
392 WINAPI
393 HIMAGELIST_QueryInterface(
394 _In_ HIMAGELIST,
395 _In_ REFIID,
396 _Outptr_ void **);
397
398 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
399
400 #define ILD_NORMAL 0x0
401 #define ILD_TRANSPARENT 0x1
402 #define ILD_MASK 0x10
403 #define ILD_IMAGE 0x20
404 #define ILD_ROP 0x40
405 #define ILD_BLEND25 0x2
406 #define ILD_BLEND50 0x4
407 #define ILD_OVERLAYMASK 0xf00
408 #define INDEXTOOVERLAYMASK(i) ((i) << 8)
409 #define ILD_PRESERVEALPHA 0x1000
410 #define ILD_SCALE 0x2000
411 #define ILD_DPISCALE 0x4000
412
413 #define ILD_SELECTED ILD_BLEND50
414 #define ILD_FOCUS ILD_BLEND25
415 #define ILD_BLEND ILD_BLEND50
416 #define CLR_HILIGHT CLR_DEFAULT
417
418 #define ILS_NORMAL 0x0
419 #define ILS_GLOW 0x1
420 #define ILS_SHADOW 0x2
421 #define ILS_SATURATE 0x4
422 #define ILS_ALPHA 0x8
423
424 WINCOMMCTRLAPI
425 BOOL
426 WINAPI
427 ImageList_Draw(
428 _In_ HIMAGELIST himl,
429 _In_ int i,
430 _In_ HDC hdcDst,
431 _In_ int x,
432 _In_ int y,
433 _In_ UINT fStyle);
434
435 WINCOMMCTRLAPI
436 BOOL
437 WINAPI
438 ImageList_Replace(
439 _In_ HIMAGELIST himl,
440 _In_ int i,
441 _In_ HBITMAP hbmImage,
442 _In_opt_ HBITMAP hbmMask);
443
444 WINCOMMCTRLAPI
445 int
446 WINAPI
447 ImageList_AddMasked(
448 _In_ HIMAGELIST himl,
449 _In_ HBITMAP hbmImage,
450 _In_ COLORREF crMask);
451
452 WINCOMMCTRLAPI
453 BOOL
454 WINAPI
455 ImageList_DrawEx(
456 _In_ HIMAGELIST himl,
457 _In_ int i,
458 _In_ HDC hdcDst,
459 _In_ int x,
460 _In_ int y,
461 _In_ int dx,
462 _In_ int dy,
463 _In_ COLORREF rgbBk,
464 _In_ COLORREF rgbFg,
465 _In_ UINT fStyle);
466
467 WINCOMMCTRLAPI
468 BOOL
469 WINAPI
470 ImageList_DrawIndirect(
471 _In_ IMAGELISTDRAWPARAMS *pimldp);
472
473 WINCOMMCTRLAPI
474 BOOL
475 WINAPI
476 ImageList_Remove(
477 _In_ HIMAGELIST himl,
478 _In_ int i);
479
480 WINCOMMCTRLAPI
481 HICON
482 WINAPI
483 ImageList_GetIcon(
484 _In_ HIMAGELIST himl,
485 _In_ int i,
486 _In_ UINT flags);
487
488 WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE hi,LPCSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags);
489 WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi,LPCWSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags);
490
491 #define ImageList_LoadImage __MINGW_NAME_AW(ImageList_LoadImage)
492
493 #define ILCF_MOVE 0x0
494 #define ILCF_SWAP 0x1
495
496 WINCOMMCTRLAPI
497 BOOL
498 WINAPI
499 ImageList_Copy(
500 _In_ HIMAGELIST himlDst,
501 _In_ int iDst,
502 _In_ HIMAGELIST himlSrc,
503 _In_ int iSrc,
504 _In_ UINT uFlags);
505
506 WINCOMMCTRLAPI
507 BOOL
508 WINAPI
509 ImageList_BeginDrag(
510 _In_ HIMAGELIST himlTrack,
511 _In_ int iTrack,
512 _In_ int dxHotspot,
513 _In_ int dyHotspot);
514
515 WINCOMMCTRLAPI void WINAPI ImageList_EndDrag(void);
516 WINCOMMCTRLAPI BOOL WINAPI ImageList_DragEnter(HWND hwndLock,int x,int y);
517 WINCOMMCTRLAPI BOOL WINAPI ImageList_DragLeave(HWND hwndLock);
518 WINCOMMCTRLAPI BOOL WINAPI ImageList_DragMove(int x,int y);
519
520 WINCOMMCTRLAPI
521 BOOL
522 WINAPI
523 ImageList_SetDragCursorImage(
524 _In_ HIMAGELIST himlDrag,
525 _In_ int iDrag,
526 _In_ int dxHotspot,
527 _In_ int dyHotspot);
528
529 WINCOMMCTRLAPI BOOL WINAPI ImageList_DragShowNolock(BOOL fShow);
530
531 _Success_(return != NULL)
532 WINCOMMCTRLAPI
533 HIMAGELIST
534 WINAPI
535 ImageList_GetDragImage(
536 _Out_opt_ POINT *ppt,
537 _Out_opt_ POINT *pptHotspot);
538
539 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
540 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
541 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
542
543 #ifdef __IStream_INTERFACE_DEFINED__
544 WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Read(_In_ LPSTREAM pstm);
545 WINCOMMCTRLAPI BOOL WINAPI ImageList_Write(_In_ HIMAGELIST himl, _In_ LPSTREAM pstm);
546 #define ILP_NORMAL 0
547 #define ILP_DOWNLEVEL 1
548 WINCOMMCTRLAPI HRESULT WINAPI ImageList_ReadEx(_In_ DWORD dwFlags, _In_ LPSTREAM pstm, _In_ REFIID riid, _Outptr_ PVOID *ppv);
549 WINCOMMCTRLAPI HRESULT WINAPI ImageList_WriteEx(_In_ HIMAGELIST himl, _In_ DWORD dwFlags, _In_ LPSTREAM pstm);
550 #endif
551
552 #ifndef IMAGEINFO
553 typedef struct _IMAGEINFO {
554 HBITMAP hbmImage;
555 HBITMAP hbmMask;
556 int Unused1;
557 int Unused2;
558 RECT rcImage;
559 } IMAGEINFO,*LPIMAGEINFO;
560 #endif
561
562 _Success_(return != 0)
563 WINCOMMCTRLAPI
564 BOOL
565 WINAPI
566 ImageList_GetIconSize(
567 _In_ HIMAGELIST himl,
568 _Out_opt_ int *cx,
569 _Out_opt_ int *cy);
570
571 _Success_(return != 0)
572 WINCOMMCTRLAPI
573 BOOL
574 WINAPI
575 ImageList_SetIconSize(
576 _In_ HIMAGELIST himl,
577 _In_ int cx,
578 _In_ int cy);
579
580 _Success_(return != 0)
581 WINCOMMCTRLAPI
582 BOOL
583 WINAPI
584 ImageList_GetImageInfo(
585 _In_ HIMAGELIST himl,
586 _In_ int i,
587 _Out_ IMAGEINFO *pImageInfo);
588
589 WINCOMMCTRLAPI
590 HIMAGELIST
591 WINAPI
592 ImageList_Merge(
593 _In_ HIMAGELIST himl1,
594 _In_ int i1,
595 _In_ HIMAGELIST himl2,
596 _In_ int i2,
597 _In_ int dx,
598 _In_ int dy);
599
600 WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Duplicate(_In_ HIMAGELIST himl);
601
602 #endif /* !NOIMAGEAPIS */
603
604 #ifndef NOHEADER
605
606 #define WC_HEADERA "SysHeader32"
607 #define WC_HEADERW L"SysHeader32"
608
609 #define WC_HEADER __MINGW_NAME_AW(WC_HEADER)
610
611 #define HDS_HORZ 0x0
612 #define HDS_BUTTONS 0x2
613 #define HDS_HOTTRACK 0x4
614 #define HDS_HIDDEN 0x8
615 #define HDS_DRAGDROP 0x40
616 #define HDS_FULLDRAG 0x80
617 #define HDS_FILTERBAR 0x100
618 #define HDS_FLAT 0x200
619 #if (_WIN32_WINNT >= 0x0600)
620 #define HDS_CHECKBOXES 0x400
621 #define HDS_NOSIZING 0x800
622 #define HDS_OVERFLOW 0x1000
623 #endif
624
625 #define HDFT_ISSTRING 0x0
626 #define HDFT_ISNUMBER 0x1
627
628 #define HDFT_HASNOVALUE 0x8000
629
630 #define HD_TEXTFILTER __MINGW_NAME_AW(HD_TEXTFILTER)
631 #define HDTEXTFILTER __MINGW_NAME_AW(HD_TEXTFILTER)
632 #define LPHD_TEXTFILTER __MINGW_NAME_AW(LPHD_TEXTFILTER)
633 #define LPHDTEXTFILTER __MINGW_NAME_AW(LPHD_TEXTFILTER)
634
635 typedef struct _HD_TEXTFILTERA {
636 LPSTR pszText;
637 INT cchTextMax;
638 } HD_TEXTFILTERA,*LPHD_TEXTFILTERA;
639
640 typedef struct _HD_TEXTFILTERW {
641 LPWSTR pszText;
642 INT cchTextMax;
643 } HD_TEXTFILTERW,*LPHD_TEXTFILTERW;
644
645 #define HD_ITEMA HDITEMA
646 #define HD_ITEMW HDITEMW
647 #define HD_ITEM HDITEM
648
649 typedef struct _HD_ITEMA {
650 UINT mask;
651 int cxy;
652 LPSTR pszText;
653 HBITMAP hbm;
654 int cchTextMax;
655 int fmt;
656 LPARAM lParam;
657 int iImage;
658 int iOrder;
659 UINT type;
660 void *pvFilter;
661 } HDITEMA,*LPHDITEMA;
662
663 #define HDITEMA_V1_SIZE CCSIZEOF_STRUCT(HDITEMA,lParam)
664 #define HDITEMW_V1_SIZE CCSIZEOF_STRUCT(HDITEMW,lParam)
665
666 typedef struct _HD_ITEMW {
667 UINT mask;
668 int cxy;
669 LPWSTR pszText;
670 HBITMAP hbm;
671 int cchTextMax;
672 int fmt;
673 LPARAM lParam;
674 int iImage;
675 int iOrder;
676 UINT type;
677 void *pvFilter;
678 } HDITEMW,*LPHDITEMW;
679
680 #define HDITEM __MINGW_NAME_AW(HDITEM)
681 #define LPHDITEM __MINGW_NAME_AW(LPHDITEM)
682
683 #define HDITEM_V1_SIZE __MINGW_NAME_AW_EXT(HDITEM,_V1_SIZE)
684
685 #define HDI_WIDTH 0x1
686 #define HDI_HEIGHT HDI_WIDTH
687 #define HDI_TEXT 0x2
688 #define HDI_FORMAT 0x4
689 #define HDI_LPARAM 0x8
690 #define HDI_BITMAP 0x10
691 #define HDI_IMAGE 0x20
692 #define HDI_DI_SETITEM 0x40
693 #define HDI_ORDER 0x80
694 #define HDI_FILTER 0x100
695
696 #define HDF_LEFT 0x0
697 #define HDF_RIGHT 0x1
698 #define HDF_CENTER 0x2
699 #define HDF_JUSTIFYMASK 0x3
700 #define HDF_RTLREADING 0x4
701
702 #define HDF_OWNERDRAW 0x8000
703 #define HDF_STRING 0x4000
704 #define HDF_BITMAP 0x2000
705 #define HDF_BITMAP_ON_RIGHT 0x1000
706 #define HDF_IMAGE 0x800
707 #define HDF_SORTUP 0x400
708 #define HDF_SORTDOWN 0x200
709 #if (_WIN32_WINNT >= 0x0600)
710 #define HDF_CHECKBOX 0x40
711 #define HDF_CHECKED 0x80
712 #define HDF_FIXEDWIDTH 0x100
713 #define HDF_SPLITBUTTON 0x1000000
714 #endif
715
716 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
717 #define Header_GetItemCount(hwndHD) (int)SNDMSG((hwndHD),HDM_GETITEMCOUNT,0,0L)
718
719 #define HDM_INSERTITEMA (HDM_FIRST+1)
720 #define HDM_INSERTITEMW (HDM_FIRST+10)
721
722 #define HDM_INSERTITEM __MINGW_NAME_AW(HDM_INSERTITEM)
723
724 #define Header_InsertItem(hwndHD,i,phdi) (int)SNDMSG((hwndHD),HDM_INSERTITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM *)(phdi))
725
726 #define HDM_DELETEITEM (HDM_FIRST+2)
727 #define Header_DeleteItem(hwndHD,i) (BOOL)SNDMSG((hwndHD),HDM_DELETEITEM,(WPARAM)(int)(i),0L)
728
729 #define HDM_GETITEMA (HDM_FIRST+3)
730 #define HDM_GETITEMW (HDM_FIRST+11)
731
732 #define HDM_GETITEM __MINGW_NAME_AW(HDM_GETITEM)
733
734 #define Header_GetItem(hwndHD,i,phdi) (BOOL)SNDMSG((hwndHD),HDM_GETITEM,(WPARAM)(int)(i),(LPARAM)(HD_ITEM *)(phdi))
735
736 #define HDM_SETITEMA (HDM_FIRST+4)
737 #define HDM_SETITEMW (HDM_FIRST+12)
738
739 #define HDM_SETITEM __MINGW_NAME_AW(HDM_SETITEM)
740
741 #define Header_SetItem(hwndHD,i,phdi) (BOOL)SNDMSG((hwndHD),HDM_SETITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM *)(phdi))
742
743 #define HD_LAYOUT HDLAYOUT
744
745 typedef struct _HD_LAYOUT {
746 RECT *prc;
747 WINDOWPOS *pwpos;
748 } HDLAYOUT,*LPHDLAYOUT;
749
750 #define HDM_LAYOUT (HDM_FIRST+5)
751 #define Header_Layout(hwndHD,playout) (BOOL)SNDMSG((hwndHD),HDM_LAYOUT,0,(LPARAM)(HD_LAYOUT *)(playout))
752
753 #define HHT_NOWHERE 0x1
754 #define HHT_ONHEADER 0x2
755 #define HHT_ONDIVIDER 0x4
756 #define HHT_ONDIVOPEN 0x8
757 #define HHT_ONFILTER 0x10
758 #define HHT_ONFILTERBUTTON 0x20
759 #define HHT_ABOVE 0x100
760 #define HHT_BELOW 0x200
761 #define HHT_TORIGHT 0x400
762 #define HHT_TOLEFT 0x800
763
764 #define HD_HITTESTINFO HDHITTESTINFO
765
766 typedef struct _HD_HITTESTINFO {
767 POINT pt;
768 UINT flags;
769 int iItem;
770 } HDHITTESTINFO,*LPHDHITTESTINFO;
771
772 #define HDM_HITTEST (HDM_FIRST+6)
773
774 #define HDM_GETITEMRECT (HDM_FIRST+7)
775 #define Header_GetItemRect(hwnd,iItem,lprc) (BOOL)SNDMSG((hwnd),HDM_GETITEMRECT,(WPARAM)(iItem),(LPARAM)(lprc))
776
777 #define HDM_SETIMAGELIST (HDM_FIRST+8)
778 #define Header_SetImageList(hwnd,himl) (HIMAGELIST)SNDMSG((hwnd),HDM_SETIMAGELIST,0,(LPARAM)(himl))
779
780 #define HDM_GETIMAGELIST (HDM_FIRST+9)
781 #define Header_GetImageList(hwnd) (HIMAGELIST)SNDMSG((hwnd),HDM_GETIMAGELIST,0,0)
782
783 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
784 #define Header_OrderToIndex(hwnd,i) (int)SNDMSG((hwnd),HDM_ORDERTOINDEX,(WPARAM)(i),0)
785
786 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
787 #define Header_CreateDragImage(hwnd,i) (HIMAGELIST)SNDMSG((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)(i),0)
788
789 #define HDM_GETORDERARRAY (HDM_FIRST+17)
790 #define Header_GetOrderArray(hwnd,iCount,lpi) (BOOL)SNDMSG((hwnd),HDM_GETORDERARRAY,(WPARAM)(iCount),(LPARAM)(lpi))
791
792 #define HDM_SETORDERARRAY (HDM_FIRST+18)
793 #define Header_SetOrderArray(hwnd,iCount,lpi) (BOOL)SNDMSG((hwnd),HDM_SETORDERARRAY,(WPARAM)(iCount),(LPARAM)(lpi))
794
795 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
796 #define Header_SetHotDivider(hwnd,fPos,dw) (int)SNDMSG((hwnd),HDM_SETHOTDIVIDER,(WPARAM)(fPos),(LPARAM)(dw))
797
798 #define HDM_SETBITMAPMARGIN (HDM_FIRST+20)
799 #define Header_SetBitmapMargin(hwnd,iWidth) (int)SNDMSG((hwnd),HDM_SETBITMAPMARGIN,(WPARAM)(iWidth),0)
800
801 #define HDM_GETBITMAPMARGIN (HDM_FIRST+21)
802 #define Header_GetBitmapMargin(hwnd) (int)SNDMSG((hwnd),HDM_GETBITMAPMARGIN,0,0)
803
804 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
805 #define Header_SetUnicodeFormat(hwnd,fUnicode) (BOOL)SNDMSG((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
806
807 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
808 #define Header_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd),HDM_GETUNICODEFORMAT,0,0)
809
810 #define HDM_SETFILTERCHANGETIMEOUT (HDM_FIRST+22)
811 #define Header_SetFilterChangeTimeout(hwnd,i) (int)SNDMSG((hwnd),HDM_SETFILTERCHANGETIMEOUT,0,(LPARAM)(i))
812
813 #define HDM_EDITFILTER (HDM_FIRST+23)
814 #define Header_EditFilter(hwnd,i,fDiscardChanges) (int)SNDMSG((hwnd),HDM_EDITFILTER,(WPARAM)(i),MAKELPARAM(fDiscardChanges,0))
815
816 #define HDM_CLEARFILTER (HDM_FIRST+24)
817 #define Header_ClearFilter(hwnd,i) (int)SNDMSG((hwnd),HDM_CLEARFILTER,(WPARAM)(i),0)
818 #define Header_ClearAllFilters(hwnd) (int)SNDMSG((hwnd),HDM_CLEARFILTER,(WPARAM)-1,0)
819
820 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
821 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
822 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
823 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
824 #define HDN_ITEMCLICKA (HDN_FIRST-2)
825 #define HDN_ITEMCLICKW (HDN_FIRST-22)
826 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
827 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
828 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
829 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
830 #define HDN_BEGINTRACKA (HDN_FIRST-6)
831 #define HDN_BEGINTRACKW (HDN_FIRST-26)
832 #define HDN_ENDTRACKA (HDN_FIRST-7)
833 #define HDN_ENDTRACKW (HDN_FIRST-27)
834 #define HDN_TRACKA (HDN_FIRST-8)
835 #define HDN_TRACKW (HDN_FIRST-28)
836 #define HDN_GETDISPINFOA (HDN_FIRST-9)
837 #define HDN_GETDISPINFOW (HDN_FIRST-29)
838 #define HDN_BEGINDRAG (HDN_FIRST-10)
839 #define HDN_ENDDRAG (HDN_FIRST-11)
840 #define HDN_FILTERCHANGE (HDN_FIRST-12)
841 #define HDN_FILTERBTNCLICK (HDN_FIRST-13)
842 #define HDN_BEGINFILTEREDIT (HDN_FIRST-14)
843 #define HDN_ENDFILTEREDIT (HDN_FIRST-15)
844 #define HDN_ITEMSTATEICONCLICK (HDN_FIRST-16)
845 #define HDN_ITEMKEYDOWN (HDN_FIRST-17)
846
847 #define HDN_ITEMCHANGING __MINGW_NAME_AW(HDN_ITEMCHANGING)
848 #define HDN_ITEMCHANGED __MINGW_NAME_AW(HDN_ITEMCHANGED)
849 #define HDN_ITEMCLICK __MINGW_NAME_AW(HDN_ITEMCLICK)
850 #define HDN_ITEMDBLCLICK __MINGW_NAME_AW(HDN_ITEMDBLCLICK)
851 #define HDN_DIVIDERDBLCLICK __MINGW_NAME_AW(HDN_DIVIDERDBLCLICK)
852 #define HDN_BEGINTRACK __MINGW_NAME_AW(HDN_BEGINTRACK)
853 #define HDN_ENDTRACK __MINGW_NAME_AW(HDN_ENDTRACK)
854 #define HDN_TRACK __MINGW_NAME_AW(HDN_TRACK)
855 #define HDN_GETDISPINFO __MINGW_NAME_AW(HDN_GETDISPINFO)
856
857 #define HD_NOTIFYA NMHEADERA
858 #define HD_NOTIFYW NMHEADERW
859 #define HD_NOTIFY NMHEADER
860
861 typedef struct tagNMHEADERA {
862 NMHDR hdr;
863 int iItem;
864 int iButton;
865 HDITEMA *pitem;
866 } NMHEADERA,*LPNMHEADERA;
867
868 typedef struct tagNMHEADERW {
869 NMHDR hdr;
870 int iItem;
871 int iButton;
872 HDITEMW *pitem;
873 } NMHEADERW,*LPNMHEADERW;
874
875 #define NMHEADER __MINGW_NAME_AW(NMHEADER)
876 #define LPNMHEADER __MINGW_NAME_AW(LPNMHEADER)
877
878 typedef struct tagNMHDDISPINFOW {
879 NMHDR hdr;
880 int iItem;
881 UINT mask;
882 LPWSTR pszText;
883 int cchTextMax;
884 int iImage;
885 LPARAM lParam;
886 } NMHDDISPINFOW,*LPNMHDDISPINFOW;
887
888 typedef struct tagNMHDDISPINFOA {
889 NMHDR hdr;
890 int iItem;
891 UINT mask;
892 LPSTR pszText;
893 int cchTextMax;
894 int iImage;
895 LPARAM lParam;
896 } NMHDDISPINFOA,*LPNMHDDISPINFOA;
897
898 #define NMHDDISPINFO __MINGW_NAME_AW(NMHDDISPINFO)
899 #define LPNMHDDISPINFO __MINGW_NAME_AW(LPNMHDDISPINFO)
900
901 typedef struct tagNMHDFILTERBTNCLICK {
902 NMHDR hdr;
903 INT iItem;
904 RECT rc;
905 } NMHDFILTERBTNCLICK,*LPNMHDFILTERBTNCLICK;
906
907 #endif /* !NOHEADER */
908
909 #ifndef NOTOOLBAR
910
911 #define TOOLBARCLASSNAMEW L"ToolbarWindow32"
912 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
913
914 #define TOOLBARCLASSNAME __MINGW_NAME_AW(TOOLBARCLASSNAME)
915
916 typedef struct _TBBUTTON {
917 int iBitmap;
918 int idCommand;
919 BYTE fsState;
920 BYTE fsStyle;
921 #ifdef _WIN64
922 BYTE bReserved[6];
923 #else
924 BYTE bReserved[2];
925 #endif
926 DWORD_PTR dwData;
927 INT_PTR iString;
928 } TBBUTTON,NEAR *PTBBUTTON,*LPTBBUTTON;
929 typedef const TBBUTTON *LPCTBBUTTON;
930
931 typedef struct _COLORMAP {
932 COLORREF from;
933 COLORREF to;
934 } COLORMAP,*LPCOLORMAP;
935
936 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);
937 WINCOMMCTRLAPI HBITMAP WINAPI CreateMappedBitmap(HINSTANCE hInstance,INT_PTR idBitmap,UINT wFlags,LPCOLORMAP lpColorMap,int iNumMaps);
938
939 #define CMB_MASKED 0x2
940 #define TBSTATE_CHECKED 0x1
941 #define TBSTATE_PRESSED 0x2
942 #define TBSTATE_ENABLED 0x4
943 #define TBSTATE_HIDDEN 0x8
944 #define TBSTATE_INDETERMINATE 0x10
945 #define TBSTATE_WRAP 0x20
946 #define TBSTATE_ELLIPSES 0x40
947 #define TBSTATE_MARKED 0x80
948
949 #define TBSTYLE_BUTTON 0x0
950 #define TBSTYLE_SEP 0x1
951 #define TBSTYLE_CHECK 0x2
952 #define TBSTYLE_GROUP 0x4
953 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
954 #define TBSTYLE_DROPDOWN 0x8
955 #define TBSTYLE_AUTOSIZE 0x10
956 #define TBSTYLE_NOPREFIX 0x20
957 #define TBSTYLE_TOOLTIPS 0x100
958 #define TBSTYLE_WRAPABLE 0x200
959 #define TBSTYLE_ALTDRAG 0x400
960 #define TBSTYLE_FLAT 0x800
961 #define TBSTYLE_LIST 0x1000
962 #define TBSTYLE_CUSTOMERASE 0x2000
963 #define TBSTYLE_REGISTERDROP 0x4000
964 #define TBSTYLE_TRANSPARENT 0x8000
965
966 #define BTNS_BUTTON TBSTYLE_BUTTON
967 #define BTNS_SEP TBSTYLE_SEP
968 #define BTNS_CHECK TBSTYLE_CHECK
969 #define BTNS_GROUP TBSTYLE_GROUP
970 #define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP
971 #define BTNS_DROPDOWN TBSTYLE_DROPDOWN
972 #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE
973 #define BTNS_NOPREFIX TBSTYLE_NOPREFIX
974 #define BTNS_SHOWTEXT 0x40
975 #define BTNS_WHOLEDROPDOWN 0x80
976
977 #define TBSTYLE_EX_DRAWDDARROWS 0x00000001
978 #define TBSTYLE_EX_MULTICOLUMN 0x00000002
979 #define TBSTYLE_EX_VERTICAL 0x00000004
980 #define TBSTYLE_EX_MIXEDBUTTONS 0x00000008
981 #define TBSTYLE_EX_HIDECLIPPEDBUTTONS 0x00000010 /* don't show partially obscured buttons */
982 #define TBSTYLE_EX_DOUBLEBUFFER 0x00000080 /* Double Buffer the toolbar */
983
984 typedef struct _NMTBCUSTOMDRAW {
985 NMCUSTOMDRAW nmcd;
986 HBRUSH hbrMonoDither;
987 HBRUSH hbrLines;
988 HPEN hpenLines;
989 COLORREF clrText;
990 COLORREF clrMark;
991 COLORREF clrTextHighlight;
992 COLORREF clrBtnFace;
993 COLORREF clrBtnHighlight;
994 COLORREF clrHighlightHotTrack;
995 RECT rcText;
996 int nStringBkMode;
997 int nHLStringBkMode;
998 int iListGap;
999 } NMTBCUSTOMDRAW,*LPNMTBCUSTOMDRAW;
1000
1001 #define TBCDRF_NOEDGES 0x10000
1002 #define TBCDRF_HILITEHOTTRACK 0x20000
1003 #define TBCDRF_NOOFFSET 0x40000
1004 #define TBCDRF_NOMARK 0x80000
1005 #define TBCDRF_NOETCHEDEFFECT 0x100000
1006
1007 #define TBCDRF_BLENDICON 0x200000
1008 #define TBCDRF_NOBACKGROUND 0x400000
1009
1010 #define TB_ENABLEBUTTON (WM_USER+1)
1011 #define TB_CHECKBUTTON (WM_USER+2)
1012 #define TB_PRESSBUTTON (WM_USER+3)
1013 #define TB_HIDEBUTTON (WM_USER+4)
1014 #define TB_INDETERMINATE (WM_USER+5)
1015 #define TB_MARKBUTTON (WM_USER+6)
1016 #define TB_ISBUTTONENABLED (WM_USER+9)
1017 #define TB_ISBUTTONCHECKED (WM_USER+10)
1018 #define TB_ISBUTTONPRESSED (WM_USER+11)
1019 #define TB_ISBUTTONHIDDEN (WM_USER+12)
1020 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
1021 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
1022 #define TB_SETSTATE (WM_USER+17)
1023 #define TB_GETSTATE (WM_USER+18)
1024 #define TB_ADDBITMAP (WM_USER+19)
1025
1026 typedef struct tagTBADDBITMAP {
1027 HINSTANCE hInst;
1028 UINT_PTR nID;
1029 } TBADDBITMAP,*LPTBADDBITMAP;
1030
1031 #define HINST_COMMCTRL ((HINSTANCE)-1)
1032 #define IDB_STD_SMALL_COLOR 0
1033 #define IDB_STD_LARGE_COLOR 1
1034 #define IDB_VIEW_SMALL_COLOR 4
1035 #define IDB_VIEW_LARGE_COLOR 5
1036 #define IDB_HIST_SMALL_COLOR 8
1037 #define IDB_HIST_LARGE_COLOR 9
1038
1039 #define STD_CUT 0
1040 #define STD_COPY 1
1041 #define STD_PASTE 2
1042 #define STD_UNDO 3
1043 #define STD_REDOW 4
1044 #define STD_DELETE 5
1045 #define STD_FILENEW 6
1046 #define STD_FILEOPEN 7
1047 #define STD_FILESAVE 8
1048 #define STD_PRINTPRE 9
1049 #define STD_PROPERTIES 10
1050 #define STD_HELP 11
1051 #define STD_FIND 12
1052 #define STD_REPLACE 13
1053 #define STD_PRINT 14
1054
1055 #define VIEW_LARGEICONS 0
1056 #define VIEW_SMALLICONS 1
1057 #define VIEW_LIST 2
1058 #define VIEW_DETAILS 3
1059 #define VIEW_SORTNAME 4
1060 #define VIEW_SORTSIZE 5
1061 #define VIEW_SORTDATE 6
1062 #define VIEW_SORTTYPE 7
1063 #define VIEW_PARENTFOLDER 8
1064 #define VIEW_NETCONNECT 9
1065 #define VIEW_NETDISCONNECT 10
1066 #define VIEW_NEWFOLDER 11
1067 #define VIEW_VIEWMENU 12
1068 #define HIST_BACK 0
1069 #define HIST_FORWARD 1
1070 #define HIST_FAVORITES 2
1071 #define HIST_ADDTOFAVORITES 3
1072 #define HIST_VIEWTREE 4
1073
1074 #define TB_ADDBUTTONSA (WM_USER+20)
1075 #define TB_INSERTBUTTONA (WM_USER+21)
1076 #define TB_DELETEBUTTON (WM_USER+22)
1077 #define TB_GETBUTTON (WM_USER+23)
1078 #define TB_BUTTONCOUNT (WM_USER+24)
1079 #define TB_COMMANDTOINDEX (WM_USER+25)
1080
1081 typedef struct tagTBSAVEPARAMSA {
1082 HKEY hkr;
1083 LPCSTR pszSubKey;
1084 LPCSTR pszValueName;
1085 } TBSAVEPARAMSA,*LPTBSAVEPARAMSA;
1086
1087 typedef struct tagTBSAVEPARAMSW {
1088 HKEY hkr;
1089 LPCWSTR pszSubKey;
1090 LPCWSTR pszValueName;
1091 } TBSAVEPARAMSW,*LPTBSAVEPARAMW;
1092
1093 #define TBSAVEPARAMS __MINGW_NAME_AW(TBSAVEPARAMS)
1094 #define LPTBSAVEPARAMS __MINGW_NAME_AW(LPTBSAVEPARAMS)
1095
1096 #define TB_SAVERESTOREA (WM_USER+26)
1097 #define TB_SAVERESTOREW (WM_USER+76)
1098 #define TB_CUSTOMIZE (WM_USER+27)
1099 #define TB_ADDSTRINGA (WM_USER+28)
1100 #define TB_ADDSTRINGW (WM_USER+77)
1101 #define TB_GETITEMRECT (WM_USER+29)
1102 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
1103 #define TB_SETBUTTONSIZE (WM_USER+31)
1104 #define TB_SETBITMAPSIZE (WM_USER+32)
1105 #define TB_AUTOSIZE (WM_USER+33)
1106 #define TB_GETTOOLTIPS (WM_USER+35)
1107 #define TB_SETTOOLTIPS (WM_USER+36)
1108 #define TB_SETPARENT (WM_USER+37)
1109 #define TB_SETROWS (WM_USER+39)
1110 #define TB_GETROWS (WM_USER+40)
1111 #define TB_SETCMDID (WM_USER+42)
1112 #define TB_CHANGEBITMAP (WM_USER+43)
1113 #define TB_GETBITMAP (WM_USER+44)
1114 #define TB_GETBUTTONTEXTA (WM_USER+45)
1115 #define TB_GETBUTTONTEXTW (WM_USER+75)
1116 #define TB_REPLACEBITMAP (WM_USER+46)
1117 #define TB_SETINDENT (WM_USER+47)
1118 #define TB_SETIMAGELIST (WM_USER+48)
1119 #define TB_GETIMAGELIST (WM_USER+49)
1120 #define TB_LOADIMAGES (WM_USER+50)
1121 #define TB_GETRECT (WM_USER+51)
1122 #define TB_SETHOTIMAGELIST (WM_USER+52)
1123 #define TB_GETHOTIMAGELIST (WM_USER+53)
1124 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
1125 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
1126 #define TB_SETSTYLE (WM_USER+56)
1127 #define TB_GETSTYLE (WM_USER+57)
1128 #define TB_GETBUTTONSIZE (WM_USER+58)
1129 #define TB_SETBUTTONWIDTH (WM_USER+59)
1130 #define TB_SETMAXTEXTROWS (WM_USER+60)
1131 #define TB_GETTEXTROWS (WM_USER+61)
1132
1133 #define TB_GETBUTTONTEXT __MINGW_NAME_AW(TB_GETBUTTONTEXT)
1134 #define TB_SAVERESTORE __MINGW_NAME_AW(TB_SAVERESTORE)
1135 #define TB_ADDSTRING __MINGW_NAME_AW(TB_ADDSTRING)
1136
1137 #define TB_GETOBJECT (WM_USER+62)
1138 #define TB_GETHOTITEM (WM_USER+71)
1139 #define TB_SETHOTITEM (WM_USER+72)
1140 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
1141 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
1142 #define TB_MAPACCELERATORA (WM_USER+78)
1143
1144 #define TB_SETBOUNDINGSIZE (WM_USER+93)
1145
1146 typedef struct {
1147 int iButton;
1148 DWORD dwFlags;
1149 } TBINSERTMARK,*LPTBINSERTMARK;
1150 #define TBIMHT_AFTER 0x1
1151 #define TBIMHT_BACKGROUND 0x2
1152
1153 #define TB_GETINSERTMARK (WM_USER+79)
1154 #define TB_SETINSERTMARK (WM_USER+80)
1155 #define TB_INSERTMARKHITTEST (WM_USER+81)
1156 #define TB_MOVEBUTTON (WM_USER+82)
1157 #define TB_GETMAXSIZE (WM_USER+83)
1158 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
1159 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
1160 #define TB_GETPADDING (WM_USER+86)
1161 #define TB_SETPADDING (WM_USER+87)
1162 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
1163 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
1164
1165 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1166 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1167
1168 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1169 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1170
1171 #define TB_MAPACCELERATORW (WM_USER+90)
1172
1173 #define TB_MAPACCELERATOR __MINGW_NAME_AW(TB_MAPACCELERATOR)
1174
1175 typedef struct {
1176 HINSTANCE hInstOld;
1177 UINT_PTR nIDOld;
1178 HINSTANCE hInstNew;
1179 UINT_PTR nIDNew;
1180 int nButtons;
1181 } TBREPLACEBITMAP,*LPTBREPLACEBITMAP;
1182
1183 #define TBBF_LARGE 0x1
1184
1185 #define TB_GETBITMAPFLAGS (WM_USER+41)
1186
1187 #define TBIF_IMAGE 0x1
1188 #define TBIF_TEXT 0x2
1189 #define TBIF_STATE 0x4
1190 #define TBIF_STYLE 0x8
1191 #define TBIF_LPARAM 0x10
1192 #define TBIF_COMMAND 0x20
1193 #define TBIF_SIZE 0x40
1194 #define TBIF_BYINDEX 0x80000000
1195
1196 typedef struct {
1197 UINT cbSize;
1198 DWORD dwMask;
1199 int idCommand;
1200 int iImage;
1201 BYTE fsState;
1202 BYTE fsStyle;
1203 WORD cx;
1204 DWORD_PTR lParam;
1205 LPSTR pszText;
1206 int cchText;
1207 } TBBUTTONINFOA,*LPTBBUTTONINFOA;
1208
1209 typedef struct {
1210 UINT cbSize;
1211 DWORD dwMask;
1212 int idCommand;
1213 int iImage;
1214 BYTE fsState;
1215 BYTE fsStyle;
1216 WORD cx;
1217 DWORD_PTR lParam;
1218 LPWSTR pszText;
1219 int cchText;
1220 } TBBUTTONINFOW,*LPTBBUTTONINFOW;
1221
1222 #define TBBUTTONINFO __MINGW_NAME_AW(TBBUTTONINFO)
1223 #define LPTBBUTTONINFO __MINGW_NAME_AW(LPTBBUTTONINFO)
1224
1225 #define TB_GETBUTTONINFOW (WM_USER+63)
1226 #define TB_SETBUTTONINFOW (WM_USER+64)
1227 #define TB_GETBUTTONINFOA (WM_USER+65)
1228 #define TB_SETBUTTONINFOA (WM_USER+66)
1229
1230 #define TB_GETBUTTONINFO __MINGW_NAME_AW(TB_GETBUTTONINFO)
1231 #define TB_SETBUTTONINFO __MINGW_NAME_AW(TB_SETBUTTONINFO)
1232
1233 #define TB_INSERTBUTTONW (WM_USER+67)
1234 #define TB_ADDBUTTONSW (WM_USER+68)
1235
1236 #define TB_HITTEST (WM_USER+69)
1237
1238 #define TB_INSERTBUTTON __MINGW_NAME_AW(TB_INSERTBUTTON)
1239 #define TB_ADDBUTTONS __MINGW_NAME_AW(TB_ADDBUTTONS)
1240
1241 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
1242
1243 #define TB_GETSTRINGW (WM_USER+91)
1244 #define TB_GETSTRINGA (WM_USER+92)
1245
1246 #define TB_GETSTRING __MINGW_NAME_AW(TB_GETSTRING)
1247
1248 #define TB_SETHOTITEM2 (WM_USER+94)
1249 #define TB_HASACCELERATOR (WM_USER+95)
1250 #define TB_SETLISTGAP (WM_USER+96)
1251 #define TB_GETIMAGELISTCOUNT (WM_USER+98)
1252 #define TB_GETIDEALSIZE (WM_USER+99)
1253 #define TB_TRANSLATEACCELERATOR CCM_TRANSLATEACCELERATOR
1254
1255 #define TBMF_PAD 0x1
1256 #define TBMF_BARPAD 0x2
1257 #define TBMF_BUTTONSPACING 0x4
1258
1259 typedef struct {
1260 UINT cbSize;
1261 DWORD dwMask;
1262 int cxPad;
1263 int cyPad;
1264 int cxBarPad;
1265 int cyBarPad;
1266 int cxButtonSpacing;
1267 int cyButtonSpacing;
1268 } TBMETRICS,*LPTBMETRICS;
1269
1270 #define TB_GETMETRICS (WM_USER+101)
1271 #define TB_SETMETRICS (WM_USER+102)
1272 #define TB_SETWINDOWTHEME CCM_SETWINDOWTHEME
1273
1274 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
1275 #define TBN_BEGINDRAG (TBN_FIRST-1)
1276 #define TBN_ENDDRAG (TBN_FIRST-2)
1277 #define TBN_BEGINADJUST (TBN_FIRST-3)
1278 #define TBN_ENDADJUST (TBN_FIRST-4)
1279 #define TBN_RESET (TBN_FIRST-5)
1280 #define TBN_QUERYINSERT (TBN_FIRST-6)
1281 #define TBN_QUERYDELETE (TBN_FIRST-7)
1282 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
1283 #define TBN_CUSTHELP (TBN_FIRST-9)
1284 #define TBN_DROPDOWN (TBN_FIRST - 10)
1285 #define TBN_GETOBJECT (TBN_FIRST - 12)
1286 typedef struct tagNMTBHOTITEM {
1287 NMHDR hdr;
1288 int idOld;
1289 int idNew;
1290 DWORD dwFlags;
1291 } NMTBHOTITEM,*LPNMTBHOTITEM;
1292
1293 #define HICF_OTHER 0x0
1294 #define HICF_MOUSE 0x1
1295 #define HICF_ARROWKEYS 0x2
1296 #define HICF_ACCELERATOR 0x4
1297 #define HICF_DUPACCEL 0x8
1298 #define HICF_ENTERING 0x10
1299 #define HICF_LEAVING 0x20
1300 #define HICF_RESELECT 0x40
1301 #define HICF_LMOUSE 0x80
1302 #define HICF_TOGGLEDROPDOWN 0x100
1303
1304 #define TBN_HOTITEMCHANGE (TBN_FIRST - 13)
1305 #define TBN_DRAGOUT (TBN_FIRST - 14)
1306 #define TBN_DELETINGBUTTON (TBN_FIRST - 15)
1307 #define TBN_GETDISPINFOA (TBN_FIRST - 16)
1308 #define TBN_GETDISPINFOW (TBN_FIRST - 17)
1309 #define TBN_GETINFOTIPA (TBN_FIRST - 18)
1310 #define TBN_GETINFOTIPW (TBN_FIRST - 19)
1311 #define TBN_GETBUTTONINFOW (TBN_FIRST - 20)
1312 #define TBN_RESTORE (TBN_FIRST - 21)
1313 #define TBN_SAVE (TBN_FIRST - 22)
1314 #define TBN_INITCUSTOMIZE (TBN_FIRST - 23)
1315 #define TBN_WRAPHOTITEM (TBN_FIRST - 24)
1316 #define TBN_DUPACCELERATOR (TBN_FIRST - 25)
1317 #define TBN_WRAPACCELERATOR (TBN_FIRST - 26)
1318 #define TBN_DRAGOVER (TBN_FIRST - 27)
1319 #define TBN_MAPACCELERATOR (TBN_FIRST - 28)
1320 #define TBNRF_HIDEHELP 0x1
1321 #define TBNRF_ENDCUSTOMIZE 0x2
1322
1323 typedef struct tagNMTBSAVE {
1324 NMHDR hdr;
1325 DWORD *pData;
1326 DWORD *pCurrent;
1327 UINT cbData;
1328 int iItem;
1329 int cButtons;
1330 TBBUTTON tbButton;
1331 } NMTBSAVE,*LPNMTBSAVE;
1332
1333 typedef struct tagNMTBRESTORE {
1334 NMHDR hdr;
1335 DWORD *pData;
1336 DWORD *pCurrent;
1337 UINT cbData;
1338 int iItem;
1339 int cButtons;
1340 int cbBytesPerRecord;
1341 TBBUTTON tbButton;
1342 } NMTBRESTORE,*LPNMTBRESTORE;
1343
1344 typedef struct tagNMTBGETINFOTIPA {
1345 NMHDR hdr;
1346 LPSTR pszText;
1347 int cchTextMax;
1348 int iItem;
1349 LPARAM lParam;
1350 } NMTBGETINFOTIPA,*LPNMTBGETINFOTIPA;
1351
1352 typedef struct tagNMTBGETINFOTIPW {
1353 NMHDR hdr;
1354 LPWSTR pszText;
1355 int cchTextMax;
1356 int iItem;
1357 LPARAM lParam;
1358 } NMTBGETINFOTIPW,*LPNMTBGETINFOTIPW;
1359
1360 #define TBN_GETINFOTIP __MINGW_NAME_AW(TBN_GETINFOTIP)
1361 #define NMTBGETINFOTIP __MINGW_NAME_AW(NMTBGETINFOTIP)
1362 #define LPNMTBGETINFOTIP __MINGW_NAME_AW(LPNMTBGETINFOTIP)
1363
1364 #define TBNF_IMAGE 0x1
1365 #define TBNF_TEXT 0x2
1366 #define TBNF_DI_SETITEM 0x10000000
1367
1368 typedef struct {
1369 NMHDR hdr;
1370 DWORD dwMask;
1371 int idCommand;
1372 DWORD_PTR lParam;
1373 int iImage;
1374 LPSTR pszText;
1375 int cchText;
1376 } NMTBDISPINFOA,*LPNMTBDISPINFOA;
1377
1378 typedef struct {
1379 NMHDR hdr;
1380 DWORD dwMask;
1381 int idCommand;
1382 DWORD_PTR lParam;
1383 int iImage;
1384 LPWSTR pszText;
1385 int cchText;
1386 } NMTBDISPINFOW,*LPNMTBDISPINFOW;
1387
1388 #define TBN_GETDISPINFO __MINGW_NAME_AW(TBN_GETDISPINFO)
1389 #define NMTBDISPINFO __MINGW_NAME_AW(NMTBDISPINFO)
1390 #define LPNMTBDISPINFO __MINGW_NAME_AW(LPNMTBDISPINFO)
1391
1392 #define TBDDRET_DEFAULT 0
1393 #define TBDDRET_NODEFAULT 1
1394 #define TBDDRET_TREATPRESSED 2
1395
1396 #define TBN_GETBUTTONINFO __MINGW_NAME_AW(TBN_GETBUTTONINFO)
1397
1398 #define TBNOTIFYA NMTOOLBARA
1399 #define TBNOTIFYW NMTOOLBARW
1400 #define LPTBNOTIFYA LPNMTOOLBARA
1401 #define LPTBNOTIFYW LPNMTOOLBARW
1402
1403 #define TBNOTIFY NMTOOLBAR
1404 #define LPTBNOTIFY LPNMTOOLBAR
1405
1406 typedef struct tagNMTOOLBARA {
1407 NMHDR hdr;
1408 int iItem;
1409 TBBUTTON tbButton;
1410 int cchText;
1411 LPSTR pszText;
1412 RECT rcButton;
1413 } NMTOOLBARA,*LPNMTOOLBARA;
1414
1415 typedef struct tagNMTOOLBARW {
1416 NMHDR hdr;
1417 int iItem;
1418 TBBUTTON tbButton;
1419 int cchText;
1420 LPWSTR pszText;
1421 RECT rcButton;
1422 } NMTOOLBARW,*LPNMTOOLBARW;
1423
1424 #define NMTOOLBAR __MINGW_NAME_AW(NMTOOLBAR)
1425 #define LPNMTOOLBAR __MINGW_NAME_AW(LPNMTOOLBAR)
1426
1427 #endif /* !NOTOOLBAR */
1428
1429 #ifndef NOREBAR
1430
1431 #define REBARCLASSNAMEW L"ReBarWindow32"
1432 #define REBARCLASSNAMEA "ReBarWindow32"
1433
1434 #define REBARCLASSNAME __MINGW_NAME_AW(REBARCLASSNAME)
1435
1436 #define RBIM_IMAGELIST 0x1
1437
1438 #define RBS_TOOLTIPS 0x100
1439 #define RBS_VARHEIGHT 0x200
1440 #define RBS_BANDBORDERS 0x400
1441 #define RBS_FIXEDORDER 0x800
1442 #define RBS_REGISTERDROP 0x1000
1443 #define RBS_AUTOSIZE 0x2000
1444 #define RBS_VERTICALGRIPPER 0x4000
1445 #define RBS_DBLCLKTOGGLE 0x8000
1446
1447 typedef struct tagREBARINFO {
1448 UINT cbSize;
1449 UINT fMask;
1450 #ifndef NOIMAGEAPIS
1451 HIMAGELIST himl;
1452 #else
1453 HANDLE himl;
1454 #endif
1455 } REBARINFO,*LPREBARINFO;
1456
1457 #define RBBS_BREAK 0x1
1458 #define RBBS_FIXEDSIZE 0x2
1459 #define RBBS_CHILDEDGE 0x4
1460 #define RBBS_HIDDEN 0x8
1461 #define RBBS_NOVERT 0x10
1462 #define RBBS_FIXEDBMP 0x20
1463 #define RBBS_VARIABLEHEIGHT 0x40
1464 #define RBBS_GRIPPERALWAYS 0x80
1465 #define RBBS_NOGRIPPER 0x100
1466 #define RBBS_USECHEVRON 0x200
1467 #define RBBS_HIDETITLE 0x400
1468 #define RBBS_TOPALIGN 0x800
1469
1470 #define RBBIM_STYLE 0x1
1471 #define RBBIM_COLORS 0x2
1472 #define RBBIM_TEXT 0x4
1473 #define RBBIM_IMAGE 0x8
1474 #define RBBIM_CHILD 0x10
1475 #define RBBIM_CHILDSIZE 0x20
1476 #define RBBIM_SIZE 0x40
1477 #define RBBIM_BACKGROUND 0x80
1478 #define RBBIM_ID 0x100
1479 #define RBBIM_IDEALSIZE 0x200
1480 #define RBBIM_LPARAM 0x400
1481 #define RBBIM_HEADERSIZE 0x800
1482
1483 typedef struct tagREBARBANDINFOA {
1484 UINT cbSize;
1485 UINT fMask;
1486 UINT fStyle;
1487 COLORREF clrFore;
1488 COLORREF clrBack;
1489 LPSTR lpText;
1490 UINT cch;
1491 int iImage;
1492 HWND hwndChild;
1493 UINT cxMinChild;
1494 UINT cyMinChild;
1495 UINT cx;
1496 HBITMAP hbmBack;
1497 UINT wID;
1498 UINT cyChild;
1499 UINT cyMaxChild;
1500 UINT cyIntegral;
1501 UINT cxIdeal;
1502 LPARAM lParam;
1503 UINT cxHeader;
1504 } REBARBANDINFOA,*LPREBARBANDINFOA;
1505 typedef REBARBANDINFOA CONST *LPCREBARBANDINFOA;
1506
1507 #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA,wID)
1508 #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW,wID)
1509 #define REBARBANDINFOA_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA,cxHeader)
1510 #define REBARBANDINFOW_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW,cxHeader)
1511
1512 typedef struct tagREBARBANDINFOW {
1513 UINT cbSize;
1514 UINT fMask;
1515 UINT fStyle;
1516 COLORREF clrFore;
1517 COLORREF clrBack;
1518 LPWSTR lpText;
1519 UINT cch;
1520 int iImage;
1521 HWND hwndChild;
1522 UINT cxMinChild;
1523 UINT cyMinChild;
1524 UINT cx;
1525 HBITMAP hbmBack;
1526 UINT wID;
1527 UINT cyChild;
1528 UINT cyMaxChild;
1529 UINT cyIntegral;
1530 UINT cxIdeal;
1531 LPARAM lParam;
1532 UINT cxHeader;
1533 } REBARBANDINFOW,*LPREBARBANDINFOW;
1534
1535 typedef REBARBANDINFOW CONST *LPCREBARBANDINFOW;
1536
1537 #define REBARBANDINFO __MINGW_NAME_AW(REBARBANDINFO)
1538 #define LPREBARBANDINFO __MINGW_NAME_AW(LPREBARBANDINFO)
1539 #define LPCREBARBANDINFO __MINGW_NAME_AW(LPCREBARBANDINFO)
1540
1541 #define REBARBANDINFO_V3_SIZE __MINGW_NAME_AW_EXT(REBARBANDINFO,_V3_SIZE)
1542
1543 #define RB_INSERTBANDA (WM_USER+1)
1544 #define RB_DELETEBAND (WM_USER+2)
1545 #define RB_GETBARINFO (WM_USER+3)
1546 #define RB_SETBARINFO (WM_USER+4)
1547 #define RB_SETBANDINFOA (WM_USER+6)
1548 #define RB_SETPARENT (WM_USER+7)
1549 #define RB_HITTEST (WM_USER+8)
1550 #define RB_GETRECT (WM_USER+9)
1551 #define RB_INSERTBANDW (WM_USER+10)
1552 #define RB_SETBANDINFOW (WM_USER+11)
1553 #define RB_GETBANDCOUNT (WM_USER+12)
1554 #define RB_GETROWCOUNT (WM_USER+13)
1555 #define RB_GETROWHEIGHT (WM_USER+14)
1556 #define RB_IDTOINDEX (WM_USER+16)
1557 #define RB_GETTOOLTIPS (WM_USER+17)
1558 #define RB_SETTOOLTIPS (WM_USER+18)
1559 #define RB_SETBKCOLOR (WM_USER+19)
1560 #define RB_GETBKCOLOR (WM_USER+20)
1561 #define RB_SETTEXTCOLOR (WM_USER+21)
1562 #define RB_GETTEXTCOLOR (WM_USER+22)
1563
1564 #define RBSTR_CHANGERECT 0x1
1565
1566 #define RB_SIZETORECT (WM_USER+23)
1567 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1568 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1569
1570 #define RB_INSERTBAND __MINGW_NAME_AW(RB_INSERTBAND)
1571 #define RB_SETBANDINFO __MINGW_NAME_AW(RB_SETBANDINFO)
1572
1573 #define RB_BEGINDRAG (WM_USER+24)
1574 #define RB_ENDDRAG (WM_USER+25)
1575 #define RB_DRAGMOVE (WM_USER+26)
1576 #define RB_GETBARHEIGHT (WM_USER+27)
1577 #define RB_GETBANDINFOW (WM_USER+28)
1578 #define RB_GETBANDINFOA (WM_USER+29)
1579
1580 #define RB_GETBANDINFO __MINGW_NAME_AW(RB_GETBANDINFO)
1581
1582 #define RB_MINIMIZEBAND (WM_USER+30)
1583 #define RB_MAXIMIZEBAND (WM_USER+31)
1584 #define RB_GETDROPTARGET (CCM_GETDROPTARGET)
1585 #define RB_GETBANDBORDERS (WM_USER+34)
1586 #define RB_SHOWBAND (WM_USER+35)
1587 #define RB_SETPALETTE (WM_USER+37)
1588 #define RB_GETPALETTE (WM_USER+38)
1589 #define RB_MOVEBAND (WM_USER+39)
1590 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1591 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1592 #define RB_GETBANDMARGINS (WM_USER+40)
1593 #define RB_SETWINDOWTHEME CCM_SETWINDOWTHEME
1594 #define RB_PUSHCHEVRON (WM_USER+43)
1595
1596 #define RBN_HEIGHTCHANGE (RBN_FIRST - 0)
1597 #define RBN_GETOBJECT (RBN_FIRST - 1)
1598 #define RBN_LAYOUTCHANGED (RBN_FIRST - 2)
1599 #define RBN_AUTOSIZE (RBN_FIRST - 3)
1600 #define RBN_BEGINDRAG (RBN_FIRST - 4)
1601 #define RBN_ENDDRAG (RBN_FIRST - 5)
1602 #define RBN_DELETINGBAND (RBN_FIRST - 6)
1603 #define RBN_DELETEDBAND (RBN_FIRST - 7)
1604 #define RBN_CHILDSIZE (RBN_FIRST - 8)
1605 #define RBN_CHEVRONPUSHED (RBN_FIRST - 10)
1606 #define RBN_MINMAX (RBN_FIRST - 21)
1607 #define RBN_AUTOBREAK (RBN_FIRST - 22)
1608
1609 typedef struct tagNMREBARCHILDSIZE {
1610 NMHDR hdr;
1611 UINT uBand;
1612 UINT wID;
1613 RECT rcChild;
1614 RECT rcBand;
1615 } NMREBARCHILDSIZE,*LPNMREBARCHILDSIZE;
1616
1617 typedef struct tagNMREBAR {
1618 NMHDR hdr;
1619 DWORD dwMask;
1620 UINT uBand;
1621 UINT fStyle;
1622 UINT wID;
1623 LPARAM lParam;
1624 } NMREBAR,*LPNMREBAR;
1625
1626 #define RBNM_ID 0x1
1627 #define RBNM_STYLE 0x2
1628 #define RBNM_LPARAM 0x4
1629
1630 typedef struct tagNMRBAUTOSIZE {
1631 NMHDR hdr;
1632 BOOL fChanged;
1633 RECT rcTarget;
1634 RECT rcActual;
1635 } NMRBAUTOSIZE,*LPNMRBAUTOSIZE;
1636
1637 typedef struct tagNMREBARCHEVRON {
1638 NMHDR hdr;
1639 UINT uBand;
1640 UINT wID;
1641 LPARAM lParam;
1642 RECT rc;
1643 LPARAM lParamNM;
1644 } NMREBARCHEVRON,*LPNMREBARCHEVRON;
1645
1646 #define RBAB_AUTOSIZE 0x1
1647 #define RBAB_ADDBAND 0x2
1648
1649 typedef struct tagNMREBARAUTOBREAK {
1650 NMHDR hdr;
1651 UINT uBand;
1652 UINT wID;
1653 LPARAM lParam;
1654 UINT uMsg;
1655 UINT fStyleCurrent;
1656 BOOL fAutoBreak;
1657 } NMREBARAUTOBREAK,*LPNMREBARAUTOBREAK;
1658
1659 #define RBHT_NOWHERE 0x1
1660 #define RBHT_CAPTION 0x2
1661 #define RBHT_CLIENT 0x3
1662 #define RBHT_GRABBER 0x4
1663 #define RBHT_CHEVRON 0x8
1664
1665 typedef struct _RB_HITTESTINFO {
1666 POINT pt;
1667 UINT flags;
1668 int iBand;
1669 } RBHITTESTINFO,*LPRBHITTESTINFO;
1670
1671 #endif /* !NOREBAR */
1672
1673 #ifndef NOTOOLTIPS
1674
1675 #define TOOLTIPS_CLASSW L"tooltips_class32"
1676 #define TOOLTIPS_CLASSA "tooltips_class32"
1677
1678 #define TOOLTIPS_CLASS __MINGW_NAME_AW(TOOLTIPS_CLASS)
1679
1680 #define LPTOOLINFOA LPTTTOOLINFOA
1681 #define LPTOOLINFOW LPTTTOOLINFOW
1682 #define TOOLINFOA TTTOOLINFOA
1683 #define TOOLINFOW TTTOOLINFOW
1684
1685 #define LPTOOLINFO LPTTTOOLINFO
1686 #define TOOLINFO TTTOOLINFO
1687
1688 #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA,lpszText)
1689 #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW,lpszText)
1690 #define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA,lParam)
1691 #define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW,lParam)
1692 #define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA,lpReserved)
1693 #define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW,lpReserved)
1694
1695 typedef struct tagTOOLINFOA {
1696 UINT cbSize;
1697 UINT uFlags;
1698 HWND hwnd;
1699 UINT_PTR uId;
1700 RECT rect;
1701 HINSTANCE hinst;
1702 LPSTR lpszText;
1703 LPARAM lParam;
1704 void *lpReserved;
1705 } TTTOOLINFOA,NEAR *PTOOLINFOA,*LPTTTOOLINFOA;
1706
1707 typedef struct tagTOOLINFOW {
1708 UINT cbSize;
1709 UINT uFlags;
1710 HWND hwnd;
1711 UINT_PTR uId;
1712 RECT rect;
1713 HINSTANCE hinst;
1714 LPWSTR lpszText;
1715 LPARAM lParam;
1716 void *lpReserved;
1717 } TTTOOLINFOW,NEAR *PTOOLINFOW,*LPTTTOOLINFOW;
1718
1719 #define TTTOOLINFO __MINGW_NAME_AW(TTTOOLINFO)
1720 #define PTOOLINFO __MINGW_NAME_AW(PTOOLINFO)
1721 #define LPTTTOOLINFO __MINGW_NAME_AW(LPTTTOOLINFO)
1722
1723 #define TTTOOLINFO_V1_SIZE __MINGW_NAME_AW_EXT(TTTOOLINFO,_V1_SIZE)
1724
1725 #define TTS_ALWAYSTIP 0x1
1726 #define TTS_NOPREFIX 0x2
1727 #define TTS_NOANIMATE 0x10
1728 #define TTS_NOFADE 0x20
1729 #define TTS_BALLOON 0x40
1730 #define TTS_CLOSE 0x80
1731
1732 #define TTF_IDISHWND 0x1
1733 #define TTF_CENTERTIP 0x2
1734 #define TTF_RTLREADING 0x4
1735 #define TTF_SUBCLASS 0x10
1736 #define TTF_TRACK 0x20
1737 #define TTF_ABSOLUTE 0x80
1738 #define TTF_TRANSPARENT 0x100
1739 #define TTF_PARSELINKS 0x1000
1740 #define TTF_DI_SETITEM 0x8000
1741
1742 #define TTDT_AUTOMATIC 0
1743 #define TTDT_RESHOW 1
1744 #define TTDT_AUTOPOP 2
1745 #define TTDT_INITIAL 3
1746
1747 #define TTI_NONE 0
1748 #define TTI_INFO 1
1749 #define TTI_WARNING 2
1750 #define TTI_ERROR 3
1751
1752 #define TTM_ACTIVATE (WM_USER+1)
1753 #define TTM_SETDELAYTIME (WM_USER+3)
1754 #define TTM_ADDTOOLA (WM_USER+4)
1755 #define TTM_ADDTOOLW (WM_USER+50)
1756 #define TTM_DELTOOLA (WM_USER+5)
1757 #define TTM_DELTOOLW (WM_USER+51)
1758 #define TTM_NEWTOOLRECTA (WM_USER+6)
1759 #define TTM_NEWTOOLRECTW (WM_USER+52)
1760 #define TTM_RELAYEVENT (WM_USER+7)
1761
1762 #define TTM_GETTOOLINFOA (WM_USER+8)
1763 #define TTM_GETTOOLINFOW (WM_USER+53)
1764
1765 #define TTM_SETTOOLINFOA (WM_USER+9)
1766 #define TTM_SETTOOLINFOW (WM_USER+54)
1767
1768 #define TTM_HITTESTA (WM_USER +10)
1769 #define TTM_HITTESTW (WM_USER +55)
1770 #define TTM_GETTEXTA (WM_USER +11)
1771 #define TTM_GETTEXTW (WM_USER +56)
1772 #define TTM_UPDATETIPTEXTA (WM_USER +12)
1773 #define TTM_UPDATETIPTEXTW (WM_USER +57)
1774 #define TTM_GETTOOLCOUNT (WM_USER +13)
1775 #define TTM_ENUMTOOLSA (WM_USER +14)
1776 #define TTM_ENUMTOOLSW (WM_USER +58)
1777 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1778 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1779 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1780 #define TTM_TRACKACTIVATE (WM_USER+17)
1781 #define TTM_TRACKPOSITION (WM_USER+18)
1782 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1783 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1784 #define TTM_GETDELAYTIME (WM_USER+21)
1785 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1786 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1787 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1788 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1789 #define TTM_SETMARGIN (WM_USER+26)
1790 #define TTM_GETMARGIN (WM_USER+27)
1791 #define TTM_POP (WM_USER+28)
1792 #define TTM_UPDATE (WM_USER+29)
1793 #define TTM_GETBUBBLESIZE (WM_USER+30)
1794 #define TTM_ADJUSTRECT (WM_USER+31)
1795 #define TTM_SETTITLEA (WM_USER+32)
1796 #define TTM_SETTITLEW (WM_USER+33)
1797
1798 #define TTM_POPUP (WM_USER+34)
1799 #define TTM_GETTITLE (WM_USER+35)
1800 typedef struct _TTGETTITLE {
1801 DWORD dwSize;
1802 UINT uTitleBitmap;
1803 UINT cch;
1804 WCHAR *pszTitle;
1805 } TTGETTITLE,*PTTGETTITLE;
1806
1807 #define TTM_ADDTOOL __MINGW_NAME_AW(TTM_ADDTOOL)
1808 #define TTM_DELTOOL __MINGW_NAME_AW(TTM_DELTOOL)
1809 #define TTM_NEWTOOLRECT __MINGW_NAME_AW(TTM_NEWTOOLRECT)
1810 #define TTM_GETTOOLINFO __MINGW_NAME_AW(TTM_GETTOOLINFO)
1811 #define TTM_SETTOOLINFO __MINGW_NAME_AW(TTM_SETTOOLINFO)
1812 #define TTM_HITTEST __MINGW_NAME_AW(TTM_HITTEST)
1813 #define TTM_GETTEXT __MINGW_NAME_AW(TTM_GETTEXT)
1814 #define TTM_UPDATETIPTEXT __MINGW_NAME_AW(TTM_UPDATETIPTEXT)
1815 #define TTM_ENUMTOOLS __MINGW_NAME_AW(TTM_ENUMTOOLS)
1816 #define TTM_GETCURRENTTOOL __MINGW_NAME_AW(TTM_GETCURRENTTOOL)
1817 #define TTM_SETTITLE __MINGW_NAME_AW(TTM_SETTITLE)
1818
1819 #define TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME
1820
1821 #define LPHITTESTINFOW LPTTHITTESTINFOW
1822 #define LPHITTESTINFOA LPTTHITTESTINFOA
1823 #define LPHITTESTINFO LPTTHITTESTINFO
1824
1825 typedef struct _TT_HITTESTINFOA {
1826 HWND hwnd;
1827 POINT pt;
1828 TTTOOLINFOA ti;
1829 } TTHITTESTINFOA,*LPTTHITTESTINFOA;
1830
1831 typedef struct _TT_HITTESTINFOW {
1832 HWND hwnd;
1833 POINT pt;
1834 TTTOOLINFOW ti;
1835 } TTHITTESTINFOW,*LPTTHITTESTINFOW;
1836
1837 #define TTHITTESTINFO __MINGW_NAME_AW(TTHITTESTINFO)
1838 #define LPTTHITTESTINFO __MINGW_NAME_AW(LPTTHITTESTINFO)
1839
1840 #define TTN_GETDISPINFOA (TTN_FIRST - 0)
1841 #define TTN_GETDISPINFOW (TTN_FIRST - 10)
1842 #define TTN_SHOW (TTN_FIRST - 1)
1843 #define TTN_POP (TTN_FIRST - 2)
1844 #define TTN_LINKCLICK (TTN_FIRST - 3)
1845
1846 #define TTN_GETDISPINFO __MINGW_NAME_AW(TTN_GETDISPINFO)
1847
1848 #define TTN_NEEDTEXT TTN_GETDISPINFO
1849 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1850 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1851
1852 #define TOOLTIPTEXTW NMTTDISPINFOW
1853 #define TOOLTIPTEXTA NMTTDISPINFOA
1854 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1855 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1856
1857 #define TOOLTIPTEXT NMTTDISPINFO
1858 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1859
1860 #define NMTTDISPINFOA_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOA,uFlags)
1861 #define NMTTDISPINFOW_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOW,uFlags)
1862
1863 typedef struct tagNMTTDISPINFOA {
1864 NMHDR hdr;
1865 LPSTR lpszText;
1866 char szText[80];
1867 HINSTANCE hinst;
1868 UINT uFlags;
1869 LPARAM lParam;
1870 } NMTTDISPINFOA,*LPNMTTDISPINFOA;
1871
1872 typedef struct tagNMTTDISPINFOW {
1873 NMHDR hdr;
1874 LPWSTR lpszText;
1875 WCHAR szText[80];
1876 HINSTANCE hinst;
1877 UINT uFlags;
1878 LPARAM lParam;
1879 } NMTTDISPINFOW,*LPNMTTDISPINFOW;
1880
1881
1882 #define NMTTDISPINFO __MINGW_NAME_AW(NMTTDISPINFO)
1883 #define LPNMTTDISPINFO __MINGW_NAME_AW(LPNMTTDISPINFO)
1884
1885 #define NMTTDISPINFO_V1_SIZE __MINGW_NAME_AW_EXT(NMTTDISPINFO,_V1_SIZE)
1886
1887 #endif /* !NOTOOLTIPS */
1888
1889 #ifndef NOSTATUSBAR
1890
1891 #define SBARS_SIZEGRIP 0x100
1892 #define SBARS_TOOLTIPS 0x800
1893 #define SBT_TOOLTIPS 0x800
1894
1895 WINCOMMCTRLAPI void WINAPI DrawStatusTextA(HDC hDC,LPCRECT lprc,LPCSTR pszText,UINT uFlags);
1896 WINCOMMCTRLAPI void WINAPI DrawStatusTextW(HDC hDC,LPCRECT lprc,LPCWSTR pszText,UINT uFlags);
1897
1898 WINCOMMCTRLAPI HWND WINAPI CreateStatusWindowA(LONG style,LPCSTR lpszText,HWND hwndParent,UINT wID);
1899 WINCOMMCTRLAPI HWND WINAPI CreateStatusWindowW(LONG style,LPCWSTR lpszText,HWND hwndParent,UINT wID);
1900
1901 #define CreateStatusWindow __MINGW_NAME_AW(CreateStatusWindow)
1902 #define DrawStatusText __MINGW_NAME_AW(DrawStatusText)
1903
1904 #define STATUSCLASSNAMEW L"msctls_statusbar32"
1905 #define STATUSCLASSNAMEA "msctls_statusbar32"
1906
1907 #define STATUSCLASSNAME __MINGW_NAME_AW(STATUSCLASSNAME)
1908
1909 #define SB_SETTEXTA (WM_USER+1)
1910 #define SB_SETTEXTW (WM_USER+11)
1911 #define SB_GETTEXTA (WM_USER+2)
1912 #define SB_GETTEXTW (WM_USER+13)
1913 #define SB_GETTEXTLENGTHA (WM_USER+3)
1914 #define SB_GETTEXTLENGTHW (WM_USER+12)
1915
1916 #define SB_GETTEXT __MINGW_NAME_AW(SB_GETTEXT)
1917 #define SB_SETTEXT __MINGW_NAME_AW(SB_SETTEXT)
1918 #define SB_GETTEXTLENGTH __MINGW_NAME_AW(SB_GETTEXTLENGTH)
1919 #define SB_SETTIPTEXT __MINGW_NAME_AW(SB_SETTIPTEXT)
1920 #define SB_GETTIPTEXT __MINGW_NAME_AW(SB_GETTIPTEXT)
1921
1922 #define SB_SETPARTS (WM_USER+4)
1923 #define SB_GETPARTS (WM_USER+6)
1924 #define SB_GETBORDERS (WM_USER+7)
1925 #define SB_SETMINHEIGHT (WM_USER+8)
1926 #define SB_SIMPLE (WM_USER+9)
1927 #define SB_GETRECT (WM_USER+10)
1928 #define SB_ISSIMPLE (WM_USER+14)
1929 #define SB_SETICON (WM_USER+15)
1930 #define SB_SETTIPTEXTA (WM_USER+16)
1931 #define SB_SETTIPTEXTW (WM_USER+17)
1932 #define SB_GETTIPTEXTA (WM_USER+18)
1933 #define SB_GETTIPTEXTW (WM_USER+19)
1934 #define SB_GETICON (WM_USER+20)
1935 #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1936 #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1937
1938 #define SBT_OWNERDRAW 0x1000
1939 #define SBT_NOBORDERS 0x100
1940 #define SBT_POPOUT 0x200
1941 #define SBT_RTLREADING 0x400
1942 #define SBT_NOTABPARSING 0x800
1943
1944 #define SB_SETBKCOLOR CCM_SETBKCOLOR
1945
1946 #define SBN_SIMPLEMODECHANGE (SBN_FIRST - 0)
1947
1948 #define SB_SIMPLEID 0xff
1949
1950 #endif /* !NOSTATUSBAR */
1951
1952 #ifndef NOMENUHELP
1953
1954 WINCOMMCTRLAPI void WINAPI MenuHelp(UINT uMsg,WPARAM wParam,LPARAM lParam,HMENU hMainMenu,HINSTANCE hInst,HWND hwndStatus,UINT *lpwIDs);
1955
1956 WINCOMMCTRLAPI
1957 BOOL
1958 WINAPI
1959 ShowHideMenuCtl(
1960 _In_ HWND hWnd,
1961 _In_ UINT_PTR uFlags,
1962 _In_z_ LPINT lpInfo);
1963
1964 WINCOMMCTRLAPI
1965 void
1966 WINAPI
1967 GetEffectiveClientRect(
1968 _In_ HWND hWnd,
1969 _Out_ LPRECT lprc,
1970 _In_z_ const INT *lpInfo);
1971
1972 #define MINSYSCOMMAND SC_SIZE
1973
1974 #endif /* !NOMENUHELP */
1975
1976 #ifndef NOTRACKBAR
1977
1978 #define TRACKBAR_CLASSA "msctls_trackbar32"
1979 #define TRACKBAR_CLASSW L"msctls_trackbar32"
1980
1981 #define TRACKBAR_CLASS __MINGW_NAME_AW(TRACKBAR_CLASS)
1982
1983 #define TBS_AUTOTICKS 0x1
1984 #define TBS_VERT 0x2
1985 #define TBS_HORZ 0x0
1986 #define TBS_TOP 0x4
1987 #define TBS_BOTTOM 0x0
1988 #define TBS_LEFT 0x4
1989 #define TBS_RIGHT 0x0
1990 #define TBS_BOTH 0x8
1991 #define TBS_NOTICKS 0x10
1992 #define TBS_ENABLESELRANGE 0x20
1993 #define TBS_FIXEDLENGTH 0x40
1994 #define TBS_NOTHUMB 0x80
1995 #define TBS_TOOLTIPS 0x100
1996 #define TBS_REVERSED 0x200
1997 #define TBS_DOWNISLEFT 0x400
1998
1999 #define TBM_GETPOS (WM_USER)
2000 #define TBM_GETRANGEMIN (WM_USER+1)
2001 #define TBM_GETRANGEMAX (WM_USER+2)
2002 #define TBM_GETTIC (WM_USER+3)
2003 #define TBM_SETTIC (WM_USER+4)
2004 #define TBM_SETPOS (WM_USER+5)
2005 #define TBM_SETRANGE (WM_USER+6)
2006 #define TBM_SETRANGEMIN (WM_USER+7)
2007 #define TBM_SETRANGEMAX (WM_USER+8)
2008 #define TBM_CLEARTICS (WM_USER+9)
2009 #define TBM_SETSEL (WM_USER+10)
2010 #define TBM_SETSELSTART (WM_USER+11)
2011 #define TBM_SETSELEND (WM_USER+12)
2012 #define TBM_GETPTICS (WM_USER+14)
2013 #define TBM_GETTICPOS (WM_USER+15)
2014 #define TBM_GETNUMTICS (WM_USER+16)
2015 #define TBM_GETSELSTART (WM_USER+17)
2016 #define TBM_GETSELEND (WM_USER+18)
2017 #define TBM_CLEARSEL (WM_USER+19)
2018 #define TBM_SETTICFREQ (WM_USER+20)
2019 #define TBM_SETPAGESIZE (WM_USER+21)
2020 #define TBM_GETPAGESIZE (WM_USER+22)
2021 #define TBM_SETLINESIZE (WM_USER+23)
2022 #define TBM_GETLINESIZE (WM_USER+24)
2023 #define TBM_GETTHUMBRECT (WM_USER+25)
2024 #define TBM_GETCHANNELRECT (WM_USER+26)
2025 #define TBM_SETTHUMBLENGTH (WM_USER+27)
2026 #define TBM_GETTHUMBLENGTH (WM_USER+28)
2027 #define TBM_SETTOOLTIPS (WM_USER+29)
2028 #define TBM_GETTOOLTIPS (WM_USER+30)
2029 #define TBM_SETTIPSIDE (WM_USER+31)
2030
2031 #define TBTS_TOP 0
2032 #define TBTS_LEFT 1
2033 #define TBTS_BOTTOM 2
2034 #define TBTS_RIGHT 3
2035
2036 #define TBM_SETBUDDY (WM_USER+32)
2037 #define TBM_GETBUDDY (WM_USER+33)
2038 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2039 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2040
2041 #define TB_LINEUP 0
2042 #define TB_LINEDOWN 1
2043 #define TB_PAGEUP 2
2044 #define TB_PAGEDOWN 3
2045 #define TB_THUMBPOSITION 4
2046 #define TB_THUMBTRACK 5
2047 #define TB_TOP 6
2048 #define TB_BOTTOM 7
2049 #define TB_ENDTRACK 8
2050
2051 #define TBCD_TICS 0x1
2052 #define TBCD_THUMB 0x2
2053 #define TBCD_CHANNEL 0x3
2054
2055 #endif /* !NOTRACKBAR */
2056
2057 #ifndef NODRAGLIST
2058
2059 typedef struct tagDRAGLISTINFO {
2060 UINT uNotification;
2061 HWND hWnd;
2062 POINT ptCursor;
2063 } DRAGLISTINFO,*LPDRAGLISTINFO;
2064
2065 #define DL_BEGINDRAG (WM_USER+133)
2066 #define DL_DRAGGING (WM_USER+134)
2067 #define DL_DROPPED (WM_USER+135)
2068 #define DL_CANCELDRAG (WM_USER+136)
2069
2070 #define DL_CURSORSET 0
2071 #define DL_STOPCURSOR 1
2072 #define DL_COPYCURSOR 2
2073 #define DL_MOVECURSOR 3
2074
2075 #define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
2076
2077 WINCOMMCTRLAPI BOOL WINAPI MakeDragList(HWND hLB);
2078 WINCOMMCTRLAPI void WINAPI DrawInsert(HWND handParent,HWND hLB,int nItem);
2079
2080 WINCOMMCTRLAPI int WINAPI LBItemFromPt(HWND hLB,POINT pt,BOOL bAutoScroll);
2081
2082 #endif /* !NODRAGLIST */
2083
2084 #ifndef NOUPDOWN
2085
2086 #define UPDOWN_CLASSA "msctls_updown32"
2087 #define UPDOWN_CLASSW L"msctls_updown32"
2088
2089 #define UPDOWN_CLASS __MINGW_NAME_AW(UPDOWN_CLASS)
2090
2091 typedef struct _UDACCEL {
2092 UINT nSec;
2093 UINT nInc;
2094 } UDACCEL,*LPUDACCEL;
2095
2096 #define UD_MAXVAL 0x7fff
2097 #define UD_MINVAL (-UD_MAXVAL)
2098
2099 #define UDS_WRAP 0x1
2100 #define UDS_SETBUDDYINT 0x2
2101 #define UDS_ALIGNRIGHT 0x4
2102 #define UDS_ALIGNLEFT 0x8
2103 #define UDS_AUTOBUDDY 0x10
2104 #define UDS_ARROWKEYS 0x20
2105 #define UDS_HORZ 0x40
2106 #define UDS_NOTHOUSANDS 0x80
2107 #define UDS_HOTTRACK 0x100
2108
2109 #define UDM_SETRANGE (WM_USER+101)
2110 #define UDM_GETRANGE (WM_USER+102)
2111 #define UDM_SETPOS (WM_USER+103)
2112 #define UDM_GETPOS (WM_USER+104)
2113 #define UDM_SETBUDDY (WM_USER+105)
2114 #define UDM_GETBUDDY (WM_USER+106)
2115 #define UDM_SETACCEL (WM_USER+107)
2116 #define UDM_GETACCEL (WM_USER+108)
2117 #define UDM_SETBASE (WM_USER+109)
2118 #define UDM_GETBASE (WM_USER+110)
2119 #define UDM_SETRANGE32 (WM_USER+111)
2120 #define UDM_GETRANGE32 (WM_USER+112)
2121 #define UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2122 #define UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2123 #define UDM_SETPOS32 (WM_USER+113)
2124 #define UDM_GETPOS32 (WM_USER+114)
2125
2126 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);
2127
2128 #define NM_UPDOWN NMUPDOWN
2129 #define LPNM_UPDOWN LPNMUPDOWN
2130
2131 typedef struct _NM_UPDOWN {
2132 NMHDR hdr;
2133 int iPos;
2134 int iDelta;
2135 } NMUPDOWN,*LPNMUPDOWN;
2136
2137 #define UDN_DELTAPOS (UDN_FIRST - 1)
2138
2139 #endif /* !NOUPDOWN */
2140
2141 #ifndef NOPROGRESS
2142
2143 #define PROGRESS_CLASSA "msctls_progress32"
2144 #define PROGRESS_CLASSW L"msctls_progress32"
2145
2146 #define PROGRESS_CLASS __MINGW_NAME_AW(PROGRESS_CLASS)
2147
2148 #define PBS_SMOOTH 0x1
2149 #define PBS_VERTICAL 0x4
2150
2151 #define PBM_SETRANGE (WM_USER+1)
2152 #define PBM_SETPOS (WM_USER+2)
2153 #define PBM_DELTAPOS (WM_USER+3)
2154 #define PBM_SETSTEP (WM_USER+4)
2155 #define PBM_STEPIT (WM_USER+5)
2156 #define PBM_SETRANGE32 (WM_USER+6)
2157 typedef struct {
2158 int iLow;
2159 int iHigh;
2160 } PBRANGE,*PPBRANGE;
2161 #define PBM_GETRANGE (WM_USER+7)
2162 #define PBM_GETPOS (WM_USER+8)
2163 #define PBM_SETBARCOLOR (WM_USER+9)
2164 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
2165
2166 #define PBS_MARQUEE 0x8
2167 #define PBM_SETMARQUEE (WM_USER+10)
2168
2169 #if (_WIN32_WINNT >= 0x0600)
2170 #define PBM_GETSTEP (WM_USER+13)
2171 #define PBM_GETBKCOLOR (WM_USER+14)
2172 #define PBM_GETBARCOLOR (WM_USER+15)
2173 #define PBM_SETSTATE (WM_USER+16)
2174 #define PBM_GETSTATE (WM_USER+17)
2175 #define PBS_SMOOTHREVERSE 0x10
2176 #define PBST_NORMAL 1
2177 #define PBST_ERROR 2
2178 #define PBST_PAUSED 3
2179 #endif /* (_WIN32_WINNT >= 0x0600) */
2180
2181 #endif /* !NOPROGRESS */
2182
2183
2184 #ifndef NOHOTKEY
2185
2186 #define HOTKEYF_SHIFT 0x1
2187 #define HOTKEYF_CONTROL 0x2
2188 #define HOTKEYF_ALT 0x4
2189 #define HOTKEYF_EXT 0x8
2190 #define HKCOMB_NONE 0x1
2191 #define HKCOMB_S 0x2
2192 #define HKCOMB_C 0x4
2193 #define HKCOMB_A 0x8
2194 #define HKCOMB_SC 0x10
2195 #define HKCOMB_SA 0x20
2196 #define HKCOMB_CA 0x40
2197 #define HKCOMB_SCA 0x80
2198
2199 #define HKM_SETHOTKEY (WM_USER+1)
2200 #define HKM_GETHOTKEY (WM_USER+2)
2201 #define HKM_SETRULES (WM_USER+3)
2202
2203 #define HOTKEY_CLASSA "msctls_hotkey32"
2204 #define HOTKEY_CLASSW L"msctls_hotkey32"
2205
2206 #define HOTKEY_CLASS __MINGW_NAME_AW(HOTKEY_CLASS)
2207
2208 #endif /* !NOHOTKEY */
2209
2210 #define CCS_TOP 0x1L
2211 #define CCS_NOMOVEY 0x2L
2212 #define CCS_BOTTOM 0x3L
2213 #define CCS_NORESIZE 0x4L
2214 #define CCS_NOPARENTALIGN 0x8L
2215 #define CCS_ADJUSTABLE 0x20L
2216 #define CCS_NODIVIDER 0x40L
2217 #define CCS_VERT 0x80L
2218 #define CCS_LEFT (CCS_VERT | CCS_TOP)
2219 #define CCS_RIGHT (CCS_VERT | CCS_BOTTOM)
2220 #define CCS_NOMOVEX (CCS_VERT | CCS_NOMOVEY)
2221
2222 #ifndef NOLISTVIEW
2223
2224 #define WC_LISTVIEWA "SysListView32"
2225 #define WC_LISTVIEWW L"SysListView32"
2226
2227 #define WC_LISTVIEW __MINGW_NAME_AW(WC_LISTVIEW)
2228
2229 #define LVS_ICON 0x0
2230 #define LVS_REPORT 0x1
2231 #define LVS_SMALLICON 0x2
2232 #define LVS_LIST 0x3
2233 #define LVS_TYPEMASK 0x3
2234 #define LVS_SINGLESEL 0x4
2235 #define LVS_SHOWSELALWAYS 0x8
2236 #define LVS_SORTASCENDING 0x10
2237 #define LVS_SORTDESCENDING 0x20
2238 #define LVS_SHAREIMAGELISTS 0x40
2239 #define LVS_NOLABELWRAP 0x80
2240 #define LVS_AUTOARRANGE 0x100
2241 #define LVS_EDITLABELS 0x200
2242 #define LVS_OWNERDATA 0x1000
2243 #define LVS_NOSCROLL 0x2000
2244
2245 #define LVS_TYPESTYLEMASK 0xfc00
2246
2247 #define LVS_ALIGNTOP 0x0
2248 #define LVS_ALIGNLEFT 0x800
2249 #define LVS_ALIGNMASK 0xc00
2250
2251 #define LVS_OWNERDRAWFIXED 0x400
2252 #define LVS_NOCOLUMNHEADER 0x4000
2253 #define LVS_NOSORTHEADER 0x8000
2254
2255 #define LVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2256 #define ListView_SetUnicodeFormat(hwnd,fUnicode) (BOOL)SNDMSG((hwnd),LVM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
2257 #define LVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2258 #define ListView_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd),LVM_GETUNICODEFORMAT,0,0)
2259 #define LVM_GETBKCOLOR (LVM_FIRST+0)
2260 #define ListView_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETBKCOLOR,0,0L)
2261 #define LVM_SETBKCOLOR (LVM_FIRST+1)
2262 #define ListView_SetBkColor(hwnd,clrBk) (BOOL)SNDMSG((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
2263 #define LVM_GETIMAGELIST (LVM_FIRST+2)
2264 #define ListView_GetImageList(hwnd,iImageList) (HIMAGELIST)SNDMSG((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
2265
2266 #define LVSIL_NORMAL 0
2267 #define LVSIL_SMALL 1
2268 #define LVSIL_STATE 2
2269 #define LVSIL_GROUPHEADER 3
2270
2271 #define LVM_SETIMAGELIST (LVM_FIRST+3)
2272 #define ListView_SetImageList(hwnd,himl,iImageList) (HIMAGELIST)SNDMSG((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(HIMAGELIST)(himl))
2273
2274 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
2275 #define ListView_GetItemCount(hwnd) (int)SNDMSG((hwnd),LVM_GETITEMCOUNT,0,0L)
2276
2277 #define LVIF_TEXT 0x1
2278 #define LVIF_IMAGE 0x2
2279 #define LVIF_PARAM 0x4
2280 #define LVIF_STATE 0x8
2281 #define LVIF_INDENT 0x10
2282 #define LVIF_NORECOMPUTE 0x800
2283 #define LVIF_GROUPID 0x100
2284 #define LVIF_COLUMNS 0x200
2285
2286 #define LVIS_FOCUSED 0x1
2287 #define LVIS_SELECTED 0x2
2288 #define LVIS_CUT 0x4
2289 #define LVIS_DROPHILITED 0x8
2290 #define LVIS_GLOW 0x10
2291 #define LVIS_ACTIVATING 0x20
2292
2293 #define LVIS_OVERLAYMASK 0xf00
2294 #define LVIS_STATEIMAGEMASK 0xF000
2295
2296 #define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
2297
2298 #define I_INDENTCALLBACK (-1)
2299 #define LV_ITEMA LVITEMA
2300 #define LV_ITEMW LVITEMW
2301
2302 #define I_GROUPIDCALLBACK (-1)
2303 #define I_GROUPIDNONE (-2)
2304
2305 #define LV_ITEM LVITEM
2306
2307 #define LVITEMA_V1_SIZE CCSIZEOF_STRUCT(LVITEMA,lParam)
2308 #define LVITEMW_V1_SIZE CCSIZEOF_STRUCT(LVITEMW,lParam)
2309
2310 typedef struct tagLVITEMA {
2311 UINT mask;
2312 int iItem;
2313 int iSubItem;
2314 UINT state;
2315 UINT stateMask;
2316 LPSTR pszText;
2317 int cchTextMax;
2318 int iImage;
2319 LPARAM lParam;
2320 int iIndent;
2321 int iGroupId;
2322 UINT cColumns;
2323 PUINT puColumns;
2324 } LVITEMA,*LPLVITEMA;
2325
2326 typedef struct tagLVITEMW
2327 {
2328 UINT mask;
2329 int iItem;
2330 int iSubItem;
2331 UINT state;
2332 UINT stateMask;
2333 LPWSTR pszText;
2334 int cchTextMax;
2335 int iImage;
2336 LPARAM lParam;
2337 int iIndent;
2338 int iGroupId;
2339 UINT cColumns;
2340 PUINT puColumns;
2341 } LVITEMW,*LPLVITEMW;
2342
2343 #define LVITEM __MINGW_NAME_AW(LVITEM)
2344 #define LPLVITEM __MINGW_NAME_AW(LPLVITEM)
2345
2346 #define LVITEM_V1_SIZE __MINGW_NAME_AW_EXT(LVITEM,_V1_SIZE)
2347
2348 #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
2349 #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
2350
2351 #define LPSTR_TEXTCALLBACK __MINGW_NAME_AW(LPSTR_TEXTCALLBACK)
2352
2353 #define I_IMAGECALLBACK (-1)
2354 #define I_IMAGENONE (-2)
2355 #define I_COLUMNSCALLBACK ((UINT)-1)
2356
2357 #define LVM_GETITEMA (LVM_FIRST+5)
2358 #define LVM_GETITEMW (LVM_FIRST+75)
2359
2360 #define LVM_GETITEM __MINGW_NAME_AW(LVM_GETITEM)
2361
2362 #define ListView_GetItem(hwnd,pitem) (BOOL)SNDMSG((hwnd),LVM_GETITEM,0,(LPARAM)(LV_ITEM *)(pitem))
2363
2364 #define LVM_SETITEMA (LVM_FIRST+6)
2365 #define LVM_SETITEMW (LVM_FIRST+76)
2366
2367 #define LVM_SETITEM __MINGW_NAME_AW(LVM_SETITEM)
2368
2369 #define ListView_SetItem(hwnd,pitem) (BOOL)SNDMSG((hwnd),LVM_SETITEM,0,(LPARAM)(const LV_ITEM *)(pitem))
2370
2371 #define LVM_INSERTITEMA (LVM_FIRST+7)
2372 #define LVM_INSERTITEMW (LVM_FIRST+77)
2373
2374 #define LVM_INSERTITEM __MINGW_NAME_AW(LVM_INSERTITEM)
2375
2376 #define ListView_InsertItem(hwnd,pitem) (int)SNDMSG((hwnd),LVM_INSERTITEM,0,(LPARAM)(const LV_ITEM *)(pitem))
2377
2378 #define LVM_DELETEITEM (LVM_FIRST+8)
2379 #define ListView_DeleteItem(hwnd,i) (BOOL)SNDMSG((hwnd),LVM_DELETEITEM,(WPARAM)(int)(i),0L)
2380
2381 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
2382 #define ListView_DeleteAllItems(hwnd) (BOOL)SNDMSG((hwnd),LVM_DELETEALLITEMS,0,0L)
2383
2384 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
2385 #define ListView_GetCallbackMask(hwnd) (BOOL)SNDMSG((hwnd),LVM_GETCALLBACKMASK,0,0)
2386
2387 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
2388 #define ListView_SetCallbackMask(hwnd,mask) (BOOL)SNDMSG((hwnd),LVM_SETCALLBACKMASK,(WPARAM)(UINT)(mask),0)
2389
2390 #define LVNI_ALL 0x0
2391 #define LVNI_FOCUSED 0x1
2392 #define LVNI_SELECTED 0x2
2393 #define LVNI_CUT 0x4
2394 #define LVNI_DROPHILITED 0x8
2395
2396 #define LVNI_ABOVE 0x100
2397 #define LVNI_BELOW 0x200
2398 #define LVNI_TOLEFT 0x400
2399 #define LVNI_TORIGHT 0x800
2400
2401 #define LVM_GETNEXTITEM (LVM_FIRST+12)
2402 #define ListView_GetNextItem(hwnd,i,flags) (int)SNDMSG((hwnd),LVM_GETNEXTITEM,(WPARAM)(int)(i),MAKELPARAM((flags),0))
2403
2404 #define LVFI_PARAM 0x0001
2405 #define LVFI_STRING 0x0002
2406 #define LVFI_SUBSTRING 0x0004
2407 #define LVFI_PARTIAL 0x0008
2408 #define LVFI_WRAP 0x0020
2409 #define LVFI_NEARESTXY 0x0040
2410
2411 #define LV_FINDINFOA LVFINDINFOA
2412 #define LV_FINDINFOW LVFINDINFOW
2413 #define LV_FINDINFO LVFINDINFO
2414
2415 typedef struct tagLVFINDINFOA {
2416 UINT flags;
2417 LPCSTR psz;
2418 LPARAM lParam;
2419 POINT pt;
2420 UINT vkDirection;
2421 } LVFINDINFOA,*LPFINDINFOA;
2422
2423 typedef struct tagLVFINDINFOW {
2424 UINT flags;
2425 LPCWSTR psz;
2426 LPARAM lParam;
2427 POINT pt;
2428 UINT vkDirection;
2429 } LVFINDINFOW,*LPFINDINFOW;
2430
2431 #define LVFINDINFO __MINGW_NAME_AW(LVFINDINFO)
2432
2433 #define LVM_FINDITEMA (LVM_FIRST+13)
2434 #define LVM_FINDITEMW (LVM_FIRST+83)
2435
2436 #define LVM_FINDITEM __MINGW_NAME_AW(LVM_FINDITEM)
2437
2438 #define ListView_FindItem(hwnd,iStart,plvfi) (int)SNDMSG((hwnd),LVM_FINDITEM,(WPARAM)(int)(iStart),(LPARAM)(const LV_FINDINFO *)(plvfi))
2439
2440 #define LVIR_BOUNDS 0
2441 #define LVIR_ICON 1
2442 #define LVIR_LABEL 2
2443 #define LVIR_SELECTBOUNDS 3
2444
2445 #define LVM_GETITEMRECT (LVM_FIRST+14)
2446 #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))
2447
2448 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
2449 #define ListView_SetItemPosition(hwndLV,i,x,y) (BOOL)SNDMSG((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(int)(i),MAKELPARAM((x),(y)))
2450
2451 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
2452 #define ListView_GetItemPosition(hwndLV,i,ppt) (BOOL)SNDMSG((hwndLV),LVM_GETITEMPOSITION,(WPARAM)(int)(i),(LPARAM)(POINT *)(ppt))
2453
2454 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
2455 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
2456
2457 #define LVM_GETSTRINGWIDTH __MINGW_NAME_AW(LVM_GETSTRINGWIDTH)
2458
2459 #define ListView_GetStringWidth(hwndLV,psz) (int)SNDMSG((hwndLV),LVM_GETSTRINGWIDTH,0,(LPARAM)(LPCTSTR)(psz))
2460
2461 #define LVHT_NOWHERE 0x1
2462 #define LVHT_ONITEMICON 0x2
2463 #define LVHT_ONITEMLABEL 0x4
2464 #define LVHT_ONITEMSTATEICON 0x8
2465 #define LVHT_ONITEM (LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON)
2466
2467 #define LVHT_ABOVE 0x8
2468 #define LVHT_BELOW 0x10
2469 #define LVHT_TORIGHT 0x20
2470 #define LVHT_TOLEFT 0x40
2471
2472 #define LV_HITTESTINFO LVHITTESTINFO
2473
2474 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
2475
2476 typedef struct tagLVHITTESTINFO {
2477 POINT pt;
2478 UINT flags;
2479 int iItem;
2480 int iSubItem;
2481 } LVHITTESTINFO,*LPLVHITTESTINFO;
2482
2483 #define LVM_HITTEST (LVM_FIRST+18)
2484 #define ListView_HitTest(hwndLV,pinfo) (int)SNDMSG((hwndLV),LVM_HITTEST,0,(LPARAM)(LV_HITTESTINFO *)(pinfo))
2485
2486 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
2487 #define ListView_EnsureVisible(hwndLV,i,fPartialOK) (BOOL)SNDMSG((hwndLV),LVM_ENSUREVISIBLE,(WPARAM)(int)(i),MAKELPARAM((fPartialOK),0))
2488
2489 #define LVM_SCROLL (LVM_FIRST+20)
2490 #define ListView_Scroll(hwndLV,dx,dy) (BOOL)SNDMSG((hwndLV),LVM_SCROLL,(WPARAM)(int)(dx),(LPARAM)(int)(dy))
2491
2492 #define LVM_REDRAWITEMS (LVM_FIRST+21)
2493 #define ListView_RedrawItems(hwndLV,iFirst,iLast) (BOOL)SNDMSG((hwndLV),LVM_REDRAWITEMS,(WPARAM)(int)(iFirst),(LPARAM)(int)(iLast))
2494
2495 #define LVA_DEFAULT 0x0
2496 #define LVA_ALIGNLEFT 0x1
2497 #define LVA_ALIGNTOP 0x2
2498 #define LVA_SNAPTOGRID 0x5
2499
2500 #define LVM_ARRANGE (LVM_FIRST+22)
2501 #define ListView_Arrange(hwndLV,code) (BOOL)SNDMSG((hwndLV),LVM_ARRANGE,(WPARAM)(UINT)(code),0L)
2502
2503 #define LVM_EDITLABELA (LVM_FIRST+23)
2504 #define LVM_EDITLABELW (LVM_FIRST+118)
2505
2506 #define LVM_EDITLABEL __MINGW_NAME_AW(LVM_EDITLABEL)
2507
2508 #define ListView_EditLabel(hwndLV,i) (HWND)SNDMSG((hwndLV),LVM_EDITLABEL,(WPARAM)(int)(i),0L)
2509
2510 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
2511 #define ListView_GetEditControl(hwndLV) (HWND)SNDMSG((hwndLV),LVM_GETEDITCONTROL,0,0L)
2512
2513 #define LV_COLUMNA LVCOLUMNA
2514 #define LV_COLUMNW LVCOLUMNW
2515 #define LV_COLUMN LVCOLUMN
2516
2517 #define LVCOLUMNA_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNA,iSubItem)
2518 #define LVCOLUMNW_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNW,iSubItem)
2519
2520 typedef struct tagLVCOLUMNA {
2521 UINT mask;
2522 int fmt;
2523 int cx;
2524 LPSTR pszText;
2525 int cchTextMax;
2526 int iSubItem;
2527 int iImage;
2528 int iOrder;
2529 } LVCOLUMNA,*LPLVCOLUMNA;
2530
2531 typedef struct tagLVCOLUMNW {
2532 UINT mask;
2533 int fmt;
2534 int cx;
2535 LPWSTR pszText;
2536 int cchTextMax;
2537 int iSubItem;
2538 # if (_WIN32_IE >= 0x0300)
2539 int iImage;
2540 int iOrder;
2541 # endif
2542 # if (_WIN32_WINNT >= 0x0600)
2543 int cxMin;
2544 int cxDefault;
2545 int cxIdeal;
2546 # endif
2547 } LVCOLUMNW,*LPLVCOLUMNW;
2548
2549 #define LVCOLUMN __MINGW_NAME_AW(LVCOLUMN)
2550 #define LPLVCOLUMN __MINGW_NAME_AW(LPLVCOLUMN)
2551
2552 #define LVCOLUMN_V1_SIZE __MINGW_NAME_AW_EXT(LVCOLUMN,_V1_SIZE)
2553
2554 #define LVCF_FMT 0x1
2555 #define LVCF_WIDTH 0x2
2556 #define LVCF_TEXT 0x4
2557 #define LVCF_SUBITEM 0x8
2558 #define LVCF_IMAGE 0x10
2559 #define LVCF_ORDER 0x20
2560 #if (_WIN32_WINNT >= 0x0600)
2561 #define LVCF_MINWIDTH 0x40
2562 #define LVCF_DEFAULTWIDTH 0x80
2563 #define LVCF_IDEALWIDTH 0x100
2564 #endif /* (_WIN32_WINNT >= 0x0600) */
2565
2566 #define LVCFMT_LEFT 0x0
2567 #define LVCFMT_RIGHT 0x1
2568 #define LVCFMT_CENTER 0x2
2569 #define LVCFMT_JUSTIFYMASK 0x3
2570 #define LVCFMT_IMAGE 0x800
2571 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2572 #define LVCFMT_COL_HAS_IMAGES 0x8000
2573 #if (_WIN32_WINNT >= 0x0600)
2574 #define LVCFMT_FIXED_WIDTH 0x100
2575 #define LVCFMT_NO_DPI_SCALE 0x40000
2576 #define LVCFMT_FIXED_RATIO 0x80000
2577 #define LVCFMT_LINE_BREAK 0x100000
2578 #define LVCFMT_FILL 0x200000
2579 #define LVCFMT_WRAP 0x400000
2580 #define LVCFMT_NO_TITLE 0x800000
2581 #define LVCFMT_SPLITBUTTON 0x1000000
2582 #define LVCFMT_TILE_PLACEMENTMASK (LVCFMT_LINE_BREAK|LVCFMT_FILL)
2583 #endif /* (_WIN32_WINNT >= 0x0600) */
2584
2585 #define LVM_GETCOLUMNA (LVM_FIRST+25)
2586 #define LVM_GETCOLUMNW (LVM_FIRST+95)
2587
2588 #define LVM_GETCOLUMN __MINGW_NAME_AW(LVM_GETCOLUMN)
2589
2590 #define ListView_GetColumn(hwnd,iCol,pcol) (BOOL)SNDMSG((hwnd),LVM_GETCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(LV_COLUMN *)(pcol))
2591
2592 #define LVM_SETCOLUMNA (LVM_FIRST+26)
2593 #define LVM_SETCOLUMNW (LVM_FIRST+96)
2594
2595 #define LVM_SETCOLUMN __MINGW_NAME_AW(LVM_SETCOLUMN)
2596
2597 #define ListView_SetColumn(hwnd,iCol,pcol) (BOOL)SNDMSG((hwnd),LVM_SETCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(const LV_COLUMN *)(pcol))
2598
2599 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
2600 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
2601
2602 #define LVM_INSERTCOLUMN __MINGW_NAME_AW(LVM_INSERTCOLUMN)
2603
2604 #define ListView_InsertColumn(hwnd,iCol,pcol) (int)SNDMSG((hwnd),LVM_INSERTCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(const LV_COLUMN *)(pcol))
2605
2606 #define LVM_DELETECOLUMN (LVM_FIRST+28)
2607 #define ListView_DeleteColumn(hwnd,iCol) (BOOL)SNDMSG((hwnd),LVM_DELETECOLUMN,(WPARAM)(int)(iCol),0)
2608
2609 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
2610 #define ListView_GetColumnWidth(hwnd,iCol) (int)SNDMSG((hwnd),LVM_GETCOLUMNWIDTH,(WPARAM)(int)(iCol),0)
2611
2612 #define LVSCW_AUTOSIZE -1
2613 #define LVSCW_AUTOSIZE_USEHEADER -2
2614 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
2615
2616 #define ListView_SetColumnWidth(hwnd,iCol,cx) (BOOL)SNDMSG((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(int)(iCol),MAKELPARAM((cx),0))
2617
2618 #define LVM_GETHEADER (LVM_FIRST+31)
2619 #define ListView_GetHeader(hwnd) (HWND)SNDMSG((hwnd),LVM_GETHEADER,0,0L)
2620 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
2621 #define ListView_CreateDragImage(hwnd,i,lpptUpLeft) (HIMAGELIST)SNDMSG((hwnd),LVM_CREATEDRAGIMAGE,(WPARAM)(int)(i),(LPARAM)(LPPOINT)(lpptUpLeft))
2622 #define LVM_GETVIEWRECT (LVM_FIRST+34)
2623 #define ListView_GetViewRect(hwnd,prc) (BOOL)SNDMSG((hwnd),LVM_GETVIEWRECT,0,(LPARAM)(RECT *)(prc))
2624 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
2625 #define ListView_GetTextColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETTEXTCOLOR,0,0L)
2626 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
2627 #define ListView_SetTextColor(hwnd,clrText) (BOOL)SNDMSG((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrText))
2628 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
2629 #define ListView_GetTextBkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETTEXTBKCOLOR,0,0L)
2630 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
2631 #define ListView_SetTextBkColor(hwnd,clrTextBk) (BOOL)SNDMSG((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrTextBk))
2632 #define LVM_GETTOPINDEX (LVM_FIRST+39)
2633 #define ListView_GetTopIndex(hwndLV) (int)SNDMSG((hwndLV),LVM_GETTOPINDEX,0,0)
2634 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
2635 #define ListView_GetCountPerPage(hwndLV) (int)SNDMSG((hwndLV),LVM_GETCOUNTPERPAGE,0,0)
2636 #define LVM_GETORIGIN (LVM_FIRST+41)
2637 #define ListView_GetOrigin(hwndLV,ppt) (BOOL)SNDMSG((hwndLV),LVM_GETORIGIN,(WPARAM)0,(LPARAM)(POINT *)(ppt))
2638 #define LVM_UPDATE (LVM_FIRST+42)
2639 #define ListView_Update(hwndLV,i) (BOOL)SNDMSG((hwndLV),LVM_UPDATE,(WPARAM)(i),0L)
2640 #define LVM_SETITEMSTATE (LVM_FIRST+43)
2641 #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);}
2642 #define ListView_SetCheckState(hwndLV,i,fCheck) ListView_SetItemState(hwndLV,i,INDEXTOSTATEIMAGEMASK((fCheck)?2:1),LVIS_STATEIMAGEMASK)
2643 #define LVM_GETITEMSTATE (LVM_FIRST+44)
2644 #define ListView_GetItemState(hwndLV,i,mask) (UINT)SNDMSG((hwndLV),LVM_GETITEMSTATE,(WPARAM)(i),(LPARAM)(mask))
2645 #define ListView_GetCheckState(hwndLV,i) ((((UINT)(SNDMSG((hwndLV),LVM_GETITEMSTATE,(WPARAM)(i),LVIS_STATEIMAGEMASK))) >> 12) -1)
2646
2647 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
2648 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
2649
2650 #define LVM_GETITEMTEXT __MINGW_NAME_AW(LVM_GETITEMTEXT)
2651
2652 #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);}
2653
2654 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
2655 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
2656
2657 #define LVM_SETITEMTEXT __MINGW_NAME_AW(LVM_SETITEMTEXT)
2658
2659 #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);}
2660
2661 #define LVSICF_NOINVALIDATEALL 0x1
2662 #define LVSICF_NOSCROLL 0x2
2663
2664 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
2665 #define ListView_SetItemCount(hwndLV,cItems) SNDMSG((hwndLV),LVM_SETITEMCOUNT,(WPARAM)(cItems),0)
2666 #define ListView_SetItemCountEx(hwndLV,cItems,dwFlags) SNDMSG((hwndLV),LVM_SETITEMCOUNT,(WPARAM)(cItems),(LPARAM)(dwFlags))
2667
2668 typedef int (CALLBACK *PFNLVCOMPARE)(LPARAM,LPARAM,LPARAM);
2669
2670 #define LVM_SORTITEMS (LVM_FIRST+48)
2671 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) (BOOL)SNDMSG((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)(_lPrm),(LPARAM)(PFNLVCOMPARE)(_pfnCompare))
2672
2673 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
2674 #define ListView_SetItemPosition32(hwndLV,i,x0,y0) { POINT ptNewPos; ptNewPos.x = x0; ptNewPos.y = y0; SNDMSG((hwndLV),LVM_SETITEMPOSITION32,(WPARAM)(int)(i),(LPARAM)&ptNewPos); }
2675
2676 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
2677 #define ListView_GetSelectedCount(hwndLV) (UINT)SNDMSG((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
2678
2679 #define LVM_GETITEMSPACING (LVM_FIRST+51)
2680 #define ListView_GetItemSpacing(hwndLV,fSmall) (DWORD)SNDMSG((hwndLV),LVM_GETITEMSPACING,fSmall,0L)
2681
2682 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
2683 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
2684
2685 #define LVM_GETISEARCHSTRING __MINGW_NAME_AW(LVM_GETISEARCHSTRING)
2686
2687 #define ListView_GetISearchString(hwndLV,lpsz) (BOOL)SNDMSG((hwndLV),LVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz))
2688
2689 #define LVM_SETICONSPACING (LVM_FIRST+53)
2690
2691 #define ListView_SetIconSpacing(hwndLV,cx,cy) (DWORD)SNDMSG((hwndLV),LVM_SETICONSPACING,0,MAKELONG(cx,cy))
2692 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
2693 #define ListView_SetExtendedListViewStyle(hwndLV,dw) (DWORD)SNDMSG((hwndLV),LVM_SETEXTENDEDLISTVIEWSTYLE,0,dw)
2694 #define ListView_SetExtendedListViewStyleEx(hwndLV,dwMask,dw) (DWORD)SNDMSG((hwndLV),LVM_SETEXTENDEDLISTVIEWSTYLE,dwMask,dw)
2695 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
2696 #define ListView_GetExtendedListViewStyle(hwndLV) (DWORD)SNDMSG((hwndLV),LVM_GETEXTENDEDLISTVIEWSTYLE,0,0)
2697 #define LVS_EX_GRIDLINES 0x1
2698 #define LVS_EX_SUBITEMIMAGES 0x2
2699 #define LVS_EX_CHECKBOXES 0x4
2700 #define LVS_EX_TRACKSELECT 0x8
2701 #define LVS_EX_HEADERDRAGDROP 0x10
2702 #define LVS_EX_FULLROWSELECT 0x20
2703 #define LVS_EX_ONECLICKACTIVATE 0x40
2704 #define LVS_EX_TWOCLICKACTIVATE 0x80
2705 #define LVS_EX_FLATSB 0x100
2706 #define LVS_EX_REGIONAL 0x200
2707 #define LVS_EX_INFOTIP 0x400
2708 #define LVS_EX_UNDERLINEHOT 0x800
2709 #define LVS_EX_UNDERLINECOLD 0x1000
2710 #define LVS_EX_MULTIWORKAREAS 0x2000
2711 #define LVS_EX_LABELTIP 0x4000
2712 #define LVS_EX_BORDERSELECT 0x8000
2713 #define LVS_EX_DOUBLEBUFFER 0x10000
2714 #define LVS_EX_HIDELABELS 0x20000
2715 #define LVS_EX_SINGLEROW 0x40000
2716 #define LVS_EX_SNAPTOGRID 0x80000
2717 #define LVS_EX_SIMPLESELECT 0x100000
2718 #if _WIN32_WINNT >= 0x0600
2719 #define LVS_EX_JUSTIFYCOLUMNS 0x200000
2720 #define LVS_EX_TRANSPARENTBKGND 0x400000
2721 #define LVS_EX_TRANSPARENTSHADOWTEXT 0x800000
2722 #define LVS_EX_AUTOAUTOARRANGE 0x1000000
2723 #define LVS_EX_HEADERINALLVIEWS 0x2000000
2724 #define LVS_EX_AUTOCHECKSELECT 0x8000000
2725 #define LVS_EX_AUTOSIZECOLUMNS 0x10000000
2726 #define LVS_EX_COLUMNSNAPPOINTS 0x40000000
2727 #define LVS_EX_COLUMNOVERFLOW 0x80000000
2728 #endif
2729
2730 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
2731 #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))
2732 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
2733 #define ListView_SubItemHitTest(hwnd,plvhti) (int)SNDMSG((hwnd),LVM_SUBITEMHITTEST,0,(LPARAM)(LPLVHITTESTINFO)(plvhti))
2734 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
2735 #define ListView_SetColumnOrderArray(hwnd,iCount,pi) (BOOL)SNDMSG((hwnd),LVM_SETCOLUMNORDERARRAY,(WPARAM)(iCount),(LPARAM)(LPINT)(pi))
2736 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
2737 #define ListView_GetColumnOrderArray(hwnd,iCount,pi) (BOOL)SNDMSG((hwnd),LVM_GETCOLUMNORDERARRAY,(WPARAM)(iCount),(LPARAM)(LPINT)(pi))
2738 #define LVM_SETHOTITEM (LVM_FIRST+60)
2739 #define ListView_SetHotItem(hwnd,i) (int)SNDMSG((hwnd),LVM_SETHOTITEM,(WPARAM)(i),0)
2740 #define LVM_GETHOTITEM (LVM_FIRST+61)
2741 #define ListView_GetHotItem(hwnd) (int)SNDMSG((hwnd),LVM_GETHOTITEM,0,0)
2742 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
2743 #define ListView_SetHotCursor(hwnd,hcur) (HCURSOR)SNDMSG((hwnd),LVM_SETHOTCURSOR,0,(LPARAM)(hcur))
2744 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
2745 #define ListView_GetHotCursor(hwnd) (HCURSOR)SNDMSG((hwnd),LVM_GETHOTCURSOR,0,0)
2746 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
2747 #define ListView_ApproximateViewRect(hwnd,iWidth,iHeight,iCount) (DWORD)SNDMSG((hwnd),LVM_APPROXIMATEVIEWRECT,iCount,MAKELPARAM(iWidth,iHeight))
2748
2749 #define LV_MAX_WORKAREAS 16
2750 #define LVM_SETWORKAREAS (LVM_FIRST+65)
2751 #define ListView_SetWorkAreas(hwnd,nWorkAreas,prc) (BOOL)SNDMSG((hwnd),LVM_SETWORKAREAS,(WPARAM)(int)(nWorkAreas),(LPARAM)(RECT *)(prc))
2752 #define LVM_GETWORKAREAS (LVM_FIRST+70)
2753 #define ListView_GetWorkAreas(hwnd,nWorkAreas,prc) (BOOL)SNDMSG((hwnd),LVM_GETWORKAREAS,(WPARAM)(int)(nWorkAreas),(LPARAM)(RECT *)(prc))
2754 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
2755 #define ListView_GetNumberOfWorkAreas(hwnd,pnWorkAreas) (BOOL)SNDMSG((hwnd),LVM_GETNUMBEROFWORKAREAS,0,(LPARAM)(UINT *)(pnWorkAreas))
2756 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
2757 #define ListView_GetSelectionMark(hwnd) (int)SNDMSG((hwnd),LVM_GETSELECTIONMARK,0,0)
2758 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
2759 #define ListView_SetSelectionMark(hwnd,i) (int)SNDMSG((hwnd),LVM_SETSELECTIONMARK,0,(LPARAM)(i))
2760 #define LVM_SETHOVERTIME (LVM_FIRST+71)
2761 #define ListView_SetHoverTime(hwndLV,dwHoverTimeMs) (DWORD)SNDMSG((hwndLV),LVM_SETHOVERTIME,0,(LPARAM)(dwHoverTimeMs))
2762 #define LVM_GETHOVERTIME (LVM_FIRST+72)
2763 #define ListView_GetHoverTime(hwndLV) (DWORD)SNDMSG((hwndLV),LVM_GETHOVERTIME,0,0)
2764 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
2765 #define ListView_SetToolTips(hwndLV,hwndNewHwnd) (HWND)SNDMSG((hwndLV),LVM_SETTOOLTIPS,(WPARAM)(hwndNewHwnd),0)
2766 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
2767 #define ListView_GetToolTips(hwndLV) (HWND)SNDMSG((hwndLV),LVM_GETTOOLTIPS,0,0)
2768 #define LVM_SORTITEMSEX (LVM_FIRST+81)
2769 #define ListView_SortItemsEx(hwndLV,_pfnCompare,_lPrm) (BOOL)SNDMSG((hwndLV),LVM_SORTITEMSEX,(WPARAM)(LPARAM)(_lPrm),(LPARAM)(PFNLVCOMPARE)(_pfnCompare))
2770
2771 typedef struct tagLVBKIMAGEA {
2772 ULONG ulFlags;
2773 HBITMAP hbm;
2774 LPSTR pszImage;
2775 UINT cchImageMax;
2776 int xOffsetPercent;
2777 int yOffsetPercent;
2778 } LVBKIMAGEA,*LPLVBKIMAGEA;
2779
2780 typedef struct tagLVBKIMAGEW {
2781 ULONG ulFlags;
2782 HBITMAP hbm;
2783 LPWSTR pszImage;
2784 UINT cchImageMax;
2785 int xOffsetPercent;
2786 int yOffsetPercent;
2787 } LVBKIMAGEW,*LPLVBKIMAGEW;
2788
2789 #define LVBKIF_SOURCE_NONE 0x0
2790 #define LVBKIF_SOURCE_HBITMAP 0x1
2791 #define LVBKIF_SOURCE_URL 0x2
2792 #define LVBKIF_SOURCE_MASK 0x3
2793 #define LVBKIF_STYLE_NORMAL 0x0
2794 #define LVBKIF_STYLE_TILE 0x10
2795 #define LVBKIF_STYLE_MASK 0x10
2796 #define LVBKIF_FLAG_TILEOFFSET 0x100
2797 #define LVBKIF_TYPE_WATERMARK 0x10000000
2798
2799 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
2800 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
2801 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
2802 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
2803
2804 #define LVM_SETSELECTEDCOLUMN (LVM_FIRST+140)
2805 #define ListView_SetSelectedColumn(hwnd,iCol) SNDMSG((hwnd),LVM_SETSELECTEDCOLUMN,(WPARAM)iCol,0)
2806 #define LVM_SETTILEWIDTH (LVM_FIRST+141)
2807 #define ListView_SetTileWidth(hwnd,cpWidth) SNDMSG((hwnd),LVM_SETTILEWIDTH,(WPARAM)cpWidth,0)
2808 #define LV_VIEW_ICON 0x0
2809 #define LV_VIEW_DETAILS 0x1
2810 #define LV_VIEW_SMALLICON 0x2
2811 #define LV_VIEW_LIST 0x3
2812 #define LV_VIEW_TILE 0x4
2813 #define LV_VIEW_MAX 0x4
2814 #define LVM_SETVIEW (LVM_FIRST+142)
2815 #define ListView_SetView(hwnd,iView) (DWORD)SNDMSG((hwnd),LVM_SETVIEW,(WPARAM)(DWORD)iView,0)
2816 #define LVM_GETVIEW (LVM_FIRST+143)
2817 #define ListView_GetView(hwnd) (DWORD)SNDMSG((hwnd),LVM_GETVIEW,0,0)
2818 #define LVGF_NONE 0x0
2819 #define LVGF_HEADER 0x1
2820 #define LVGF_FOOTER 0x2
2821 #define LVGF_STATE 0x4
2822 #define LVGF_ALIGN 0x8
2823 #define LVGF_GROUPID 0x10
2824
2825 #define LVGS_NORMAL 0x0
2826 #define LVGS_COLLAPSED 0x1
2827 #define LVGS_HIDDEN 0x2
2828
2829 #define LVGA_HEADER_LEFT 0x1
2830 #define LVGA_HEADER_CENTER 0x2
2831 #define LVGA_HEADER_RIGHT 0x4
2832 #define LVGA_FOOTER_LEFT 0x8
2833 #define LVGA_FOOTER_CENTER 0x10
2834 #define LVGA_FOOTER_RIGHT 0x20
2835
2836 typedef struct tagLVGROUP {
2837 UINT cbSize;
2838 UINT mask;
2839 LPWSTR pszHeader;
2840 int cchHeader;
2841 LPWSTR pszFooter;
2842 int cchFooter;
2843 int iGroupId;
2844 UINT stateMask;
2845 UINT state;
2846 UINT uAlign;
2847 } LVGROUP,*PLVGROUP;
2848
2849 #define LVM_INSERTGROUP (LVM_FIRST+145)
2850 #define ListView_InsertGroup(hwnd,index,pgrp) SNDMSG((hwnd),LVM_INSERTGROUP,(WPARAM)index,(LPARAM)pgrp)
2851 #define LVM_SETGROUPINFO (LVM_FIRST+147)
2852 #define ListView_SetGroupInfo(hwnd,iGroupId,pgrp) SNDMSG((hwnd),LVM_SETGROUPINFO,(WPARAM)iGroupId,(LPARAM)pgrp)
2853 #define LVM_GETGROUPINFO (LVM_FIRST+149)
2854 #define ListView_GetGroupInfo(hwnd,iGroupId,pgrp) SNDMSG((hwnd),LVM_GETGROUPINFO,(WPARAM)iGroupId,(LPARAM)pgrp)
2855 #define LVM_REMOVEGROUP (LVM_FIRST+150)
2856 #define ListView_RemoveGroup(hwnd,iGroupId) SNDMSG((hwnd),LVM_REMOVEGROUP,(WPARAM)iGroupId,0)
2857 #define LVM_MOVEGROUP (LVM_FIRST+151)
2858 #define ListView_MoveGroup(hwnd,iGroupId,toIndex) SNDMSG((hwnd),LVM_MOVEGROUP,(WPARAM)iGroupId,(LPARAM)toIndex)
2859 #define LVM_MOVEITEMTOGROUP (LVM_FIRST+154)
2860 #define ListView_MoveItemToGroup(hwnd,idItemFrom,idGroupTo) SNDMSG((hwnd),LVM_MOVEITEMTOGROUP,(WPARAM)idItemFrom,(LPARAM)idGroupTo)
2861 #define LVGMF_NONE 0x0
2862 #define LVGMF_BORDERSIZE 0x1
2863 #define LVGMF_BORDERCOLOR 0x2
2864 #define LVGMF_TEXTCOLOR 0x4
2865
2866 typedef struct tagLVGROUPMETRICS {
2867 UINT cbSize;
2868 UINT mask;
2869 UINT Left;
2870 UINT Top;
2871 UINT Right;
2872 UINT Bottom;
2873 COLORREF crLeft;
2874 COLORREF crTop;
2875 COLORREF crRight;
2876 COLORREF crBottom;
2877 COLORREF crHeader;
2878 COLORREF crFooter;
2879 } LVGROUPMETRICS,*PLVGROUPMETRICS;
2880
2881 #define LVM_SETGROUPMETRICS (LVM_FIRST+155)
2882 #define ListView_SetGroupMetrics(hwnd,pGroupMetrics) SNDMSG((hwnd),LVM_SETGROUPMETRICS,0,(LPARAM)pGroupMetrics)
2883 #define LVM_GETGROUPMETRICS (LVM_FIRST+156)
2884 #define ListView_GetGroupMetrics(hwnd,pGroupMetrics) SNDMSG((hwnd),LVM_GETGROUPMETRICS,0,(LPARAM)pGroupMetrics)
2885 #define LVM_ENABLEGROUPVIEW (LVM_FIRST+157)
2886 #define ListView_EnableGroupView(hwnd,fEnable) SNDMSG((hwnd),LVM_ENABLEGROUPVIEW,(WPARAM)fEnable,0)
2887
2888 typedef int (CALLBACK *PFNLVGROUPCOMPARE)(int,int,void *);
2889
2890 #define LVM_SORTGROUPS (LVM_FIRST+158)
2891 #define ListView_SortGroups(hwnd,_pfnGroupCompate,_plv) SNDMSG((hwnd),LVM_SORTGROUPS,(WPARAM)_pfnGroupCompate,(LPARAM)_plv)
2892
2893 typedef struct tagLVINSERTGROUPSORTED {
2894 PFNLVGROUPCOMPARE pfnGroupCompare;
2895 void *pvData;
2896 LVGROUP lvGroup;
2897 } LVINSERTGROUPSORTED,*PLVINSERTGROUPSORTED;
2898
2899 #define LVM_INSERTGROUPSORTED (LVM_FIRST+159)
2900 #define ListView_InsertGroupSorted(hwnd,structInsert) SNDMSG((hwnd),LVM_INSERTGROUPSORTED,(WPARAM)structInsert,0)
2901 #define LVM_REMOVEALLGROUPS (LVM_FIRST+160)
2902 #define ListView_RemoveAllGroups(hwnd) SNDMSG((hwnd),LVM_REMOVEALLGROUPS,0,0)
2903 #define LVM_HASGROUP (LVM_FIRST+161)
2904 #define ListView_HasGroup(hwnd,dwGroupId) SNDMSG((hwnd),LVM_HASGROUP,dwGroupId,0)
2905
2906 #define LVTVIF_AUTOSIZE 0x0
2907 #define LVTVIF_FIXEDWIDTH 0x1
2908 #define LVTVIF_FIXEDHEIGHT 0x2
2909 #define LVTVIF_FIXEDSIZE 0x3
2910
2911 #define LVTVIM_TILESIZE 0x1
2912 #define LVTVIM_COLUMNS 0x2
2913 #define LVTVIM_LABELMARGIN 0x4
2914
2915 typedef struct tagLVTILEVIEWINFO {
2916 UINT cbSize;
2917 DWORD dwMask;
2918 DWORD dwFlags;
2919 SIZE sizeTile;
2920 int cLines;
2921 RECT rcLabelMargin;
2922 } LVTILEVIEWINFO,*PLVTILEVIEWINFO;
2923
2924 typedef struct tagLVTILEINFO {
2925 UINT cbSize;
2926 int iItem;
2927 UINT cColumns;
2928 PUINT puColumns;
2929 } LVTILEINFO,*PLVTILEINFO;
2930
2931 #define LVM_SETTILEVIEWINFO (LVM_FIRST+162)
2932 #define ListView_SetTileViewInfo(hwnd,ptvi) SNDMSG((hwnd),LVM_SETTILEVIEWINFO,0,(LPARAM)ptvi)
2933 #define LVM_GETTILEVIEWINFO (LVM_FIRST+163)
2934 #define ListView_GetTileViewInfo(hwnd,ptvi) SNDMSG((hwnd),LVM_GETTILEVIEWINFO,0,(LPARAM)ptvi)
2935 #define LVM_SETTILEINFO (LVM_FIRST+164)
2936 #define ListView_SetTileInfo(hwnd,pti) SNDMSG((hwnd),LVM_SETTILEINFO,0,(LPARAM)pti)
2937 #define LVM_GETTILEINFO (LVM_FIRST+165)
2938 #define ListView_GetTileInfo(hwnd,pti) SNDMSG((hwnd),LVM_GETTILEINFO,0,(LPARAM)pti)
2939
2940 typedef struct {
2941 UINT cbSize;
2942 DWORD dwFlags;
2943 int iItem;
2944 DWORD dwReserved;
2945 } LVINSERTMARK,*LPLVINSERTMARK;
2946
2947 #define LVIM_AFTER 0x1
2948
2949 #define LVM_SETINSERTMARK (LVM_FIRST+166)
2950 #define ListView_SetInsertMark(hwnd,lvim) (BOOL)SNDMSG((hwnd),LVM_SETINSERTMARK,(WPARAM) 0,(LPARAM) (lvim))
2951 #define LVM_GETINSERTMARK (LVM_FIRST+167)
2952 #define ListView_GetInsertMark(hwnd,lvim) (BOOL)SNDMSG((hwnd),LVM_GETINSERTMARK,(WPARAM) 0,(LPARAM) (lvim))
2953 #define LVM_INSERTMARKHITTEST (LVM_FIRST+168)
2954 #define ListView_InsertMarkHitTest(hwnd,point,lvim) (int)SNDMSG((hwnd),LVM_INSERTMARKHITTEST,(WPARAM)(LPPOINT)(point),(LPARAM)(LPLVINSERTMARK)(lvim))
2955 #define LVM_GETINSERTMARKRECT (LVM_FIRST+169)
2956 #define ListView_GetInsertMarkRect(hwnd,rc) (int)SNDMSG((hwnd),LVM_GETINSERTMARKRECT,(WPARAM)0,(LPARAM)(LPRECT)(rc))
2957 #define LVM_SETINSERTMARKCOLOR (LVM_FIRST+170)
2958 #define ListView_SetInsertMarkColor(hwnd,color) (COLORREF)SNDMSG((hwnd),LVM_SETINSERTMARKCOLOR,(WPARAM)0,(LPARAM)(COLORREF)(color))
2959 #define LVM_GETINSERTMARKCOLOR (LVM_FIRST+171)
2960 #define ListView_GetInsertMarkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETINSERTMARKCOLOR,(WPARAM)0,(LPARAM)0)
2961
2962 typedef struct tagLVSETINFOTIP {
2963 UINT cbSize;
2964 DWORD dwFlags;
2965 LPWSTR pszText;
2966 int iItem;
2967 int iSubItem;
2968 } LVSETINFOTIP,*PLVSETINFOTIP;
2969
2970 #define LVM_SETINFOTIP (LVM_FIRST+173)
2971 #define ListView_SetInfoTip(hwndLV,plvInfoTip) (BOOL)SNDMSG((hwndLV),LVM_SETINFOTIP,(WPARAM)0,(LPARAM)plvInfoTip)
2972 #define LVM_GETSELECTEDCOLUMN (LVM_FIRST+174)
2973 #define ListView_GetSelectedColumn(hwnd) (UINT)SNDMSG((hwnd),LVM_GETSELECTEDCOLUMN,0,0)
2974 #define LVM_ISGROUPVIEWENABLED (LVM_FIRST+175)
2975 #define ListView_IsGroupViewEnabled(hwnd) (BOOL)SNDMSG((hwnd),LVM_ISGROUPVIEWENABLED,0,0)
2976 #define LVM_GETOUTLINECOLOR (LVM_FIRST+176)
2977 #define ListView_GetOutlineColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETOUTLINECOLOR,0,0)
2978 #define LVM_SETOUTLINECOLOR (LVM_FIRST+177)
2979 #define ListView_SetOutlineColor(hwnd,color) (COLORREF)SNDMSG((hwnd),LVM_SETOUTLINECOLOR,(WPARAM)0,(LPARAM)(COLORREF)(color))
2980 #define LVM_CANCELEDITLABEL (LVM_FIRST+179)
2981 #define ListView_CancelEditLabel(hwnd) (VOID)SNDMSG((hwnd),LVM_CANCELEDITLABEL,(WPARAM)0,(LPARAM)0)
2982 #define LVM_MAPINDEXTOID (LVM_FIRST+180)
2983 #define ListView_MapIndexToID(hwnd,index) (UINT)SNDMSG((hwnd),LVM_MAPINDEXTOID,(WPARAM)index,(LPARAM)0)
2984 #define LVM_MAPIDTOINDEX (LVM_FIRST+181)
2985 #define ListView_MapIDToIndex(hwnd,id) (UINT)SNDMSG((hwnd),LVM_MAPIDTOINDEX,(WPARAM)id,(LPARAM)0)
2986 #define LVM_ISITEMVISIBLE (LVM_FIRST+182)
2987 #define ListView_IsItemVisible(hwnd,index) (UINT)SNDMSG((hwnd),LVM_ISITEMVISIBLE,(WPARAM)(index),(LPARAM)0)
2988
2989 #define LVBKIMAGE __MINGW_NAME_AW(LVBKIMAGE)
2990 #define LPLVBKIMAGE __MINGW_NAME_AW(LPLVBKIMAGE)
2991 #define LVM_SETBKIMAGE __MINGW_NAME_AW(LVM_SETBKIMAGE)
2992 #define LVM_GETBKIMAGE __MINGW_NAME_AW(LVM_GETBKIMAGE)
2993
2994 #define ListView_SetBkImage(hwnd,plvbki) (BOOL)SNDMSG((hwnd),LVM_SETBKIMAGE,0,(LPARAM)(plvbki))
2995 #define ListView_GetBkImage(hwnd,plvbki) (BOOL)SNDMSG((hwnd),LVM_GETBKIMAGE,0,(LPARAM)(plvbki))
2996
2997 #define LPNM_LISTVIEW LPNMLISTVIEW
2998 #define NM_LISTVIEW NMLISTVIEW
2999
3000 typedef struct tagNMLISTVIEW {
3001 NMHDR hdr;
3002 int iItem;
3003 int iSubItem;
3004 UINT uNewState;
3005 UINT uOldState;
3006 UINT uChanged;
3007 POINT ptAction;
3008 LPARAM lParam;
3009 } NMLISTVIEW,*LPNMLISTVIEW;
3010
3011 typedef struct tagNMITEMACTIVATE {
3012 NMHDR hdr;
3013 int iItem;
3014 int iSubItem;
3015 UINT uNewState;
3016 UINT uOldState;
3017 UINT uChanged;
3018 POINT ptAction;
3019 LPARAM lParam;
3020 UINT uKeyFlags;
3021 } NMITEMACTIVATE,*LPNMITEMACTIVATE;
3022
3023 #define LVKF_ALT 0x1
3024 #define LVKF_CONTROL 0x2
3025 #define LVKF_SHIFT 0x4
3026
3027 #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLVCUSTOMDRW,clrTextBk)
3028
3029 typedef struct tagNMLVCUSTOMDRAW {
3030 NMCUSTOMDRAW nmcd;
3031 COLORREF clrText;
3032 COLORREF clrTextBk;
3033 int iSubItem;
3034 DWORD dwItemType;
3035 COLORREF clrFace;
3036 int iIconEffect;
3037 int iIconPhase;
3038 int iPartId;
3039 int iStateId;
3040 RECT rcText;
3041 UINT uAlign;
3042 } NMLVCUSTOMDRAW,*LPNMLVCUSTOMDRAW;
3043
3044 #define LVCDI_ITEM 0x0
3045 #define LVCDI_GROUP 0x1
3046
3047 #define LVCDRF_NOSELECT 0x10000
3048 #define LVCDRF_NOGROUPFRAME 0x20000
3049
3050 typedef struct tagNMLVCACHEHINT {
3051 NMHDR hdr;
3052 int iFrom;
3053 int iTo;
3054 } NMLVCACHEHINT,*LPNMLVCACHEHINT;
3055
3056 #define LPNM_CACHEHINT LPNMLVCACHEHINT
3057 #define PNM_CACHEHINT LPNMLVCACHEHINT
3058 #define NM_CACHEHINT NMLVCACHEHINT
3059
3060 typedef struct tagNMLVFINDITEMA {
3061 NMHDR hdr;
3062 int iStart;
3063 LVFINDINFOA lvfi;
3064 } NMLVFINDITEMA,*LPNMLVFINDITEMA;
3065
3066 typedef struct tagNMLVFINDITEMW {
3067 NMHDR hdr;
3068 int iStart;
3069 LVFINDINFOW lvfi;
3070 } NMLVFINDITEMW,*LPNMLVFINDITEMW;
3071
3072 #define PNM_FINDITEMA LPNMLVFINDITEMA
3073 #define LPNM_FINDITEMA LPNMLVFINDITEMA
3074 #define NM_FINDITEMA NMLVFINDITEMA
3075
3076 #define PNM_FINDITEMW LPNMLVFINDITEMW
3077 #define LPNM_FINDITEMW LPNMLVFINDITEMW
3078 #define NM_FINDITEMW NMLVFINDITEMW
3079
3080 #define PNM_FINDITEM __MINGW_NAME_AW(PNM_FINDITEM)
3081 #define LPNM_FINDITEM __MINGW_NAME_AW(LPNM_FINDITEM)
3082 #define NM_FINDITEM __MINGW_NAME_AW(NM_FINDITEM)
3083 #define NMLVFINDITEM __MINGW_NAME_AW(NMLVFINDITEM)
3084 #define LPNMLVFINDITEM __MINGW_NAME_AW(LPNMLVFINDITEM)
3085
3086 typedef struct tagNMLVODSTATECHANGE {
3087 NMHDR hdr;
3088 int iFrom;
3089 int iTo;
3090 UINT uNewState;
3091 UINT uOldState;
3092 } NMLVODSTATECHANGE,*LPNMLVODSTATECHANGE;
3093
3094 #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3095 #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3096 #define NM_ODSTATECHANGE NMLVODSTATECHANGE
3097
3098 #define LVN_ITEMCHANGING (LVN_FIRST-0)
3099 #define LVN_ITEMCHANGED (LVN_FIRST-1)
3100 #define LVN_INSERTITEM (LVN_FIRST-2)
3101 #define LVN_DELETEITEM (LVN_FIRST-3)
3102 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
3103 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
3104 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
3105 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
3106 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
3107 #define LVN_COLUMNCLICK (LVN_FIRST-8)
3108 #define LVN_BEGINDRAG (LVN_FIRST-9)
3109 #define LVN_BEGINRDRAG (LVN_FIRST-11)
3110
3111 #define LVN_ODCACHEHINT (LVN_FIRST-13)
3112 #define LVN_ODFINDITEMA (LVN_FIRST-52)
3113 #define LVN_ODFINDITEMW (LVN_FIRST-79)
3114
3115 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
3116 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
3117
3118 #define LVN_ODFINDITEM __MINGW_NAME_AW(LVN_ODFINDITEM)
3119
3120 #define LVN_HOTTRACK (LVN_FIRST-21)
3121 #define LVN_GETDISPINFOA (LVN_FIRST-50)
3122 #define LVN_GETDISPINFOW (LVN_FIRST-77)
3123 #define LVN_SETDISPINFOA (LVN_FIRST-51)
3124 #define LVN_SETDISPINFOW (LVN_FIRST-78)
3125
3126 #define LVN_BEGINLABELEDIT __MINGW_NAME_AW(LVN_BEGINLABELEDIT)
3127 #define LVN_ENDLABELEDIT __MINGW_NAME_AW(LVN_ENDLABELEDIT)
3128 #define LVN_GETDISPINFO __MINGW_NAME_AW(LVN_GETDISPINFO)
3129 #define LVN_SETDISPINFO __MINGW_NAME_AW(LVN_SETDISPINFO)
3130
3131 #define LVIF_DI_SETITEM 0x1000
3132
3133 #define LV_DISPINFOA NMLVDISPINFOA
3134 #define LV_DISPINFOW NMLVDISPINFOW
3135 #define LV_DISPINFO NMLVDISPINFO
3136
3137 typedef struct tagLVDISPINFO {
3138 NMHDR hdr;
3139 LVITEMA item;
3140 } NMLVDISPINFOA,*LPNMLVDISPINFOA;
3141
3142 typedef struct tagLVDISPINFOW {
3143 NMHDR hdr;
3144 LVITEMW item;
3145 } NMLVDISPINFOW,*LPNMLVDISPINFOW;
3146
3147 #define NMLVDISPINFO __MINGW_NAME_AW(NMLVDISPINFO)
3148
3149 #define LVN_KEYDOWN (LVN_FIRST-55)
3150
3151 #define LV_KEYDOWN NMLVKEYDOWN
3152
3153 #include <pshpack1.h>
3154
3155 typedef struct tagLVKEYDOWN {
3156 NMHDR hdr;
3157 WORD wVKey;
3158 UINT flags;
3159 } NMLVKEYDOWN,*LPNMLVKEYDOWN;
3160
3161 #include <poppack.h>
3162
3163 #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
3164
3165 typedef struct tagNMLVGETINFOTIPA {
3166 NMHDR hdr;
3167 DWORD dwFlags;
3168 LPSTR pszText;
3169 int cchTextMax;
3170 int iItem;
3171 int iSubItem;
3172 LPARAM lParam;
3173 } NMLVGETINFOTIPA,*LPNMLVGETINFOTIPA;
3174
3175 typedef struct tagNMLVGETINFOTIPW {
3176 NMHDR hdr;
3177 DWORD dwFlags;
3178 LPWSTR pszText;
3179 int cchTextMax;
3180 int iItem;
3181 int iSubItem;
3182 LPARAM lParam;
3183 } NMLVGETINFOTIPW,*LPNMLVGETINFOTIPW;
3184
3185 #define LVGIT_UNFOLDED 0x1
3186
3187 #define LVN_GETINFOTIPA (LVN_FIRST-57)
3188 #define LVN_GETINFOTIPW (LVN_FIRST-58)
3189
3190 #define LVN_GETINFOTIP __MINGW_NAME_AW(LVN_GETINFOTIP)
3191 #define NMLVGETINFOTIP __MINGW_NAME_AW(NMLVGETINFOTIP)
3192 #define LPNMLVGETINFOTIP __MINGW_NAME_AW(LPNMLVGETINFOTIP)
3193
3194 typedef struct tagNMLVSCROLL {
3195 NMHDR hdr;
3196 int dx;
3197 int dy;
3198 } NMLVSCROLL,*LPNMLVSCROLL;
3199
3200 #define LVN_BEGINSCROLL (LVN_FIRST-80)
3201 #define LVN_ENDSCROLL (LVN_FIRST-81)
3202
3203 #endif /* !NOLISTVIEW */
3204
3205 #ifndef NOTREEVIEW
3206
3207 #define WC_TREEVIEWA "SysTreeView32"
3208 #define WC_TREEVIEWW L"SysTreeView32"
3209
3210 #define WC_TREEVIEW __MINGW_NAME_AW(WC_TREEVIEW)
3211
3212 #define TVS_HASBUTTONS 0x1
3213 #define TVS_HASLINES 0x2
3214 #define TVS_LINESATROOT 0x4
3215 #define TVS_EDITLABELS 0x8
3216 #define TVS_DISABLEDRAGDROP 0x10
3217 #define TVS_SHOWSELALWAYS 0x20
3218 #define TVS_RTLREADING 0x40
3219 #define TVS_NOTOOLTIPS 0x80
3220 #define TVS_CHECKBOXES 0x100
3221 #define TVS_TRACKSELECT 0x200
3222 #define TVS_SINGLEEXPAND 0x400
3223 #define TVS_INFOTIP 0x800
3224 #define TVS_FULLROWSELECT 0x1000
3225 #define TVS_NOSCROLL 0x2000
3226 #define TVS_NONEVENHEIGHT 0x4000
3227 #define TVS_NOHSCROLL 0x8000
3228
3229 typedef struct _TREEITEM *HTREEITEM;
3230
3231 #define TVIF_TEXT 0x1
3232 #define TVIF_IMAGE 0x2
3233 #define TVIF_PARAM 0x4
3234 #define TVIF_STATE 0x8
3235 #define TVIF_HANDLE 0x10
3236 #define TVIF_SELECTEDIMAGE 0x20
3237 #define TVIF_CHILDREN 0x40
3238 #if(_WIN32_IE >= 0x0400)
3239 #define TVIF_INTEGRAL 0x80
3240 #endif
3241 #if(_WIN32_IE >= 0x0600)
3242 #define TVIF_STATEEX 0x100
3243 #endif
3244 #define TVIF_EXPANDEDIMAGE 0x200
3245 #define TVIS_SELECTED 0x2
3246 #define TVIS_CUT 0x4
3247 #define TVIS_DROPHILITED 0x8
3248 #define TVIS_BOLD 0x10
3249 #define TVIS_EXPANDED 0x20
3250 #define TVIS_EXPANDEDONCE 0x40
3251 #define TVIS_EXPANDPARTIAL 0x80
3252 #define TVIS_OVERLAYMASK 0xf00
3253 #define TVIS_STATEIMAGEMASK 0xF000
3254 #define TVIS_USERMASK 0xF000
3255
3256 #define TVIS_FOCUSED 0x0001
3257
3258 #define I_CHILDRENCALLBACK (-1)
3259
3260 #define LPTV_ITEMW LPTVITEMW
3261 #define LPTV_ITEMA LPTVITEMA
3262 #define TV_ITEMW TVITEMW
3263 #define TV_ITEMA TVITEMA
3264 #define LPTV_ITEM LPTVITEM
3265 #define TV_ITEM TVITEM
3266
3267 typedef struct tagTVITEMA {
3268 UINT mask;
3269 HTREEITEM hItem;
3270 UINT state;
3271 UINT stateMask;
3272 LPSTR pszText;
3273 int cchTextMax;
3274 int iImage;
3275 int iSelectedImage;
3276 int cChildren;
3277 LPARAM lParam;
3278 } TVITEMA,*LPTVITEMA;
3279
3280 typedef struct tagTVITEMW {
3281 UINT mask;
3282 HTREEITEM hItem;
3283 UINT state;
3284 UINT stateMask;
3285 LPWSTR pszText;
3286 int cchTextMax;
3287 int iImage;
3288 int iSelectedImage;
3289 int cChildren;
3290 LPARAM lParam;
3291 } TVITEMW,*LPTVITEMW;
3292
3293 typedef struct tagTVITEMEXA {
3294 UINT mask;
3295 HTREEITEM hItem;
3296 UINT state;
3297 UINT stateMask;
3298 LPSTR pszText;
3299 int cchTextMax;
3300 int iImage;
3301 int iSelectedImage;
3302 int cChildren;
3303 LPARAM lParam;
3304 int iIntegral;
3305 UINT uStateEx; /* _WIN32_IE >= 0x600 */
3306 HWND hwnd; /* _WIN32_IE >= 0x600 */
3307 int iExpandedImage; /* _WIN32_IE >= 0x600 */
3308 } TVITEMEXA, *LPTVITEMEXA;
3309
3310 typedef struct tagTVITEMEXW {
3311 UINT mask;
3312 HTREEITEM hItem;
3313 UINT state;
3314 UINT stateMask;
3315 LPWSTR pszText;
3316 int cchTextMax;
3317 int iImage;
3318 int iSelectedImage;
3319 int cChildren;
3320 LPARAM lParam;
3321 int iIntegral;
3322 UINT uStateEx; /* _WIN32_IE >= 0x600 */
3323 HWND hwnd; /* _WIN32_IE >= 0x600 */
3324 int iExpandedImage; /* _WIN32_IE >= 0x600 */
3325 } TVITEMEXW, *LPTVITEMEXW;
3326
3327 __MINGW_TYPEDEF_AW(TVITEMEX)
3328 __MINGW_TYPEDEF_AW(LPTVITEMEX)
3329
3330 #define TVITEM __MINGW_NAME_AW(TVITEM)
3331 #define LPTVITEM __MINGW_NAME_AW(LPTVITEM)
3332
3333 #define TVI_ROOT ((HTREEITEM)(ULONG_PTR)-0x10000)
3334 #define TVI_FIRST ((HTREEITEM)(ULONG_PTR)-0xffff)
3335 #define TVI_LAST ((HTREEITEM)(ULONG_PTR)-0xfffe)
3336 #define TVI_SORT ((HTREEITEM)(ULONG_PTR)-0xfffd)
3337
3338 #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
3339 #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
3340 #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
3341 #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
3342 #define TV_INSERTSTRUCT TVINSERTSTRUCT
3343 #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
3344
3345 #define TVINSERTSTRUCTA_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTA,item)
3346 #define TVINSERTSTRUCTW_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTW,item)
3347
3348 typedef struct tagTVINSERTSTRUCTA {
3349 HTREEITEM hParent;
3350 HTREEITEM hInsertAfter;
3351 __C89_NAMELESS union {
3352 TVITEMEXA itemex;
3353 TV_ITEMA item;
3354 } DUMMYUNIONNAME;
3355 } TVINSERTSTRUCTA,*LPTVINSERTSTRUCTA;
3356
3357 typedef struct tagTVINSERTSTRUCTW {
3358 HTREEITEM hParent;
3359 HTREEITEM hInsertAfter;
3360 __C89_NAMELESS union {
3361 TVITEMEXW itemex;
3362 TV_ITEMW item;
3363 } DUMMYUNIONNAME;
3364 } TVINSERTSTRUCTW,*LPTVINSERTSTRUCTW;
3365
3366
3367 #define TVINSERTSTRUCT __MINGW_NAME_AW(TVINSERTSTRUCT)
3368 #define LPTVINSERTSTRUCT __MINGW_NAME_AW(LPTVINSERTSTRUCT)
3369
3370 #define TVINSERTSTRUCT_V1_SIZE __MINGW_NAME_AW_EXT(TVINSERTSTRUCT,_V1_SIZE)
3371
3372 #define TVM_INSERTITEMA (TV_FIRST+0)
3373 #define TVM_INSERTITEMW (TV_FIRST+50)
3374
3375 #define TVM_INSERTITEM __MINGW_NAME_AW(TVM_INSERTITEM)
3376
3377 #define TreeView_InsertItem(hwnd,lpis) (HTREEITEM)SNDMSG((hwnd),TVM_INSERTITEM,0,(LPARAM)(LPTV_INSERTSTRUCT)(lpis))
3378
3379 #define TVM_DELETEITEM (TV_FIRST+1)
3380 #define TreeView_DeleteItem(hwnd,hitem) (BOOL)SNDMSG((hwnd),TVM_DELETEITEM,0,(LPARAM)(HTREEITEM)(hitem))
3381
3382 #define TreeView_DeleteAllItems(hwnd) (BOOL)SNDMSG((hwnd),TVM_DELETEITEM,0,(LPARAM)TVI_ROOT)
3383
3384 #define TVM_EXPAND (TV_FIRST+2)
3385 #define TreeView_Expand(hwnd,hitem,code) (BOOL)SNDMSG((hwnd),TVM_EXPAND,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
3386
3387 #define TVE_COLLAPSE 0x1
3388 #define TVE_EXPAND 0x2
3389 #define TVE_TOGGLE 0x3
3390 #define TVE_EXPANDPARTIAL 0x4000
3391 #define TVE_COLLAPSERESET 0x8000
3392
3393 #define TVM_GETITEMRECT (TV_FIRST+4)
3394 #define TreeView_GetItemRect(hwnd,hitem,prc,code) (*(HTREEITEM *)prc = (hitem),(BOOL)SNDMSG((hwnd),TVM_GETITEMRECT,(WPARAM)(code),(LPARAM)(RECT *)(prc)))
3395
3396 #define TVM_GETCOUNT (TV_FIRST+5)
3397 #define TreeView_GetCount(hwnd) (UINT)SNDMSG((hwnd),TVM_GETCOUNT,0,0)
3398
3399 #define TVM_GETINDENT (TV_FIRST+6)
3400 #define TreeView_GetIndent(hwnd) (UINT)SNDMSG((hwnd),TVM_GETINDENT,0,0)
3401
3402 #define TVM_SETINDENT (TV_FIRST+7)
3403 #define TreeView_SetIndent(hwnd,indent) (BOOL)SNDMSG((hwnd),TVM_SETINDENT,(WPARAM)(indent),0)
3404
3405 #define TVM_GETIMAGELIST (TV_FIRST+8)
3406 #define TreeView_GetImageList(hwnd,iImage) (HIMAGELIST)SNDMSG((hwnd),TVM_GETIMAGELIST,iImage,0)
3407
3408 #define TVSIL_NORMAL 0
3409 #define TVSIL_STATE 2
3410
3411 #define TVM_SETIMAGELIST (TV_FIRST+9)
3412 #define TreeView_SetImageList(hwnd,himl,iImage) (HIMAGELIST)SNDMSG((hwnd),TVM_SETIMAGELIST,iImage,(LPARAM)(HIMAGELIST)(himl))
3413
3414 #define TVM_GETNEXTITEM (TV_FIRST+10)
3415 #define TreeView_GetNextItem(hwnd,hitem,code) (HTREEITEM)SNDMSG((hwnd),TVM_GETNEXTITEM,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
3416
3417 #define TVGN_ROOT 0x0
3418 #define TVGN_NEXT 0x1
3419 #define TVGN_PREVIOUS 0x2
3420 #define TVGN_PARENT 0x3
3421 #define TVGN_CHILD 0x4
3422 #define TVGN_FIRSTVISIBLE 0x5
3423 #define TVGN_NEXTVISIBLE 0x6
3424 #define TVGN_PREVIOUSVISIBLE 0x7
3425 #define TVGN_DROPHILITE 0x8
3426 #define TVGN_CARET 0x9
3427 #define TVGN_LASTVISIBLE 0xa
3428
3429 #define TVSI_NOSINGLEEXPAND 0x8000
3430
3431 #define TreeView_GetChild(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_CHILD)
3432 #define TreeView_GetNextSibling(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_NEXT)
3433 #define TreeView_GetPrevSibling(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PREVIOUS)
3434 #define TreeView_GetParent(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PARENT)
3435 #define TreeView_GetFirstVisible(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_FIRSTVISIBLE)
3436 #define TreeView_GetNextVisible(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_NEXTVISIBLE)
3437 #define TreeView_GetPrevVisible(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PREVIOUSVISIBLE)
3438 #define TreeView_GetSelection(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_CARET)
3439 #define TreeView_GetDropHilight(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_DROPHILITE)
3440 #define TreeView_GetRoot(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_ROOT)
3441 #define TreeView_GetLastVisible(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_LASTVISIBLE)
3442
3443 #define TVM_SELECTITEM (TV_FIRST+11)
3444 #define TreeView_Select(hwnd,hitem,code) (BOOL)SNDMSG((hwnd),TVM_SELECTITEM,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
3445
3446 #define TreeView_SelectItem(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_CARET)
3447 #define TreeView_SelectDropTarget(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_DROPHILITE)
3448 #define TreeView_SelectSetFirstVisible(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_FIRSTVISIBLE)
3449
3450 #define TVM_GETITEMA (TV_FIRST+12)
3451 #define TVM_GETITEMW (TV_FIRST+62)
3452
3453 #define TVM_GETITEM __MINGW_NAME_AW(TVM_GETITEM)
3454
3455 #define TreeView_GetItem(hwnd,pitem) (BOOL)SNDMSG((hwnd),TVM_GETITEM,0,(LPARAM)(TV_ITEM *)(pitem))
3456
3457 #define TVM_SETITEMA (TV_FIRST+13)
3458 #define TVM_SETITEMW (TV_FIRST+63)
3459
3460 #define TVM_SETITEM __MINGW_NAME_AW(TVM_SETITEM)
3461
3462 #define TreeView_SetItem(hwnd,pitem) (BOOL)SNDMSG((hwnd),TVM_SETITEM,0,(LPARAM)(const TV_ITEM *)(pitem))
3463
3464 #define TVM_EDITLABELA (TV_FIRST+14)
3465 #define TVM_EDITLABELW (TV_FIRST+65)
3466
3467 #define TVM_EDITLABEL __MINGW_NAME_AW(TVM_EDITLABEL)
3468
3469 #define TreeView_EditLabel(hwnd,hitem) (HWND)SNDMSG((hwnd),TVM_EDITLABEL,0,(LPARAM)(HTREEITEM)(hitem))
3470
3471 #define TVM_GETEDITCONTROL (TV_FIRST+15)
3472 #define TreeView_GetEditControl(hwnd) (HWND)SNDMSG((hwnd),TVM_GETEDITCONTROL,0,0)
3473
3474 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
3475 #define TreeView_GetVisibleCount(hwnd) (UINT)SNDMSG((hwnd),TVM_GETVISIBLECOUNT,0,0)
3476
3477 #define TVM_HITTEST (TV_FIRST+17)
3478 #define TreeView_HitTest(hwnd,lpht) (HTREEITEM)SNDMSG((hwnd),TVM_HITTEST,0,(LPARAM)(LPTV_HITTESTINFO)(lpht))
3479
3480 #define LPTV_HITTESTINFO LPTVHITTESTINFO
3481 #define TV_HITTESTINFO TVHITTESTINFO
3482
3483 typedef struct tagTVHITTESTINFO {
3484 POINT pt;
3485 UINT flags;
3486 HTREEITEM hItem;
3487 } TVHITTESTINFO,*LPTVHITTESTINFO;
3488
3489 #define TVHT_NOWHERE 0x1
3490 #define TVHT_ONITEMICON 0x2
3491 #define TVHT_ONITEMLABEL 0x4
3492 #define TVHT_ONITEM (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON)
3493 #define TVHT_ONITEMINDENT 0x8
3494 #define TVHT_ONITEMBUTTON 0x10
3495 #define TVHT_ONITEMRIGHT 0x20
3496 #define TVHT_ONITEMSTATEICON 0x40
3497
3498 #define TVHT_ABOVE 0x100
3499 #define TVHT_BELOW 0x200
3500 #define TVHT_TORIGHT 0x400
3501 #define TVHT_TOLEFT 0x800
3502
3503 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
3504 #define TreeView_CreateDragImage(hwnd,hitem) (HIMAGELIST)SNDMSG((hwnd),TVM_CREATEDRAGIMAGE,0,(LPARAM)(HTREEITEM)(hitem))
3505
3506 #define TVM_SORTCHILDREN (TV_FIRST+19)
3507 #define TreeView_SortChildren(hwnd,hitem,recurse) (BOOL)SNDMSG((hwnd),TVM_SORTCHILDREN,(WPARAM)(recurse),(LPARAM)(HTREEITEM)(hitem))
3508
3509 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
3510 #define TreeView_EnsureVisible(hwnd,hitem) (BOOL)SNDMSG((hwnd),TVM_ENSUREVISIBLE,0,(LPARAM)(HTREEITEM)(hitem))
3511
3512 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
3513 #define TreeView_SortChildrenCB(hwnd,psort,recurse) (BOOL)SNDMSG((hwnd),TVM_SORTCHILDRENCB,(WPARAM)(recurse),(LPARAM)(LPTV_SORTCB)(psort))
3514
3515 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
3516 #define TreeView_EndEditLabelNow(hwnd,fCancel) (BOOL)SNDMSG((hwnd),TVM_ENDEDITLABELNOW,(WPARAM)(fCancel),0)
3517
3518 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
3519 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
3520
3521 #define TVM_GETISEARCHSTRING __MINGW_NAME_AW(TVM_GETISEARCHSTRING)
3522
3523 #define TVM_SETTOOLTIPS (TV_FIRST+24)
3524 #define TreeView_SetToolTips(hwnd,hwndTT) (HWND)SNDMSG((hwnd),TVM_SETTOOLTIPS,(WPARAM)(hwndTT),0)
3525 #define TVM_GETTOOLTIPS (TV_FIRST+25)
3526 #define TreeView_GetToolTips(hwnd) (HWND)SNDMSG((hwnd),TVM_GETTOOLTIPS,0,0)
3527 #define TreeView_GetISearchString(hwndTV,lpsz) (BOOL)SNDMSG((hwndTV),TVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz))
3528
3529 #define TVM_SETINSERTMARK (TV_FIRST+26)
3530 #define TreeView_SetInsertMark(hwnd,hItem,fAfter) (BOOL)SNDMSG((hwnd),TVM_SETINSERTMARK,(WPARAM) (fAfter),(LPARAM) (hItem))
3531 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3532 #define TreeView_SetUnicodeFormat(hwnd,fUnicode) (BOOL)SNDMSG((hwnd),TVM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
3533 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3534 #define TreeView_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd),TVM_GETUNICODEFORMAT,0,0)
3535
3536 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
3537 #define TreeView_SetItemHeight(hwnd,iHeight) (int)SNDMSG((hwnd),TVM_SETITEMHEIGHT,(WPARAM)(iHeight),0)
3538 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
3539 #define TreeView_GetItemHeight(hwnd) (int)SNDMSG((hwnd),TVM_GETITEMHEIGHT,0,0)
3540 #define TVM_SETBKCOLOR (TV_FIRST+29)
3541 #define TreeView_SetBkColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETBKCOLOR,0,(LPARAM)(clr))
3542 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
3543 #define TreeView_SetTextColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETTEXTCOLOR,0,(LPARAM)(clr))
3544 #define TVM_GETBKCOLOR (TV_FIRST+31)
3545 #define TreeView_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETBKCOLOR,0,0)
3546 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
3547 #define TreeView_GetTextColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETTEXTCOLOR,0,0)
3548 #define TVM_SETSCROLLTIME (TV_FIRST+33)
3549 #define TreeView_SetScrollTime(hwnd,uTime) (UINT)SNDMSG((hwnd),TVM_SETSCROLLTIME,uTime,0)
3550 #define TVM_GETSCROLLTIME (TV_FIRST+34)
3551 #define TreeView_GetScrollTime(hwnd) (UINT)SNDMSG((hwnd),TVM_GETSCROLLTIME,0,0)
3552 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
3553 #define TreeView_SetInsertMarkColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETINSERTMARKCOLOR,0,(LPARAM)(clr))
3554 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
3555 #define TreeView_GetInsertMarkColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETINSERTMARKCOLOR,0,0)
3556
3557 #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);}
3558 #define TreeView_SetCheckState(hwndTV,hti,fCheck) TreeView_SetItemState(hwndTV,hti,INDEXTOSTATEIMAGEMASK((fCheck)?2:1),TVIS_STATEIMAGEMASK)
3559 #define TVM_GETITEMSTATE (TV_FIRST+39)
3560 #define TreeView_GetItemState(hwndTV,hti,mask) (UINT)SNDMSG((hwndTV),TVM_GETITEMSTATE,(WPARAM)(hti),(LPARAM)(mask))
3561 #define TreeView_GetCheckState(hwndTV,hti) ((((UINT)(SNDMSG((hwndTV),TVM_GETITEMSTATE,(WPARAM)(hti),TVIS_STATEIMAGEMASK))) >> 12) -1)
3562 #define TVM_SETLINECOLOR (TV_FIRST+40)
3563 #define TreeView_SetLineColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETLINECOLOR,0,(LPARAM)(clr))
3564 #define TVM_GETLINECOLOR (TV_FIRST+41)
3565 #define TreeView_GetLineColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETLINECOLOR,0,0)
3566
3567 #define TVM_MAPACCIDTOHTREEITEM (TV_FIRST+42)
3568 #define TreeView_MapAccIDToHTREEITEM(hwnd,id) (HTREEITEM)SNDMSG((hwnd),TVM_MAPACCIDTOHTREEITEM,id,0)
3569
3570 #define TVM_MAPHTREEITEMTOACCID (TV_FIRST+43)
3571 #define TreeView_MapHTREEITEMToAccID(hwnd,htreeitem) (UINT)SNDMSG((hwnd),TVM_MAPHTREEITEMTOACCID,(WPARAM)htreeitem,0)
3572
3573 typedef int (CALLBACK *PFNTVCOMPARE)(LPARAM lParam1,LPARAM lParam2,LPARAM lParamSort);
3574
3575 #define LPTV_SORTCB LPTVSORTCB
3576 #define TV_SORTCB TVSORTCB
3577
3578 typedef struct tagTVSORTCB {
3579 HTREEITEM hParent;
3580 PFNTVCOMPARE lpfnCompare;
3581 LPARAM lParam;
3582 } TVSORTCB,*LPTVSORTCB;
3583
3584 #define LPNM_TREEVIEWA LPNMTREEVIEWA
3585 #define LPNM_TREEVIEWW LPNMTREEVIEWW
3586 #define NM_TREEVIEWW NMTREEVIEWW
3587 #define NM_TREEVIEWA NMTREEVIEWA
3588 #define LPNM_TREEVIEW LPNMTREEVIEW
3589 #define NM_TREEVIEW NMTREEVIEW
3590
3591 typedef struct tagNMTREEVIEWA {
3592 NMHDR hdr;
3593 UINT action;
3594 TVITEMA itemOld;
3595 TVITEMA itemNew;
3596 POINT ptDrag;
3597 } NMTREEVIEWA,*LPNMTREEVIEWA;
3598
3599 typedef struct tagNMTREEVIEWW {
3600 NMHDR hdr;
3601 UINT action;
3602 TVITEMW itemOld;
3603 TVITEMW itemNew;
3604 POINT ptDrag;
3605 } NMTREEVIEWW,*LPNMTREEVIEWW;
3606
3607 #define NMTREEVIEW __MINGW_NAME_AW(NMTREEVIEW)
3608 #define LPNMTREEVIEW __MINGW_NAME_AW(LPNMTREEVIEW)
3609
3610 #define TVN_SELCHANGINGA (TVN_FIRST-1)
3611 #define TVN_SELCHANGINGW (TVN_FIRST-50)
3612 #define TVN_SELCHANGEDA (TVN_FIRST-2)
3613 #define TVN_SELCHANGEDW (TVN_FIRST-51)
3614
3615 #define TVC_UNKNOWN 0x0
3616 #define TVC_BYMOUSE 0x1
3617 #define TVC_BYKEYBOARD 0x2
3618
3619 #define TVN_GETDISPINFOA (TVN_FIRST-3)
3620 #define TVN_GETDISPINFOW (TVN_FIRST-52)
3621 #define TVN_SETDISPINFOA (TVN_FIRST-4)
3622 #define TVN_SETDISPINFOW (TVN_FIRST-53)
3623
3624 #define TVIF_DI_SETITEM 0x1000
3625
3626 #define TV_DISPINFOA NMTVDISPINFOA
3627 #define TV_DISPINFOW NMTVDISPINFOW
3628 #define TV_DISPINFO NMTVDISPINFO
3629
3630 typedef struct tagTVDISPINFOA {
3631 NMHDR hdr;
3632 TVITEMA item;
3633 } NMTVDISPINFOA,*LPNMTVDISPINFOA;
3634
3635 typedef struct tagTVDISPINFOW {
3636 NMHDR hdr;
3637 TVITEMW item;
3638 } NMTVDISPINFOW,*LPNMTVDISPINFOW;
3639
3640 #define NMTVDISPINFO __MINGW_NAME_AW(NMTVDISPINFO)
3641 #define LPNMTVDISPINFO __MINGW_NAME_AW(LPNMTVDISPINFO)
3642
3643 #if (_WIN32_IE >= 0x0600)
3644
3645 typedef struct tagTVDISPINFOEXA {
3646 NMHDR hdr;
3647 TVITEMEXA item;
3648 } NMTVDISPINFOEXA, *LPNMTVDISPINFOEXA;
3649
3650 typedef struct tagTVDISPINFOEXW {
3651 NMHDR hdr;
3652 TVITEMEXW item;
3653 } NMTVDISPINFOEXW, *LPNMTVDISPINFOEXW;
3654
3655 #define NMTVDISPINFOEX __MINGW_NAME_AW(NMTVDISPINFOEX)
3656 #define LPNMTVDISPINFOEX __MINGW_NAME_AW(LPNMTVDISPINFOEX)
3657
3658 #define TV_DISPINFOEXA NMTVDISPINFOEXA
3659 #define TV_DISPINFOEXW NMTVDISPINFOEXW
3660 #define TV_DISPINFOEX NMTVDISPINFOEX
3661
3662 #endif /* (_WIN32_IE >= 0x0600) */
3663
3664 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
3665 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
3666 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
3667 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
3668 #define TVN_BEGINDRAGA (TVN_FIRST-7)
3669 #define TVN_BEGINDRAGW (TVN_FIRST-56)
3670 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
3671 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
3672 #define TVN_DELETEITEMA (TVN_FIRST-9)
3673 #define TVN_DELETEITEMW (TVN_FIRST-58)
3674 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
3675 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
3676 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
3677 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
3678 #define TVN_KEYDOWN (TVN_FIRST-12)
3679 #define TVN_GETINFOTIPA (TVN_FIRST-13)
3680 #define TVN_GETINFOTIPW (TVN_FIRST-14)
3681 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
3682
3683 #define TVNRET_DEFAULT 0
3684 #define TVNRET_SKIPOLD 1
3685 #define TVNRET_SKIPNEW 2
3686
3687 #define TV_KEYDOWN NMTVKEYDOWN
3688
3689 #include <pshpack1.h>
3690
3691 typedef struct tagTVKEYDOWN {
3692 NMHDR hdr;
3693 WORD wVKey;
3694 UINT flags;
3695 } NMTVKEYDOWN,*LPNMTVKEYDOWN;
3696
3697 #include <poppack.h>
3698
3699 #define TVN_SELCHANGING __MINGW_NAME_AW(TVN_SELCHANGING)
3700 #define TVN_SELCHANGED __MINGW_NAME_AW(TVN_SELCHANGED)
3701 #define TVN_GETDISPINFO __MINGW_NAME_AW(TVN_GETDISPINFO)
3702 #define TVN_SETDISPINFO __MINGW_NAME_AW(TVN_SETDISPINFO)
3703 #define TVN_ITEMEXPANDING __MINGW_NAME_AW(TVN_ITEMEXPANDING)
3704 #define TVN_ITEMEXPANDED __MINGW_NAME_AW(TVN_ITEMEXPANDED)
3705 #define TVN_BEGINDRAG __MINGW_NAME_AW(TVN_BEGINDRAG)
3706 #define TVN_BEGINRDRAG __MINGW_NAME_AW(TVN_BEGINRDRAG)
3707 #define TVN_DELETEITEM __MINGW_NAME_AW(TVN_DELETEITEM)
3708 #define TVN_BEGINLABELEDIT __MINGW_NAME_AW(TVN_BEGINLABELEDIT)
3709 #define TVN_ENDLABELEDIT __MINGW_NAME_AW(TVN_ENDLABELEDIT)
3710
3711 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW,clrTextBk)
3712
3713 typedef struct tagNMTVCUSTOMDRAW {
3714 NMCUSTOMDRAW nmcd;
3715 COLORREF clrText;
3716 COLORREF clrTextBk;
3717 int iLevel;
3718 } NMTVCUSTOMDRAW,*LPNMTVCUSTOMDRAW;
3719
3720 typedef struct tagNMTVGETINFOTIPA {
3721 NMHDR hdr;
3722 LPSTR pszText;
3723 int cchTextMax;
3724 HTREEITEM hItem;
3725 LPARAM lParam;
3726 } NMTVGETINFOTIPA,*LPNMTVGETINFOTIPA;
3727
3728 typedef struct tagNMTVGETINFOTIPW {
3729 NMHDR hdr;
3730 LPWSTR pszText;
3731 int cchTextMax;
3732 HTREEITEM hItem;
3733 LPARAM lParam;
3734 } NMTVGETINFOTIPW,*LPNMTVGETINFOTIPW;
3735
3736 #define TVN_GETINFOTIP __MINGW_NAME_AW(TVN_GETINFOTIP)
3737 #define NMTVGETINFOTIP __MINGW_NAME_AW(NMTVGETINFOTIP)
3738 #define LPNMTVGETINFOTIP __MINGW_NAME_AW(LPNMTVGETINFOTIP)
3739
3740 #define TVCDRF_NOIMAGES 0x10000
3741
3742 #endif /* !NOTREEVIEW */
3743
3744 #ifndef NOUSEREXCONTROLS
3745
3746 #define WC_COMBOBOXEXW L"ComboBoxEx32"
3747 #define WC_COMBOBOXEXA "ComboBoxEx32"
3748
3749 #define WC_COMBOBOXEX __MINGW_NAME_AW(WC_COMBOBOXEX)
3750
3751 #define CBEIF_TEXT 0x1
3752 #define CBEIF_IMAGE 0x2
3753 #define CBEIF_SELECTEDIMAGE 0x4
3754 #define CBEIF_OVERLAY 0x8
3755 #define CBEIF_INDENT 0x10
3756 #define CBEIF_LPARAM 0x20
3757