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