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