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