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