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