9f3366e3474ee350ed398cbdba99e2e3048171e3
[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_PARTIAL 0x8
2396 #define LVFI_WRAP 0x20
2397 #define LVFI_NEARESTXY 0x40
2398
2399 #define LV_FINDINFOA LVFINDINFOA
2400 #define LV_FINDINFOW LVFINDINFOW
2401 #define LV_FINDINFO LVFINDINFO
2402
2403 typedef struct tagLVFINDINFOA {
2404 UINT flags;
2405 LPCSTR psz;
2406 LPARAM lParam;
2407 POINT pt;
2408 UINT vkDirection;
2409 } LVFINDINFOA,*LPFINDINFOA;
2410
2411 typedef struct tagLVFINDINFOW {
2412 UINT flags;
2413 LPCWSTR psz;
2414 LPARAM lParam;
2415 POINT pt;
2416 UINT vkDirection;
2417 } LVFINDINFOW,*LPFINDINFOW;
2418
2419 #ifdef UNICODE
2420 #define LVFINDINFO LVFINDINFOW
2421 #else
2422 #define LVFINDINFO LVFINDINFOA
2423 #endif
2424
2425 #define LVM_FINDITEMA (LVM_FIRST+13)
2426 #define LVM_FINDITEMW (LVM_FIRST+83)
2427 #ifdef UNICODE
2428 #define LVM_FINDITEM LVM_FINDITEMW
2429 #else
2430 #define LVM_FINDITEM LVM_FINDITEMA
2431 #endif
2432
2433 #define ListView_FindItem(hwnd,iStart,plvfi) (int)SNDMSG((hwnd),LVM_FINDITEM,(WPARAM)(int)(iStart),(LPARAM)(const LV_FINDINFO *)(plvfi))
2434
2435 #define LVIR_BOUNDS 0
2436 #define LVIR_ICON 1
2437 #define LVIR_LABEL 2
2438 #define LVIR_SELECTBOUNDS 3
2439
2440 #define LVM_GETITEMRECT (LVM_FIRST+14)
2441 #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))
2442
2443 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
2444 #define ListView_SetItemPosition(hwndLV,i,x,y) (WINBOOL)SNDMSG((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(int)(i),MAKELPARAM((x),(y)))
2445
2446 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
2447 #define ListView_GetItemPosition(hwndLV,i,ppt) (WINBOOL)SNDMSG((hwndLV),LVM_GETITEMPOSITION,(WPARAM)(int)(i),(LPARAM)(POINT *)(ppt))
2448
2449 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
2450 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
2451 #ifdef UNICODE
2452 #define LVM_GETSTRINGWIDTH LVM_GETSTRINGWIDTHW
2453 #else
2454 #define LVM_GETSTRINGWIDTH LVM_GETSTRINGWIDTHA
2455 #endif
2456
2457 #define ListView_GetStringWidth(hwndLV,psz) (int)SNDMSG((hwndLV),LVM_GETSTRINGWIDTH,0,(LPARAM)(LPCTSTR)(psz))
2458
2459 #define LVHT_NOWHERE 0x1
2460 #define LVHT_ONITEMICON 0x2
2461 #define LVHT_ONITEMLABEL 0x4
2462 #define LVHT_ONITEMSTATEICON 0x8
2463 #define LVHT_ONITEM (LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON)
2464
2465 #define LVHT_ABOVE 0x8
2466 #define LVHT_BELOW 0x10
2467 #define LVHT_TORIGHT 0x20
2468 #define LVHT_TOLEFT 0x40
2469
2470 #define LV_HITTESTINFO LVHITTESTINFO
2471
2472 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
2473
2474 typedef struct tagLVHITTESTINFO {
2475 POINT pt;
2476 UINT flags;
2477 int iItem;
2478 int iSubItem;
2479 } LVHITTESTINFO,*LPLVHITTESTINFO;
2480
2481 #define LVM_HITTEST (LVM_FIRST+18)
2482 #define ListView_HitTest(hwndLV,pinfo) (int)SNDMSG((hwndLV),LVM_HITTEST,0,(LPARAM)(LV_HITTESTINFO *)(pinfo))
2483
2484 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
2485 #define ListView_EnsureVisible(hwndLV,i,fPartialOK) (WINBOOL)SNDMSG((hwndLV),LVM_ENSUREVISIBLE,(WPARAM)(int)(i),MAKELPARAM((fPartialOK),0))
2486
2487 #define LVM_SCROLL (LVM_FIRST+20)
2488 #define ListView_Scroll(hwndLV,dx,dy) (WINBOOL)SNDMSG((hwndLV),LVM_SCROLL,(WPARAM)(int)(dx),(LPARAM)(int)(dy))
2489
2490 #define LVM_REDRAWITEMS (LVM_FIRST+21)
2491 #define ListView_RedrawItems(hwndLV,iFirst,iLast) (WINBOOL)SNDMSG((hwndLV),LVM_REDRAWITEMS,(WPARAM)(int)(iFirst),(LPARAM)(int)(iLast))
2492
2493 #define LVA_DEFAULT 0x0
2494 #define LVA_ALIGNLEFT 0x1
2495 #define LVA_ALIGNTOP 0x2
2496 #define LVA_SNAPTOGRID 0x5
2497
2498 #define LVM_ARRANGE (LVM_FIRST+22)
2499 #define ListView_Arrange(hwndLV,code) (WINBOOL)SNDMSG((hwndLV),LVM_ARRANGE,(WPARAM)(UINT)(code),0L)
2500
2501 #define LVM_EDITLABELA (LVM_FIRST+23)
2502 #define LVM_EDITLABELW (LVM_FIRST+118)
2503 #ifdef UNICODE
2504 #define LVM_EDITLABEL LVM_EDITLABELW
2505 #else
2506 #define LVM_EDITLABEL LVM_EDITLABELA
2507 #endif
2508
2509 #define ListView_EditLabel(hwndLV,i) (HWND)SNDMSG((hwndLV),LVM_EDITLABEL,(WPARAM)(int)(i),0L)
2510
2511 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
2512 #define ListView_GetEditControl(hwndLV) (HWND)SNDMSG((hwndLV),LVM_GETEDITCONTROL,0,0L)
2513
2514 #define LV_COLUMNA LVCOLUMNA
2515 #define LV_COLUMNW LVCOLUMNW
2516 #define LV_COLUMN LVCOLUMN
2517
2518 #define LVCOLUMNA_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNA,iSubItem)
2519 #define LVCOLUMNW_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNW,iSubItem)
2520
2521 typedef struct tagLVCOLUMNA {
2522 UINT mask;
2523 int fmt;
2524 int cx;
2525 LPSTR pszText;
2526 int cchTextMax;
2527 int iSubItem;
2528 int iImage;
2529 int iOrder;
2530 } LVCOLUMNA,*LPLVCOLUMNA;
2531
2532 typedef struct tagLVCOLUMNW {
2533 UINT mask;
2534 int fmt;
2535 int cx;
2536 LPWSTR pszText;
2537 int cchTextMax;
2538 int iSubItem;
2539 #if (_WIN32_IE >= 0x0300)
2540 int iImage;
2541 int iOrder;
2542 #endif
2543 #if (_WIN32_WINNT >= 0x0600)
2544 int cxMin;
2545 int cxDefault;
2546 int cxIdeal;
2547 #endif
2548 } LVCOLUMNW,*LPLVCOLUMNW;
2549
2550 #ifdef UNICODE
2551 #define LVCOLUMN LVCOLUMNW
2552 #define LPLVCOLUMN LPLVCOLUMNW
2553 #define LVCOLUMN_V1_SIZE LVCOLUMNW_V1_SIZE
2554 #else
2555 #define LVCOLUMN LVCOLUMNA
2556 #define LPLVCOLUMN LPLVCOLUMNA
2557 #define LVCOLUMN_V1_SIZE LVCOLUMNA_V1_SIZE
2558 #endif
2559
2560 #define LVCF_FMT 0x1
2561 #define LVCF_WIDTH 0x2
2562 #define LVCF_TEXT 0x4
2563 #define LVCF_SUBITEM 0x8
2564 #define LVCF_IMAGE 0x10
2565 #define LVCF_ORDER 0x20
2566 #if (_WIN32_WINNT >= 0x0600)
2567 #define LVCF_MINWIDTH 0x40
2568 #define LVCF_DEFAULTWIDTH 0x80
2569 #define LVCF_IDEALWIDTH 0x100
2570 #endif /* (_WIN32_WINNT >= 0x0600) */
2571
2572 #define LVCFMT_LEFT 0x0
2573 #define LVCFMT_RIGHT 0x1
2574 #define LVCFMT_CENTER 0x2
2575 #define LVCFMT_JUSTIFYMASK 0x3
2576 #define LVCFMT_IMAGE 0x800
2577 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2578 #define LVCFMT_COL_HAS_IMAGES 0x8000
2579 #if (_WIN32_WINNT >= 0x0600)
2580 #define LVCFMT_FIXED_WIDTH 0x100
2581 #define LVCFMT_NO_DPI_SCALE 0x40000
2582 #define LVCFMT_FIXED_RATIO 0x80000
2583 #define LVCFMT_LINE_BREAK 0x100000
2584 #define LVCFMT_FILL 0x200000
2585 #define LVCFMT_WRAP 0x400000
2586 #define LVCFMT_NO_TITLE 0x800000
2587 #define LVCFMT_SPLITBUTTON 0x1000000
2588 #define LVCFMT_TILE_PLACEMENTMASK (LVCFMT_LINE_BREAK|LVCFMT_FILL)
2589 #endif /* (_WIN32_WINNT >= 0x0600) */
2590
2591 #define LVM_GETCOLUMNA (LVM_FIRST+25)
2592 #define LVM_GETCOLUMNW (LVM_FIRST+95)
2593 #ifdef UNICODE
2594 #define LVM_GETCOLUMN LVM_GETCOLUMNW
2595 #else
2596 #define LVM_GETCOLUMN LVM_GETCOLUMNA
2597 #endif
2598
2599 #define ListView_GetColumn(hwnd,iCol,pcol) (WINBOOL)SNDMSG((hwnd),LVM_GETCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(LV_COLUMN *)(pcol))
2600
2601 #define LVM_SETCOLUMNA (LVM_FIRST+26)
2602 #define LVM_SETCOLUMNW (LVM_FIRST+96)
2603 #ifdef UNICODE
2604 #define LVM_SETCOLUMN LVM_SETCOLUMNW
2605 #else
2606 #define LVM_SETCOLUMN LVM_SETCOLUMNA
2607 #endif
2608
2609 #define ListView_SetColumn(hwnd,iCol,pcol) (WINBOOL)SNDMSG((hwnd),LVM_SETCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(const LV_COLUMN *)(pcol))
2610
2611 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
2612 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
2613 #ifdef UNICODE
2614 #define LVM_INSERTCOLUMN LVM_INSERTCOLUMNW
2615 #else
2616 #define LVM_INSERTCOLUMN LVM_INSERTCOLUMNA
2617 #endif
2618
2619 #define ListView_InsertColumn(hwnd,iCol,pcol) (int)SNDMSG((hwnd),LVM_INSERTCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(const LV_COLUMN *)(pcol))
2620
2621 #define LVM_DELETECOLUMN (LVM_FIRST+28)
2622 #define ListView_DeleteColumn(hwnd,iCol) (WINBOOL)SNDMSG((hwnd),LVM_DELETECOLUMN,(WPARAM)(int)(iCol),0)
2623
2624 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
2625 #define ListView_GetColumnWidth(hwnd,iCol) (int)SNDMSG((hwnd),LVM_GETCOLUMNWIDTH,(WPARAM)(int)(iCol),0)
2626
2627 #define LVSCW_AUTOSIZE -1
2628 #define LVSCW_AUTOSIZE_USEHEADER -2
2629 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
2630
2631 #define ListView_SetColumnWidth(hwnd,iCol,cx) (WINBOOL)SNDMSG((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(int)(iCol),MAKELPARAM((cx),0))
2632
2633 #define LVM_GETHEADER (LVM_FIRST+31)
2634 #define ListView_GetHeader(hwnd) (HWND)SNDMSG((hwnd),LVM_GETHEADER,0,0L)
2635 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
2636 #define ListView_CreateDragImage(hwnd,i,lpptUpLeft) (HIMAGELIST)SNDMSG((hwnd),LVM_CREATEDRAGIMAGE,(WPARAM)(int)(i),(LPARAM)(LPPOINT)(lpptUpLeft))
2637 #define LVM_GETVIEWRECT (LVM_FIRST+34)
2638 #define ListView_GetViewRect(hwnd,prc) (WINBOOL)SNDMSG((hwnd),LVM_GETVIEWRECT,0,(LPARAM)(RECT *)(prc))
2639 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
2640 #define ListView_GetTextColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETTEXTCOLOR,0,0L)
2641 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
2642 #define ListView_SetTextColor(hwnd,clrText) (WINBOOL)SNDMSG((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrText))
2643 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
2644 #define ListView_GetTextBkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETTEXTBKCOLOR,0,0L)
2645 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
2646 #define ListView_SetTextBkColor(hwnd,clrTextBk) (WINBOOL)SNDMSG((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrTextBk))
2647 #define LVM_GETTOPINDEX (LVM_FIRST+39)
2648 #define ListView_GetTopIndex(hwndLV) (int)SNDMSG((hwndLV),LVM_GETTOPINDEX,0,0)
2649 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
2650 #define ListView_GetCountPerPage(hwndLV) (int)SNDMSG((hwndLV),LVM_GETCOUNTPERPAGE,0,0)
2651 #define LVM_GETORIGIN (LVM_FIRST+41)
2652 #define ListView_GetOrigin(hwndLV,ppt) (WINBOOL)SNDMSG((hwndLV),LVM_GETORIGIN,(WPARAM)0,(LPARAM)(POINT *)(ppt))
2653 #define LVM_UPDATE (LVM_FIRST+42)
2654 #define ListView_Update(hwndLV,i) (WINBOOL)SNDMSG((hwndLV),LVM_UPDATE,(WPARAM)(i),0L)
2655 #define LVM_SETITEMSTATE (LVM_FIRST+43)
2656 #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);}
2657 #define ListView_SetCheckState(hwndLV,i,fCheck) ListView_SetItemState(hwndLV,i,INDEXTOSTATEIMAGEMASK((fCheck)?2:1),LVIS_STATEIMAGEMASK)
2658 #define LVM_GETITEMSTATE (LVM_FIRST+44)
2659 #define ListView_GetItemState(hwndLV,i,mask) (UINT)SNDMSG((hwndLV),LVM_GETITEMSTATE,(WPARAM)(i),(LPARAM)(mask))
2660 #define ListView_GetCheckState(hwndLV,i) ((((UINT)(SNDMSG((hwndLV),LVM_GETITEMSTATE,(WPARAM)(i),LVIS_STATEIMAGEMASK))) >> 12) -1)
2661
2662 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
2663 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
2664
2665 #ifdef UNICODE
2666 #define LVM_GETITEMTEXT LVM_GETITEMTEXTW
2667 #else
2668 #define LVM_GETITEMTEXT LVM_GETITEMTEXTA
2669 #endif
2670
2671 #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);}
2672
2673 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
2674 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
2675
2676 #ifdef UNICODE
2677 #define LVM_SETITEMTEXT LVM_SETITEMTEXTW
2678 #else
2679 #define LVM_SETITEMTEXT LVM_SETITEMTEXTA
2680 #endif
2681
2682 #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);}
2683
2684 #define LVSICF_NOINVALIDATEALL 0x1
2685 #define LVSICF_NOSCROLL 0x2
2686
2687 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
2688 #define ListView_SetItemCount(hwndLV,cItems) SNDMSG((hwndLV),LVM_SETITEMCOUNT,(WPARAM)(cItems),0)
2689 #define ListView_SetItemCountEx(hwndLV,cItems,dwFlags) SNDMSG((hwndLV),LVM_SETITEMCOUNT,(WPARAM)(cItems),(LPARAM)(dwFlags))
2690
2691 typedef int (CALLBACK *PFNLVCOMPARE)(LPARAM,LPARAM,LPARAM);
2692
2693 #define LVM_SORTITEMS (LVM_FIRST+48)
2694 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) (WINBOOL)SNDMSG((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)(_lPrm),(LPARAM)(PFNLVCOMPARE)(_pfnCompare))
2695
2696 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
2697 #define ListView_SetItemPosition32(hwndLV,i,x0,y0) { POINT ptNewPos; ptNewPos.x = x0; ptNewPos.y = y0; SNDMSG((hwndLV),LVM_SETITEMPOSITION32,(WPARAM)(int)(i),(LPARAM)&ptNewPos); }
2698
2699 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
2700 #define ListView_GetSelectedCount(hwndLV) (UINT)SNDMSG((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
2701
2702 #define LVM_GETITEMSPACING (LVM_FIRST+51)
2703 #define ListView_GetItemSpacing(hwndLV,fSmall) (DWORD)SNDMSG((hwndLV),LVM_GETITEMSPACING,fSmall,0L)
2704
2705 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
2706 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
2707
2708 #ifdef UNICODE
2709 #define LVM_GETISEARCHSTRING LVM_GETISEARCHSTRINGW
2710 #else
2711 #define LVM_GETISEARCHSTRING LVM_GETISEARCHSTRINGA
2712 #endif
2713
2714 #define ListView_GetISearchString(hwndLV,lpsz) (WINBOOL)SNDMSG((hwndLV),LVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz))
2715
2716 #define LVM_SETICONSPACING (LVM_FIRST+53)
2717
2718 #define ListView_SetIconSpacing(hwndLV,cx,cy) (DWORD)SNDMSG((hwndLV),LVM_SETICONSPACING,0,MAKELONG(cx,cy))
2719 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
2720 #define ListView_SetExtendedListViewStyle(hwndLV,dw) (DWORD)SNDMSG((hwndLV),LVM_SETEXTENDEDLISTVIEWSTYLE,0,dw)
2721 #define ListView_SetExtendedListViewStyleEx(hwndLV,dwMask,dw) (DWORD)SNDMSG((hwndLV),LVM_SETEXTENDEDLISTVIEWSTYLE,dwMask,dw)
2722 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
2723 #define ListView_GetExtendedListViewStyle(hwndLV) (DWORD)SNDMSG((hwndLV),LVM_GETEXTENDEDLISTVIEWSTYLE,0,0)
2724 #define LVS_EX_GRIDLINES 0x1
2725 #define LVS_EX_SUBITEMIMAGES 0x2
2726 #define LVS_EX_CHECKBOXES 0x4
2727 #define LVS_EX_TRACKSELECT 0x8
2728 #define LVS_EX_HEADERDRAGDROP 0x10
2729 #define LVS_EX_FULLROWSELECT 0x20
2730 #define LVS_EX_ONECLICKACTIVATE 0x40
2731 #define LVS_EX_TWOCLICKACTIVATE 0x80
2732 #define LVS_EX_FLATSB 0x100
2733 #define LVS_EX_REGIONAL 0x200
2734 #define LVS_EX_INFOTIP 0x400
2735 #define LVS_EX_UNDERLINEHOT 0x800
2736 #define LVS_EX_UNDERLINECOLD 0x1000
2737 #define LVS_EX_MULTIWORKAREAS 0x2000
2738 #define LVS_EX_LABELTIP 0x4000
2739 #define LVS_EX_BORDERSELECT 0x8000
2740 #define LVS_EX_DOUBLEBUFFER 0x10000
2741 #define LVS_EX_HIDELABELS 0x20000
2742 #define LVS_EX_SINGLEROW 0x40000
2743 #define LVS_EX_SNAPTOGRID 0x80000
2744 #define LVS_EX_SIMPLESELECT 0x100000
2745 #if _WIN32_WINNT >= 0x0600
2746 #define LVS_EX_JUSTIFYCOLUMNS 0x200000
2747 #define LVS_EX_TRANSPARENTBKGND 0x400000
2748 #define LVS_EX_TRANSPARENTSHADOWTEXT 0x800000
2749 #define LVS_EX_AUTOAUTOARRANGE 0x1000000
2750 #define LVS_EX_HEADERINALLVIEWS 0x2000000
2751 #define LVS_EX_AUTOCHECKSELECT 0x8000000
2752 #define LVS_EX_AUTOSIZECOLUMNS 0x10000000
2753 #define LVS_EX_COLUMNSNAPPOINTS 0x40000000
2754 #define LVS_EX_COLUMNOVERFLOW 0x80000000
2755 #endif
2756
2757 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
2758 #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))
2759 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
2760 #define ListView_SubItemHitTest(hwnd,plvhti) (int)SNDMSG((hwnd),LVM_SUBITEMHITTEST,0,(LPARAM)(LPLVHITTESTINFO)(plvhti))
2761 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
2762 #define ListView_SetColumnOrderArray(hwnd,iCount,pi) (WINBOOL)SNDMSG((hwnd),LVM_SETCOLUMNORDERARRAY,(WPARAM)(iCount),(LPARAM)(LPINT)(pi))
2763 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
2764 #define ListView_GetColumnOrderArray(hwnd,iCount,pi) (WINBOOL)SNDMSG((hwnd),LVM_GETCOLUMNORDERARRAY,(WPARAM)(iCount),(LPARAM)(LPINT)(pi))
2765 #define LVM_SETHOTITEM (LVM_FIRST+60)
2766 #define ListView_SetHotItem(hwnd,i) (int)SNDMSG((hwnd),LVM_SETHOTITEM,(WPARAM)(i),0)
2767 #define LVM_GETHOTITEM (LVM_FIRST+61)
2768 #define ListView_GetHotItem(hwnd) (int)SNDMSG((hwnd),LVM_GETHOTITEM,0,0)
2769 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
2770 #define ListView_SetHotCursor(hwnd,hcur) (HCURSOR)SNDMSG((hwnd),LVM_SETHOTCURSOR,0,(LPARAM)(hcur))
2771 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
2772 #define ListView_GetHotCursor(hwnd) (HCURSOR)SNDMSG((hwnd),LVM_GETHOTCURSOR,0,0)
2773 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
2774 #define ListView_ApproximateViewRect(hwnd,iWidth,iHeight,iCount) (DWORD)SNDMSG((hwnd),LVM_APPROXIMATEVIEWRECT,iCount,MAKELPARAM(iWidth,iHeight))
2775
2776 #define LV_MAX_WORKAREAS 16
2777 #define LVM_SETWORKAREAS (LVM_FIRST+65)
2778 #define ListView_SetWorkAreas(hwnd,nWorkAreas,prc) (WINBOOL)SNDMSG((hwnd),LVM_SETWORKAREAS,(WPARAM)(int)(nWorkAreas),(LPARAM)(RECT *)(prc))
2779 #define LVM_GETWORKAREAS (LVM_FIRST+70)
2780 #define ListView_GetWorkAreas(hwnd,nWorkAreas,prc) (WINBOOL)SNDMSG((hwnd),LVM_GETWORKAREAS,(WPARAM)(int)(nWorkAreas),(LPARAM)(RECT *)(prc))
2781 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
2782 #define ListView_GetNumberOfWorkAreas(hwnd,pnWorkAreas) (WINBOOL)SNDMSG((hwnd),LVM_GETNUMBEROFWORKAREAS,0,(LPARAM)(UINT *)(pnWorkAreas))
2783 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
2784 #define ListView_GetSelectionMark(hwnd) (int)SNDMSG((hwnd),LVM_GETSELECTIONMARK,0,0)
2785 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
2786 #define ListView_SetSelectionMark(hwnd,i) (int)SNDMSG((hwnd),LVM_SETSELECTIONMARK,0,(LPARAM)(i))
2787 #define LVM_SETHOVERTIME (LVM_FIRST+71)
2788 #define ListView_SetHoverTime(hwndLV,dwHoverTimeMs) (DWORD)SNDMSG((hwndLV),LVM_SETHOVERTIME,0,(LPARAM)(dwHoverTimeMs))
2789 #define LVM_GETHOVERTIME (LVM_FIRST+72)
2790 #define ListView_GetHoverTime(hwndLV) (DWORD)SNDMSG((hwndLV),LVM_GETHOVERTIME,0,0)
2791 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
2792 #define ListView_SetToolTips(hwndLV,hwndNewHwnd) (HWND)SNDMSG((hwndLV),LVM_SETTOOLTIPS,(WPARAM)(hwndNewHwnd),0)
2793 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
2794 #define ListView_GetToolTips(hwndLV) (HWND)SNDMSG((hwndLV),LVM_GETTOOLTIPS,0,0)
2795 #define LVM_SORTITEMSEX (LVM_FIRST+81)
2796 #define ListView_SortItemsEx(hwndLV,_pfnCompare,_lPrm) (WINBOOL)SNDMSG((hwndLV),LVM_SORTITEMSEX,(WPARAM)(LPARAM)(_lPrm),(LPARAM)(PFNLVCOMPARE)(_pfnCompare))
2797
2798 typedef struct tagLVBKIMAGEA {
2799 ULONG ulFlags;
2800 HBITMAP hbm;
2801 LPSTR pszImage;
2802 UINT cchImageMax;
2803 int xOffsetPercent;
2804 int yOffsetPercent;
2805 } LVBKIMAGEA,*LPLVBKIMAGEA;
2806
2807 typedef struct tagLVBKIMAGEW {
2808 ULONG ulFlags;
2809 HBITMAP hbm;
2810 LPWSTR pszImage;
2811 UINT cchImageMax;
2812 int xOffsetPercent;
2813 int yOffsetPercent;
2814 } LVBKIMAGEW,*LPLVBKIMAGEW;
2815
2816 #define LVBKIF_SOURCE_NONE 0x0
2817 #define LVBKIF_SOURCE_HBITMAP 0x1
2818 #define LVBKIF_SOURCE_URL 0x2
2819 #define LVBKIF_SOURCE_MASK 0x3
2820 #define LVBKIF_STYLE_NORMAL 0x0
2821 #define LVBKIF_STYLE_TILE 0x10
2822 #define LVBKIF_STYLE_MASK 0x10
2823 #define LVBKIF_FLAG_TILEOFFSET 0x100
2824 #define LVBKIF_TYPE_WATERMARK 0x10000000
2825
2826 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
2827 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
2828 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
2829 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
2830
2831 #define LVM_SETSELECTEDCOLUMN (LVM_FIRST+140)
2832 #define ListView_SetSelectedColumn(hwnd,iCol) SNDMSG((hwnd),LVM_SETSELECTEDCOLUMN,(WPARAM)iCol,0)
2833 #define LVM_SETTILEWIDTH (LVM_FIRST+141)
2834 #define ListView_SetTileWidth(hwnd,cpWidth) SNDMSG((hwnd),LVM_SETTILEWIDTH,(WPARAM)cpWidth,0)
2835 #define LV_VIEW_ICON 0x0
2836 #define LV_VIEW_DETAILS 0x1
2837 #define LV_VIEW_SMALLICON 0x2
2838 #define LV_VIEW_LIST 0x3
2839 #define LV_VIEW_TILE 0x4
2840 #define LV_VIEW_MAX 0x4
2841 #define LVM_SETVIEW (LVM_FIRST+142)
2842 #define ListView_SetView(hwnd,iView) (DWORD)SNDMSG((hwnd),LVM_SETVIEW,(WPARAM)(DWORD)iView,0)
2843 #define LVM_GETVIEW (LVM_FIRST+143)
2844 #define ListView_GetView(hwnd) (DWORD)SNDMSG((hwnd),LVM_GETVIEW,0,0)
2845 #define LVGF_NONE 0x0
2846 #define LVGF_HEADER 0x1
2847 #define LVGF_FOOTER 0x2
2848 #define LVGF_STATE 0x4
2849 #define LVGF_ALIGN 0x8
2850 #define LVGF_GROUPID 0x10
2851
2852 #define LVGS_NORMAL 0x0
2853 #define LVGS_COLLAPSED 0x1
2854 #define LVGS_HIDDEN 0x2
2855
2856 #define LVGA_HEADER_LEFT 0x1
2857 #define LVGA_HEADER_CENTER 0x2
2858 #define LVGA_HEADER_RIGHT 0x4
2859 #define LVGA_FOOTER_LEFT 0x8
2860 #define LVGA_FOOTER_CENTER 0x10
2861 #define LVGA_FOOTER_RIGHT 0x20
2862
2863 typedef struct tagLVGROUP {
2864 UINT cbSize;
2865 UINT mask;
2866 LPWSTR pszHeader;
2867 int cchHeader;
2868 LPWSTR pszFooter;
2869 int cchFooter;
2870 int iGroupId;
2871 UINT stateMask;
2872 UINT state;
2873 UINT uAlign;
2874 } LVGROUP,*PLVGROUP;
2875
2876 #define LVM_INSERTGROUP (LVM_FIRST+145)
2877 #define ListView_InsertGroup(hwnd,index,pgrp) SNDMSG((hwnd),LVM_INSERTGROUP,(WPARAM)index,(LPARAM)pgrp)
2878 #define LVM_SETGROUPINFO (LVM_FIRST+147)
2879 #define ListView_SetGroupInfo(hwnd,iGroupId,pgrp) SNDMSG((hwnd),LVM_SETGROUPINFO,(WPARAM)iGroupId,(LPARAM)pgrp)
2880 #define LVM_GETGROUPINFO (LVM_FIRST+149)
2881 #define ListView_GetGroupInfo(hwnd,iGroupId,pgrp) SNDMSG((hwnd),LVM_GETGROUPINFO,(WPARAM)iGroupId,(LPARAM)pgrp)
2882 #define LVM_REMOVEGROUP (LVM_FIRST+150)
2883 #define ListView_RemoveGroup(hwnd,iGroupId) SNDMSG((hwnd),LVM_REMOVEGROUP,(WPARAM)iGroupId,0)
2884 #define LVM_MOVEGROUP (LVM_FIRST+151)
2885 #define ListView_MoveGroup(hwnd,iGroupId,toIndex) SNDMSG((hwnd),LVM_MOVEGROUP,(WPARAM)iGroupId,(LPARAM)toIndex)
2886 #define LVM_MOVEITEMTOGROUP (LVM_FIRST+154)
2887 #define ListView_MoveItemToGroup(hwnd,idItemFrom,idGroupTo) SNDMSG((hwnd),LVM_MOVEITEMTOGROUP,(WPARAM)idItemFrom,(LPARAM)idGroupTo)
2888 #define LVGMF_NONE 0x0
2889 #define LVGMF_BORDERSIZE 0x1
2890 #define LVGMF_BORDERCOLOR 0x2
2891 #define LVGMF_TEXTCOLOR 0x4
2892
2893 typedef struct tagLVGROUPMETRICS {
2894 UINT cbSize;
2895 UINT mask;
2896 UINT Left;
2897 UINT Top;
2898 UINT Right;
2899 UINT Bottom;
2900 COLORREF crLeft;
2901 COLORREF crTop;
2902 COLORREF crRight;
2903 COLORREF crBottom;
2904 COLORREF crHeader;
2905 COLORREF crFooter;
2906 } LVGROUPMETRICS,*PLVGROUPMETRICS;
2907
2908 #define LVM_SETGROUPMETRICS (LVM_FIRST+155)
2909 #define ListView_SetGroupMetrics(hwnd,pGroupMetrics) SNDMSG((hwnd),LVM_SETGROUPMETRICS,0,(LPARAM)pGroupMetrics)
2910 #define LVM_GETGROUPMETRICS (LVM_FIRST+156)
2911 #define ListView_GetGroupMetrics(hwnd,pGroupMetrics) SNDMSG((hwnd),LVM_GETGROUPMETRICS,0,(LPARAM)pGroupMetrics)
2912 #define LVM_ENABLEGROUPVIEW (LVM_FIRST+157)
2913 #define ListView_EnableGroupView(hwnd,fEnable) SNDMSG((hwnd),LVM_ENABLEGROUPVIEW,(WPARAM)fEnable,0)
2914
2915 typedef int (CALLBACK *PFNLVGROUPCOMPARE)(int,int,void *);
2916
2917 #define LVM_SORTGROUPS (LVM_FIRST+158)
2918 #define ListView_SortGroups(hwnd,_pfnGroupCompate,_plv) SNDMSG((hwnd),LVM_SORTGROUPS,(WPARAM)_pfnGroupCompate,(LPARAM)_plv)
2919
2920 typedef struct tagLVINSERTGROUPSORTED {
2921 PFNLVGROUPCOMPARE pfnGroupCompare;
2922 void *pvData;
2923 LVGROUP lvGroup;
2924 } LVINSERTGROUPSORTED,*PLVINSERTGROUPSORTED;
2925
2926 #define LVM_INSERTGROUPSORTED (LVM_FIRST+159)
2927 #define ListView_InsertGroupSorted(hwnd,structInsert) SNDMSG((hwnd),LVM_INSERTGROUPSORTED,(WPARAM)structInsert,0)
2928 #define LVM_REMOVEALLGROUPS (LVM_FIRST+160)
2929 #define ListView_RemoveAllGroups(hwnd) SNDMSG((hwnd),LVM_REMOVEALLGROUPS,0,0)
2930 #define LVM_HASGROUP (LVM_FIRST+161)
2931 #define ListView_HasGroup(hwnd,dwGroupId) SNDMSG((hwnd),LVM_HASGROUP,dwGroupId,0)
2932
2933 #define LVTVIF_AUTOSIZE 0x0
2934 #define LVTVIF_FIXEDWIDTH 0x1
2935 #define LVTVIF_FIXEDHEIGHT 0x2
2936 #define LVTVIF_FIXEDSIZE 0x3
2937
2938 #define LVTVIM_TILESIZE 0x1
2939 #define LVTVIM_COLUMNS 0x2
2940 #define LVTVIM_LABELMARGIN 0x4
2941
2942 typedef struct tagLVTILEVIEWINFO {
2943 UINT cbSize;
2944 DWORD dwMask;
2945 DWORD dwFlags;
2946 SIZE sizeTile;
2947 int cLines;
2948 RECT rcLabelMargin;
2949 } LVTILEVIEWINFO,*PLVTILEVIEWINFO;
2950
2951 typedef struct tagLVTILEINFO {
2952 UINT cbSize;
2953 int iItem;
2954 UINT cColumns;
2955 PUINT puColumns;
2956 } LVTILEINFO,*PLVTILEINFO;
2957
2958 #define LVM_SETTILEVIEWINFO (LVM_FIRST+162)
2959 #define ListView_SetTileViewInfo(hwnd,ptvi) SNDMSG((hwnd),LVM_SETTILEVIEWINFO,0,(LPARAM)ptvi)
2960 #define LVM_GETTILEVIEWINFO (LVM_FIRST+163)
2961 #define ListView_GetTileViewInfo(hwnd,ptvi) SNDMSG((hwnd),LVM_GETTILEVIEWINFO,0,(LPARAM)ptvi)
2962 #define LVM_SETTILEINFO (LVM_FIRST+164)
2963 #define ListView_SetTileInfo(hwnd,pti) SNDMSG((hwnd),LVM_SETTILEINFO,0,(LPARAM)pti)
2964 #define LVM_GETTILEINFO (LVM_FIRST+165)
2965 #define ListView_GetTileInfo(hwnd,pti) SNDMSG((hwnd),LVM_GETTILEINFO,0,(LPARAM)pti)
2966
2967 typedef struct {
2968 UINT cbSize;
2969 DWORD dwFlags;
2970 int iItem;
2971 DWORD dwReserved;
2972 } LVINSERTMARK,*LPLVINSERTMARK;
2973
2974 #define LVIM_AFTER 0x1
2975
2976 #define LVM_SETINSERTMARK (LVM_FIRST+166)
2977 #define ListView_SetInsertMark(hwnd,lvim) (WINBOOL)SNDMSG((hwnd),LVM_SETINSERTMARK,(WPARAM) 0,(LPARAM) (lvim))
2978 #define LVM_GETINSERTMARK (LVM_FIRST+167)
2979 #define ListView_GetInsertMark(hwnd,lvim) (WINBOOL)SNDMSG((hwnd),LVM_GETINSERTMARK,(WPARAM) 0,(LPARAM) (lvim))
2980 #define LVM_INSERTMARKHITTEST (LVM_FIRST+168)
2981 #define ListView_InsertMarkHitTest(hwnd,point,lvim) (int)SNDMSG((hwnd),LVM_INSERTMARKHITTEST,(WPARAM)(LPPOINT)(point),(LPARAM)(LPLVINSERTMARK)(lvim))
2982 #define LVM_GETINSERTMARKRECT (LVM_FIRST+169)
2983 #define ListView_GetInsertMarkRect(hwnd,rc) (int)SNDMSG((hwnd),LVM_GETINSERTMARKRECT,(WPARAM)0,(LPARAM)(LPRECT)(rc))
2984 #define LVM_SETINSERTMARKCOLOR (LVM_FIRST+170)
2985 #define ListView_SetInsertMarkColor(hwnd,color) (COLORREF)SNDMSG((hwnd),LVM_SETINSERTMARKCOLOR,(WPARAM)0,(LPARAM)(COLORREF)(color))
2986 #define LVM_GETINSERTMARKCOLOR (LVM_FIRST+171)
2987 #define ListView_GetInsertMarkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETINSERTMARKCOLOR,(WPARAM)0,(LPARAM)0)
2988
2989 typedef struct tagLVSETINFOTIP {
2990 UINT cbSize;
2991 DWORD dwFlags;
2992 LPWSTR pszText;
2993 int iItem;
2994 int iSubItem;
2995 } LVSETINFOTIP,*PLVSETINFOTIP;
2996
2997 #define LVM_SETINFOTIP (LVM_FIRST+173)
2998 #define ListView_SetInfoTip(hwndLV,plvInfoTip) (WINBOOL)SNDMSG((hwndLV),LVM_SETINFOTIP,(WPARAM)0,(LPARAM)plvInfoTip)
2999 #define LVM_GETSELECTEDCOLUMN (LVM_FIRST+174)
3000 #define ListView_GetSelectedColumn(hwnd) (UINT)SNDMSG((hwnd),LVM_GETSELECTEDCOLUMN,0,0)
3001 #define LVM_ISGROUPVIEWENABLED (LVM_FIRST+175)
3002 #define ListView_IsGroupViewEnabled(hwnd) (WINBOOL)SNDMSG((hwnd),LVM_ISGROUPVIEWENABLED,0,0)
3003 #define LVM_GETOUTLINECOLOR (LVM_FIRST+176)
3004 #define ListView_GetOutlineColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETOUTLINECOLOR,0,0)
3005 #define LVM_SETOUTLINECOLOR (LVM_FIRST+177)
3006 #define ListView_SetOutlineColor(hwnd,color) (COLORREF)SNDMSG((hwnd),LVM_SETOUTLINECOLOR,(WPARAM)0,(LPARAM)(COLORREF)(color))
3007 #define LVM_CANCELEDITLABEL (LVM_FIRST+179)
3008 #define ListView_CancelEditLabel(hwnd) (VOID)SNDMSG((hwnd),LVM_CANCELEDITLABEL,(WPARAM)0,(LPARAM)0)
3009 #define LVM_MAPINDEXTOID (LVM_FIRST+180)
3010 #define ListView_MapIndexToID(hwnd,index) (UINT)SNDMSG((hwnd),LVM_MAPINDEXTOID,(WPARAM)index,(LPARAM)0)
3011 #define LVM_MAPIDTOINDEX (LVM_FIRST+181)
3012 #define ListView_MapIDToIndex(hwnd,id) (UINT)SNDMSG((hwnd),LVM_MAPIDTOINDEX,(WPARAM)id,(LPARAM)0)
3013 #define LVM_ISITEMVISIBLE (LVM_FIRST+182)
3014 #define ListView_IsItemVisible(hwnd,index) (UINT)SNDMSG((hwnd),LVM_ISITEMVISIBLE,(WPARAM)(index),(LPARAM)0)
3015
3016 #ifdef UNICODE
3017 #define LVBKIMAGE LVBKIMAGEW
3018 #define LPLVBKIMAGE LPLVBKIMAGEW
3019 #define LVM_SETBKIMAGE LVM_SETBKIMAGEW
3020 #define LVM_GETBKIMAGE LVM_GETBKIMAGEW
3021 #else
3022 #define LVBKIMAGE LVBKIMAGEA
3023 #define LPLVBKIMAGE LPLVBKIMAGEA
3024 #define LVM_SETBKIMAGE LVM_SETBKIMAGEA
3025 #define LVM_GETBKIMAGE LVM_GETBKIMAGEA
3026 #endif
3027
3028 #define ListView_SetBkImage(hwnd,plvbki) (WINBOOL)SNDMSG((hwnd),LVM_SETBKIMAGE,0,(LPARAM)(plvbki))
3029 #define ListView_GetBkImage(hwnd,plvbki) (WINBOOL)SNDMSG((hwnd),LVM_GETBKIMAGE,0,(LPARAM)(plvbki))
3030
3031 #define LPNM_LISTVIEW LPNMLISTVIEW
3032 #define NM_LISTVIEW NMLISTVIEW
3033
3034 typedef struct tagNMLISTVIEW {
3035 NMHDR hdr;
3036 int iItem;
3037 int iSubItem;
3038 UINT uNewState;
3039 UINT uOldState;
3040 UINT uChanged;
3041 POINT ptAction;
3042 LPARAM lParam;
3043 } NMLISTVIEW,*LPNMLISTVIEW;
3044
3045 typedef struct tagNMITEMACTIVATE {
3046 NMHDR hdr;
3047 int iItem;
3048 int iSubItem;
3049 UINT uNewState;
3050 UINT uOldState;
3051 UINT uChanged;
3052 POINT ptAction;
3053 LPARAM lParam;
3054 UINT uKeyFlags;
3055 } NMITEMACTIVATE,*LPNMITEMACTIVATE;
3056
3057 #define LVKF_ALT 0x1
3058 #define LVKF_CONTROL 0x2
3059 #define LVKF_SHIFT 0x4
3060
3061 #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLVCUSTOMDRW,clrTextBk)
3062
3063 typedef struct tagNMLVCUSTOMDRAW {
3064 NMCUSTOMDRAW nmcd;
3065 COLORREF clrText;
3066 COLORREF clrTextBk;
3067 int iSubItem;
3068 DWORD dwItemType;
3069 COLORREF clrFace;
3070 int iIconEffect;
3071 int iIconPhase;
3072 int iPartId;
3073 int iStateId;
3074 RECT rcText;
3075 UINT uAlign;
3076 } NMLVCUSTOMDRAW,*LPNMLVCUSTOMDRAW;
3077
3078 #define LVCDI_ITEM 0x0
3079 #define LVCDI_GROUP 0x1
3080
3081 #define LVCDRF_NOSELECT 0x10000
3082 #define LVCDRF_NOGROUPFRAME 0x20000
3083
3084 typedef struct tagNMLVCACHEHINT {
3085 NMHDR hdr;
3086 int iFrom;
3087 int iTo;
3088 } NMLVCACHEHINT,*LPNMLVCACHEHINT;
3089
3090 #define LPNM_CACHEHINT LPNMLVCACHEHINT
3091 #define PNM_CACHEHINT LPNMLVCACHEHINT
3092 #define NM_CACHEHINT NMLVCACHEHINT
3093
3094 typedef struct tagNMLVFINDITEMA {
3095 NMHDR hdr;
3096 int iStart;
3097 LVFINDINFOA lvfi;
3098 } NMLVFINDITEMA,*LPNMLVFINDITEMA;
3099
3100 typedef struct tagNMLVFINDITEMW {
3101 NMHDR hdr;
3102 int iStart;
3103 LVFINDINFOW lvfi;
3104 } NMLVFINDITEMW,*LPNMLVFINDITEMW;
3105
3106 #define PNM_FINDITEMA LPNMLVFINDITEMA
3107 #define LPNM_FINDITEMA LPNMLVFINDITEMA
3108 #define NM_FINDITEMA NMLVFINDITEMA
3109
3110 #define PNM_FINDITEMW LPNMLVFINDITEMW
3111 #define LPNM_FINDITEMW LPNMLVFINDITEMW
3112 #define NM_FINDITEMW NMLVFINDITEMW
3113
3114 #ifdef UNICODE
3115 #define PNM_FINDITEM PNM_FINDITEMW
3116 #define LPNM_FINDITEM LPNM_FINDITEMW
3117 #define NM_FINDITEM NM_FINDITEMW
3118 #define NMLVFINDITEM NMLVFINDITEMW
3119 #define LPNMLVFINDITEM LPNMLVFINDITEMW
3120 #else
3121 #define PNM_FINDITEM PNM_FINDITEMA
3122 #define LPNM_FINDITEM LPNM_FINDITEMA
3123 #define NM_FINDITEM NM_FINDITEMA
3124 #define NMLVFINDITEM NMLVFINDITEMA
3125 #define LPNMLVFINDITEM LPNMLVFINDITEMA
3126 #endif
3127
3128 typedef struct tagNMLVODSTATECHANGE {
3129 NMHDR hdr;
3130 int iFrom;
3131 int iTo;
3132 UINT uNewState;
3133 UINT uOldState;
3134 } NMLVODSTATECHANGE,*LPNMLVODSTATECHANGE;
3135
3136 #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3137 #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3138 #define NM_ODSTATECHANGE NMLVODSTATECHANGE
3139
3140 #define LVN_ITEMCHANGING (LVN_FIRST-0)
3141 #define LVN_ITEMCHANGED (LVN_FIRST-1)
3142 #define LVN_INSERTITEM (LVN_FIRST-2)
3143 #define LVN_DELETEITEM (LVN_FIRST-3)
3144 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
3145 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
3146 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
3147 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
3148 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
3149 #define LVN_COLUMNCLICK (LVN_FIRST-8)
3150 #define LVN_BEGINDRAG (LVN_FIRST-9)
3151 #define LVN_BEGINRDRAG (LVN_FIRST-11)
3152
3153 #define LVN_ODCACHEHINT (LVN_FIRST-13)
3154 #define LVN_ODFINDITEMA (LVN_FIRST-52)
3155 #define LVN_ODFINDITEMW (LVN_FIRST-79)
3156
3157 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
3158 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
3159
3160 #ifdef UNICODE
3161 #define LVN_ODFINDITEM LVN_ODFINDITEMW
3162 #else
3163 #define LVN_ODFINDITEM LVN_ODFINDITEMA
3164 #endif
3165
3166 #define LVN_HOTTRACK (LVN_FIRST-21)
3167 #define LVN_GETDISPINFOA (LVN_FIRST-50)
3168 #define LVN_GETDISPINFOW (LVN_FIRST-77)
3169 #define LVN_SETDISPINFOA (LVN_FIRST-51)
3170 #define LVN_SETDISPINFOW (LVN_FIRST-78)
3171
3172 #ifdef UNICODE
3173 #define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITW
3174 #define LVN_ENDLABELEDIT LVN_ENDLABELEDITW
3175 #define LVN_GETDISPINFO LVN_GETDISPINFOW
3176 #define LVN_SETDISPINFO LVN_SETDISPINFOW
3177 #else
3178 #define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITA
3179 #define LVN_ENDLABELEDIT LVN_ENDLABELEDITA
3180 #define LVN_GETDISPINFO LVN_GETDISPINFOA
3181 #define LVN_SETDISPINFO LVN_SETDISPINFOA
3182 #endif
3183
3184 #define LVIF_DI_SETITEM 0x1000
3185
3186 #define LV_DISPINFOA NMLVDISPINFOA
3187 #define LV_DISPINFOW NMLVDISPINFOW
3188 #define LV_DISPINFO NMLVDISPINFO
3189
3190 typedef struct tagLVDISPINFO {
3191 NMHDR hdr;
3192 LVITEMA item;
3193 } NMLVDISPINFOA,*LPNMLVDISPINFOA;
3194
3195 typedef struct tagLVDISPINFOW {
3196 NMHDR hdr;
3197 LVITEMW item;
3198 } NMLVDISPINFOW,*LPNMLVDISPINFOW;
3199
3200 #ifdef UNICODE
3201 #define NMLVDISPINFO NMLVDISPINFOW
3202 #else
3203 #define NMLVDISPINFO NMLVDISPINFOA
3204 #endif
3205
3206 #define LVN_KEYDOWN (LVN_FIRST-55)
3207
3208 #define LV_KEYDOWN NMLVKEYDOWN
3209
3210 #include <pshpack1.h>
3211
3212 typedef struct tagLVKEYDOWN {
3213 NMHDR hdr;
3214 WORD wVKey;
3215 UINT flags;
3216 } NMLVKEYDOWN,*LPNMLVKEYDOWN;
3217
3218 #include <poppack.h>
3219
3220 #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
3221
3222 typedef struct tagNMLVGETINFOTIPA {
3223 NMHDR hdr;
3224 DWORD dwFlags;
3225 LPSTR pszText;
3226 int cchTextMax;
3227 int iItem;
3228 int iSubItem;
3229 LPARAM lParam;
3230 } NMLVGETINFOTIPA,*LPNMLVGETINFOTIPA;
3231
3232 typedef struct tagNMLVGETINFOTIPW {
3233 NMHDR hdr;
3234 DWORD dwFlags;
3235 LPWSTR pszText;
3236 int cchTextMax;
3237 int iItem;
3238 int iSubItem;
3239 LPARAM lParam;
3240 } NMLVGETINFOTIPW,*LPNMLVGETINFOTIPW;
3241
3242 #define LVGIT_UNFOLDED 0x1
3243
3244 #define LVN_GETINFOTIPA (LVN_FIRST-57)
3245 #define LVN_GETINFOTIPW (LVN_FIRST-58)
3246
3247 #ifdef UNICODE
3248 #define LVN_GETINFOTIP LVN_GETINFOTIPW
3249 #define NMLVGETINFOTIP NMLVGETINFOTIPW
3250 #define LPNMLVGETINFOTIP LPNMLVGETINFOTIPW
3251 #else
3252 #define LVN_GETINFOTIP LVN_GETINFOTIPA
3253 #define NMLVGETINFOTIP NMLVGETINFOTIPA
3254 #define LPNMLVGETINFOTIP LPNMLVGETINFOTIPA
3255 #endif
3256
3257 typedef struct tagNMLVSCROLL {
3258 NMHDR hdr;
3259 int dx;
3260 int dy;
3261 } NMLVSCROLL,*LPNMLVSCROLL;
3262
3263 #define LVN_BEGINSCROLL (LVN_FIRST-80)
3264 #define LVN_ENDSCROLL (LVN_FIRST-81)
3265 #endif
3266
3267 #ifndef NOTREEVIEW
3268
3269 #define WC_TREEVIEWA "SysTreeView32"
3270 #define WC_TREEVIEWW L"SysTreeView32"
3271 #ifdef UNICODE
3272 #define WC_TREEVIEW WC_TREEVIEWW
3273 #else
3274 #define WC_TREEVIEW WC_TREEVIEWA
3275 #endif
3276
3277 #define TVS_HASBUTTONS 0x1
3278 #define TVS_HASLINES 0x2
3279 #define TVS_LINESATROOT 0x4
3280 #define TVS_EDITLABELS 0x8
3281 #define TVS_DISABLEDRAGDROP 0x10
3282 #define TVS_SHOWSELALWAYS 0x20
3283 #define TVS_RTLREADING 0x40
3284 #define TVS_NOTOOLTIPS 0x80
3285 #define TVS_CHECKBOXES 0x100
3286 #define TVS_TRACKSELECT 0x200
3287 #define TVS_SINGLEEXPAND 0x400
3288 #define TVS_INFOTIP 0x800
3289 #define TVS_FULLROWSELECT 0x1000
3290 #define TVS_NOSCROLL 0x2000
3291 #define TVS_NONEVENHEIGHT 0x4000
3292 #define TVS_NOHSCROLL 0x8000
3293
3294 typedef struct _TREEITEM *HTREEITEM;
3295
3296 #define TVIF_TEXT 0x1
3297 #define TVIF_IMAGE 0x2
3298 #define TVIF_PARAM 0x4
3299 #define TVIF_STATE 0x8
3300 #define TVIF_HANDLE 0x10
3301 #define TVIF_SELECTEDIMAGE 0x20
3302 #define TVIF_CHILDREN 0x40
3303 #define TVIF_INTEGRAL 0x80
3304 #define TVIS_SELECTED 0x2
3305 #define TVIS_CUT 0x4
3306 #define TVIS_DROPHILITED 0x8
3307 #define TVIS_BOLD 0x10
3308 #define TVIS_EXPANDED 0x20
3309 #define TVIS_EXPANDEDONCE 0x40
3310 #define TVIS_EXPANDPARTIAL 0x80
3311 #define TVIS_OVERLAYMASK 0xf00
3312 #define TVIS_STATEIMAGEMASK 0xF000
3313 #define TVIS_USERMASK 0xF000
3314
3315 #define I_CHILDRENCALLBACK (-1)
3316
3317 #define LPTV_ITEMW LPTVITEMW
3318 #define LPTV_ITEMA LPTVITEMA
3319 #define TV_ITEMW TVITEMW
3320 #define TV_ITEMA TVITEMA
3321 #define LPTV_ITEM LPTVITEM
3322 #define TV_ITEM TVITEM
3323
3324 typedef struct tagTVITEMA {
3325 UINT mask;
3326 HTREEITEM hItem;
3327 UINT state;
3328 UINT stateMask;
3329 LPSTR pszText;
3330 int cchTextMax;
3331 int iImage;
3332 int iSelectedImage;
3333 int cChildren;
3334 LPARAM lParam;
3335 } TVITEMA,*LPTVITEMA;
3336
3337 typedef struct tagTVITEMW {
3338 UINT mask;
3339 HTREEITEM hItem;
3340 UINT state;
3341 UINT stateMask;
3342 LPWSTR pszText;
3343 int cchTextMax;
3344 int iImage;
3345 int iSelectedImage;
3346 int cChildren;
3347 LPARAM lParam;
3348 } TVITEMW,*LPTVITEMW;
3349
3350 typedef struct tagTVITEMEXA {
3351 UINT mask;
3352 HTREEITEM hItem;
3353 UINT state;
3354 UINT stateMask;
3355 LPSTR pszText;
3356 int cchTextMax;
3357 int iImage;
3358 int iSelectedImage;
3359 int cChildren;
3360 LPARAM lParam;
3361 int iIntegral;
3362 } TVITEMEXA,*LPTVITEMEXA;
3363
3364 typedef struct tagTVITEMEXW {
3365 UINT mask;
3366 HTREEITEM hItem;
3367 UINT state;
3368 UINT stateMask;
3369 LPWSTR pszText;
3370 int cchTextMax;
3371 int iImage;
3372 int iSelectedImage;
3373 int cChildren;
3374 LPARAM lParam;
3375 int iIntegral;
3376 } TVITEMEXW,*LPTVITEMEXW;
3377 #ifdef UNICODE
3378 typedef TVITEMEXW TVITEMEX;
3379 typedef LPTVITEMEXW LPTVITEMEX;
3380 #else
3381 typedef TVITEMEXA TVITEMEX;
3382 typedef LPTVITEMEXA LPTVITEMEX;
3383 #endif
3384
3385 #ifdef UNICODE
3386 #define TVITEM TVITEMW
3387 #define LPTVITEM LPTVITEMW
3388 #else
3389 #define TVITEM TVITEMA
3390 #define LPTVITEM LPTVITEMA
3391 #endif
3392
3393 #define TVI_ROOT ((HTREEITEM)(ULONG_PTR)-0x10000)
3394 #define TVI_FIRST ((HTREEITEM)(ULONG_PTR)-0xffff)
3395 #define TVI_LAST ((HTREEITEM)(ULONG_PTR)-0xfffe)
3396 #define TVI_SORT ((HTREEITEM)(ULONG_PTR)-0xfffd)
3397
3398 #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
3399 #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
3400 #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
3401 #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
3402 #define TV_INSERTSTRUCT TVINSERTSTRUCT
3403 #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
3404
3405 #define TVINSERTSTRUCTA_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTA,item)
3406 #define TVINSERTSTRUCTW_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTW,item)
3407
3408 typedef struct tagTVINSERTSTRUCTA {
3409 HTREEITEM hParent;
3410 HTREEITEM hInsertAfter;
3411 __MINGW_EXTENSION union {
3412 TVITEMEXA itemex;
3413 TV_ITEMA item;
3414 } DUMMYUNIONNAME;
3415 } TVINSERTSTRUCTA,*LPTVINSERTSTRUCTA;
3416
3417 typedef struct tagTVINSERTSTRUCTW {
3418 HTREEITEM hParent;
3419 HTREEITEM hInsertAfter;
3420 __MINGW_EXTENSION union {
3421 TVITEMEXW itemex;
3422 TV_ITEMW item;
3423 } DUMMYUNIONNAME;
3424 } TVINSERTSTRUCTW,*LPTVINSERTSTRUCTW;
3425
3426 #ifdef UNICODE
3427 #define TVINSERTSTRUCT TVINSERTSTRUCTW
3428 #define LPTVINSERTSTRUCT LPTVINSERTSTRUCTW
3429 #define TVINSERTSTRUCT_V1_SIZE TVINSERTSTRUCTW_V1_SIZE
3430 #else
3431 #define TVINSERTSTRUCT TVINSERTSTRUCTA
3432 #define LPTVINSERTSTRUCT LPTVINSERTSTRUCTA
3433 #define TVINSERTSTRUCT_V1_SIZE TVINSERTSTRUCTA_V1_SIZE
3434 #endif
3435
3436 #define TVM_INSERTITEMA (TV_FIRST+0)
3437 #define TVM_INSERTITEMW (TV_FIRST+50)
3438 #ifdef UNICODE
3439 #define TVM_INSERTITEM TVM_INSERTITEMW
3440 #else
3441 #define TVM_INSERTITEM TVM_INSERTITEMA
3442 #endif
3443
3444 #define TreeView_InsertItem(hwnd,lpis) (HTREEITEM)SNDMSG((hwnd),TVM_INSERTITEM,0,(LPARAM)(LPTV_INSERTSTRUCT)(lpis))
3445
3446 #define TVM_DELETEITEM (TV_FIRST+1)
3447 #define TreeView_DeleteItem(hwnd,hitem) (WINBOOL)SNDMSG((hwnd),TVM_DELETEITEM,0,(LPARAM)(HTREEITEM)(hitem))
3448
3449 #define TreeView_DeleteAllItems(hwnd) (WINBOOL)SNDMSG((hwnd),TVM_DELETEITEM,0,(LPARAM)TVI_ROOT)
3450
3451 #define TVM_EXPAND (TV_FIRST+2)
3452 #define TreeView_Expand(hwnd,hitem,code) (WINBOOL)SNDMSG((hwnd),TVM_EXPAND,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
3453
3454 #define TVE_COLLAPSE 0x1
3455 #define TVE_EXPAND 0x2
3456 #define TVE_TOGGLE 0x3
3457 #define TVE_EXPANDPARTIAL 0x4000
3458 #define TVE_COLLAPSERESET 0x8000
3459
3460 #define TVM_GETITEMRECT (TV_FIRST+4)
3461 #define TreeView_GetItemRect(hwnd,hitem,prc,code) (*(HTREEITEM *)prc = (hitem),(WINBOOL)SNDMSG((hwnd),TVM_GETITEMRECT,(WPARAM)(code),(LPARAM)(RECT *)(prc)))
3462
3463 #define TVM_GETCOUNT (TV_FIRST+5)
3464 #define TreeView_GetCount(hwnd) (UINT)SNDMSG((hwnd),TVM_GETCOUNT,0,0)
3465
3466 #define TVM_GETINDENT (TV_FIRST+6)
3467 #define TreeView_GetIndent(hwnd) (UINT)SNDMSG((hwnd),TVM_GETINDENT,0,0)
3468
3469 #define TVM_SETINDENT (TV_FIRST+7)
3470 #define TreeView_SetIndent(hwnd,indent) (WINBOOL)SNDMSG((hwnd),TVM_SETINDENT,(WPARAM)(indent),0)
3471
3472 #define TVM_GETIMAGELIST (TV_FIRST+8)
3473 #define TreeView_GetImageList(hwnd,iImage) (HIMAGELIST)SNDMSG((hwnd),TVM_GETIMAGELIST,iImage,0)
3474
3475 #define TVSIL_NORMAL 0
3476 #define TVSIL_STATE 2
3477
3478 #define TVM_SETIMAGELIST (TV_FIRST+9)
3479 #define TreeView_SetImageList(hwnd,himl,iImage) (HIMAGELIST)SNDMSG((hwnd),TVM_SETIMAGELIST,iImage,(LPARAM)(HIMAGELIST)(himl))
3480
3481 #define TVM_GETNEXTITEM (TV_FIRST+10)
3482 #define TreeView_GetNextItem(hwnd,hitem,code) (HTREEITEM)SNDMSG((hwnd),TVM_GETNEXTITEM,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
3483
3484 #define TVGN_ROOT 0x0
3485 #define TVGN_NEXT 0x1
3486 #define TVGN_PREVIOUS 0x2
3487 #define TVGN_PARENT 0x3
3488 #define TVGN_CHILD 0x4
3489 #define TVGN_FIRSTVISIBLE 0x5
3490 #define TVGN_NEXTVISIBLE 0x6
3491 #define TVGN_PREVIOUSVISIBLE 0x7
3492 #define TVGN_DROPHILITE 0x8
3493 #define TVGN_CARET 0x9
3494 #define TVGN_LASTVISIBLE 0xa
3495
3496 #define TVSI_NOSINGLEEXPAND 0x8000
3497
3498 #define TreeView_GetChild(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_CHILD)
3499 #define TreeView_GetNextSibling(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_NEXT)
3500 #define TreeView_GetPrevSibling(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PREVIOUS)
3501 #define TreeView_GetParent(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PARENT)
3502 #define TreeView_GetFirstVisible(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_FIRSTVISIBLE)
3503 #define TreeView_GetNextVisible(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_NEXTVISIBLE)
3504 #define TreeView_GetPrevVisible(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PREVIOUSVISIBLE)
3505 #define TreeView_GetSelection(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_CARET)
3506 #define TreeView_GetDropHilight(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_DROPHILITE)
3507 #define TreeView_GetRoot(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_ROOT)
3508 #define TreeView_GetLastVisible(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_LASTVISIBLE)
3509
3510 #define TVM_SELECTITEM (TV_FIRST+11)
3511 #define TreeView_Select(hwnd,hitem,code) (WINBOOL)SNDMSG((hwnd),TVM_SELECTITEM,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
3512
3513 #define TreeView_SelectItem(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_CARET)
3514 #define TreeView_SelectDropTarget(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_DROPHILITE)
3515 #define TreeView_SelectSetFirstVisible(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_FIRSTVISIBLE)
3516
3517 #define TVM_GETITEMA (TV_FIRST+12)
3518 #define TVM_GETITEMW (TV_FIRST+62)
3519
3520 #ifdef UNICODE
3521 #define TVM_GETITEM TVM_GETITEMW
3522 #else
3523 #define TVM_GETITEM TVM_GETITEMA
3524 #endif
3525
3526 #define TreeView_GetItem(hwnd,pitem) (WINBOOL)SNDMSG((hwnd),TVM_GETITEM,0,(LPARAM)(TV_ITEM *)(pitem))
3527
3528 #define TVM_SETITEMA (TV_FIRST+13)
3529 #define TVM_SETITEMW (TV_FIRST+63)
3530
3531 #ifdef UNICODE
3532 #define TVM_SETITEM TVM_SETITEMW
3533 #else
3534 #define TVM_SETITEM TVM_SETITEMA
3535 #endif
3536
3537 #define TreeView_SetItem(hwnd,pitem) (WINBOOL)SNDMSG((hwnd),TVM_SETITEM,0,(LPARAM)(const TV_ITEM *)(pitem))
3538
3539 #define TVM_EDITLABELA (TV_FIRST+14)
3540 #define TVM_EDITLABELW (TV_FIRST+65)
3541 #ifdef UNICODE
3542 #define TVM_EDITLABEL TVM_EDITLABELW
3543 #else
3544 #define TVM_EDITLABEL TVM_EDITLABELA
3545 #endif
3546
3547 #define TreeView_EditLabel(hwnd,hitem) (HWND)SNDMSG((hwnd),TVM_EDITLABEL,0,(LPARAM)(HTREEITEM)(hitem))
3548
3549 #define TVM_GETEDITCONTROL (TV_FIRST+15)
3550 #define TreeView_GetEditControl(hwnd) (HWND)SNDMSG((hwnd),TVM_GETEDITCONTROL,0,0)
3551
3552 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
3553 #define TreeView_GetVisibleCount(hwnd) (UINT)SNDMSG((hwnd),TVM_GETVISIBLECOUNT,0,0)
3554
3555 #define TVM_HITTEST (TV_FIRST+17)
3556 #define TreeView_HitTest(hwnd,lpht) (HTREEITEM)SNDMSG((hwnd),TVM_HITTEST,0,(LPARAM)(LPTV_HITTESTINFO)(lpht))
3557
3558 #define LPTV_HITTESTINFO LPTVHITTESTINFO
3559 #define TV_HITTESTINFO TVHITTESTINFO
3560
3561 typedef struct tagTVHITTESTINFO {
3562 POINT pt;
3563 UINT flags;
3564 HTREEITEM hItem;
3565 } TVHITTESTINFO,*LPTVHITTESTINFO;
3566
3567 #define TVHT_NOWHERE 0x1
3568 #define TVHT_ONITEMICON 0x2
3569 #define TVHT_ONITEMLABEL 0x4
3570 #define TVHT_ONITEM (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON)
3571 #define TVHT_ONITEMINDENT 0x8
3572 #define TVHT_ONITEMBUTTON 0x10
3573 #define TVHT_ONITEMRIGHT 0x20
3574 #define TVHT_ONITEMSTATEICON 0x40
3575
3576 #define TVHT_ABOVE 0x100
3577 #define TVHT_BELOW 0x200
3578 #define TVHT_TORIGHT 0x400
3579 #define TVHT_TOLEFT 0x800
3580
3581 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
3582 #define TreeView_CreateDragImage(hwnd,hitem) (HIMAGELIST)SNDMSG((hwnd),TVM_CREATEDRAGIMAGE,0,(LPARAM)(HTREEITEM)(hitem))
3583
3584 #define TVM_SORTCHILDREN (TV_FIRST+19)
3585 #define TreeView_SortChildren(hwnd,hitem,recurse) (WINBOOL)SNDMSG((hwnd),TVM_SORTCHILDREN,(WPARAM)(recurse),(LPARAM)(HTREEITEM)(hitem))
3586
3587 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
3588 #define TreeView_EnsureVisible(hwnd,hitem) (WINBOOL)SNDMSG((hwnd),TVM_ENSUREVISIBLE,0,(LPARAM)(HTREEITEM)(hitem))
3589
3590 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
3591 #define TreeView_SortChildrenCB(hwnd,psort,recurse) (WINBOOL)SNDMSG((hwnd),TVM_SORTCHILDRENCB,(WPARAM)(recurse),(LPARAM)(LPTV_SORTCB)(psort))
3592
3593 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
3594 #define TreeView_EndEditLabelNow(hwnd,fCancel) (WINBOOL)SNDMSG((hwnd),TVM_ENDEDITLABELNOW,(WPARAM)(fCancel),0)
3595
3596 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
3597 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
3598
3599 #ifdef UNICODE
3600 #define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGW
3601 #else
3602 #define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGA
3603 #endif
3604
3605 #define TVM_SETTOOLTIPS (TV_FIRST+24)
3606 #define TreeView_SetToolTips(hwnd,hwndTT) (HWND)SNDMSG((hwnd),TVM_SETTOOLTIPS,(WPARAM)(hwndTT),0)
3607 #define TVM_GETTOOLTIPS (TV_FIRST+25)
3608 #define TreeView_GetToolTips(hwnd) (HWND)SNDMSG((hwnd),TVM_GETTOOLTIPS,0,0)
3609 #define TreeView_GetISearchString(hwndTV,lpsz) (WINBOOL)SNDMSG((hwndTV),TVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz))
3610
3611 #define TVM_SETINSERTMARK (TV_FIRST+26)
3612 #define TreeView_SetInsertMark(hwnd,hItem,fAfter) (WINBOOL)SNDMSG((hwnd),TVM_SETINSERTMARK,(WPARAM) (fAfter),(LPARAM) (hItem))
3613 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3614 #define TreeView_SetUnicodeFormat(hwnd,fUnicode) (WINBOOL)SNDMSG((hwnd),TVM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
3615 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3616 #define TreeView_GetUnicodeFormat(hwnd) (WINBOOL)SNDMSG((hwnd),TVM_GETUNICODEFORMAT,0,0)
3617
3618 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
3619 #define TreeView_SetItemHeight(hwnd,iHeight) (int)SNDMSG((hwnd),TVM_SETITEMHEIGHT,(WPARAM)(iHeight),0)
3620 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
3621 #define TreeView_GetItemHeight(hwnd) (int)SNDMSG((hwnd),TVM_GETITEMHEIGHT,0,0)
3622 #define TVM_SETBKCOLOR (TV_FIRST+29)
3623 #define TreeView_SetBkColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETBKCOLOR,0,(LPARAM)(clr))
3624 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
3625 #define TreeView_SetTextColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETTEXTCOLOR,0,(LPARAM)(clr))
3626 #define TVM_GETBKCOLOR (TV_FIRST+31)
3627 #define TreeView_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETBKCOLOR,0,0)
3628 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
3629 #define TreeView_GetTextColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETTEXTCOLOR,0,0)
3630 #define TVM_SETSCROLLTIME (TV_FIRST+33)
3631 #define TreeView_SetScrollTime(hwnd,uTime) (UINT)SNDMSG((hwnd),TVM_SETSCROLLTIME,uTime,0)
3632 #define TVM_GETSCROLLTIME (TV_FIRST+34)
3633 #define TreeView_GetScrollTime(hwnd) (UINT)SNDMSG((hwnd),TVM_GETSCROLLTIME,0,0)
3634 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
3635 #define TreeView_SetInsertMarkColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETINSERTMARKCOLOR,0,(LPARAM)(clr))
3636 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
3637 #define TreeView_GetInsertMarkColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETINSERTMARKCOLOR,0,0)
3638
3639 #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);}
3640 #define TreeView_SetCheckState(hwndTV,hti,fCheck) TreeView_SetItemState(hwndTV,hti,INDEXTOSTATEIMAGEMASK((fCheck)?2:1),TVIS_STATEIMAGEMASK)
3641 #define TVM_GETITEMSTATE (TV_FIRST+39)
3642 #define TreeView_GetItemState(hwndTV,hti,mask) (UINT)SNDMSG((hwndTV),TVM_GETITEMSTATE,(WPARAM)(hti),(LPARAM)(mask))
3643 #define TreeView_GetCheckState(hwndTV,hti) ((((UINT)(SNDMSG((hwndTV),TVM_GETITEMSTATE,(WPARAM)(hti),TVIS_STATEIMAGEMASK))) >> 12) -1)
3644 #define TVM_SETLINECOLOR (TV_FIRST+40)
3645 #define TreeView_SetLineColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETLINECOLOR,0,(LPARAM)(clr))
3646 #define TVM_GETLINECOLOR (TV_FIRST+41)
3647 #define TreeView_GetLineColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETLINECOLOR,0,0)
3648
3649 #define TVM_MAPACCIDTOHTREEITEM (TV_FIRST+42)
3650 #define TreeView_MapAccIDToHTREEITEM(hwnd,id) (HTREEITEM)SNDMSG((hwnd),TVM_MAPACCIDTOHTREEITEM,id,0)
3651
3652 #define TVM_MAPHTREEITEMTOACCID (TV_FIRST+43)
3653 #define TreeView_MapHTREEITEMToAccID(hwnd,htreeitem) (UINT)SNDMSG((hwnd),TVM_MAPHTREEITEMTOACCID,(WPARAM)htreeitem,0)
3654
3655 typedef int (CALLBACK *PFNTVCOMPARE)(LPARAM lParam1,LPARAM lParam2,LPARAM lParamSort);
3656
3657 #define LPTV_SORTCB LPTVSORTCB
3658 #define TV_SORTCB TVSORTCB
3659
3660 typedef struct tagTVSORTCB {
3661 HTREEITEM hParent;
3662 PFNTVCOMPARE lpfnCompare;
3663 LPARAM lParam;
3664 } TVSORTCB,*LPTVSORTCB;
3665
3666 #define LPNM_TREEVIEWA LPNMTREEVIEWA
3667 #define LPNM_TREEVIEWW LPNMTREEVIEWW
3668 #define NM_TREEVIEWW NMTREEVIEWW
3669 #define NM_TREEVIEWA NMTREEVIEWA
3670 #define LPNM_TREEVIEW LPNMTREEVIEW
3671 #define NM_TREEVIEW NMTREEVIEW
3672
3673 typedef struct tagNMTREEVIEWA {
3674 NMHDR hdr;
3675 UINT action;
3676 TVITEMA itemOld;
3677 TVITEMA itemNew;
3678 POINT ptDrag;
3679 } NMTREEVIEWA,*LPNMTREEVIEWA;
3680
3681 typedef struct tagNMTREEVIEWW {
3682 NMHDR hdr;
3683 UINT action;
3684 TVITEMW itemOld;
3685 TVITEMW itemNew;
3686 POINT ptDrag;
3687 } NMTREEVIEWW,*LPNMTREEVIEWW;
3688
3689 #ifdef UNICODE
3690 #define NMTREEVIEW NMTREEVIEWW
3691 #define LPNMTREEVIEW LPNMTREEVIEWW
3692 #else
3693 #define NMTREEVIEW NMTREEVIEWA
3694 #define LPNMTREEVIEW LPNMTREEVIEWA
3695 #endif
3696
3697 #define TVN_SELCHANGINGA (TVN_FIRST-1)
3698 #define TVN_SELCHANGINGW (TVN_FIRST-50)
3699 #define TVN_SELCHANGEDA (TVN_FIRST-2)
3700 #define TVN_SELCHANGEDW (TVN_FIRST-51)
3701
3702 #define TVC_UNKNOWN 0x0
3703 #define TVC_BYMOUSE 0x1
3704 #define TVC_BYKEYBOARD 0x2
3705
3706 #define TVN_GETDISPINFOA (TVN_FIRST-3)
3707 #define TVN_GETDISPINFOW (TVN_FIRST-52)
3708 #define TVN_SETDISPINFOA (TVN_FIRST-4)
3709 #define TVN_SETDISPINFOW (TVN_FIRST-53)
3710
3711 #define TVIF_DI_SETITEM 0x1000
3712
3713 #define TV_DISPINFOA NMTVDISPINFOA
3714 #define TV_DISPINFOW NMTVDISPINFOW
3715 #define TV_DISPINFO NMTVDISPINFO
3716
3717 typedef struct tagTVDISPINFOA {
3718 NMHDR hdr;
3719 TVITEMA item;
3720 } NMTVDISPINFOA,*LPNMTVDISPINFOA;
3721
3722 typedef struct tagTVDISPINFOW {
3723 NMHDR hdr;
3724 TVITEMW item;
3725 } NMTVDISPINFOW,*LPNMTVDISPINFOW;
3726
3727 #ifdef UNICODE
3728 #define NMTVDISPINFO NMTVDISPINFOW
3729 #define LPNMTVDISPINFO LPNMTVDISPINFOW
3730 #else
3731 #define NMTVDISPINFO NMTVDISPINFOA
3732 #define LPNMTVDISPINFO LPNMTVDISPINFOA
3733 #endif
3734
3735 #if (_WIN32_IE >= 0x0600)
3736
3737 typedef struct tagTVDISPINFOEXA {
3738 NMHDR hdr;
3739 TVITEMEXA item;
3740 } NMTVDISPINFOEXA, *LPNMTVDISPINFOEXA;
3741
3742 typedef struct tagTVDISPINFOEXW {
3743 NMHDR hdr;
3744 TVITEMEXW item;
3745 } NMTVDISPINFOEXW, *LPNMTVDISPINFOEXW;
3746
3747 #ifdef UNICODE
3748 #define NMTVDISPINFOEX NMTVDISPINFOEXW
3749 #define LPNMTVDISPINFOEX LPNMTVDISPINFOEXW
3750 #else
3751 #define NMTVDISPINFOEX NMTVDISPINFOEXA
3752 #define LPNMTVDISPINFOEX LPNMTVDISPINFOEXA
3753 #endif /* UNICODE */
3754
3755 #define TV_DISPINFOEXA NMTVDISPINFOEXA
3756 #define TV_DISPINFOEXW NMTVDISPINFOEXW
3757 #define TV_DISPINFOEX NMTVDISPINFOEX
3758
3759 #endif /* (_WIN32_IE >= 0x0600) */
3760
3761 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
3762 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
3763 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
3764 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
3765 #define TVN_BEGINDRAGA (TVN_FIRST-7)
3766 #define TVN_BEGINDRAGW (TVN_FIRST-56)
3767 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
3768 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
3769 #define TVN_DELETEITEMA (TVN_FIRST-9)
3770 #define TVN_DELETEITEMW (TVN_FIRST-58)
3771 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
3772 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
3773 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
3774 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
3775 #define TVN_KEYDOWN (TVN_FIRST-12)
3776 #define TVN_GETINFOTIPA (TVN_FIRST-13)
3777 #define TVN_GETINFOTIPW (TVN_FIRST-14)
3778 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
3779
3780 #define TVNRET_DEFAULT 0
3781 #define TVNRET_SKIPOLD 1
3782 #define TVNRET_SKIPNEW 2
3783
3784 #define TV_KEYDOWN NMTVKEYDOWN
3785
3786 #include <pshpack1.h>
3787
3788 typedef struct tagTVKEYDOWN {
3789 NMHDR hdr;
3790 WORD wVKey;
3791 UINT flags;
3792 } NMTVKEYDOWN,*LPNMTVKEYDOWN;
3793
3794 #include <poppack.h>
3795
3796 #ifdef UNICODE
3797 #define TVN_SELCHANGING TVN_SELCHANGINGW
3798 #define TVN_SELCHANGED TVN_SELCHANGEDW
3799 #define TVN_GETDISPINFO TVN_GETDISPINFOW
3800 #define TVN_SETDISPINFO TVN_SETDISPINFOW
3801 #define TVN_ITEMEXPANDING TVN_ITEMEXPANDINGW
3802 #define TVN_ITEMEXPANDED TVN_ITEMEXPANDEDW
3803 #define TVN_BEGINDRAG TVN_BEGINDRAGW
3804 #define TVN_BEGINRDRAG TVN_BEGINRDRAGW
3805 #define TVN_DELETEITEM TVN_DELETEITEMW
3806 #define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITW
3807 #define TVN_ENDLABELEDIT TVN_ENDLABELEDITW
3808 #else
3809 #define TVN_SELCHANGING TVN_SELCHANGINGA
3810 #define TVN_SELCHANGED TVN_SELCHANGEDA
3811 #define TVN_GETDISPINFO TVN_GETDISPINFOA
3812 #define TVN_SETDISPINFO TVN_SETDISPINFOA
3813 #define TVN_ITEMEXPANDING TVN_ITEMEXPANDINGA
3814 #define TVN_ITEMEXPANDED TVN_ITEMEXPANDEDA
3815 #define TVN_BEGINDRAG TVN_BEGINDRAGA
3816 #define TVN_BEGINRDRAG TVN_BEGINRDRAGA
3817 #define TVN_DELETEITEM TVN_DELETEITEMA
3818 #define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITA
3819 #define TVN_ENDLABELEDIT TVN_ENDLABELEDITA
3820 #endif
3821
3822 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW,clrTextBk)
3823
3824 typedef struct tagNMTVCUSTOMDRAW {
3825 NMCUSTOMDRAW nmcd;
3826 COLORREF clrText;
3827 COLORREF clrTextBk;
3828 int iLevel;
3829 } NMTVCUSTOMDRAW,*LPNMTVCUSTOMDRAW;
3830
3831 typedef struct tagNMTVGETINFOTIPA {
3832 NMHDR hdr;
3833 LPSTR pszText;
3834 int cchTextMax;
3835 HTREEITEM hItem;
3836 LPARAM lParam;
3837 } NMTVGETINFOTIPA,*LPNMTVGETINFOTIPA;
3838
3839 typedef struct tagNMTVGETINFOTIPW {
3840 NMHDR hdr;
3841 LPWSTR pszText;
3842 int cchTextMax;
3843 HTREEITEM hItem;
3844 LPARAM lParam;
3845 } NMTVGETINFOTIPW,*LPNMTVGETINFOTIPW;
3846
3847 #ifdef UNICODE
3848 #define TVN_GETINFOTIP TVN_GETINFOTIPW
3849 #define NMTVGETINFOTIP NMTVGETINFOTIPW
3850 #define LPNMTVGETINFOTIP LPNMTVGETINFOTIPW
3851 #else
3852 #define TVN_GETINFOTIP TVN_GETINFOTIPA
3853 #define NMTVGETINFOTIP NMTVGETINFOTIPA
3854 #define LPNMTVGETINFOTIP LPNMTVGETINFOTIPA
3855 #endif
3856
3857 #define TVCDRF_NOIMAGES 0x10000
3858 #endif
3859
3860 #ifndef NOUSEREXCONTROLS
3861
3862 #define WC_COMBOBOXEXW L"ComboBoxEx32"
3863 #define WC_COMBOBOXEXA "ComboBoxEx32"
3864
3865 #ifdef UNICODE
3866 #define WC_COMBOBOXEX WC_COMBOBOXEXW
3867 #else
3868 #define WC_COMBOBOXEX WC_COMBOBOXEXA
3869 #endif
3870
3871 #define CBEIF_TEXT 0x1
3872 #define CBEIF_IMAGE 0x2
3873 #define CBEIF_SELECTEDIMAGE 0x4
3874 #define CBEIF_OVERLAY 0x8
3875 #define CBEIF_INDENT 0x10
3876 #define CBEIF_LPARAM 0x20
3877
3878 #define CBEIF_DI_SETITEM 0x10000000
3879
3880 typedef struct tagCOMBOBOXEXITEMA {
3881 UINT mask;
3882 INT_PTR iItem;
3883 LPSTR pszText;
3884 int cchTextMax;
3885 int iImage;
3886 int iSelectedImage;
3887 int iOverlay;
3888 int iIndent;
3889 LPARAM lParam;
3890 } COMBOBOXEXITEMA,*PCOMBOBOXEXITEMA;
3891 typedef COMBOBOXEXITEMA CONST *PCCOMBOEXITEMA;
3892
3893 typedef struct tagCOMBOBOXEXITEMW
3894 {
3895 UINT mask;
3896 INT_PTR iItem;
3897 LPWSTR pszText;
3898 int cchTextMax;
3899 int iImage;
3900 int iSelectedImage;
3901 int iOverlay;
3902 int iIndent;
3903 LPARAM lParam;
3904 } COMBOBOXEXITEMW,*PCOMBOBOXEXITEMW;
3905 typedef COMBOBOXEXITEMW CONST *PCCOMBOEXITEMW;
3906
3907 #ifdef UNICODE
3908 #define COMBOBOXEXITEM COMBOBOXEXITEMW
3909 #define PCOMBOBOXEXITEM PCOMBOBOXEXITEMW
3910 #define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMW
3911 #else
3912 #define COMBOBOXEXITEM COMBOBOXEXITEMA
3913 #define PCOMBOBOXEXITEM PCOMBOBOXEXITEMA
3914 #define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMA
3915 #endif
3916
3917 #define CBEM_INSERTITEMA (WM_USER+1)
3918 #define CBEM_SETIMAGELIST (WM_USER+2)
3919 #define CBEM_GETIMAGELIST (WM_USER+3)
3920 #define CBEM_GETITEMA (WM_USER+4)
3921 #define CBEM_SETITEMA (WM_USER+5)
3922 #define CBEM_DELETEITEM CB_DELETESTRING
3923 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
3924 #define CBEM_GETEDITCONTROL (WM_USER+7)
3925 #define CBEM_SETEXSTYLE (WM_USER+8)
3926 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
3927 #define CBEM_GETEXSTYLE (WM_USER+9)
3928 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
3929 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3930 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3931 #define CBEM_HASEDITCHANGED (WM_USER+10)
3932 #define CBEM_INSERTITEMW (WM_USER+11)
3933 #define CBEM_SETITEMW (WM_USER+12)
3934 #define CBEM_GETITEMW (WM_USER+13)
3935
3936 #ifdef UNICODE
3937 #define CBEM_INSERTITEM CBEM_INSERTITEMW
3938 #define CBEM_SETITEM CBEM_SETITEMW
3939 #define CBEM_GETITEM CBEM_GETITEMW
3940 #else
3941 #define CBEM_INSERTITEM CBEM_INSERTITEMA
3942 #define CBEM_SETITEM CBEM_SETITEMA
3943 #define CBEM_GETITEM CBEM_GETITEMA
3944 #endif
3945
3946 #define CBEM_SETWINDOWTHEME CCM_SETWINDOWTHEME
3947
3948 #define CBES_EX_NOEDITIMAGE 0x1
3949 #define CBES_EX_NOEDITIMAGEINDENT 0x2
3950 #define CBES_EX_PATHWORDBREAKPROC 0x4
3951 #define CBES_EX_NOSIZELIMIT 0x8
3952 #define CBES_EX_CASESENSITIVE 0x10
3953
3954 typedef struct {
3955 NMHDR hdr;
3956 COMBOBOXEXITEMA ceItem;
3957 } NMCOMBOBOXEXA,*PNMCOMBOBOXEXA;
3958
3959 typedef struct {
3960 NMHDR hdr;
3961 COMBOBOXEXITEMW ceItem;
3962 } NMCOMBOBOXEXW,*PNMCOMBOBOXEXW;
3963
3964 #ifdef UNICODE
3965 #define NMCOMBOBOXEX NMCOMBOBOXEXW
3966 #define PNMCOMBOBOXEX PNMCOMBOBOXEXW
3967 #define CBEN_GETDISPINFO CBEN_GETDISPINFOW
3968 #else
3969 #define NMCOMBOBOXEX NMCOMBOBOXEXA
3970 #define PNMCOMBOBOXEX PNMCOMBOBOXEXA
3971 #define CBEN_GETDISPINFO CBEN_GETDISPINFOA
3972 #endif
3973
3974 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
3975 #define CBEN_INSERTITEM (CBEN_FIRST - 1)
3976 #define CBEN_DELETEITEM (CBEN_FIRST - 2)
3977 #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
3978 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
3979 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
3980
3981 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
3982
3983 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
3984 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
3985
3986 #ifdef UNICODE
3987 #define CBEN_DRAGBEGIN CBEN_DRAGBEGINW
3988 #else
3989 #define CBEN_DRAGBEGIN CBEN_DRAGBEGINA
3990 #endif
3991
3992 #ifdef UNICODE
3993 #define CBEN_ENDEDIT CBEN_ENDEDITW
3994 #else
3995 #define CBEN_ENDEDIT CBEN_ENDEDITA
3996 #endif
3997
3998 #define CBENF_KILLFOCUS 1
3999 #define CBENF_RETURN 2
4000 #define CBENF_ESCAPE 3
4001 #define CBENF_DROPDOWN 4
4002
4003 #define CBEMAXSTRLEN 260
4004
4005 typedef struct {
4006 NMHDR hdr;
4007 int iItemid;
4008 WCHAR szText[CBEMAXSTRLEN];
4009 }NMCBEDRAGBEGINW,*LPNMCBEDRAGBEGINW,*PNMCBEDRAGBEGINW;
4010
4011 typedef struct {
4012 NMHDR hdr;
4013 int iItemid;
4014 char szText[CBEMAXSTRLEN];
4015 }NMCBEDRAGBEGINA,*LPNMCBEDRAGBEGINA,*PNMCBEDRAGBEGINA;
4016
4017 #ifdef UNICODE
4018 #define NMCBEDRAGBEGIN NMCBEDRAGBEGINW
4019 #define LPNMCBEDRAGBEGIN LPNMCBEDRAGBEGINW
4020 #define PNMCBEDRAGBEGIN PNMCBEDRAGBEGINW
4021 #else
4022 #define NMCBEDRAGBEGIN NMCBEDRAGBEGINA
4023 #define LPNMCBEDRAGBEGIN LPNMCBEDRAGBEGINA
4024 #define PNMCBEDRAGBEGIN PNMCBEDRAGBEGINA
4025 #endif
4026
4027 typedef struct {
4028 NMHDR hdr;
4029 WINBOOL fChanged;
4030 int iNewSelection;
4031 WCHAR szText[CBEMAXSTRLEN];
4032 int iWhy;
4033 } NMCBEENDEDITW,*LPNMCBEENDEDITW,*PNMCBEENDEDITW;
4034
4035 typedef struct {
4036 NMHDR hdr;
4037 WINBOOL fChanged;
4038 int iNewSelection;
4039 char szText[CBEMAXSTRLEN];
4040 int iWhy;
4041 } NMCBEENDEDITA,*LPNMCBEENDEDITA,*PNMCBEENDEDITA;
4042
4043 #ifdef UNICODE
4044 #define NMCBEENDEDIT NMCBEENDEDITW
4045 #define LPNMCBEENDEDIT LPNMCBEENDEDITW
4046 #define PNMCBEENDEDIT PNMCBEENDEDITW
4047 #else
4048 #define NMCBEENDEDIT NMCBEENDEDITA
4049 #define LPNMCBEENDEDIT LPNMCBEENDEDITA
4050 #define PNMCBEENDEDIT PNMCBEENDEDITA
4051 #endif
4052 #endif
4053
4054 #ifndef NOTABCONTROL
4055
4056 #define WC_TABCONTROLA "SysTabControl32"
4057 #define WC_TABCONTROLW L"SysTabControl32"
4058 #ifdef UNICODE
4059 #define WC_TABCONTROL WC_TABCONTROLW
4060 #else
4061 #define WC_TABCONTROL WC_TABCONTROLA
4062 #endif
4063
4064 #define TCS_SCROLLOPPOSITE 0x1
4065 #define TCS_BOTTOM 0x2
4066 #define TCS_RIGHT 0x2
4067 #define TCS_MULTISELECT 0x4
4068 #define TCS_FLATBUTTONS 0x8
4069 #define TCS_FORCEICONLEFT 0x10
4070 #define TCS_FORCELABELLEFT 0x20
4071 #define TCS_HOTTRACK 0x40
4072 #define TCS_VERTICAL 0x80
4073 #define TCS_TABS 0x0
4074 #define TCS_BUTTONS 0x100
4075 #define TCS_SINGLELINE 0x0
4076 #define TCS_MULTILINE 0x200
4077 #define TCS_RIGHTJUSTIFY 0x0
4078 #define TCS_FIXEDWIDTH 0x400
4079 #define TCS_RAGGEDRIGHT 0x800
4080 #define TCS_FOCUSONBUTTONDOWN 0x1000
4081 #define TCS_OWNERDRAWFIXED 0x2000
4082 #define TCS_TOOLTIPS 0x4000
4083 #define TCS_FOCUSNEVER 0x8000
4084
4085 #define TCS_EX_FLATSEPARATORS 0x1
4086 #define TCS_EX_REGISTERDROP 0x2
4087
4088 #define TCM_GETIMAGELIST (TCM_FIRST+2)
4089 #define TabCtrl_GetImageList(hwnd) (HIMAGELIST)SNDMSG((hwnd),TCM_GETIMAGELIST,0,0L)
4090
4091 #define TCM_SETIMAGELIST (TCM_FIRST+3)
4092 #define TabCtrl_SetImageList(hwnd,himl) (HIMAGELIST)SNDMSG((hwnd),TCM_SETIMAGELIST,0,(LPARAM)(HIMAGELIST)(himl))
4093
4094 #define TCM_GETITEMCOUNT (TCM_FIRST+4)
4095 #define TabCtrl_GetItemCount(hwnd) (int)SNDMSG((hwnd),TCM_GETITEMCOUNT,0,0L)
4096
4097 #define TCIF_TEXT 0x1
4098 #define TCIF_IMAGE 0x2
4099 #define TCIF_RTLREADING 0x4
4100 #define TCIF_PARAM 0x8
4101 #define TCIF_STATE 0x10
4102
4103 #define TCIS_BUTTONPRESSED 0x1
4104 #define TCIS_HIGHLIGHTED 0x2
4105
4106 #define TC_ITEMHEADERA TCITEMHEADERA
4107 #define TC_ITEMHEADERW TCITEMHEADERW
4108 #define TC_ITEMHEADER TCITEMHEADER
4109
4110 typedef struct tagTCITEMHEADERA {
4111 UINT mask;
4112 UINT lpReserved1;
4113 UINT lpReserved2;
4114 LPSTR pszText;
4115 int cchTextMax;
4116 int iImage;
4117 } TCITEMHEADERA,*LPTCITEMHEADERA;
4118
4119 typedef struct tagTCITEMHEADERW {
4120 UINT mask;
4121 UINT lpReserved1;
4122 UINT lpReserved2;
4123 LPWSTR pszText;
4124 int cchTextMax;
4125 int iImage;
4126 } TCITEMHEADERW,*LPTCITEMHEADERW;
4127
4128 #ifdef UNICODE
4129 #define TCITEMHEADER TCITEMHEADERW
4130 #define LPTCITEMHEADER LPTCITEMHEADERW
4131 #else
4132 #define TCITEMHEADER TCITEMHEADERA
4133 #define LPTCITEMHEADER LPTCITEMHEADERA
4134 #endif
4135
4136 #define TC_ITEMA TCITEMA
4137 #define TC_ITEMW TCITEMW
4138 #define TC_ITEM TCITEM
4139
4140 typedef struct tagTCITEMA {
4141 UINT mask;
4142 DWORD dwState;
4143 DWORD dwStateMask;
4144 LPSTR pszText;
4145 int cchTextMax;
4146 int iImage;
4147 LPARAM lParam;
4148 } TCITEMA,*LPTCITEMA;
4149
4150 typedef struct tagTCITEMW {
4151 UINT mask;
4152 DWORD dwState;
4153 DWORD dwStateMask;
4154 LPWSTR pszText;
4155 int cchTextMax;
4156 int iImage;
4157 LPARAM lParam;
4158 } TCITEMW,*LPTCITEMW;
4159
4160 #ifdef UNICODE
4161 #define TCITEM TCITEMW
4162 #define LPTCITEM LPTCITEMW
4163 #else
4164 #define TCITEM TCITEMA
4165 #define LPTCITEM LPTCITEMA
4166 #endif
4167
4168 #define TCM_GETITEMA (TCM_FIRST+5)
4169 #define TCM_GETITEMW (TCM_FIRST+60)
4170
4171 #ifdef UNICODE
4172 #define TCM_GETITEM TCM_GETITEMW
4173 #else
4174 #define TCM_GETITEM TCM_GETITEMA
4175 #endif
4176
4177 #define TabCtrl_GetItem(hwnd,iItem,pitem) (WINBOOL)SNDMSG((hwnd),TCM_GETITEM,(WPARAM)(int)(iItem),(LPARAM)(TC_ITEM *)(pitem))
4178
4179 #define TCM_SETITEMA (TCM_FIRST+6)
4180 #define TCM_SETITEMW (TCM_FIRST+61)
4181
4182 #ifdef UNICODE
4183 #define TCM_SETITEM TCM_SETITEMW
4184 #else
4185 #define TCM_SETITEM TCM_SETITEMA
4186 #endif
4187
4188 #define TabCtrl_SetItem(hwnd,iItem,pitem) (WINBOOL)SNDMSG((hwnd),TCM_SETITEM,(WPARAM)(int)(iItem),(LPARAM)(TC_ITEM *)(pitem))
4189
4190 #define TCM_INSERTITEMA (TCM_FIRST+7)
4191 #define TCM_INSERTITEMW (TCM_FIRST+62)
4192
4193 #ifdef UNICODE
4194 #define TCM_INSERTITEM TCM_INSERTITEMW
4195 #else
4196 #define TCM_INSERTITEM TCM_INSERTITEMA
4197 #endif
4198
4199 #define TabCtrl_InsertItem(hwnd,iItem,pitem) (int)SNDMSG((hwnd),TCM_INSERTITEM,(WPARAM)(int)(iItem),(LPARAM)(const TC_ITEM *)(pitem))
4200
4201 #define TCM_DELETEITEM (TCM_FIRST+8)
4202 #define TabCtrl_DeleteItem(hwnd,i) (WINBOOL)SNDMSG((hwnd),TCM_DELETEITEM,(WPARAM)(int)(i),0L)
4203
4204 #define TCM_DELETEALLITEMS (TCM_FIRST+9)
4205 #define TabCtrl_DeleteAllItems(hwnd) (WINBOOL)SNDMSG((hwnd),TCM_DELETEALLITEMS,0,0L)
4206
4207 #define TCM_GETITEMRECT (TCM_FIRST+10)
4208 #define TabCtrl_GetItemRect(hwnd,i,prc) (WINBOOL)SNDMSG((hwnd),TCM_GETITEMRECT,(WPARAM)(int)(i),(LPARAM)(RECT *)(prc))
4209
4210 #define TCM_GETCURSEL (TCM_FIRST+11)
4211 #define TabCtrl_GetCurSel(hwnd) (int)SNDMSG((hwnd),TCM_GETCURSEL,0,0)
4212
4213 #define TCM_SETCURSEL (TCM_FIRST+12)
4214 #define TabCtrl_SetCurSel(hwnd,i) (int)SNDMSG((hwnd),TCM_SETCURSEL,(WPARAM)(i),0)
4215
4216 #define TCHT_NOWHERE 0x1
4217 #define TCHT_ONITEMICON 0x2
4218 #define TCHT_ONITEMLABEL 0x4
4219 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
4220
4221 #define LPTC_HITTESTINFO LPTCHITTESTINFO
4222 #define TC_HITTESTINFO TCHITTESTINFO
4223
4224 typedef struct tagTCHITTESTINFO {
4225 POINT pt;
4226 UINT flags;
4227 } TCHITTESTINFO,*LPTCHITTESTINFO;
4228
4229 #define TCM_HITTEST (TCM_FIRST+13)
4230 #define TabCtrl_HitTest(hwndTC,pinfo) (int)SNDMSG((hwndTC),TCM_HITTEST,0,(LPARAM)(TC_HITTESTINFO *)(pinfo))
4231 #define TCM_SETITEMEXTRA (TCM_FIRST+14)
4232 #define TabCtrl_SetItemExtra(hwndTC,cb) (WINBOOL)SNDMSG((hwndTC),TCM_SETITEMEXTRA,(WPARAM)(cb),0L)
4233 #define TCM_ADJUSTRECT (TCM_FIRST+40)
4234 #define TabCtrl_AdjustRect(hwnd,bLarger,prc) (int)SNDMSG(hwnd,TCM_ADJUSTRECT,(WPARAM)(WINBOOL)(bLarger),(LPARAM)(RECT *)prc)
4235 #define TCM_SETITEMSIZE (TCM_FIRST+41)
4236 #define TabCtrl_SetItemSize(hwnd,x,y) (DWORD)SNDMSG((hwnd),TCM_SETITEMSIZE,0,MAKELPARAM(x,y))
4237 #define TCM_REMOVEIMAGE (TCM_FIRST+42)
4238 #define TabCtrl_RemoveImage(hwnd,i) (void)SNDMSG((hwnd),TCM_REMOVEIMAGE,i,0L)
4239 #define TCM_SETPADDING (TCM_FIRST+43)
4240 #define TabCtrl_SetPadding(hwnd,cx,cy) (void)SNDMSG((hwnd),TCM_SETPADDING,0,MAKELPARAM(cx,cy))
4241 #define TCM_GETROWCOUNT (TCM_FIRST+44)
4242 #define TabCtrl_GetRowCount(hwnd) (int)SNDMSG((hwnd),TCM_GETROWCOUNT,0,0L)
4243 #define TCM_GETTOOLTIPS (TCM_FIRST+45)
4244 #define TabCtrl_GetToolTips(hwnd) (HWND)SNDMSG((hwnd),TCM_GETTOOLTIPS,0,0L)
4245 #define TCM_SETTOOLTIPS (TCM_FIRST+46)
4246 #define TabCtrl_SetToolTips(hwnd,hwndTT) (void)SNDMSG((hwnd),TCM_SETTOOLTIPS,(WPARAM)(hwndTT),0L)
4247 #define TCM_GETCURFOCUS (TCM_FIRST+47)
4248 #define TabCtrl_GetCurFocus(hwnd) (int)SNDMSG((hwnd),TCM_GETCURFOCUS,0,0)
4249 #define TCM_SETCURFOCUS (TCM_FIRST+48)
4250 #define TabCtrl_SetCurFocus(hwnd,i) SNDMSG((hwnd),TCM_SETCURFOCUS,i,0)
4251 #define TCM_SETMINTABWIDTH (TCM_FIRST+49)
4252 #define TabCtrl_SetMinTabWidth(hwnd,x) (int)SNDMSG((hwnd),TCM_SETMINTABWIDTH,0,x)
4253 #define TCM_DESELECTALL (TCM_FIRST+50)
4254 #define TabCtrl_DeselectAll(hwnd,fExcludeFocus) (void)SNDMSG((hwnd),TCM_DESELECTALL,fExcludeFocus,0)
4255 #define TCM_HIGHLIGHTITEM (TCM_FIRST+51)
4256 #define TabCtrl_HighlightItem(hwnd,i,fHighlight) (WINBOOL)SNDMSG((hwnd),TCM_HIGHLIGHTITEM,(WPARAM)(i),(LPARAM)MAKELONG (fHighlight,0))
4257 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST+52)
4258 #define TabCtrl_SetExtendedStyle(hwnd,dw) (DWORD)SNDMSG((hwnd),TCM_SETEXTENDEDSTYLE,0,dw)
4259 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST+53)
4260 #define TabCtrl_GetExtendedStyle(hwnd) (DWORD)SNDMSG((hwnd),TCM_GETEXTENDEDSTYLE,0,0)
4261 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4262 #define TabCtrl_SetUnicodeFormat(hwnd,fUnicode) (WINBOOL)SNDMSG((hwnd),TCM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
4263 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4264 #define TabCtrl_GetUnicodeFormat(hwnd) (WINBOOL)SNDMSG((hwnd),TCM_GETUNICODEFORMAT,0,0)
4265
4266 #define TCN_KEYDOWN (TCN_FIRST - 0)
4267
4268 #define TC_KEYDOWN NMTCKEYDOWN
4269
4270 #include <pshpack1.h>
4271
4272 typedef struct tagTCKEYDOWN {
4273 NMHDR hdr;
4274 WORD wVKey;
4275 UINT flags;
4276 } NMTCKEYDOWN;
4277
4278 #include <poppack.h>
4279
4280 #define TCN_SELCHANGE (TCN_FIRST - 1)
4281 #define TCN_SELCHANGING (TCN_FIRST - 2)
4282 #define TCN_GETOBJECT (TCN_FIRST - 3)
4283 #define TCN_FOCUSCHANGE (TCN_FIRST - 4)
4284 #endif
4285
4286 #ifndef NOANIMATE
4287
4288 #define ANIMATE_CLASSW L"SysAnimate32"
4289 #define ANIMATE_CLASSA "SysAnimate32"
4290 #ifdef UNICODE
4291 #define ANIMATE_CLASS ANIMATE_CLASSW
4292 #else
4293 #define ANIMATE_CLASS ANIMATE_CLASSA
4294 #endif
4295
4296 #define ACS_CENTER 0x1
4297 #define ACS_TRANSPARENT 0x2
4298 #define ACS_AUTOPLAY 0x4
4299 #define ACS_TIMER 0x8
4300
4301 #define ACM_OPENA (WM_USER+100)
4302 #define ACM_OPENW (WM_USER+103)
4303 #ifdef UNICODE
4304 #define ACM_OPEN ACM_OPENW
4305 #else
4306 #define ACM_OPEN ACM_OPENA
4307 #endif
4308
4309 #define ACM_PLAY (WM_USER+101)
4310 #define ACM_STOP (WM_USER+102)
4311
4312 #define ACN_START 1
4313 #define ACN_STOP 2
4314
4315 #define Animate_Create(hwndP,id,dwStyle,hInstance) CreateWindow(ANIMATE_CLASS,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
4316
4317 #define Animate_Open(hwnd,szName) (WINBOOL)SNDMSG(hwnd,ACM_OPEN,0,(LPARAM)(LPTSTR)(szName))
4318 #define Animate_OpenEx(hwnd,hInst,szName) (WINBOOL)SNDMSG(hwnd,ACM_OPEN,(WPARAM)(hInst),(LPARAM)(LPTSTR)(szName))
4319 #define Animate_Play(hwnd,from,to,rep) (WINBOOL)SNDMSG(hwnd,ACM_PLAY,(WPARAM)(rep),(LPARAM)MAKELONG(from,to))
4320 #define Animate_Stop(hwnd) (WINBOOL)SNDMSG(hwnd,ACM_STOP,0,0)
4321 #define Animate_Close(hwnd) Animate_Open(hwnd,NULL)
4322 #define Animate_Seek(hwnd,frame) Animate_Play(hwnd,frame,frame,1)
4323 #endif
4324
4325 #ifndef NOMONTHCAL
4326 #define MONTHCAL_CLASSW L"SysMonthCal32"
4327 #define MONTHCAL_CLASSA "SysMonthCal32"
4328 #ifdef UNICODE
4329 #define MONTHCAL_CLASS MONTHCAL_CLASSW
4330 #else
4331 #define MONTHCAL_CLASS MONTHCAL_CLASSA
4332 #endif
4333
4334 typedef DWORD MONTHDAYSTATE,*LPMONTHDAYSTATE;
4335
4336 #define MCM_FIRST 0x1000
4337
4338 #define MCM_GETCURSEL (MCM_FIRST+1)
4339 #define MonthCal_GetCurSel(hmc,pst) (WINBOOL)SNDMSG(hmc,MCM_GETCURSEL,0,(LPARAM)(pst))
4340 #define MCM_SETCURSEL (MCM_FIRST+2)
4341 #define MonthCal_SetCurSel(hmc,pst) (WINBOOL)SNDMSG(hmc,MCM_SETCURSEL,0,(LPARAM)(pst))
4342 #define MCM_GETMAXSELCOUNT (MCM_FIRST+3)
4343 #define MonthCal_GetMaxSelCount(hmc) (DWORD)SNDMSG(hmc,MCM_GETMAXSELCOUNT,0,0L)
4344 #define MCM_SETMAXSELCOUNT (MCM_FIRST+4)
4345 #define MonthCal_SetMaxSelCount(hmc,n) (WINBOOL)SNDMSG(hmc,MCM_SETMAXSELCOUNT,(WPARAM)(n),0L)
4346 #define MCM_GETSELRANGE (MCM_FIRST+5)
4347 #define MonthCal_GetSelRange(hmc,rgst) SNDMSG(hmc,MCM_GETSELRANGE,0,(LPARAM)(rgst))
4348 #define MCM_SETSELRANGE (MCM_FIRST+6)
4349 #define MonthCal_SetSelRange(hmc,rgst) SNDMSG(hmc,MCM_SETSELRANGE,0,(LPARAM)(rgst))
4350 #define MCM_GETMONTHRANGE (MCM_FIRST+7)
4351 #define MonthCal_GetMonthRange(hmc,gmr,rgst) (DWORD)SNDMSG(hmc,MCM_GETMONTHRANGE,(WPARAM)(gmr),(LPARAM)(rgst))
4352 #define MCM_SETDAYSTATE (MCM_FIRST+8)
4353 #define MonthCal_SetDayState(hmc,cbds,rgds) SNDMSG(hmc,MCM_SETDAYSTATE,(WPARAM)(cbds),(LPARAM)(rgds))
4354 #define MCM_GETMINREQRECT (MCM_FIRST+9)
4355 #define MonthCal_GetMinReqRect(hmc,prc) SNDMSG(hmc,MCM_GETMINREQRECT,0,(LPARAM)(prc))
4356 #define MCM_SETCOLOR (MCM_FIRST+10)
4357 #define MonthCal_SetColor(hmc,iColor,clr) SNDMSG(hmc,MCM_SETCOLOR,iColor,clr)
4358 #define MCM_GETCOLOR (MCM_FIRST+11)
4359 #define MonthCal_GetColor(hmc,iColor) SNDMSG(hmc,MCM_GETCOLOR,iColor,0)
4360
4361 #define MCSC_BACKGROUND 0
4362 #define MCSC_TEXT 1
4363 #define MCSC_TITLEBK 2
4364 #define MCSC_TITLETEXT 3
4365 #define MCSC_MONTHBK 4
4366 #define MCSC_TRAILINGTEXT 5
4367
4368 #define MCM_SETTODAY (MCM_FIRST+12)
4369 #define MonthCal_SetToday(hmc,pst) SNDMSG(hmc,MCM_SETTODAY,0,(LPARAM)(pst))
4370 #define MCM_GETTODAY (MCM_FIRST+13)
4371 #define MonthCal_GetToday(hmc,pst) (WINBOOL)SNDMSG(hmc,MCM_GETTODAY,0,(LPARAM)(pst))
4372 #define MCM_HITTEST (MCM_FIRST+14)
4373 #define MonthCal_HitTest(hmc,pinfo) SNDMSG(hmc,MCM_HITTEST,0,(LPARAM)(PMCHITTESTINFO)(pinfo))
4374
4375 typedef struct {
4376 UINT cbSize;
4377 POINT pt;
4378
4379 UINT uHit;
4380 SYSTEMTIME st;
4381 } MCHITTESTINFO,*PMCHITTESTINFO;
4382
4383 #define MCHT_TITLE 0x10000
4384 #define MCHT_CALENDAR 0x20000
4385 #define MCHT_TODAYLINK 0x30000
4386
4387 #define MCHT_NEXT 0x1000000
4388 #define MCHT_PREV 0x2000000
4389
4390 #define MCHT_NOWHERE 0x0
4391
4392 #define MCHT_TITLEBK (MCHT_TITLE)
4393 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x1)
4394 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x2)
4395 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x3)
4396 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x3)
4397
4398 #define MCHT_CALENDARBK (MCHT_CALENDAR)
4399 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x1)
4400 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
4401 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
4402 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x2)
4403 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x3)
4404
4405 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST+15)
4406 #define MonthCal_SetFirstDayOfWeek(hmc,iDay) SNDMSG(hmc,MCM_SETFIRSTDAYOFWEEK,0,iDay)
4407 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST+16)
4408 #define MonthCal_GetFirstDayOfWeek(hmc) (DWORD)SNDMSG(hmc,MCM_GETFIRSTDAYOFWEEK,0,0)
4409 #define MCM_GETRANGE (MCM_FIRST+17)
4410 #define MonthCal_GetRange(hmc,rgst) (DWORD)SNDMSG(hmc,MCM_GETRANGE,0,(LPARAM)(rgst))
4411 #define MCM_SETRANGE (MCM_FIRST+18)
4412 #define MonthCal_SetRange(hmc,gd,rgst) (WINBOOL)SNDMSG(hmc,MCM_SETRANGE,(WPARAM)(gd),(LPARAM)(rgst))
4413 #define MCM_GETMONTHDELTA (MCM_FIRST+19)
4414 #define MonthCal_GetMonthDelta(hmc) (int)SNDMSG(hmc,MCM_GETMONTHDELTA,0,0)
4415 #define MCM_SETMONTHDELTA (MCM_FIRST+20)
4416 #define MonthCal_SetMonthDelta(hmc,n) (int)SNDMSG(hmc,MCM_SETMONTHDELTA,n,0)
4417 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST+21)
4418 #define MonthCal_GetMaxTodayWidth(hmc) (DWORD)SNDMSG(hmc,MCM_GETMAXTODAYWIDTH,0,0)
4419 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4420 #define MonthCal_SetUnicodeFormat(hwnd,fUnicode) (WINBOOL)SNDMSG((hwnd),MCM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
4421 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4422 #define MonthCal_GetUnicodeFormat(hwnd) (WINBOOL)SNDMSG((hwnd),MCM_GETUNICODEFORMAT,0,0)
4423
4424 typedef struct tagNMSELCHANGE {
4425 NMHDR nmhdr;
4426 SYSTEMTIME stSelStart;
4427 SYSTEMTIME stSelEnd;
4428 } NMSELCHANGE,*LPNMSELCHANGE;
4429
4430 #define MCN_SELCHANGE (MCN_FIRST+1)
4431
4432 typedef struct tagNMDAYSTATE {
4433 NMHDR nmhdr;
4434 SYSTEMTIME stStart;
4435 int cDayState;
4436
4437 LPMONTHDAYSTATE prgDayState;
4438 } NMDAYSTATE,*LPNMDAYSTATE;
4439
4440 #define MCN_GETDAYSTATE (MCN_FIRST+3)
4441
4442 typedef NMSELCHANGE NMSELECT,*LPNMSELECT;
4443
4444 #define MCN_SELECT (MCN_FIRST+4)
4445
4446 #define MCS_DAYSTATE 0x1
4447 #define MCS_MULTISELECT 0x2
4448 #define MCS_WEEKNUMBERS 0x4
4449 #define MCS_NOTODAYCIRCLE 0x8
4450 #define MCS_NOTODAY 0x10
4451
4452 #define GMR_VISIBLE 0
4453 #define GMR_DAYSTATE 1