include: Update shell link flags enum.
[wine.git] / include / commctrl.h
blob700b335fbb718724d716dcdf69985ee969499ae3
1 /*
2 * Common controls definitions
4 * Copyright (C) the Wine project
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_COMMCTRL_H
22 #define __WINE_COMMCTRL_H
24 #include <prsht.h>
25 #include <commctrl.rh>
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 BOOL WINAPI ShowHideMenuCtl (HWND, UINT_PTR, LPINT);
32 VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, const INT*);
33 VOID WINAPI InitCommonControls (VOID);
35 typedef struct tagINITCOMMONCONTROLSEX {
36 DWORD dwSize;
37 DWORD dwICC;
38 } INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
40 BOOL WINAPI InitCommonControlsEx (const INITCOMMONCONTROLSEX*);
42 LANGID WINAPI GetMUILanguage (VOID);
43 VOID WINAPI InitMUILanguage (LANGID uiLang);
45 enum _LI_METRIC
47 LIM_SMALL,
48 LIM_LARGE
51 HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE, const WCHAR *, int, int, HICON *);
52 HRESULT WINAPI LoadIconMetric(HINSTANCE, const WCHAR *, int, HICON *);
54 #define COMCTL32_VERSION 5 /* dll version */
56 #ifndef _WIN32_IE
57 #define _WIN32_IE 0x0400
58 #endif
60 #define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
61 #define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
62 #define ICC_BAR_CLASSES 0x00000004 /* toolbar, statusbar, trackbar, tooltips */
63 #define ICC_TAB_CLASSES 0x00000008 /* tab, tooltips */
64 #define ICC_UPDOWN_CLASS 0x00000010 /* updown */
65 #define ICC_PROGRESS_CLASS 0x00000020 /* progress */
66 #define ICC_HOTKEY_CLASS 0x00000040 /* hotkey */
67 #define ICC_ANIMATE_CLASS 0x00000080 /* animate */
68 #define ICC_WIN95_CLASSES 0x000000FF
69 #define ICC_DATE_CLASSES 0x00000100 /* month picker, date picker, time picker, updown */
70 #define ICC_USEREX_CLASSES 0x00000200 /* comboex */
71 #define ICC_COOL_CLASSES 0x00000400 /* rebar (coolbar) */
72 #define ICC_INTERNET_CLASSES 0x00000800 /* IP address, ... */
73 #define ICC_PAGESCROLLER_CLASS 0x00001000 /* page scroller */
74 #define ICC_NATIVEFNTCTL_CLASS 0x00002000 /* native font control ???*/
75 #define ICC_STANDARD_CLASSES 0x00004000
76 #define ICC_LINK_CLASS 0x00008000
79 /* common control shared messages */
80 #define CCM_FIRST 0x2000
82 #define CCM_SETBKCOLOR (CCM_FIRST+0x1) /* lParam = bkColor */
83 #define CCM_SETCOLORSCHEME (CCM_FIRST+0x2) /* lParam = COLORSCHEME struct ptr */
84 #define CCM_GETCOLORSCHEME (CCM_FIRST+0x3) /* lParam = COLORSCHEME struct ptr */
85 #define CCM_GETDROPTARGET (CCM_FIRST+0x4)
86 #define CCM_SETUNICODEFORMAT (CCM_FIRST+0x5)
87 #define CCM_GETUNICODEFORMAT (CCM_FIRST+0x6)
88 #define CCM_SETVERSION (CCM_FIRST+0x7)
89 #define CCM_GETVERSION (CCM_FIRST+0x8)
90 #define CCM_SETNOTIFYWINDOW (CCM_FIRST+0x9) /* wParam = hwndParent */
91 #define CCM_SETWINDOWTHEME (CCM_FIRST+0xb)
92 #define CCM_DPISCALE (CCM_FIRST+0xc)
95 /* common notification codes (WM_NOTIFY)*/
96 #define NM_FIRST (0U- 0U)
97 #define NM_LAST (0U- 99U)
98 #define NM_OUTOFMEMORY (NM_FIRST-1)
99 #define NM_CLICK (NM_FIRST-2)
100 #define NM_DBLCLK (NM_FIRST-3)
101 #define NM_RETURN (NM_FIRST-4)
102 #define NM_RCLICK (NM_FIRST-5)
103 #define NM_RDBLCLK (NM_FIRST-6)
104 #define NM_SETFOCUS (NM_FIRST-7)
105 #define NM_KILLFOCUS (NM_FIRST-8)
106 #define NM_CUSTOMDRAW (NM_FIRST-12)
107 #define NM_HOVER (NM_FIRST-13)
108 #define NM_NCHITTEST (NM_FIRST-14)
109 #define NM_KEYDOWN (NM_FIRST-15)
110 #define NM_RELEASEDCAPTURE (NM_FIRST-16)
111 #define NM_SETCURSOR (NM_FIRST-17)
112 #define NM_CHAR (NM_FIRST-18)
113 #define NM_TOOLTIPSCREATED (NM_FIRST-19)
114 #define NM_LDOWN (NM_FIRST-20)
115 #define NM_RDOWN (NM_FIRST-21)
116 #define NM_THEMECHANGED (NM_FIRST-22)
117 #define NM_FONTCHANGED (NM_FIRST-23)
118 #define NM_CUSTOMTEXT (NM_FIRST-24)
119 #define NM_TVSTATEIMAGECHANGING (NM_FIRST-24)
121 #define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) \
122 (fn)((hwnd), (int)(wParam), (NMHDR*)(lParam))
123 #define FORWARD_WM_NOTIFY(hwnd, idFrom, pnmhdr, fn) \
124 (LRESULT)(fn)((hwnd), WM_NOTIFY, (WPARAM)(int)(idFrom), (LPARAM)(NMHDR*)(pnmhdr))
127 /* callback constants */
128 #define LPSTR_TEXTCALLBACKA ((LPSTR)-1)
129 #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1)
130 #define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
132 #define I_IMAGECALLBACK (-1)
133 #define I_IMAGENONE (-2)
134 #define I_INDENTCALLBACK (-1)
135 #define I_CHILDRENCALLBACK (-1)
136 #define I_GROUPIDCALLBACK (-1)
137 #define I_GROUPIDNONE (-2)
138 #define I_COLUMNSCALLBACK ((UINT)-1)
140 /* owner drawn types */
141 #define ODT_HEADER 100
142 #define ODT_TAB 101
143 #define ODT_LISTVIEW 102
145 /* common notification structures */
146 typedef struct tagNMTOOLTIPSCREATED
148 NMHDR hdr;
149 HWND hwndToolTips;
150 } NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;
152 typedef struct tagNMMOUSE
154 NMHDR hdr;
155 DWORD_PTR dwItemSpec;
156 DWORD_PTR dwItemData;
157 POINT pt;
158 DWORD dwHitInfo; /* info where on item or control the mouse is */
159 } NMMOUSE, *LPNMMOUSE;
161 typedef struct tagNMOBJECTNOTIFY
163 NMHDR hdr;
164 int iItem;
165 #ifdef __IID_DEFINED__
166 const IID *piid;
167 #else
168 const void *piid;
169 #endif
170 void *pObject;
171 HRESULT hResult;
172 DWORD dwFlags;
173 } NMOBJECTNOTIFY, *LPNMOBJECTNOTIFY;
175 typedef struct tagNMKEY
177 NMHDR hdr;
178 UINT nVKey;
179 UINT uFlags;
180 } NMKEY, *LPNMKEY;
182 typedef struct tagNMCHAR
184 NMHDR hdr;
185 UINT ch;
186 DWORD dwItemPrev; /* Item previously selected */
187 DWORD dwItemNext; /* Item to be selected */
188 } NMCHAR, *LPNMCHAR;
190 #ifndef CCSIZEOF_STRUCT
191 #define CCSIZEOF_STRUCT(name, member) \
192 (((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
193 sizeof(((name*)0)->member))
194 #endif
197 #ifndef SNDMSG
198 #ifdef __cplusplus
199 #define SNDMSG ::SendMessage
200 #else /* __cplusplus */
201 #define SNDMSG SendMessage
202 #endif /* __cplusplus */
203 #endif /* SNDMSG */
206 #ifdef __cplusplus
207 #define SNDMSGA ::SendMessageA
208 #define SNDMSGW ::SendMessageW
209 #else
210 #define SNDMSGA SendMessageA
211 #define SNDMSGW SendMessageW
212 #endif
214 /* Custom Draw messages */
216 #define CDRF_DODEFAULT 0x0
217 #define CDRF_NEWFONT 0x00000002
218 #define CDRF_SKIPDEFAULT 0x00000004
219 #define CDRF_DOERASE 0x00000008
220 #define CDRF_NOTIFYPOSTPAINT 0x00000010
221 #define CDRF_NOTIFYITEMDRAW 0x00000020
222 #define CDRF_NOTIFYSUBITEMDRAW 0x00000020
223 #define CDRF_NOTIFYPOSTERASE 0x00000040
224 #define CDRF_NOTIFYITEMERASE 0x00000080 /* obsolete ??? */
225 #define CDRF_SKIPPOSTPAINT 0x00000100
228 /* drawstage flags */
230 #define CDDS_PREPAINT 1
231 #define CDDS_POSTPAINT 2
232 #define CDDS_PREERASE 3
233 #define CDDS_POSTERASE 4
235 #define CDDS_ITEM 0x00010000
236 #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
237 #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
238 #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
239 #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
240 #define CDDS_SUBITEM 0x00020000
242 /* itemState flags */
244 #define CDIS_SELECTED 0x0001
245 #define CDIS_GRAYED 0x0002
246 #define CDIS_DISABLED 0x0004
247 #define CDIS_CHECKED 0x0008
248 #define CDIS_FOCUS 0x0010
249 #define CDIS_DEFAULT 0x0020
250 #define CDIS_HOT 0x0040
251 #define CDIS_MARKED 0x0080
252 #define CDIS_INDETERMINATE 0x0100
253 #define CDIS_SHOWKEYBOARDCUES 0x0200
254 #define CDIS_NEARHOT 0x0400
255 #define CDIS_OTHERSIDEHOT 0x0800
256 #define CDIS_DROPHILITED 0x1000
259 typedef struct tagNMCUSTOMDRAWINFO
261 NMHDR hdr;
262 DWORD dwDrawStage;
263 HDC hdc;
264 RECT rc;
265 DWORD_PTR dwItemSpec;
266 UINT uItemState;
267 LPARAM lItemlParam;
268 } NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
270 typedef struct tagNMTTCUSTOMDRAW
272 NMCUSTOMDRAW nmcd;
273 UINT uDrawFlags;
274 } NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
279 /* StatusWindow */
281 #define STATUSCLASSNAMEA "msctls_statusbar32"
282 #if defined(_MSC_VER) || defined(__MINGW32__)
283 # define STATUSCLASSNAMEW L"msctls_statusbar32"
284 #else
285 static const WCHAR STATUSCLASSNAMEW[] = { 'm','s','c','t','l','s','_',
286 's','t','a','t','u','s','b','a','r','3','2',0 };
287 #endif
288 #define STATUSCLASSNAME WINELIB_NAME_AW(STATUSCLASSNAME)
290 #define SBT_NOBORDERS 0x0100
291 #define SBT_POPOUT 0x0200
292 #define SBT_RTLREADING 0x0400 /* not supported */
293 #define SBT_OWNERDRAW 0x1000
295 #define SB_SIMPLEID 0x00ff
297 #define SB_SETTEXTA (WM_USER+1)
298 #define SB_SETTEXTW (WM_USER+11)
299 #define SB_SETTEXT WINELIB_NAME_AW(SB_SETTEXT)
300 #define SB_GETTEXTA (WM_USER+2)
301 #define SB_GETTEXTW (WM_USER+13)
302 #define SB_GETTEXT WINELIB_NAME_AW(SB_GETTEXT)
303 #define SB_GETTEXTLENGTHA (WM_USER+3)
304 #define SB_GETTEXTLENGTHW (WM_USER+12)
305 #define SB_GETTEXTLENGTH WINELIB_NAME_AW(SB_GETTEXTLENGTH)
306 #define SB_SETPARTS (WM_USER+4)
307 #define SB_SETBORDERS (WM_USER+5)
308 #define SB_GETPARTS (WM_USER+6)
309 #define SB_GETBORDERS (WM_USER+7)
310 #define SB_SETMINHEIGHT (WM_USER+8)
311 #define SB_SIMPLE (WM_USER+9)
312 #define SB_GETRECT (WM_USER+10)
313 #define SB_ISSIMPLE (WM_USER+14)
314 #define SB_SETICON (WM_USER+15)
315 #define SB_SETTIPTEXTA (WM_USER+16)
316 #define SB_SETTIPTEXTW (WM_USER+17)
317 #define SB_SETTIPTEXT WINELIB_NAME_AW(SB_SETTIPTEXT)
318 #define SB_GETTIPTEXTA (WM_USER+18)
319 #define SB_GETTIPTEXTW (WM_USER+19)
320 #define SB_GETTIPTEXT WINELIB_NAME_AW(SB_GETTIPTEXT)
321 #define SB_GETICON (WM_USER+20)
322 #define SB_SETBKCOLOR CCM_SETBKCOLOR /* lParam = bkColor */
323 #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
324 #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
326 #define SBN_FIRST (0U-880U)
327 #define SBN_LAST (0U-899U)
328 #define SBN_SIMPLEMODECHANGE (SBN_FIRST-0)
330 HWND WINAPI CreateStatusWindowA (LONG, LPCSTR, HWND, UINT);
331 HWND WINAPI CreateStatusWindowW (LONG, LPCWSTR, HWND, UINT);
332 #define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
333 VOID WINAPI DrawStatusTextA (HDC, LPCRECT, LPCSTR, UINT);
334 VOID WINAPI DrawStatusTextW (HDC, LPCRECT, LPCWSTR, UINT);
335 #define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
336 VOID WINAPI MenuHelp (UINT, WPARAM, LPARAM, HMENU,
337 HINSTANCE, HWND, UINT*);
339 typedef struct tagCOLORSCHEME
341 DWORD dwSize;
342 COLORREF clrBtnHighlight; /* highlight color */
343 COLORREF clrBtnShadow; /* shadow color */
344 } COLORSCHEME, *LPCOLORSCHEME;
346 /**************************************************************************
347 * Drag List control
350 typedef struct tagDRAGLISTINFO
352 UINT uNotification;
353 HWND hWnd;
354 POINT ptCursor;
355 } DRAGLISTINFO, *LPDRAGLISTINFO;
357 #define DL_BEGINDRAG (WM_USER+133)
358 #define DL_DRAGGING (WM_USER+134)
359 #define DL_DROPPED (WM_USER+135)
360 #define DL_CANCELDRAG (WM_USER+136)
362 #define DL_CURSORSET 0
363 #define DL_STOPCURSOR 1
364 #define DL_COPYCURSOR 2
365 #define DL_MOVECURSOR 3
367 #define DRAGLISTMSGSTRINGA "commctrl_DragListMsg"
368 #if defined(_MSC_VER) || defined(__MINGW32__)
369 # define DRAGLISTMSGSTRINGW L"commctrl_DragListMsg"
370 #else
371 static const WCHAR DRAGLISTMSGSTRINGW[] = { 'c','o','m','m','c','t','r','l',
372 '_','D','r','a','g','L','i','s','t','M','s','g',0 };
373 #endif
374 #define DRAGLISTMSGSTRING WINELIB_NAME_AW(DRAGLISTMSGSTRING)
376 BOOL WINAPI MakeDragList (HWND);
377 VOID WINAPI DrawInsert (HWND, HWND, INT);
378 INT WINAPI LBItemFromPt (HWND, POINT, BOOL);
381 /* UpDown */
383 #define UPDOWN_CLASSA "msctls_updown32"
384 #if defined(_MSC_VER) || defined(__MINGW32__)
385 # define UPDOWN_CLASSW L"msctls_updown32"
386 #else
387 static const WCHAR UPDOWN_CLASSW[] = { 'm','s','c','t','l','s','_',
388 'u','p','d','o','w','n','3','2',0 };
389 #endif
390 #define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
392 typedef struct _UDACCEL
394 UINT nSec;
395 UINT nInc;
396 } UDACCEL, *LPUDACCEL;
398 #define UD_MAXVAL 0x7fff
399 #define UD_MINVAL 0x8001
402 #define UDN_FIRST (0U-721)
403 #define UDN_LAST (0U-740)
404 #define UDN_DELTAPOS (UDN_FIRST-1)
406 #define UDM_SETRANGE (WM_USER+101)
407 #define UDM_GETRANGE (WM_USER+102)
408 #define UDM_SETPOS (WM_USER+103)
409 #define UDM_GETPOS (WM_USER+104)
410 #define UDM_SETBUDDY (WM_USER+105)
411 #define UDM_GETBUDDY (WM_USER+106)
412 #define UDM_SETACCEL (WM_USER+107)
413 #define UDM_GETACCEL (WM_USER+108)
414 #define UDM_SETBASE (WM_USER+109)
415 #define UDM_GETBASE (WM_USER+110)
416 #define UDM_SETRANGE32 (WM_USER+111)
417 #define UDM_GETRANGE32 (WM_USER+112)
418 #define UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
419 #define UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
420 #define UDM_SETPOS32 (WM_USER+113)
421 #define UDM_GETPOS32 (WM_USER+114)
424 #define NMUPDOWN NM_UPDOWN
425 #define LPNMUPDOWN LPNM_UPDOWN
427 typedef struct tagNM_UPDOWN
429 NMHDR hdr;
430 int iPos;
431 int iDelta;
432 } NM_UPDOWN, *LPNM_UPDOWN;
434 HWND WINAPI CreateUpDownControl (DWORD, INT, INT, INT, INT,
435 HWND, INT, HINSTANCE, HWND,
436 INT, INT, INT);
438 /* Progress Bar */
440 #define PROGRESS_CLASSA "msctls_progress32"
441 #if defined(_MSC_VER) || defined(__MINGW32__)
442 # define PROGRESS_CLASSW L"msctls_progress32"
443 #else
444 static const WCHAR PROGRESS_CLASSW[] = { 'm','s','c','t','l','s','_',
445 'p','r','o','g','r','e','s','s','3','2',0 };
446 #endif
447 #define PROGRESS_CLASS WINELIB_NAME_AW(PROGRESS_CLASS)
449 #define PBM_SETRANGE (WM_USER+1)
450 #define PBM_SETPOS (WM_USER+2)
451 #define PBM_DELTAPOS (WM_USER+3)
452 #define PBM_SETSTEP (WM_USER+4)
453 #define PBM_STEPIT (WM_USER+5)
454 #define PBM_SETRANGE32 (WM_USER+6)
455 #define PBM_GETRANGE (WM_USER+7)
456 #define PBM_GETPOS (WM_USER+8)
457 #define PBM_SETBARCOLOR (WM_USER+9)
458 #define PBM_SETMARQUEE (WM_USER+10)
459 #define PBM_GETSTEP (WM_USER+13)
460 #define PBM_GETBKCOLOR (WM_USER+14)
461 #define PBM_GETBARCOLOR (WM_USER+15)
462 #define PBM_SETSTATE (WM_USER+16)
463 #define PBM_GETSTATE (WM_USER+17)
464 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
467 #define PBST_NORMAL 1
468 #define PBST_ERROR 2
469 #define PBST_PAUSED 3
471 typedef struct
473 INT iLow;
474 INT iHigh;
475 } PBRANGE, *PPBRANGE;
478 /* ImageList */
480 struct _IMAGELIST;
481 typedef struct _IMAGELIST *HIMAGELIST;
483 #define CLR_NONE 0xFFFFFFFF
484 #define CLR_DEFAULT 0xFF000000
485 #define CLR_HILIGHT CLR_DEFAULT
487 #define ILC_MASK 0x00000001
488 #define ILC_COLOR 0x00000000
489 #define ILC_COLORDDB 0x000000fe
490 #define ILC_COLOR4 0x00000004
491 #define ILC_COLOR8 0x00000008
492 #define ILC_COLOR16 0x00000010
493 #define ILC_COLOR24 0x00000018
494 #define ILC_COLOR32 0x00000020
495 #define ILC_PALETTE 0x00000800 /* no longer supported by M$ */
496 #define ILC_MIRROR 0x00002000
497 #define ILC_PERITEMMIRROR 0x00008000
498 #define ILC_ORIGINALSIZE 0x00010000
499 #define ILC_HIGHQUALITYSCALE 0x00020000
501 #define ILD_NORMAL 0x0000
502 #define ILD_TRANSPARENT 0x0001
503 #define ILD_BLEND25 0x0002
504 #define ILD_BLEND50 0x0004
505 #define ILD_MASK 0x0010
506 #define ILD_IMAGE 0x0020
507 #define ILD_ROP 0x0040
508 #define ILD_OVERLAYMASK 0x0F00
509 #define ILD_PRESERVEALPHA 0x1000
510 #define ILD_SCALE 0x2000
511 #define ILD_DPISCALE 0x4000
512 #define ILD_ASYNC 0x8000
514 #define ILD_SELECTED ILD_BLEND50
515 #define ILD_FOCUS ILD_BLEND25
516 #define ILD_BLEND ILD_BLEND50
518 #define INDEXTOOVERLAYMASK(i) ((i)<<8)
519 #define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
521 #define ILCF_MOVE (0x00000000)
522 #define ILCF_SWAP (0x00000001)
524 #define ILGT_NORMAL 0x0000
525 #define ILGT_ASYNC 0x0001
527 #define ILS_NORMAL 0x0000
528 #define ILS_GLOW 0x0001
529 #define ILS_SHADOW 0x0002
530 #define ILS_SATURATE 0x0004
531 #define ILS_ALPHA 0x0008
533 typedef struct _IMAGEINFO
535 HBITMAP hbmImage;
536 HBITMAP hbmMask;
537 INT Unused1;
538 INT Unused2;
539 RECT rcImage;
540 } IMAGEINFO, *LPIMAGEINFO;
543 typedef struct _IMAGELISTDRAWPARAMS
545 DWORD cbSize;
546 HIMAGELIST himl;
547 INT i;
548 HDC hdcDst;
549 INT x;
550 INT y;
551 INT cx;
552 INT cy;
553 INT xBitmap; /* x offset from the upperleft of bitmap */
554 INT yBitmap; /* y offset from the upperleft of bitmap */
555 COLORREF rgbBk;
556 COLORREF rgbFg;
557 UINT fStyle;
558 DWORD dwRop;
559 DWORD fState;
560 DWORD Frame;
561 COLORREF crEffect;
562 } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
564 #define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS, dwRop)
566 HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST,REFIID,void **);
567 INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
568 INT WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
569 BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT);
570 BOOL WINAPI ImageList_Copy(HIMAGELIST,INT,HIMAGELIST,INT,UINT);
571 HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
572 BOOL WINAPI ImageList_Destroy(HIMAGELIST);
573 BOOL WINAPI ImageList_DragEnter(HWND,INT,INT);
574 BOOL WINAPI ImageList_DragLeave(HWND);
575 BOOL WINAPI ImageList_DragMove(INT,INT);
576 BOOL WINAPI ImageList_DragShowNolock (BOOL);
577 BOOL WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
578 BOOL WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
579 INT,COLORREF,COLORREF,UINT);
580 BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
581 HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
582 VOID WINAPI ImageList_EndDrag(VOID);
583 COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
584 HIMAGELIST WINAPI ImageList_GetDragImage(POINT*,POINT*);
585 HICON WINAPI ImageList_GetIcon(HIMAGELIST,INT,UINT);
586 BOOL WINAPI ImageList_GetIconSize(HIMAGELIST,INT*,INT*);
587 INT WINAPI ImageList_GetImageCount(HIMAGELIST);
588 BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST,INT,IMAGEINFO*);
589 BOOL WINAPI ImageList_GetImageRect(HIMAGELIST,INT,LPRECT);
590 HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,INT,INT,
591 COLORREF,UINT,UINT);
592 HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,INT,INT,
593 COLORREF,UINT,UINT);
594 #define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
595 HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
596 BOOL WINAPI ImageList_Remove(HIMAGELIST,INT);
597 BOOL WINAPI ImageList_Replace(HIMAGELIST,INT,HBITMAP,HBITMAP);
598 INT WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT,HICON);
599 COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
600 BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT,INT,INT);
602 BOOL WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
603 BOOL WINAPI ImageList_SetImageCount(HIMAGELIST,UINT);
604 BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
606 #ifdef __IStream_INTERFACE_DEFINED__
607 HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
608 BOOL WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
609 #endif
611 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
612 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
613 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
614 ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
615 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
618 #ifndef WM_MOUSEHOVER
619 #define WM_MOUSEHOVER 0x02A1
620 #define WM_MOUSELEAVE 0x02A3
621 #endif
623 #ifndef TME_HOVER
625 #define TME_HOVER 0x00000001
626 #define TME_LEAVE 0x00000002
627 #define TME_NONCLIENT 0x00000010
628 #define TME_QUERY 0x40000000
629 #define TME_CANCEL 0x80000000
632 #define HOVER_DEFAULT 0xFFFFFFFF
634 typedef struct tagTRACKMOUSEEVENT {
635 DWORD cbSize;
636 DWORD dwFlags;
637 HWND hwndTrack;
638 DWORD dwHoverTime;
639 } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
641 #endif
643 BOOL WINAPI _TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack);
645 /* Flat Scrollbar control */
647 #define FLATSB_CLASSA "flatsb_class32"
648 #if defined(_MSC_VER) || defined(__MINGW32__)
649 # define FLATSB_CLASSW L"flatsb_class32"
650 #else
651 static const WCHAR FLATSB_CLASSW[] = { 'f','l','a','t','s','b','_',
652 'c','l','a','s','s','3','2',0 };
653 #endif
654 #define FLATSB_CLASS WINELIB_NAME_AW(FLATSB_CLASS)
656 #define WSB_PROP_CYVSCROLL __MSABI_LONG(0x00000001)
657 #define WSB_PROP_CXHSCROLL __MSABI_LONG(0x00000002)
658 #define WSB_PROP_CYHSCROLL __MSABI_LONG(0x00000004)
659 #define WSB_PROP_CXVSCROLL __MSABI_LONG(0x00000008)
660 #define WSB_PROP_CXHTHUMB __MSABI_LONG(0x00000010)
661 #define WSB_PROP_CYVTHUMB __MSABI_LONG(0x00000020)
662 #define WSB_PROP_VBKGCOLOR __MSABI_LONG(0x00000040)
663 #define WSB_PROP_HBKGCOLOR __MSABI_LONG(0x00000080)
664 #define WSB_PROP_VSTYLE __MSABI_LONG(0x00000100)
665 #define WSB_PROP_HSTYLE __MSABI_LONG(0x00000200)
666 #define WSB_PROP_WINSTYLE __MSABI_LONG(0x00000400)
667 #define WSB_PROP_PALETTE __MSABI_LONG(0x00000800)
668 #define WSB_PROP_MASK __MSABI_LONG(0x00000FFF)
670 #define FSB_REGULAR_MODE 0
671 #define FSB_ENCARTA_MODE 1
672 #define FSB_FLAT_MODE 2
675 BOOL WINAPI FlatSB_EnableScrollBar(HWND, INT, UINT);
676 BOOL WINAPI FlatSB_ShowScrollBar(HWND, INT, BOOL);
677 BOOL WINAPI FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
678 BOOL WINAPI FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
679 INT WINAPI FlatSB_GetScrollPos(HWND, INT);
680 BOOL WINAPI FlatSB_GetScrollProp(HWND, INT, LPINT);
681 INT WINAPI FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
682 INT WINAPI FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
683 INT WINAPI FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
684 BOOL WINAPI FlatSB_SetScrollProp(HWND, UINT, INT, BOOL);
685 BOOL WINAPI InitializeFlatSB(HWND);
686 HRESULT WINAPI UninitializeFlatSB(HWND);
688 /* Subclassing stuff */
689 typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR);
690 BOOL WINAPI SetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
691 BOOL WINAPI GetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR*);
692 BOOL WINAPI RemoveWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR);
693 LRESULT WINAPI DefSubclassProc(HWND, UINT, WPARAM, LPARAM);
695 int WINAPI DrawShadowText(HDC, LPCWSTR, UINT, RECT*, DWORD, COLORREF, COLORREF, int, int);
697 /* Header control */
699 #define WC_HEADERA "SysHeader32"
700 #if defined(_MSC_VER) || defined(__MINGW32__)
701 # define WC_HEADERW L"SysHeader32"
702 #else
703 static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',0 };
704 #endif
705 #define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
708 #define HDI_WIDTH 0x0001
709 #define HDI_HEIGHT HDI_WIDTH
710 #define HDI_TEXT 0x0002
711 #define HDI_FORMAT 0x0004
712 #define HDI_LPARAM 0x0008
713 #define HDI_BITMAP 0x0010
714 #define HDI_IMAGE 0x0020
715 #define HDI_DI_SETITEM 0x0040
716 #define HDI_ORDER 0x0080
717 #define HDI_FILTER 0x0100
718 #define HDI_STATE 0x0200
720 #define HDIS_FOCUSED 0x00000001
722 #define HDF_LEFT 0x0000
723 #define HDF_RIGHT 0x0001
724 #define HDF_CENTER 0x0002
725 #define HDF_JUSTIFYMASK 0x0003
726 #define HDF_RTLREADING 0x0004
727 #define HDF_CHECKBOX 0x0040
728 #define HDF_CHECKED 0x0080
729 #define HDF_FIXEDWIDTH 0x0100
730 #define HDF_SORTDOWN 0x0200
731 #define HDF_SORTUP 0x0400
732 #define HDF_IMAGE 0x0800
733 #define HDF_BITMAP_ON_RIGHT 0x1000
734 #define HDF_BITMAP 0x2000
735 #define HDF_STRING 0x4000
736 #define HDF_OWNERDRAW 0x8000
737 #define HDF_SPLITBUTTON 0x1000000
739 #define HHT_NOWHERE 0x0001
740 #define HHT_ONHEADER 0x0002
741 #define HHT_ONDIVIDER 0x0004
742 #define HHT_ONDIVOPEN 0x0008
743 #define HHT_ONFILTER 0x0010
744 #define HHT_ONFILTERBUTTON 0x0020
745 #define HHT_ABOVE 0x0100
746 #define HHT_BELOW 0x0200
747 #define HHT_TORIGHT 0x0400
748 #define HHT_TOLEFT 0x0800
749 #define HHT_ONITEMSTATEICON 0x1000
750 #define HHT_ONDROPDOWN 0x2000
751 #define HHT_ONOVERFLOW 0x4000
753 #define HDM_FIRST 0x1200
754 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
755 #define HDM_INSERTITEMA (HDM_FIRST+1)
756 #define HDM_INSERTITEMW (HDM_FIRST+10)
757 #define HDM_INSERTITEM WINELIB_NAME_AW(HDM_INSERTITEM)
758 #define HDM_DELETEITEM (HDM_FIRST+2)
759 #define HDM_GETITEMA (HDM_FIRST+3)
760 #define HDM_GETITEMW (HDM_FIRST+11)
761 #define HDM_GETITEM WINELIB_NAME_AW(HDM_GETITEM)
762 #define HDM_SETITEMA (HDM_FIRST+4)
763 #define HDM_SETITEMW (HDM_FIRST+12)
764 #define HDM_SETITEM WINELIB_NAME_AW(HDM_SETITEM)
765 #define HDM_LAYOUT (HDM_FIRST+5)
766 #define HDM_HITTEST (HDM_FIRST+6)
767 #define HDM_GETITEMRECT (HDM_FIRST+7)
768 #define HDM_SETIMAGELIST (HDM_FIRST+8)
769 #define HDM_GETIMAGELIST (HDM_FIRST+9)
771 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
772 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
773 #define HDM_GETORDERARRAY (HDM_FIRST+17)
774 #define HDM_SETORDERARRAY (HDM_FIRST+18)
775 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
776 #define HDM_SETBITMAPMARGIN (HDM_FIRST+20)
777 #define HDM_GETBITMAPMARGIN (HDM_FIRST+21)
778 #define HDM_SETFILTERCHANGETIMEOUT (HDM_FIRST+22)
779 #define HDM_EDITFILTER (HDM_FIRST+23)
780 #define HDM_CLEARFILTER (HDM_FIRST+24)
781 #define HDM_GETITEMDROPDOWNRECT (HDM_FIRST+25)
782 #define HDM_GETOVERFLOWRECT (HDM_FIRST+26)
783 #define HDM_GETFOCUSEDITEM (HDM_FIRST+27)
784 #define HDM_SETFOCUSEDITEM (HDM_FIRST+28)
785 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
786 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
788 #define HDN_FIRST (0U-300U)
789 #define HDN_LAST (0U-399U)
790 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
791 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
792 #define HDN_ITEMCHANGING WINELIB_NAME_AW(HDN_ITEMCHANGING)
793 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
794 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
795 #define HDN_ITEMCHANGED WINELIB_NAME_AW(HDN_ITEMCHANGED)
796 #define HDN_ITEMCLICKA (HDN_FIRST-2)
797 #define HDN_ITEMCLICKW (HDN_FIRST-22)
798 #define HDN_ITEMCLICK WINELIB_NAME_AW(HDN_ITEMCLICK)
799 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
800 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
801 #define HDN_ITEMDBLCLICK WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
802 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
803 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
804 #define HDN_DIVIDERDBLCLICK WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
805 #define HDN_BEGINTRACKA (HDN_FIRST-6)
806 #define HDN_BEGINTRACKW (HDN_FIRST-26)
807 #define HDN_BEGINTRACK WINELIB_NAME_AW(HDN_BEGINTRACK)
808 #define HDN_ENDTRACKA (HDN_FIRST-7)
809 #define HDN_ENDTRACKW (HDN_FIRST-27)
810 #define HDN_ENDTRACK WINELIB_NAME_AW(HDN_ENDTRACK)
811 #define HDN_TRACKA (HDN_FIRST-8)
812 #define HDN_TRACKW (HDN_FIRST-28)
813 #define HDN_TRACK WINELIB_NAME_AW(HDN_TRACK)
814 #define HDN_GETDISPINFOA (HDN_FIRST-9)
815 #define HDN_GETDISPINFOW (HDN_FIRST-29)
816 #define HDN_GETDISPINFO WINELIB_NAME_AW(HDN_GETDISPINFO)
817 #define HDN_BEGINDRAG (HDN_FIRST-10)
818 #define HDN_ENDDRAG (HDN_FIRST-11)
819 #define HDN_FILTERCHANGE (HDN_FIRST-12)
820 #define HDN_FILTERBTNCLICK (HDN_FIRST-13)
821 #define HDN_BEGINFILTEREDIT (HDN_FIRST-14)
822 #define HDN_ENDFILTEREDIT (HDN_FIRST-15)
823 #define HDN_ITEMSTATEICONCLICK (HDN_FIRST-16)
824 #define HDN_ITEMKEYDOWN (HDN_FIRST-17)
825 #define HDN_DROPDOWN (HDN_FIRST-18)
826 #define HDN_OVERFLOWCLICK (HDN_FIRST-19)
828 typedef struct _HD_LAYOUT
830 RECT *prc;
831 WINDOWPOS *pwpos;
832 } HDLAYOUT, *LPHDLAYOUT;
834 #define HD_LAYOUT HDLAYOUT
836 typedef struct _HD_ITEMA
838 UINT mask;
839 INT cxy;
840 LPSTR pszText;
841 HBITMAP hbm;
842 INT cchTextMax;
843 INT fmt;
844 LPARAM lParam;
845 /* (_WIN32_IE >= 0x0300) */
846 INT iImage;
847 INT iOrder;
848 /* (_WIN32_IE >= 0x0500) */
849 UINT type;
850 LPVOID pvFilter;
851 /* (_WIN32_WINNT >= 0x0600) */
852 UINT state;
853 } HDITEMA, *LPHDITEMA;
855 typedef struct _HD_ITEMW
857 UINT mask;
858 INT cxy;
859 LPWSTR pszText;
860 HBITMAP hbm;
861 INT cchTextMax;
862 INT fmt;
863 LPARAM lParam;
864 /* (_WIN32_IE >= 0x0300) */
865 INT iImage;
866 INT iOrder;
867 /* (_WIN32_IE >= 0x0500) */
868 UINT type;
869 LPVOID pvFilter;
870 /* (_WIN32_WINNT >= 0x0600) */
871 UINT state;
872 } HDITEMW, *LPHDITEMW;
874 #define HDITEM WINELIB_NAME_AW(HDITEM)
875 #define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
876 #define HD_ITEM HDITEM
878 #define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
879 #define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
880 #define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
882 #define HDFT_ISSTRING 0x0000
883 #define HDFT_ISNUMBER 0x0001
884 #define HDFT_HASNOVALUE 0x8000
886 typedef struct _HD_TEXTFILTERA
888 LPSTR pszText;
889 INT cchTextMax;
890 } HD_TEXTFILTERA, *LPHD_TEXTFILTERA;
892 typedef struct _HD_TEXTFILTERW
894 LPWSTR pszText;
895 INT cchTextMax;
896 } HD_TEXTFILTERW, *LPHD_TEXTFILTERW;
898 #define HD_TEXTFILTER WINELIB_NAME_AW(HD_TEXTFILTER)
899 #define HDTEXTFILTER WINELIB_NAME_AW(HD_TEXTFILTER)
900 #define LPHD_TEXTFILTER WINELIB_NAME_AW(LPHD_TEXTFILTER)
901 #define LPHDTEXTFILTER WINELIB_NAME_AW(LPHD_TEXTFILTER)
903 typedef struct _HD_HITTESTINFO
905 POINT pt;
906 UINT flags;
907 INT iItem;
908 } HDHITTESTINFO, *LPHDHITTESTINFO;
910 #define HD_HITTESTINFO HDHITTESTINFO
912 typedef struct tagNMHEADERA
914 NMHDR hdr;
915 INT iItem;
916 INT iButton;
917 HDITEMA *pitem;
918 } NMHEADERA, *LPNMHEADERA;
920 typedef struct tagNMHEADERW
922 NMHDR hdr;
923 INT iItem;
924 INT iButton;
925 HDITEMW *pitem;
926 } NMHEADERW, *LPNMHEADERW;
928 #define NMHEADER WINELIB_NAME_AW(NMHEADER)
929 #define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
930 #define HD_NOTIFY NMHEADER
932 typedef struct tagNMHDDISPINFOA
934 NMHDR hdr;
935 INT iItem;
936 UINT mask;
937 LPSTR pszText;
938 INT cchTextMax;
939 INT iImage;
940 LPARAM lParam;
941 } NMHDDISPINFOA, *LPNMHDDISPINFOA;
943 typedef struct tagNMHDDISPINFOW
945 NMHDR hdr;
946 INT iItem;
947 UINT mask;
948 LPWSTR pszText;
949 INT cchTextMax;
950 INT iImage;
951 LPARAM lParam;
952 } NMHDDISPINFOW, *LPNMHDDISPINFOW;
954 #define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
955 #define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
957 typedef struct tagNMHDFILTERBTNCLICK
959 NMHDR hdr;
960 INT iItem;
961 RECT rc;
962 } NMHDFILTERBTNCLICK, *LPNMHDFILTERBTNCLICK;
964 #define Header_GetItemCount(hwndHD) \
965 (INT)SNDMSG((hwndHD), HDM_GETITEMCOUNT, 0, 0)
966 #define Header_InsertItemA(hwndHD,i,phdi) \
967 (INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
968 #define Header_InsertItemW(hwndHD,i,phdi) \
969 (INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
970 #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
971 #define Header_DeleteItem(hwndHD,i) \
972 (BOOL)SNDMSG((hwndHD), HDM_DELETEITEM, (WPARAM)(INT)(i), 0)
973 #define Header_GetItemA(hwndHD,i,phdi) \
974 (BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
975 #define Header_GetItemW(hwndHD,i,phdi) \
976 (BOOL)SNDMSGW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
977 #define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
978 #define Header_SetItemA(hwndHD,i,phdi) \
979 (BOOL)SNDMSGA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
980 #define Header_SetItemW(hwndHD,i,phdi) \
981 (BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
982 #define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
983 #define Header_Layout(hwndHD,playout) \
984 (BOOL)SNDMSG((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
985 #define Header_GetItemRect(hwnd,iItem,lprc) \
986 (BOOL)SNDMSG((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
987 #define Header_SetImageList(hwnd,himl) \
988 (HIMAGELIST)SNDMSG((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
989 #define Header_GetImageList(hwnd) \
990 (HIMAGELIST)SNDMSG((hwnd),HDM_GETIMAGELIST,0,0)
991 #define Header_OrderToIndex(hwnd,i) \
992 (INT)SNDMSG((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
993 #define Header_CreateDragImage(hwnd,i) \
994 (HIMAGELIST)SNDMSG((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
995 #define Header_GetOrderArray(hwnd,iCount,lpi) \
996 (BOOL)SNDMSG((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
997 #define Header_SetOrderArray(hwnd,iCount,lpi) \
998 (BOOL)SNDMSG((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
999 #define Header_SetHotDivider(hwnd,fPos,dw) \
1000 (INT)SNDMSG((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
1001 #define Header_SetUnicodeFormat(hwnd,fUnicode) \
1002 (BOOL)SNDMSG((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
1003 #define Header_GetUnicodeFormat(hwnd) \
1004 (BOOL)SNDMSG((hwnd),HDM_GETUNICODEFORMAT,0,0)
1005 #define Header_GetItemDropDownRect(hwnd,iItem,lprc) \
1006 (BOOL)SNDMSG((hwnd), HDM_GETITEMDROPDOWNRECT, (WPARAM)iItem, (LPARAM)lprc)
1007 #define Header_GetOverflowRect(hwnd, rc) \
1008 (BOOL)SNDMSG((hwnd), HDM_GETOVERFLOWRECT, 0, (LPARAM)(rc))
1009 #define Header_GetFocusedItem(hwnd) \
1010 (INT)SNDMSG((hwnd), HDM_GETFOCUSEDITEM, (WPARAM)(0), (LPARAM)(0))
1011 #define Header_SetFocusedItem(hwnd, item) \
1012 (BOOL)SNDMSG((hwnd), HDM_SETFOCUSEDITEM, (WPARAM)(0), (LPARAM)(item))
1014 /* Win32 5.1 Button Theme */
1015 #define WC_BUTTONA "Button"
1016 #if defined(_MSC_VER) || defined(__MINGW32__)
1017 # define WC_BUTTONW L"Button"
1018 #else
1019 static const WCHAR WC_BUTTONW[] = { 'B','u','t','t','o','n',0 };
1020 #endif
1021 #define WC_BUTTON WINELIB_NAME_AW(WC_BUTTON)
1023 #define BCN_FIRST (0U-1250U)
1024 #define BCN_LAST (0U-1350U)
1026 #define BCN_HOTITEMCHANGE (BCN_FIRST + 1)
1027 #define BCN_DROPDOWN (BCN_FIRST + 2)
1028 #define NM_GETCUSTOMSPLITRECT (BCN_FIRST + 3)
1030 #define BCM_FIRST 0x1600
1031 #define BCM_GETIDEALSIZE (BCM_FIRST + 1)
1032 #define BCM_SETIMAGELIST (BCM_FIRST + 2)
1033 #define BCM_GETIMAGELIST (BCM_FIRST + 3)
1034 #define BCM_SETTEXTMARGIN (BCM_FIRST + 4)
1035 #define BCM_GETTEXTMARGIN (BCM_FIRST + 5)
1036 #define BCM_SETDROPDOWNSTATE (BCM_FIRST + 6)
1037 #define BCM_SETSPLITINFO (BCM_FIRST + 7)
1038 #define BCM_GETSPLITINFO (BCM_FIRST + 8)
1039 #define BCM_SETNOTE (BCM_FIRST + 9)
1040 #define BCM_GETNOTE (BCM_FIRST + 10)
1041 #define BCM_GETNOTELENGTH (BCM_FIRST + 11)
1042 #define BCM_SETSHIELD (BCM_FIRST + 12)
1044 #define BUTTON_IMAGELIST_ALIGN_LEFT 0
1045 #define BUTTON_IMAGELIST_ALIGN_RIGHT 1
1046 #define BUTTON_IMAGELIST_ALIGN_TOP 2
1047 #define BUTTON_IMAGELIST_ALIGN_BOTTOM 3
1048 #define BUTTON_IMAGELIST_ALIGN_CENTER 4
1050 #define BCCL_NOGLYPH (HIMAGELIST)(-1)
1052 typedef struct
1054 HIMAGELIST himl;
1055 RECT margin;
1056 UINT uAlign;
1057 } BUTTON_IMAGELIST, *PBUTTON_IMAGELIST;
1059 typedef struct tagBUTTON_SPLITINFO
1061 UINT mask;
1062 HIMAGELIST himlGlyph;
1063 UINT uSplitStyle;
1064 SIZE size;
1065 } BUTTON_SPLITINFO, *PBUTTON_SPLITINFO;
1067 typedef struct tagNMBCDROPDOWN
1069 NMHDR hdr;
1070 RECT rcButton;
1071 } NMBCDROPDOWN;
1073 typedef struct tagNMBCHOTITEM
1075 NMHDR hdr;
1076 DWORD dwFlags;
1077 } NMBCHOTITEM, *LPNMBCHOTITEM;
1079 #define BST_HOT 0x0200
1080 #define BST_DROPDOWNPUSHED 0x0400
1082 /* Button control styles for _WIN32_WINNT >= 0x600 */
1083 #define BS_SPLITBUTTON 0x0000000C
1084 #define BS_DEFSPLITBUTTON 0x0000000D
1085 #define BS_COMMANDLINK 0x0000000E
1086 #define BS_DEFCOMMANDLINK 0x0000000F
1088 #define BCSIF_GLYPH 0x00000001
1089 #define BCSIF_IMAGE 0x00000002
1090 #define BCSIF_STYLE 0x00000004
1091 #define BCSIF_SIZE 0x00000008
1093 #define BCSS_NOSPLIT 0x00000001
1094 #define BCSS_STRETCH 0x00000002
1095 #define BCSS_ALIGNLEFT 0x00000004
1096 #define BCSS_IMAGE 0x00000008
1098 /* Button macros */
1099 #define Button_SetNote(button, note) \
1100 (BOOL)SNDMSG(button, BCM_SETNOTE, 0, (LPARAM)(note))
1101 #define Button_GetNote(button, buffer, size) \
1102 (BOOL)SNDMSG(button, BCM_GETNOTE, (WPARAM)(size), (LPARAM)(buffer))
1103 #define Button_GetNoteLength(button) \
1104 (LRESULT)SNDMSG(button, BCM_GETNOTELENGTH, 0, 0)
1105 #define Button_GetImageList(button, image_list) \
1106 (BOOL)SNDMSG(button, BCM_GETIMAGELIST, 0, (LPARAM)(image_list))
1107 #define Button_SetImageList(button, image_list) \
1108 (BOOL)SNDMSG(button, BCM_SETIMAGELIST, 0, (LPARAM)(image_list))
1109 #define Button_GetTextMargin(button, margin) \
1110 (BOOL)SNDMSG(button, BCM_GETTEXTMARGIN, 0, (LPARAM)(margin))
1111 #define Button_SetTextMargin(button, margin) \
1112 (BOOL)SNDMSG(button, BCM_SETTEXTMARGIN, 0, (LPARAM)(margin))
1113 #define Button_GetIdealSize(button, size) \
1114 (BOOL)SNDMSG(button, BCM_GETIDEALSIZE, 0, (LPARAM)(size))
1115 #define Button_SetSplitInfo(hwnd, info) \
1116 (BOOL)SNDMSG((hwnd), BCM_SETSPLITINFO, 0, (LPARAM)(info))
1117 #define Button_GetSplitInfo(hwnd, info) \
1118 (BOOL)SNDMSG((hwnd), BCM_GETSPLITINFO, 0, (LPARAM)(info))
1119 #define Button_SetElevationRequiredState(hwnd, required) \
1120 (LRESULT)SNDMSG((hwnd), BCM_SETSHIELD, 0, (LPARAM)required)
1121 #define Button_SetDropDownState(hwnd, dropdown) \
1122 (BOOL)SNDMSG((hwnd), BCM_SETDROPDOWNSTATE, (WPARAM)(dropdown), 0)
1124 /* Toolbar */
1126 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
1127 #if defined(_MSC_VER) || defined(__MINGW32__)
1128 # define TOOLBARCLASSNAMEW L"ToolbarWindow32"
1129 #else
1130 static const WCHAR TOOLBARCLASSNAMEW[] = { 'T','o','o','l','b','a','r',
1131 'W','i','n','d','o','w','3','2',0 };
1132 #endif
1133 #define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
1135 #define CMB_MASKED 0x02
1137 #define TBSTATE_CHECKED 0x01
1138 #define TBSTATE_PRESSED 0x02
1139 #define TBSTATE_ENABLED 0x04
1140 #define TBSTATE_HIDDEN 0x08
1141 #define TBSTATE_INDETERMINATE 0x10
1142 #define TBSTATE_WRAP 0x20
1143 #define TBSTATE_ELLIPSES 0x40
1144 #define TBSTATE_MARKED 0x80
1147 /* as of _WIN32_IE >= 0x0500 the following symbols are obsolete,
1148 * "everyone" should use the BTNS_... stuff below
1150 #define TBSTYLE_BUTTON 0x00
1151 #define TBSTYLE_SEP 0x01
1152 #define TBSTYLE_CHECK 0x02
1153 #define TBSTYLE_GROUP 0x04
1154 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
1155 #define TBSTYLE_DROPDOWN 0x08
1156 #define TBSTYLE_AUTOSIZE 0x10
1157 #define TBSTYLE_NOPREFIX 0x20
1158 #define BTNS_BUTTON TBSTYLE_BUTTON
1159 #define BTNS_SEP TBSTYLE_SEP
1160 #define BTNS_CHECK TBSTYLE_CHECK
1161 #define BTNS_GROUP TBSTYLE_GROUP
1162 #define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP
1163 #define BTNS_DROPDOWN TBSTYLE_DROPDOWN
1164 #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE
1165 #define BTNS_NOPREFIX TBSTYLE_NOPREFIX
1166 #define BTNS_SHOWTEXT 0x40 /* ignored unless TBSTYLE_EX_MIXEDB set */
1167 #define BTNS_WHOLEDROPDOWN 0x80 /* draw dropdown arrow, but without split arrow section */
1169 #define TBSTYLE_TOOLTIPS 0x0100
1170 #define TBSTYLE_WRAPABLE 0x0200
1171 #define TBSTYLE_ALTDRAG 0x0400
1172 #define TBSTYLE_FLAT 0x0800
1173 #define TBSTYLE_LIST 0x1000
1174 #define TBSTYLE_CUSTOMERASE 0x2000
1175 #define TBSTYLE_REGISTERDROP 0x4000
1176 #define TBSTYLE_TRANSPARENT 0x8000
1177 #define TBSTYLE_EX_DRAWDDARROWS 0x00000001
1178 #define TBSTYLE_EX_MULTICOLUMN 0x00000002
1179 #define TBSTYLE_EX_VERTICAL 0x00000004
1180 #define TBSTYLE_EX_MIXEDBUTTONS 0x00000008
1181 #define TBSTYLE_EX_HIDECLIPPEDBUTTONS 0x00000010 /* don't show partially obscured buttons */
1182 #define TBSTYLE_EX_DOUBLEBUFFER 0x00000080 /* Double Buffer the toolbar */
1184 #define TBIF_IMAGE 0x00000001
1185 #define TBIF_TEXT 0x00000002
1186 #define TBIF_STATE 0x00000004
1187 #define TBIF_STYLE 0x00000008
1188 #define TBIF_LPARAM 0x00000010
1189 #define TBIF_COMMAND 0x00000020
1190 #define TBIF_SIZE 0x00000040
1191 #define TBIF_BYINDEX 0x80000000
1193 #define TBBF_LARGE 0x0001
1195 #define TB_ENABLEBUTTON (WM_USER+1)
1196 #define TB_CHECKBUTTON (WM_USER+2)
1197 #define TB_PRESSBUTTON (WM_USER+3)
1198 #define TB_HIDEBUTTON (WM_USER+4)
1199 #define TB_INDETERMINATE (WM_USER+5)
1200 #define TB_MARKBUTTON (WM_USER+6)
1201 #define TB_ISBUTTONENABLED (WM_USER+9)
1202 #define TB_ISBUTTONCHECKED (WM_USER+10)
1203 #define TB_ISBUTTONPRESSED (WM_USER+11)
1204 #define TB_ISBUTTONHIDDEN (WM_USER+12)
1205 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
1206 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
1207 #define TB_SETSTATE (WM_USER+17)
1208 #define TB_GETSTATE (WM_USER+18)
1209 #define TB_ADDBITMAP (WM_USER+19)
1210 #define TB_ADDBUTTONSA (WM_USER+20)
1211 #define TB_ADDBUTTONSW (WM_USER+68)
1212 #define TB_ADDBUTTONS WINELIB_NAME_AW(TB_ADDBUTTONS)
1213 #define TB_HITTEST (WM_USER+69)
1214 #define TB_INSERTBUTTONA (WM_USER+21)
1215 #define TB_INSERTBUTTONW (WM_USER+67)
1216 #define TB_INSERTBUTTON WINELIB_NAME_AW(TB_INSERTBUTTON)
1217 #define TB_DELETEBUTTON (WM_USER+22)
1218 #define TB_GETBUTTON (WM_USER+23)
1219 #define TB_BUTTONCOUNT (WM_USER+24)
1220 #define TB_COMMANDTOINDEX (WM_USER+25)
1221 #define TB_SAVERESTOREA (WM_USER+26)
1222 #define TB_SAVERESTOREW (WM_USER+76)
1223 #define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
1224 #define TB_CUSTOMIZE (WM_USER+27)
1225 #define TB_ADDSTRINGA (WM_USER+28)
1226 #define TB_ADDSTRINGW (WM_USER+77)
1227 #define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
1228 #define TB_GETITEMRECT (WM_USER+29)
1229 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
1230 #define TB_SETBUTTONSIZE (WM_USER+31)
1231 #define TB_SETBITMAPSIZE (WM_USER+32)
1232 #define TB_AUTOSIZE (WM_USER+33)
1233 #define TB_GETTOOLTIPS (WM_USER+35)
1234 #define TB_SETTOOLTIPS (WM_USER+36)
1235 #define TB_SETPARENT (WM_USER+37)
1236 #define TB_SETROWS (WM_USER+39)
1237 #define TB_GETROWS (WM_USER+40)
1238 #define TB_GETBITMAPFLAGS (WM_USER+41)
1239 #define TB_SETCMDID (WM_USER+42)
1240 #define TB_CHANGEBITMAP (WM_USER+43)
1241 #define TB_GETBITMAP (WM_USER+44)
1242 #define TB_GETBUTTONTEXTA (WM_USER+45)
1243 #define TB_GETBUTTONTEXTW (WM_USER+75)
1244 #define TB_GETBUTTONTEXT WINELIB_NAME_AW(TB_GETBUTTONTEXT)
1245 #define TB_REPLACEBITMAP (WM_USER+46)
1246 #define TB_SETINDENT (WM_USER+47)
1247 #define TB_SETIMAGELIST (WM_USER+48)
1248 #define TB_GETIMAGELIST (WM_USER+49)
1249 #define TB_LOADIMAGES (WM_USER+50)
1250 #define TB_GETRECT (WM_USER+51) /* wParam is the Cmd instead of index */
1251 #define TB_SETHOTIMAGELIST (WM_USER+52)
1252 #define TB_GETHOTIMAGELIST (WM_USER+53)
1253 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
1254 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
1255 #define TB_SETSTYLE (WM_USER+56)
1256 #define TB_GETSTYLE (WM_USER+57)
1257 #define TB_GETBUTTONSIZE (WM_USER+58)
1258 #define TB_SETBUTTONWIDTH (WM_USER+59)
1259 #define TB_SETMAXTEXTROWS (WM_USER+60)
1260 #define TB_GETTEXTROWS (WM_USER+61)
1261 #define TB_GETOBJECT (WM_USER+62)
1262 #define TB_GETBUTTONINFOW (WM_USER+63)
1263 #define TB_GETBUTTONINFOA (WM_USER+65)
1264 #define TB_GETBUTTONINFO WINELIB_NAME_AW(TB_GETBUTTONINFO)
1265 #define TB_SETBUTTONINFOW (WM_USER+64)
1266 #define TB_SETBUTTONINFOA (WM_USER+66)
1267 #define TB_SETBUTTONINFO WINELIB_NAME_AW(TB_SETBUTTONINFO)
1268 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
1269 #define TB_GETHOTITEM (WM_USER+71)
1270 #define TB_SETHOTITEM (WM_USER+72)
1271 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
1272 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
1273 #define TB_MAPACCELERATORA (WM_USER+78)
1274 #define TB_MAPACCELERATORW (WM_USER+90)
1275 #define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
1276 #define TB_GETINSERTMARK (WM_USER+79)
1277 #define TB_SETINSERTMARK (WM_USER+80)
1278 #define TB_INSERTMARKHITTEST (WM_USER+81)
1279 #define TB_MOVEBUTTON (WM_USER+82)
1280 #define TB_GETMAXSIZE (WM_USER+83)
1281 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
1282 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
1283 #define TB_GETPADDING (WM_USER+86)
1284 #define TB_SETPADDING (WM_USER+87)
1285 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
1286 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
1287 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1288 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1289 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1290 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1291 #define TB_GETSTRINGW (WM_USER+91)
1292 #define TB_GETSTRINGA (WM_USER+92)
1293 #define TB_GETSTRING WINELIB_NAME_AW(TB_GETSTRING)
1294 #define TB_SETBOUNDINGSIZE (WM_USER+93)
1295 #define TB_SETHOTITEM2 (WM_USER+94)
1296 #define TB_HASACCELERATOR (WM_USER+95)
1297 #define TB_SETLISTGAP (WM_USER+96)
1298 #define TB_GETIMAGELISTCOUNT (WM_USER+98)
1299 #define TB_GETIDEALSIZE (WM_USER+99)
1301 /* undocumented messages in Toolbar */
1302 #ifdef __WINESRC__
1303 #define TB_UNKWN464 (WM_USER+100)
1304 #endif
1306 #define TB_GETMETRICS (WM_USER+101)
1307 #define TB_SETMETRICS (WM_USER+102)
1308 #define TB_GETITEMDROPDOWNRECT (WM_USER+103)
1309 #define TB_SETPRESSEDIMAGELIST (WM_USER+104)
1310 #define TB_GETPRESSEDIMAGELIST (WM_USER+105)
1311 #define TB_SETWINDOWTHEME CCM_SETWINDOWTHEME
1313 #define TBN_FIRST (0U-700U)
1314 #define TBN_LAST (0U-720U)
1315 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
1316 #define TBN_GETBUTTONINFOW (TBN_FIRST-20)
1317 #define TBN_GETBUTTONINFO WINELIB_NAME_AW(TBN_GETBUTTONINFO)
1318 #define TBN_BEGINDRAG (TBN_FIRST-1)
1319 #define TBN_ENDDRAG (TBN_FIRST-2)
1320 #define TBN_BEGINADJUST (TBN_FIRST-3)
1321 #define TBN_ENDADJUST (TBN_FIRST-4)
1322 #define TBN_RESET (TBN_FIRST-5)
1323 #define TBN_QUERYINSERT (TBN_FIRST-6)
1324 #define TBN_QUERYDELETE (TBN_FIRST-7)
1325 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
1326 #define TBN_CUSTHELP (TBN_FIRST-9)
1327 #define TBN_DROPDOWN (TBN_FIRST-10)
1328 #define TBN_GETOBJECT (TBN_FIRST-12)
1329 #define TBN_HOTITEMCHANGE (TBN_FIRST-13)
1330 #define TBN_DRAGOUT (TBN_FIRST-14)
1331 #define TBN_DELETINGBUTTON (TBN_FIRST-15)
1332 #define TBN_GETDISPINFOA (TBN_FIRST-16)
1333 #define TBN_GETDISPINFOW (TBN_FIRST-17)
1334 #define TBN_GETDISPINFO WINELIB_NAME_AW(TBN_GETDISPINFO)
1335 #define TBN_GETINFOTIPA (TBN_FIRST-18)
1336 #define TBN_GETINFOTIPW (TBN_FIRST-19)
1337 #define TBN_GETINFOTIP WINELIB_NAME_AW(TBN_GETINFOTIP)
1338 #define TBN_RESTORE (TBN_FIRST-21)
1339 #define TBN_SAVE (TBN_FIRST-22)
1340 #define TBN_INITCUSTOMIZE (TBN_FIRST-23)
1341 #define TBN_WRAPHOTITEM (TBN_FIRST-24)
1342 #define TBN_DUPACCELERATOR (TBN_FIRST-25)
1343 #define TBN_WRAPACCELERATOR (TBN_FIRST-26)
1344 #define TBN_DRAGOVER (TBN_FIRST-27)
1345 #define TBN_MAPACCELERATOR (TBN_FIRST-28)
1346 #define TBNRF_HIDEHELP 0x00000001
1349 /* Return values from TBN_DROPDOWN */
1350 #define TBDDRET_DEFAULT 0
1351 #define TBDDRET_NODEFAULT 1
1352 #define TBDDRET_TREATPRESSED 2
1354 typedef struct _NMTBCUSTOMDRAW
1356 NMCUSTOMDRAW nmcd;
1357 HBRUSH hbrMonoDither;
1358 HBRUSH hbrLines;
1359 HPEN hpenLines;
1360 COLORREF clrText;
1361 COLORREF clrMark;
1362 COLORREF clrTextHighlight;
1363 COLORREF clrBtnFace;
1364 COLORREF clrBtnHighlight;
1365 COLORREF clrHighlightHotTrack;
1366 RECT rcText;
1367 int nStringBkMode;
1368 int nHLStringBkMode;
1369 int iListGap;
1370 } NMTBCUSTOMDRAW, *LPNMTBCUSTOMDRAW;
1372 /* return flags for Toolbar NM_CUSTOMDRAW notifications */
1373 #define TBCDRF_NOEDGES 0x00010000 /* Don't draw button edges */
1374 #define TBCDRF_HILITEHOTTRACK 0x00020000 /* Use color of the button bkgnd */
1375 /* when hottracked */
1376 #define TBCDRF_NOOFFSET 0x00040000 /* No offset button if pressed */
1377 #define TBCDRF_NOMARK 0x00080000 /* Don't draw default highlight */
1378 /* for TBSTATE_MARKED */
1379 #define TBCDRF_NOETCHEDEFFECT 0x00100000 /* No etched effect for */
1380 /* disabled items */
1381 #define TBCDRF_BLENDICON 0x00200000 /* ILD_BLEND50 on the icon image */
1382 #define TBCDRF_NOBACKGROUND 0x00400000 /* ILD_BLEND50 on the icon image */
1383 #define TBCDRF_USECDCOLORS 0x00800000
1386 /* This is just for old CreateToolbar. */
1387 /* Don't use it in new programs. */
1388 typedef struct _OLDTBBUTTON {
1389 INT iBitmap;
1390 INT idCommand;
1391 BYTE fsState;
1392 BYTE fsStyle;
1393 BYTE bReserved[2];
1394 DWORD dwData;
1395 } OLDTBBUTTON, *POLDTBBUTTON, *LPOLDTBBUTTON;
1396 typedef const OLDTBBUTTON *LPCOLDTBBUTTON;
1399 typedef struct _TBBUTTON {
1400 INT iBitmap;
1401 INT idCommand;
1402 BYTE fsState;
1403 BYTE fsStyle;
1404 #ifdef _WIN64
1405 BYTE bReserved[6];
1406 #else
1407 BYTE bReserved[2];
1408 #endif
1409 DWORD_PTR dwData;
1410 INT_PTR iString;
1411 } TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
1412 typedef const TBBUTTON *LPCTBBUTTON;
1415 typedef struct _COLORMAP {
1416 COLORREF from;
1417 COLORREF to;
1418 } COLORMAP, *LPCOLORMAP;
1421 typedef struct tagTBADDBITMAP {
1422 HINSTANCE hInst;
1423 UINT_PTR nID;
1424 } TBADDBITMAP, *LPTBADDBITMAP;
1426 #define HINST_COMMCTRL ((HINSTANCE)-1)
1427 #define IDB_STD_SMALL_COLOR 0
1428 #define IDB_STD_LARGE_COLOR 1
1429 #define IDB_VIEW_SMALL_COLOR 4
1430 #define IDB_VIEW_LARGE_COLOR 5
1431 #define IDB_HIST_SMALL_COLOR 8
1432 #define IDB_HIST_LARGE_COLOR 9
1433 #define IDB_HIST_NORMAL 12
1434 #define IDB_HIST_HOT 13
1435 #define IDB_HIST_DISABLED 14
1436 #define IDB_HIST_PRESSED 15
1438 #define STD_CUT 0
1439 #define STD_COPY 1
1440 #define STD_PASTE 2
1441 #define STD_UNDO 3
1442 #define STD_REDOW 4
1443 #define STD_DELETE 5
1444 #define STD_FILENEW 6
1445 #define STD_FILEOPEN 7
1446 #define STD_FILESAVE 8
1447 #define STD_PRINTPRE 9
1448 #define STD_PROPERTIES 10
1449 #define STD_HELP 11
1450 #define STD_FIND 12
1451 #define STD_REPLACE 13
1452 #define STD_PRINT 14
1454 #define VIEW_LARGEICONS 0
1455 #define VIEW_SMALLICONS 1
1456 #define VIEW_LIST 2
1457 #define VIEW_DETAILS 3
1458 #define VIEW_SORTNAME 4
1459 #define VIEW_SORTSIZE 5
1460 #define VIEW_SORTDATE 6
1461 #define VIEW_SORTTYPE 7
1462 #define VIEW_PARENTFOLDER 8
1463 #define VIEW_NETCONNECT 9
1464 #define VIEW_NETDISCONNECT 10
1465 #define VIEW_NEWFOLDER 11
1466 #define VIEW_VIEWMENU 12
1468 #define HIST_BACK 0
1469 #define HIST_FORWARD 1
1470 #define HIST_FAVORITES 2
1471 #define HIST_ADDTOFAVORITES 3
1472 #define HIST_VIEWTREE 4
1474 typedef struct tagTBSAVEPARAMSA {
1475 HKEY hkr;
1476 LPCSTR pszSubKey;
1477 LPCSTR pszValueName;
1478 } TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
1480 typedef struct tagTBSAVEPARAMSW {
1481 HKEY hkr;
1482 LPCWSTR pszSubKey;
1483 LPCWSTR pszValueName;
1484 } TBSAVEPARAMSW, *LPTBSAVEPARAMSW;
1486 #define TBSAVEPARAMS WINELIB_NAME_AW(TBSAVEPARAMS)
1487 #define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
1489 typedef struct
1491 UINT cbSize;
1492 DWORD dwMask;
1493 INT idCommand;
1494 INT iImage;
1495 BYTE fsState;
1496 BYTE fsStyle;
1497 WORD cx;
1498 DWORD_PTR lParam;
1499 LPSTR pszText;
1500 INT cchText;
1501 } TBBUTTONINFOA, *LPTBBUTTONINFOA;
1503 typedef struct
1505 UINT cbSize;
1506 DWORD dwMask;
1507 INT idCommand;
1508 INT iImage;
1509 BYTE fsState;
1510 BYTE fsStyle;
1511 WORD cx;
1512 DWORD_PTR lParam;
1513 LPWSTR pszText;
1514 INT cchText;
1515 } TBBUTTONINFOW, *LPTBBUTTONINFOW;
1517 #define TBBUTTONINFO WINELIB_NAME_AW(TBBUTTONINFO)
1518 #define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
1520 typedef struct tagNMTBHOTITEM
1522 NMHDR hdr;
1523 int idOld;
1524 int idNew;
1525 DWORD dwFlags;
1526 } NMTBHOTITEM, *LPNMTBHOTITEM;
1528 typedef struct tagNMTBGETINFOTIPA
1530 NMHDR hdr;
1531 LPSTR pszText;
1532 INT cchTextMax;
1533 INT iItem;
1534 LPARAM lParam;
1535 } NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
1537 typedef struct tagNMTBGETINFOTIPW
1539 NMHDR hdr;
1540 LPWSTR pszText;
1541 INT cchTextMax;
1542 INT iItem;
1543 LPARAM lParam;
1544 } NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
1546 #define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOTIP)
1547 #define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
1549 typedef struct
1551 NMHDR hdr;
1552 DWORD dwMask;
1553 int idCommand;
1554 DWORD_PTR lParam;
1555 int iImage;
1556 LPSTR pszText;
1557 int cchText;
1558 } NMTBDISPINFOA, *LPNMTBDISPINFOA;
1560 typedef struct
1562 NMHDR hdr;
1563 DWORD dwMask;
1564 int idCommand;
1565 DWORD_PTR lParam;
1566 int iImage;
1567 LPWSTR pszText;
1568 int cchText;
1569 } NMTBDISPINFOW, *LPNMTBDISPINFOW;
1571 #define NMTBDISPINFO WINELIB_NAME_AW(NMTBDISPINFO)
1572 #define LPNMTBDISPINFO WINELIB_NAME_AW(LPNMTBDISPINFO)
1574 /* contents of dwMask in the NMTBDISPINFO structure */
1575 #define TBNF_IMAGE 0x00000001
1576 #define TBNF_TEXT 0x00000002
1577 #define TBNF_DI_SETITEM 0x10000000
1580 typedef struct tagNMTOOLBARA
1582 NMHDR hdr;
1583 INT iItem;
1584 TBBUTTON tbButton;
1585 INT cchText;
1586 LPSTR pszText;
1587 RECT rcButton; /* Version 5.80 */
1588 } NMTOOLBARA, *LPNMTOOLBARA, TBNOTIFYA, *LPTBNOTIFYA;
1590 typedef struct tagNMTOOLBARW
1592 NMHDR hdr;
1593 INT iItem;
1594 TBBUTTON tbButton;
1595 INT cchText;
1596 LPWSTR pszText;
1597 RECT rcButton; /* Version 5.80 */
1598 } NMTOOLBARW, *LPNMTOOLBARW, TBNOTIFYW, *LPTBNOTIFYW;
1600 #define NMTOOLBAR WINELIB_NAME_AW(NMTOOLBAR)
1601 #define LPNMTOOLBAR WINELIB_NAME_AW(LPNMTOOLBAR)
1602 #define TBNOTIFY WINELIB_NAME_AW(TBNOTIFY)
1603 #define LPTBNOTIFY WINELIB_NAME_AW(LPTBNOTIFY)
1605 typedef struct
1607 HINSTANCE hInstOld;
1608 UINT_PTR nIDOld;
1609 HINSTANCE hInstNew;
1610 UINT_PTR nIDNew;
1611 INT nButtons;
1612 } TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
1614 #define HICF_OTHER 0x00000000
1615 #define HICF_MOUSE 0x00000001 /* Triggered by mouse */
1616 #define HICF_ARROWKEYS 0x00000002 /* Triggered by arrow keys */
1617 #define HICF_ACCELERATOR 0x00000004 /* Triggered by accelerator */
1618 #define HICF_DUPACCEL 0x00000008 /* This accelerator is not unique */
1619 #define HICF_ENTERING 0x00000010 /* idOld is invalid */
1620 #define HICF_LEAVING 0x00000020 /* idNew is invalid */
1621 #define HICF_RESELECT 0x00000040 /* hot item reselected */
1622 #define HICF_LMOUSE 0x00000080 /* left mouse button selected */
1623 #define HICF_TOGGLEDROPDOWN 0x00000100 /* Toggle button's dropdown state */
1625 typedef struct
1627 int iButton;
1628 DWORD dwFlags;
1629 } TBINSERTMARK, *LPTBINSERTMARK;
1630 #define TBIMHT_AFTER 0x00000001 /* TRUE = insert After iButton, otherwise before */
1631 #define TBIMHT_BACKGROUND 0x00000002 /* TRUE if and only if missed buttons completely */
1633 typedef struct tagNMTBSAVE
1635 NMHDR hdr;
1636 DWORD* pData;
1637 DWORD* pCurrent;
1638 UINT cbData;
1639 int iItem;
1640 int cButtons;
1641 TBBUTTON tbButton;
1642 } NMTBSAVE, *LPNMTBSAVE;
1644 typedef struct tagNMTBRESTORE
1646 NMHDR hdr;
1647 DWORD* pData;
1648 DWORD* pCurrent;
1649 UINT cbData;
1650 int iItem;
1651 int cButtons;
1652 int cbBytesPerRecord;
1653 TBBUTTON tbButton;
1654 } NMTBRESTORE, *LPNMTBRESTORE;
1656 #define TBMF_PAD 0x00000001
1657 #define TBMF_BARPAD 0x00000002
1658 #define TBMF_BUTTONSPACING 0x00000004
1660 typedef struct
1662 UINT cbSize;
1663 DWORD dwMask;
1664 INT cxPad;
1665 INT cyPad;
1666 INT cxBarPad;
1667 INT cyBarPad;
1668 INT cxButtonSpacing;
1669 INT cyButtonSpacing;
1670 } TBMETRICS, *LPTBMETRICS;
1672 /* these are undocumented and the names are guesses */
1673 typedef struct
1675 NMHDR hdr;
1676 HWND hwndDialog;
1677 } NMTBINITCUSTOMIZE;
1679 typedef struct
1681 NMHDR hdr;
1682 INT idNew;
1683 INT iDirection; /* left is -1, right is 1 */
1684 DWORD dwReason; /* HICF_* */
1685 } NMTBWRAPHOTITEM;
1688 HWND WINAPI
1689 CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
1690 UINT, LPCTBBUTTON, INT);
1692 HWND WINAPI
1693 CreateToolbarEx(HWND, DWORD, UINT, INT,
1694 HINSTANCE, UINT_PTR, LPCTBBUTTON,
1695 INT, INT, INT, INT, INT, UINT);
1697 HBITMAP WINAPI
1698 CreateMappedBitmap (HINSTANCE, INT_PTR, UINT, LPCOLORMAP, INT);
1701 /* Tool tips */
1703 #define TOOLTIPS_CLASSA "tooltips_class32"
1704 #if defined(_MSC_VER) || defined(__MINGW32__)
1705 # define TOOLTIPS_CLASSW L"tooltips_class32"
1706 #else
1707 static const WCHAR TOOLTIPS_CLASSW[] = { 't','o','o','l','t','i','p','s','_',
1708 'c','l','a','s','s','3','2',0 };
1709 #endif
1710 #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
1712 #define INFOTIPSIZE 1024
1715 #define TTF_IDISHWND 0x0001
1716 #define TTF_CENTERTIP 0x0002
1717 #define TTF_RTLREADING 0x0004
1718 #define TTF_SUBCLASS 0x0010
1719 #define TTF_TRACK 0x0020
1720 #define TTF_ABSOLUTE 0x0080
1721 #define TTF_TRANSPARENT 0x0100
1722 #define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
1725 #define TTDT_AUTOMATIC 0
1726 #define TTDT_RESHOW 1
1727 #define TTDT_AUTOPOP 2
1728 #define TTDT_INITIAL 3
1731 #define TTI_NONE 0
1732 #define TTI_INFO 1
1733 #define TTI_WARNING 2
1734 #define TTI_ERROR 3
1735 #define TTI_INFO_LARGE 4
1736 #define TTI_WARNING_LARGE 5
1737 #define TTI_ERROR_LARGE 6
1740 #define TTM_ACTIVATE (WM_USER+1)
1741 #define TTM_SETDELAYTIME (WM_USER+3)
1742 #define TTM_ADDTOOLA (WM_USER+4)
1743 #define TTM_ADDTOOLW (WM_USER+50)
1744 #define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
1745 #define TTM_DELTOOLA (WM_USER+5)
1746 #define TTM_DELTOOLW (WM_USER+51)
1747 #define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
1748 #define TTM_NEWTOOLRECTA (WM_USER+6)
1749 #define TTM_NEWTOOLRECTW (WM_USER+52)
1750 #define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
1751 #define TTM_RELAYEVENT (WM_USER+7)
1752 #define TTM_GETTOOLINFOA (WM_USER+8)
1753 #define TTM_GETTOOLINFOW (WM_USER+53)
1754 #define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
1755 #define TTM_SETTOOLINFOA (WM_USER+9)
1756 #define TTM_SETTOOLINFOW (WM_USER+54)
1757 #define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
1758 #define TTM_HITTESTA (WM_USER+10)
1759 #define TTM_HITTESTW (WM_USER+55)
1760 #define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
1761 #define TTM_GETTEXTA (WM_USER+11)
1762 #define TTM_GETTEXTW (WM_USER+56)
1763 #define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
1764 #define TTM_UPDATETIPTEXTA (WM_USER+12)
1765 #define TTM_UPDATETIPTEXTW (WM_USER+57)
1766 #define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
1767 #define TTM_GETTOOLCOUNT (WM_USER+13)
1768 #define TTM_ENUMTOOLSA (WM_USER+14)
1769 #define TTM_ENUMTOOLSW (WM_USER+58)
1770 #define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
1771 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1772 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1773 #define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
1774 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1775 #define TTM_TRACKACTIVATE (WM_USER+17)
1776 #define TTM_TRACKPOSITION (WM_USER+18)
1777 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1778 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1779 #define TTM_GETDELAYTIME (WM_USER+21)
1780 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1781 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1782 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1783 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1784 #define TTM_SETMARGIN (WM_USER+26)
1785 #define TTM_GETMARGIN (WM_USER+27)
1786 #define TTM_POP (WM_USER+28)
1787 #define TTM_UPDATE (WM_USER+29)
1788 #define TTM_GETBUBBLESIZE (WM_USER+30)
1789 #define TTM_ADJUSTRECT (WM_USER+31)
1790 #define TTM_SETTITLEA (WM_USER+32)
1791 #define TTM_SETTITLEW (WM_USER+33)
1792 #define TTM_SETTITLE WINELIB_NAME_AW(TTM_SETTITLE)
1793 #define TTM_POPUP (WM_USER+34)
1794 #define TTM_GETTITLE (WM_USER+35)
1795 #define TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME
1798 #define TTN_FIRST (0U-520U)
1799 #define TTN_LAST (0U-549U)
1800 #define TTN_GETDISPINFOA (TTN_FIRST-0)
1801 #define TTN_GETDISPINFOW (TTN_FIRST-10)
1802 #define TTN_GETDISPINFO WINELIB_NAME_AW(TTN_GETDISPINFO)
1803 #define TTN_SHOW (TTN_FIRST-1)
1804 #define TTN_POP (TTN_FIRST-2)
1805 #define TTN_LINKCLICK (TTN_FIRST-3)
1807 #define TTN_NEEDTEXT TTN_GETDISPINFO
1808 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1809 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1811 typedef struct tagTOOLINFOA {
1812 UINT cbSize;
1813 UINT uFlags;
1814 HWND hwnd;
1815 UINT_PTR uId;
1816 RECT rect;
1817 HINSTANCE hinst;
1818 LPSTR lpszText;
1819 LPARAM lParam;
1820 void *lpReserved;
1821 } TTTOOLINFOA, *LPTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
1823 typedef struct tagTOOLINFOW {
1824 UINT cbSize;
1825 UINT uFlags;
1826 HWND hwnd;
1827 UINT_PTR uId;
1828 RECT rect;
1829 HINSTANCE hinst;
1830 LPWSTR lpszText;
1831 LPARAM lParam;
1832 void *lpReserved;
1833 } TTTOOLINFOW, *LPTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW;
1835 #define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1836 #define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1837 #define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
1838 #define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
1839 #define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
1841 #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
1842 #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
1843 #define TTTOOLINFO_V1_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(TTTOOLINFO), lpszText)
1844 #define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lParam)
1845 #define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lParam)
1846 #define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpReserved)
1847 #define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpReserved)
1849 typedef struct _TT_HITTESTINFOA
1851 HWND hwnd;
1852 POINT pt;
1853 TTTOOLINFOA ti;
1854 } TTHITTESTINFOA, *LPTTHITTESTINFOA;
1855 #define LPHITTESTINFOA LPTTHITTESTINFOA
1857 typedef struct _TT_HITTESTINFOW
1859 HWND hwnd;
1860 POINT pt;
1861 TTTOOLINFOW ti;
1862 } TTHITTESTINFOW, *LPTTHITTESTINFOW;
1863 #define LPHITTESTINFOW LPTTHITTESTINFOW
1865 #define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
1866 #define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
1867 #define LPHITTESTINFO WINELIB_NAME_AW(LPHITTESTINFO)
1869 typedef struct tagNMTTDISPINFOA
1871 NMHDR hdr;
1872 LPSTR lpszText;
1873 CHAR szText[80];
1874 HINSTANCE hinst;
1875 UINT uFlags;
1876 LPARAM lParam;
1877 } NMTTDISPINFOA, *LPNMTTDISPINFOA;
1879 typedef struct tagNMTTDISPINFOW
1881 NMHDR hdr;
1882 LPWSTR lpszText;
1883 WCHAR szText[80];
1884 HINSTANCE hinst;
1885 UINT uFlags;
1886 LPARAM lParam;
1887 } NMTTDISPINFOW, *LPNMTTDISPINFOW;
1889 #define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
1890 #define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
1892 #define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
1893 #define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
1894 #define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)
1896 typedef struct _TTGETTITLE
1898 DWORD dwSize;
1899 UINT uTitleBitmap;
1900 UINT cch;
1901 WCHAR* pszTitle;
1902 } TTGETTITLE, *PTTGETTITLE;
1904 #define TOOLTIPTEXTW NMTTDISPINFOW
1905 #define TOOLTIPTEXTA NMTTDISPINFOA
1906 #define TOOLTIPTEXT NMTTDISPINFO
1907 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1908 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1909 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1912 /* Rebar control */
1914 #define REBARCLASSNAMEA "ReBarWindow32"
1915 #if defined(_MSC_VER) || defined(__MINGW32__)
1916 # define REBARCLASSNAMEW L"ReBarWindow32"
1917 #else
1918 static const WCHAR REBARCLASSNAMEW[] = { 'R','e','B','a','r',
1919 'W','i','n','d','o','w','3','2',0 };
1920 #endif
1921 #define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
1924 #define RBIM_IMAGELIST 0x00000001
1926 #define RBBIM_STYLE 0x00000001
1927 #define RBBIM_COLORS 0x00000002
1928 #define RBBIM_TEXT 0x00000004
1929 #define RBBIM_IMAGE 0x00000008
1930 #define RBBIM_CHILD 0x00000010
1931 #define RBBIM_CHILDSIZE 0x00000020
1932 #define RBBIM_SIZE 0x00000040
1933 #define RBBIM_BACKGROUND 0x00000080
1934 #define RBBIM_ID 0x00000100
1935 #define RBBIM_IDEALSIZE 0x00000200
1936 #define RBBIM_LPARAM 0x00000400
1937 #define RBBIM_HEADERSIZE 0x00000800
1938 #define RBBIM_CHEVRONLOCATION 0x00001000
1939 #define RBBIM_CHEVRONSTATE 0x00002000
1941 #define RBBS_BREAK 0x00000001
1942 #define RBBS_FIXEDSIZE 0x00000002
1943 #define RBBS_CHILDEDGE 0x00000004
1944 #define RBBS_HIDDEN 0x00000008
1945 #define RBBS_NOVERT 0x00000010
1946 #define RBBS_FIXEDBMP 0x00000020
1947 #define RBBS_VARIABLEHEIGHT 0x00000040
1948 #define RBBS_GRIPPERALWAYS 0x00000080
1949 #define RBBS_NOGRIPPER 0x00000100
1950 #define RBBS_USECHEVRON 0x00000200
1951 #define RBBS_HIDETITLE 0x00000400
1952 #define RBBS_TOPALIGN 0x00000800
1954 #define RBNM_ID 0x00000001
1955 #define RBNM_STYLE 0x00000002
1956 #define RBNM_LPARAM 0x00000004
1958 #define RBHT_NOWHERE 0x0001
1959 #define RBHT_CAPTION 0x0002
1960 #define RBHT_CLIENT 0x0003
1961 #define RBHT_GRABBER 0x0004
1962 #define RBHT_CHEVRON 0x0008
1963 #define RBHT_SPLITTER 0x0010
1965 #define RB_INSERTBANDA (WM_USER+1)
1966 #define RB_INSERTBANDW (WM_USER+10)
1967 #define RB_INSERTBAND WINELIB_NAME_AW(RB_INSERTBAND)
1968 #define RB_DELETEBAND (WM_USER+2)
1969 #define RB_GETBARINFO (WM_USER+3)
1970 #define RB_SETBARINFO (WM_USER+4)
1971 #define RB_SETBANDINFOA (WM_USER+6)
1972 #define RB_SETBANDINFOW (WM_USER+11)
1973 #define RB_SETBANDINFO WINELIB_NAME_AW(RB_SETBANDINFO)
1974 #define RB_SETPARENT (WM_USER+7)
1975 #define RB_HITTEST (WM_USER+8)
1976 #define RB_GETRECT (WM_USER+9)
1977 #define RB_GETBANDCOUNT (WM_USER+12)
1978 #define RB_GETROWCOUNT (WM_USER+13)
1979 #define RB_GETROWHEIGHT (WM_USER+14)
1980 #define RB_IDTOINDEX (WM_USER+16)
1981 #define RB_GETTOOLTIPS (WM_USER+17)
1982 #define RB_SETTOOLTIPS (WM_USER+18)
1983 #define RB_SETBKCOLOR (WM_USER+19)
1984 #define RB_GETBKCOLOR (WM_USER+20)
1985 #define RB_SETTEXTCOLOR (WM_USER+21)
1986 #define RB_GETTEXTCOLOR (WM_USER+22)
1987 #define RB_SIZETORECT (WM_USER+23)
1988 #define RB_BEGINDRAG (WM_USER+24)
1989 #define RB_ENDDRAG (WM_USER+25)
1990 #define RB_DRAGMOVE (WM_USER+26)
1991 #define RB_GETBARHEIGHT (WM_USER+27)
1992 #define RB_GETBANDINFOW (WM_USER+28)
1993 #define RB_GETBANDINFOA (WM_USER+29)
1994 #define RB_GETBANDINFO WINELIB_NAME_AW(RB_GETBANDINFO)
1995 #define RB_MINIMIZEBAND (WM_USER+30)
1996 #define RB_MAXIMIZEBAND (WM_USER+31)
1997 #define RB_GETBANDBORDERS (WM_USER+34)
1998 #define RB_SHOWBAND (WM_USER+35)
1999 #define RB_SETPALETTE (WM_USER+37)
2000 #define RB_GETPALETTE (WM_USER+38)
2001 #define RB_MOVEBAND (WM_USER+39)
2002 #define RB_GETBANDMARGINS (WM_USER+40)
2003 #define RB_SETEXTENDEDSTYLE (WM_USER+41)
2004 #define RB_GETEXTENDEDSTYLE (WM_USER+42)
2005 #define RB_PUSHCHEVRON (WM_USER+43)
2006 #define RB_SETBANDWIDTH (WM_USER+44)
2008 #define RB_GETDROPTARGET CCM_GETDROPTARGET
2009 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
2010 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
2011 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2012 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2013 #define RB_SETWINDOWTHEME CCM_SETWINDOWTHEME
2015 #define RBN_FIRST (0U-831U)
2016 #define RBN_LAST (0U-859U)
2017 #define RBN_HEIGHTCHANGE (RBN_FIRST-0)
2018 #define RBN_GETOBJECT (RBN_FIRST-1)
2019 #define RBN_LAYOUTCHANGED (RBN_FIRST-2)
2020 #define RBN_AUTOSIZE (RBN_FIRST-3)
2021 #define RBN_BEGINDRAG (RBN_FIRST-4)
2022 #define RBN_ENDDRAG (RBN_FIRST-5)
2023 #define RBN_DELETINGBAND (RBN_FIRST-6)
2024 #define RBN_DELETEDBAND (RBN_FIRST-7)
2025 #define RBN_CHILDSIZE (RBN_FIRST-8)
2026 #define RBN_CHEVRONPUSHED (RBN_FIRST-10)
2027 #define RBN_SPLITTERDRAG (RBN_FIRST-11)
2028 #define RBN_MINMAX (RBN_FIRST-21)
2029 #define RBN_AUTOBREAK (RBN_FIRST-22)
2031 typedef struct tagREBARINFO
2033 UINT cbSize;
2034 UINT fMask;
2035 HIMAGELIST himl;
2036 } REBARINFO, *LPREBARINFO;
2038 typedef struct tagREBARBANDINFOA
2040 UINT cbSize;
2041 UINT fMask;
2042 UINT fStyle;
2043 COLORREF clrFore;
2044 COLORREF clrBack;
2045 LPSTR lpText;
2046 UINT cch;
2047 INT iImage;
2048 HWND hwndChild;
2049 UINT cxMinChild;
2050 UINT cyMinChild;
2051 UINT cx;
2052 HBITMAP hbmBack;
2053 UINT wID;
2054 UINT cyChild;
2055 UINT cyMaxChild;
2056 UINT cyIntegral;
2057 UINT cxIdeal;
2058 LPARAM lParam;
2059 UINT cxHeader;
2060 /* _WIN32_WINNT >= 0x0600 */
2061 RECT rcChevronLocation;
2062 UINT uChevronState;
2063 } REBARBANDINFOA, *LPREBARBANDINFOA;
2065 typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
2067 typedef struct tagREBARBANDINFOW
2069 UINT cbSize;
2070 UINT fMask;
2071 UINT fStyle;
2072 COLORREF clrFore;
2073 COLORREF clrBack;
2074 LPWSTR lpText;
2075 UINT cch;
2076 INT iImage;
2077 HWND hwndChild;
2078 UINT cxMinChild;
2079 UINT cyMinChild;
2080 UINT cx;
2081 HBITMAP hbmBack;
2082 UINT wID;
2083 UINT cyChild;
2084 UINT cyMaxChild;
2085 UINT cyIntegral;
2086 UINT cxIdeal;
2087 LPARAM lParam;
2088 UINT cxHeader;
2089 /* _WIN32_WINNT >= 0x0600 */
2090 RECT rcChevronLocation;
2091 UINT uChevronState;
2092 } REBARBANDINFOW, *LPREBARBANDINFOW;
2094 typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
2096 #define REBARBANDINFO WINELIB_NAME_AW(REBARBANDINFO)
2097 #define LPREBARBANDINFO WINELIB_NAME_AW(LPREBARBANDINFO)
2098 #define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
2100 #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
2101 #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
2102 #define REBARBANDINFO_V3_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(REBARBANDINFO), wID)
2103 #define REBARBANDINFOA_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, cxHeader)
2104 #define REBARBANDINFOW_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, cxHeader)
2105 #define REBARBANDINFO_V6_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(REBARBANDINFO), cxHeader)
2107 typedef struct tagNMREBARCHILDSIZE
2109 NMHDR hdr;
2110 UINT uBand;
2111 UINT wID;
2112 RECT rcChild;
2113 RECT rcBand;
2114 } NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;
2116 typedef struct tagNMREBAR
2118 NMHDR hdr;
2119 DWORD dwMask;
2120 UINT uBand;
2121 UINT fStyle;
2122 UINT wID;
2123 LPARAM lParam;
2124 } NMREBAR, *LPNMREBAR;
2126 typedef struct tagNMRBAUTOSIZE
2128 NMHDR hdr;
2129 BOOL fChanged;
2130 RECT rcTarget;
2131 RECT rcActual;
2132 } NMRBAUTOSIZE, *LPNMRBAUTOSIZE;
2134 typedef struct tagNMREBARCHEVRON
2136 NMHDR hdr;
2137 UINT uBand;
2138 UINT wID;
2139 LPARAM lParam;
2140 RECT rc;
2141 LPARAM lParamNM;
2142 } NMREBARCHEVRON, *LPNMREBARCHEVRON;
2144 typedef struct _RB_HITTESTINFO
2146 POINT pt;
2147 UINT flags;
2148 INT iBand;
2149 } RBHITTESTINFO, *LPRBHITTESTINFO;
2151 #define RBAB_AUTOSIZE 0x0001
2152 #define RBAB_ADDBAND 0x0002
2154 typedef struct tagNMREBARAUTOBREAK
2156 NMHDR hdr;
2157 UINT uBand;
2158 UINT wID;
2159 LPARAM lParam;
2160 UINT uMsg;
2161 UINT fStyleCurrent;
2162 BOOL fAutoBreak;
2163 } NMREBARAUTOBREAK, *LPNMREBARAUTOBREAK;
2166 /* Trackbar control */
2168 #define TRACKBAR_CLASSA "msctls_trackbar32"
2169 #if defined(_MSC_VER) || defined(__MINGW32__)
2170 # define TRACKBAR_CLASSW L"msctls_trackbar32"
2171 #else
2172 static const WCHAR TRACKBAR_CLASSW[] = { 'm','s','c','t','l','s','_',
2173 't','r','a','c','k','b','a','r','3','2',0 };
2174 #endif
2175 #define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
2178 #define TBTS_TOP 0
2179 #define TBTS_LEFT 1
2180 #define TBTS_BOTTOM 2
2181 #define TBTS_RIGHT 3
2183 #define TB_LINEUP 0
2184 #define TB_LINEDOWN 1
2185 #define TB_PAGEUP 2
2186 #define TB_PAGEDOWN 3
2187 #define TB_THUMBPOSITION 4
2188 #define TB_THUMBTRACK 5
2189 #define TB_TOP 6
2190 #define TB_BOTTOM 7
2191 #define TB_ENDTRACK 8
2193 #define TBCD_TICS 0x0001
2194 #define TBCD_THUMB 0x0002
2195 #define TBCD_CHANNEL 0x0003
2197 #define TBM_GETPOS (WM_USER)
2198 #define TBM_GETRANGEMIN (WM_USER+1)
2199 #define TBM_GETRANGEMAX (WM_USER+2)
2200 #define TBM_GETTIC (WM_USER+3)
2201 #define TBM_SETTIC (WM_USER+4)
2202 #define TBM_SETPOS (WM_USER+5)
2203 #define TBM_SETRANGE (WM_USER+6)
2204 #define TBM_SETRANGEMIN (WM_USER+7)
2205 #define TBM_SETRANGEMAX (WM_USER+8)
2206 #define TBM_CLEARTICS (WM_USER+9)
2207 #define TBM_SETSEL (WM_USER+10)
2208 #define TBM_SETSELSTART (WM_USER+11)
2209 #define TBM_SETSELEND (WM_USER+12)
2210 #define TBM_GETPTICS (WM_USER+14)
2211 #define TBM_GETTICPOS (WM_USER+15)
2212 #define TBM_GETNUMTICS (WM_USER+16)
2213 #define TBM_GETSELSTART (WM_USER+17)
2214 #define TBM_GETSELEND (WM_USER+18)
2215 #define TBM_CLEARSEL (WM_USER+19)
2216 #define TBM_SETTICFREQ (WM_USER+20)
2217 #define TBM_SETPAGESIZE (WM_USER+21)
2218 #define TBM_GETPAGESIZE (WM_USER+22)
2219 #define TBM_SETLINESIZE (WM_USER+23)
2220 #define TBM_GETLINESIZE (WM_USER+24)
2221 #define TBM_GETTHUMBRECT (WM_USER+25)
2222 #define TBM_GETCHANNELRECT (WM_USER+26)
2223 #define TBM_SETTHUMBLENGTH (WM_USER+27)
2224 #define TBM_GETTHUMBLENGTH (WM_USER+28)
2225 #define TBM_SETTOOLTIPS (WM_USER+29)
2226 #define TBM_GETTOOLTIPS (WM_USER+30)
2227 #define TBM_SETTIPSIDE (WM_USER+31)
2228 #define TBM_SETBUDDY (WM_USER+32)
2229 #define TBM_GETBUDDY (WM_USER+33)
2230 #define TBM_SETPOSNOTIFY (WM_USER+34)
2231 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2232 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2234 #define TRBN_FIRST (0u-1501u)
2235 #define TRBN_LAST (0u-1519u)
2236 #define TRBN_THUMBPOSCHANGING (TRBN_FIRST-1)
2238 /* Pager control */
2240 #define WC_PAGESCROLLERA "SysPager"
2241 #if defined(_MSC_VER) || defined(__MINGW32__)
2242 # define WC_PAGESCROLLERW L"SysPager"
2243 #else
2244 static const WCHAR WC_PAGESCROLLERW[] = { 'S','y','s','P','a','g','e','r',0 };
2245 #endif
2246 #define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
2249 #define PGF_INVISIBLE 0
2250 #define PGF_NORMAL 1
2251 #define PGF_GRAYED 2
2252 #define PGF_DEPRESSED 4
2253 #define PGF_HOT 8
2255 #define PGB_TOPORLEFT 0
2256 #define PGB_BOTTOMORRIGHT 1
2258 /* only used with PGN_SCROLL */
2259 #define PGF_SCROLLUP 1
2260 #define PGF_SCROLLDOWN 2
2261 #define PGF_SCROLLLEFT 4
2262 #define PGF_SCROLLRIGHT 8
2264 #define PGK_SHIFT 1
2265 #define PGK_CONTROL 2
2266 #define PGK_MENU 4
2268 /* only used with PGN_CALCSIZE */
2269 #define PGF_CALCWIDTH 1
2270 #define PGF_CALCHEIGHT 2
2272 #define PGM_FIRST 0x1400
2273 #define PGM_SETCHILD (PGM_FIRST+1)
2274 #define PGM_RECALCSIZE (PGM_FIRST+2)
2275 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
2276 #define PGM_SETBKCOLOR (PGM_FIRST+4)
2277 #define PGM_GETBKCOLOR (PGM_FIRST+5)
2278 #define PGM_SETBORDER (PGM_FIRST+6)
2279 #define PGM_GETBORDER (PGM_FIRST+7)
2280 #define PGM_SETPOS (PGM_FIRST+8)
2281 #define PGM_GETPOS (PGM_FIRST+9)
2282 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
2283 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
2284 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
2285 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
2287 #define PGN_FIRST (0U-900U)
2288 #define PGN_LAST (0U-950U)
2289 #define PGN_SCROLL (PGN_FIRST-1)
2290 #define PGN_CALCSIZE (PGN_FIRST-2)
2291 #define PGN_HOTITEMCHANGE (PGN_FIRST-3)
2293 #include <pshpack1.h>
2295 typedef struct
2297 NMHDR hdr;
2298 WORD fwKeys;
2299 RECT rcParent;
2300 INT iDir;
2301 INT iXpos;
2302 INT iYpos;
2303 INT iScroll;
2304 } NMPGSCROLL, *LPNMPGSCROLL;
2306 #include <poppack.h>
2308 typedef struct
2310 NMHDR hdr;
2311 DWORD dwFlag;
2312 INT iWidth;
2313 INT iHeight;
2314 } NMPGCALCSIZE, *LPNMPGCALCSIZE;
2316 #define Pager_SetChild(hwnd, child) \
2317 SNDMSG((hwnd), PGM_SETCHILD, 0, (LPARAM)(child))
2318 #define Pager_RecalcSize(hwnd) \
2319 SNDMSG((hwnd), PGM_RECALCSIZE, 0, 0)
2320 #define Pager_ForwardMouse(hwnd, forward) \
2321 SNDMSG((hwnd), PGM_FORWARDMOUSE, (WPARAM)(forward), 0)
2322 #define Pager_SetBkColor(hwnd, clr) \
2323 (COLORREF)SNDMSG((hwnd), PGM_SETBKCOLOR, 0, (LPARAM)(clr))
2324 #define Pager_GetBkColor(hwnd) \
2325 (COLORREF)SNDMSG((hwnd), PGM_GETBKCOLOR, 0, 0)
2326 #define Pager_SetBorder(hwnd, border) \
2327 (INT)SNDMSG((hwnd), PGM_SETBORDER, 0, (LPARAM)(border))
2328 #define Pager_GetBorder(hwnd) \
2329 (INT)SNDMSG((hwnd), PGM_GETBORDER, 0, 0)
2330 #define Pager_SetPos(hwnd, pos) \
2331 (INT)SNDMSG((hwnd), PGM_SETPOS, 0, (LPARAM)(pos))
2332 #define Pager_GetPos(hwnd) \
2333 (INT)SNDMSG((hwnd), PGM_GETPOS, 0, 0)
2334 #define Pager_SetButtonSize(hwnd, size) \
2335 (INT)SNDMSG((hwnd), PGM_SETBUTTONSIZE, 0, (LPARAM)(size))
2336 #define Pager_GetButtonSize(hwnd) \
2337 (INT)SNDMSG((hwnd), PGM_GETBUTTONSIZE, 0, 0)
2338 #define Pager_GetButtonState(hwnd, button) \
2339 (DWORD)SNDMSG((hwnd), PGM_GETBUTTONSTATE, 0, (LPARAM)(button))
2340 #define Pager_GetDropTarget(hwnd, dt) \
2341 SNDMSG((hwnd), PGM_GETDROPTARGET, 0, (LPARAM)(dt))
2342 #define Pager_SetScrollInfo(hwnd, timeout, lines, pixels) \
2343 SNDMSG((hwnd), PGM_SETSCROLLINFO, timeout, MAKELONG(lines, pixels))
2345 /* Treeview control */
2347 #define WC_TREEVIEWA "SysTreeView32"
2348 #if defined(_MSC_VER) || defined(__MINGW32__)
2349 # define WC_TREEVIEWW L"SysTreeView32"
2350 #else
2351 static const WCHAR WC_TREEVIEWW[] = { 'S','y','s',
2352 'T','r','e','e','V','i','e','w','3','2',0 };
2353 #endif
2354 #define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
2356 #define TVSIL_NORMAL 0
2357 #define TVSIL_STATE 2
2359 #define TVSBF_XBORDER 1
2360 #define TVSBF_YBORDER 2
2362 #define TV_FIRST 0x1100
2363 #define TVM_INSERTITEMA (TV_FIRST+0)
2364 #define TVM_INSERTITEMW (TV_FIRST+50)
2365 #define TVM_INSERTITEM WINELIB_NAME_AW(TVM_INSERTITEM)
2366 #define TVM_DELETEITEM (TV_FIRST+1)
2367 #define TVM_EXPAND (TV_FIRST+2)
2368 #define TVM_GETITEMRECT (TV_FIRST+4)
2369 #define TVM_GETCOUNT (TV_FIRST+5)
2370 #define TVM_GETINDENT (TV_FIRST+6)
2371 #define TVM_SETINDENT (TV_FIRST+7)
2372 #define TVM_GETIMAGELIST (TV_FIRST+8)
2373 #define TVM_SETIMAGELIST (TV_FIRST+9)
2374 #define TVM_GETNEXTITEM (TV_FIRST+10)
2375 #define TVM_SELECTITEM (TV_FIRST+11)
2376 #define TVM_GETITEMA (TV_FIRST+12)
2377 #define TVM_GETITEMW (TV_FIRST+62)
2378 #define TVM_GETITEM WINELIB_NAME_AW(TVM_GETITEM)
2379 #define TVM_SETITEMA (TV_FIRST+13)
2380 #define TVM_SETITEMW (TV_FIRST+63)
2381 #define TVM_SETITEM WINELIB_NAME_AW(TVM_SETITEM)
2382 #define TVM_EDITLABELA (TV_FIRST+14)
2383 #define TVM_EDITLABELW (TV_FIRST+65)
2384 #define TVM_EDITLABEL WINELIB_NAME_AW(TVM_EDITLABEL)
2385 #define TVM_GETEDITCONTROL (TV_FIRST+15)
2386 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
2387 #define TVM_HITTEST (TV_FIRST+17)
2388 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
2389 #define TVM_SORTCHILDREN (TV_FIRST+19)
2390 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
2391 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
2392 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
2393 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
2394 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
2395 #define TVM_GETISEARCHSTRING WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
2396 #define TVM_SETTOOLTIPS (TV_FIRST+24)
2397 #define TVM_GETTOOLTIPS (TV_FIRST+25)
2398 #define TVM_SETINSERTMARK (TV_FIRST+26)
2399 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
2400 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
2401 #define TVM_SETBKCOLOR (TV_FIRST+29)
2402 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
2403 #define TVM_GETBKCOLOR (TV_FIRST+31)
2404 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
2405 #define TVM_SETSCROLLTIME (TV_FIRST+33)
2406 #define TVM_GETSCROLLTIME (TV_FIRST+34)
2407 #define TVM_SETBORDER (TV_FIRST+35)
2408 #define TVM_UNKNOWN36 (TV_FIRST+36)
2409 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
2410 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
2411 #define TVM_GETITEMSTATE (TV_FIRST+39)
2412 #define TVM_SETLINECOLOR (TV_FIRST+40)
2413 #define TVM_GETLINECOLOR (TV_FIRST+41)
2414 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2415 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2416 #define TVM_MAPACCIDTOHTREEITEM (TV_FIRST + 42)
2417 #define TVM_MAPHTREEITEMTOACCID (TV_FIRST + 43)
2418 #define TVM_SETEXTENDEDSTYLE (TV_FIRST + 44)
2419 #define TVM_GETEXTENDEDSTYLE (TV_FIRST + 45)
2420 #define TVM_SETAUTOSCROLLINFO (TV_FIRST + 59)
2421 #define TVM_GETSELECTEDCOUNT (TV_FIRST + 70)
2422 #define TVM_SHOWINFOTIP (TV_FIRST + 71)
2423 #define TVM_GETITEMPARTRECT (TV_FIRST + 72)
2426 #define TVN_FIRST (0U-400U)
2427 #define TVN_LAST (0U-499U)
2429 #define TVN_SELCHANGINGA (TVN_FIRST-1)
2430 #define TVN_SELCHANGINGW (TVN_FIRST-50)
2431 #define TVN_SELCHANGING WINELIB_NAME_AW(TVN_SELCHANGING)
2433 #define TVN_SELCHANGEDA (TVN_FIRST-2)
2434 #define TVN_SELCHANGEDW (TVN_FIRST-51)
2435 #define TVN_SELCHANGED WINELIB_NAME_AW(TVN_SELCHANGED)
2437 #define TVN_GETDISPINFOA (TVN_FIRST-3)
2438 #define TVN_GETDISPINFOW (TVN_FIRST-52)
2439 #define TVN_GETDISPINFO WINELIB_NAME_AW(TVN_GETDISPINFO)
2441 #define TVN_SETDISPINFOA (TVN_FIRST-4)
2442 #define TVN_SETDISPINFOW (TVN_FIRST-53)
2443 #define TVN_SETDISPINFO WINELIB_NAME_AW(TVN_SETDISPINFO)
2445 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
2446 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
2447 #define TVN_ITEMEXPANDING WINELIB_NAME_AW(TVN_ITEMEXPANDING)
2449 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
2450 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
2451 #define TVN_ITEMEXPANDED WINELIB_NAME_AW(TVN_ITEMEXPANDED)
2453 #define TVN_BEGINDRAGA (TVN_FIRST-7)
2454 #define TVN_BEGINDRAGW (TVN_FIRST-56)
2455 #define TVN_BEGINDRAG WINELIB_NAME_AW(TVN_BEGINDRAG)
2457 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
2458 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
2459 #define TVN_BEGINRDRAG WINELIB_NAME_AW(TVN_BEGINRDRAG)
2461 #define TVN_DELETEITEMA (TVN_FIRST-9)
2462 #define TVN_DELETEITEMW (TVN_FIRST-58)
2463 #define TVN_DELETEITEM WINELIB_NAME_AW(TVN_DELETEITEM)
2465 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
2466 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
2467 #define TVN_BEGINLABELEDIT WINELIB_NAME_AW(TVN_BEGINLABELEDIT)
2469 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
2470 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
2471 #define TVN_ENDLABELEDIT WINELIB_NAME_AW(TVN_ENDLABELEDIT)
2473 #define TVN_KEYDOWN (TVN_FIRST-12)
2475 #define TVN_GETINFOTIPA (TVN_FIRST-13)
2476 #define TVN_GETINFOTIPW (TVN_FIRST-14)
2477 #define TVN_GETINFOTIP WINELIB_NAME_AW(TVN_GETINFOTIP)
2479 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
2481 #define TVN_ITEMCHANGINGA (TVN_FIRST-16)
2482 #define TVN_ITEMCHANGINGW (TVN_FIRST-17)
2483 #define TVN_ITEMCHANGEDA (TVN_FIRST-18)
2484 #define TVN_ITEMCHANGEDW (TVN_FIRST-19)
2485 #define TVN_ASYNCDRAW (TVN_FIRST-20)
2487 #define TVIF_TEXT 0x0001
2488 #define TVIF_IMAGE 0x0002
2489 #define TVIF_PARAM 0x0004
2490 #define TVIF_STATE 0x0008
2491 #define TVIF_HANDLE 0x0010
2492 #define TVIF_SELECTEDIMAGE 0x0020
2493 #define TVIF_CHILDREN 0x0040
2494 #define TVIF_INTEGRAL 0x0080
2495 #define TVIF_STATEEX 0x0100
2496 #define TVIF_EXPANDEDIMAGE 0x0200
2497 #define TVIF_DI_SETITEM 0x1000
2499 #define TVI_ROOT ((HTREEITEM)-65536)
2500 #define TVI_FIRST ((HTREEITEM)-65535)
2501 #define TVI_LAST ((HTREEITEM)-65534)
2502 #define TVI_SORT ((HTREEITEM)-65533)
2504 #define TVIS_FOCUSED 0x0001
2505 #define TVIS_SELECTED 0x0002
2506 #define TVIS_CUT 0x0004
2507 #define TVIS_DROPHILITED 0x0008
2508 #define TVIS_BOLD 0x0010
2509 #define TVIS_EXPANDED 0x0020
2510 #define TVIS_EXPANDEDONCE 0x0040
2511 #define TVIS_EXPANDPARTIAL 0x0080
2512 #define TVIS_OVERLAYMASK 0x0f00
2513 #define TVIS_STATEIMAGEMASK 0xf000
2514 #define TVIS_USERMASK 0xf000
2516 #define TVIS_EX_FLAT 0x0001
2517 #define TVIS_EX_DISABLED 0x0002
2518 /* TVIS_EX_HWND is listed on MSDN but apparently not in any header. */
2519 #define TVIS_EX_ALL 0x0002
2521 #define TVHT_NOWHERE 0x0001
2522 #define TVHT_ONITEMICON 0x0002
2523 #define TVHT_ONITEMLABEL 0x0004
2524 #define TVHT_ONITEMINDENT 0x0008
2525 #define TVHT_ONITEMBUTTON 0x0010
2526 #define TVHT_ONITEMRIGHT 0x0020
2527 #define TVHT_ONITEMSTATEICON 0x0040
2528 #define TVHT_ONITEM (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON)
2529 #define TVHT_ABOVE 0x0100
2530 #define TVHT_BELOW 0x0200
2531 #define TVHT_TORIGHT 0x0400
2532 #define TVHT_TOLEFT 0x0800
2534 #define TVS_SHAREDIMAGELISTS 0x0000
2535 #define TVS_PRIVATEIMAGELISTS 0x0400
2537 #define TVS_EX_NOSINGLECOLLAPSE 0x0001
2538 #define TVS_EX_MULTISELECT 0x0002
2539 #define TVS_EX_DOUBLEBUFFER 0x0004
2540 #define TVS_EX_NOINDENTSTATE 0x0008
2541 #define TVS_EX_RICHTOOLTIP 0x0010
2542 #define TVS_EX_AUTOHSCROLL 0x0020
2543 #define TVS_EX_FADEINOUTEXPANDOS 0x0040
2544 #define TVS_EX_PARTIALCHECKBOXES 0x0080
2545 #define TVS_EX_EXCLUSIONCHECKBOXES 0x0100
2546 #define TVS_EX_DIMMEDCHECKBOXES 0x0200
2547 #define TVS_EX_DRAWIMAGEASYNC 0x0400
2549 #define TVE_COLLAPSE 0x0001
2550 #define TVE_EXPAND 0x0002
2551 #define TVE_TOGGLE 0x0003
2552 #define TVE_EXPANDPARTIAL 0x4000
2553 #define TVE_COLLAPSERESET 0x8000
2555 #define TVGN_ROOT 0
2556 #define TVGN_NEXT 1
2557 #define TVGN_PREVIOUS 2
2558 #define TVGN_PARENT 3
2559 #define TVGN_CHILD 4
2560 #define TVGN_FIRSTVISIBLE 5
2561 #define TVGN_NEXTVISIBLE 6
2562 #define TVGN_PREVIOUSVISIBLE 7
2563 #define TVGN_DROPHILITE 8
2564 #define TVGN_CARET 9
2565 #define TVGN_LASTVISIBLE 10
2566 #define TVGN_NEXTSELECTED 11
2567 #define TVSI_NOSINGLEEXPAND 0x8000
2569 #define TVC_UNKNOWN 0x00
2570 #define TVC_BYMOUSE 0x01
2571 #define TVC_BYKEYBOARD 0x02
2574 typedef struct _TREEITEM *HTREEITEM;
2576 typedef struct {
2577 UINT mask;
2578 HTREEITEM hItem;
2579 UINT state;
2580 UINT stateMask;
2581 LPSTR pszText;
2582 INT cchTextMax;
2583 INT iImage;
2584 INT iSelectedImage;
2585 INT cChildren;
2586 LPARAM lParam;
2587 } TVITEMA, *LPTVITEMA;
2589 typedef struct {
2590 UINT mask;
2591 HTREEITEM hItem;
2592 UINT state;
2593 UINT stateMask;
2594 LPWSTR pszText;
2595 INT cchTextMax;
2596 INT iImage;
2597 INT iSelectedImage;
2598 INT cChildren;
2599 LPARAM lParam;
2600 } TVITEMW, *LPTVITEMW;
2602 #define TV_ITEMA TVITEMA
2603 #define TV_ITEMW TVITEMW
2604 #define LPTV_ITEMA LPTVITEMA
2605 #define LPTV_ITEMW LPTVITEMW
2607 #define TVITEM WINELIB_NAME_AW(TVITEM)
2608 #define LPTVITEM WINELIB_NAME_AW(LPTVITEM)
2609 #define TV_ITEM WINELIB_NAME_AW(TV_ITEM)
2610 #define LPTV_ITEM WINELIB_NAME_AW(LPTV_ITEM)
2612 typedef struct {
2613 UINT mask;
2614 HTREEITEM hItem;
2615 UINT state;
2616 UINT stateMask;
2617 LPSTR pszText;
2618 INT cchTextMax;
2619 INT iImage;
2620 INT iSelectedImage;
2621 INT cChildren;
2622 LPARAM lParam;
2623 INT iIntegral;
2624 UINT uStateEx; /* _WIN32_IE >= 0x600 */
2625 HWND hwnd; /* _WIN32_IE >= 0x600 */
2626 INT iExpandedImage; /* _WIN32_IE >= 0x600 */
2627 INT iReserved;
2628 } TVITEMEXA, *LPTVITEMEXA;
2630 typedef struct {
2631 UINT mask;
2632 HTREEITEM hItem;
2633 UINT state;
2634 UINT stateMask;
2635 LPWSTR pszText;
2636 INT cchTextMax;
2637 INT iImage;
2638 INT iSelectedImage;
2639 INT cChildren;
2640 LPARAM lParam;
2641 INT iIntegral;
2642 UINT uStateEx; /* _WIN32_IE >= 0x600 */
2643 HWND hwnd; /* _WIN32_IE >= 0x600 */
2644 INT iExpandedImage; /* _WIN32_IE >= 0x600 */
2645 INT iReserved;
2646 } TVITEMEXW, *LPTVITEMEXW;
2648 #define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
2649 #define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
2651 typedef struct tagTVINSERTSTRUCTA {
2652 HTREEITEM hParent;
2653 HTREEITEM hInsertAfter;
2654 union {
2655 TVITEMEXA itemex;
2656 TVITEMA item;
2657 } DUMMYUNIONNAME;
2658 } TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
2660 typedef struct tagTVINSERTSTRUCTW {
2661 HTREEITEM hParent;
2662 HTREEITEM hInsertAfter;
2663 union {
2664 TVITEMEXW itemex;
2665 TVITEMW item;
2666 } DUMMYUNIONNAME;
2667 } TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
2669 #define TVINSERTSTRUCT WINELIB_NAME_AW(TVINSERTSTRUCT)
2670 #define LPTVINSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
2672 #define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
2673 #define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
2674 #define TVINSERTSTRUCT_V1_SIZE WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)
2676 #define TV_INSERTSTRUCT TVINSERTSTRUCT
2677 #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
2678 #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
2679 #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
2680 #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
2681 #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
2685 typedef struct tagNMTREEVIEWA {
2686 NMHDR hdr;
2687 UINT action;
2688 TVITEMA itemOld;
2689 TVITEMA itemNew;
2690 POINT ptDrag;
2691 } NMTREEVIEWA, *LPNMTREEVIEWA;
2693 typedef struct tagNMTREEVIEWW {
2694 NMHDR hdr;
2695 UINT action;
2696 TVITEMW itemOld;
2697 TVITEMW itemNew;
2698 POINT ptDrag;
2699 } NMTREEVIEWW, *LPNMTREEVIEWW;
2701 #define NMTREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2702 #define NM_TREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2703 #define NM_TREEVIEWA NMTREEVIEWA
2704 #define NM_TREEVIEWW NMTREEVIEWW
2705 #define LPNMTREEVIEW WINELIB_NAME_AW(LPNMTREEVIEW)
2707 #define LPNM_TREEVIEW LPNMTREEVIEW
2708 #define LPNM_TREEVIEWA LPNMTREEVIEWA
2709 #define LPNM_TREEVIEWW LPNMTREEVIEWW
2711 typedef struct tagTVDISPINFOA {
2712 NMHDR hdr;
2713 TVITEMA item;
2714 } NMTVDISPINFOA, *LPNMTVDISPINFOA;
2716 typedef struct tagTVDISPINFOW {
2717 NMHDR hdr;
2718 TVITEMW item;
2719 } NMTVDISPINFOW, *LPNMTVDISPINFOW;
2721 typedef struct tagTVDISPINFOEXA {
2722 NMHDR hdr;
2723 TVITEMEXA item;
2724 } NMTVDISPINFOEXA, *LPNMTVDISPINFOEXA;
2726 typedef struct tagTVDISPINFOEXW {
2727 NMHDR hdr;
2728 TVITEMEXW item;
2729 } NMTVDISPINFOEXW, *LPNMTVDISPINFOEXW;
2731 #define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
2732 #define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
2733 #define NMTVDISPINFOEX WINELIB_NAME_AW(NMTVDISPINFOEX)
2734 #define LPNMTVDISPINFOEX WINELIB_NAME_AW(LPNMTVDISPINFOEX)
2735 #define TV_DISPINFOA NMTVDISPINFOA
2736 #define TV_DISPINFOW NMTVDISPINFOW
2737 #define TV_DISPINFO NMTVDISPINFO
2739 typedef INT (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
2741 typedef struct tagTVSORTCB
2743 HTREEITEM hParent;
2744 PFNTVCOMPARE lpfnCompare;
2745 LPARAM lParam;
2746 } TVSORTCB, *LPTVSORTCB;
2748 #define TV_SORTCB TVSORTCB
2749 #define LPTV_SORTCB LPTVSORTCB
2751 typedef struct tagTVHITTESTINFO {
2752 POINT pt;
2753 UINT flags;
2754 HTREEITEM hItem;
2755 } TVHITTESTINFO, *LPTVHITTESTINFO;
2757 #define TV_HITTESTINFO TVHITTESTINFO
2760 /* Custom Draw Treeview */
2762 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
2764 #define TVCDRF_NOIMAGES 0x00010000
2766 typedef struct tagNMTVCUSTOMDRAW
2768 NMCUSTOMDRAW nmcd;
2769 COLORREF clrText;
2770 COLORREF clrTextBk;
2771 INT iLevel; /* IE>0x0400 */
2772 } NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
2774 /* Treeview tooltips */
2776 typedef struct tagNMTVGETINFOTIPA
2778 NMHDR hdr;
2779 LPSTR pszText;
2780 INT cchTextMax;
2781 HTREEITEM hItem;
2782 LPARAM lParam;
2783 } NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
2785 typedef struct tagNMTVGETINFOTIPW
2787 NMHDR hdr;
2788 LPWSTR pszText;
2789 INT cchTextMax;
2790 HTREEITEM hItem;
2791 LPARAM lParam;
2792 } NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
2794 #define NMTVGETINFOTIP WINELIB_NAME_AW(NMTVGETINFOTIP)
2795 #define LPNMTVGETINFOTIP WINELIB_NAME_AW(LPNMTVGETINFOTIP)
2797 typedef enum _TVITEMPART
2799 TVGIPR_BUTTON = 1
2800 } TVITEMPART;
2802 typedef struct tagTVGETITEMPARTRECTINFO
2804 HTREEITEM hti;
2805 RECT *prc;
2806 TVITEMPART partID;
2807 } TVGETITEMPARTRECTINFO;
2809 typedef struct tagTVITEMCHANGE
2811 NMHDR hdr;
2812 UINT uChanged;
2813 HTREEITEM hItem;
2814 UINT uStateNew;
2815 UINT uStateOld;
2816 LPARAM lParam;
2817 } NMTVITEMCHANGE;
2819 typedef struct tagNMTVASYNCDRAW
2821 NMHDR hdr;
2822 IMAGELISTDRAWPARAMS *pimldp;
2823 HRESULT hr;
2824 HTREEITEM hItem;
2825 LPARAM lParam;
2826 DWORD dwRetFlags;
2827 int iRetImageIndex;
2828 } NMTVASYNCDRAW;
2830 #include <pshpack1.h>
2831 typedef struct tagTVKEYDOWN
2833 NMHDR hdr;
2834 WORD wVKey;
2835 UINT flags;
2836 } NMTVKEYDOWN, *LPNMTVKEYDOWN;
2837 #include <poppack.h>
2839 #define TV_KEYDOWN NMTVKEYDOWN
2841 #define TreeView_InsertItemA(hwnd, phdi) \
2842 (HTREEITEM)SNDMSGA((hwnd), TVM_INSERTITEMA, 0, \
2843 (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
2844 #define TreeView_InsertItemW(hwnd,phdi) \
2845 (HTREEITEM)SNDMSGW((hwnd), TVM_INSERTITEMW, 0, \
2846 (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
2847 #define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem)
2849 #define TreeView_DeleteItem(hwnd, hItem) \
2850 (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
2851 #define TreeView_DeleteAllItems(hwnd) \
2852 (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
2853 #define TreeView_Expand(hwnd, hitem, code) \
2854 (BOOL)SNDMSG((hwnd), TVM_EXPAND, (WPARAM)code, \
2855 (LPARAM)(HTREEITEM)(hitem))
2857 #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
2858 (*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSG((hwnd), \
2859 TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
2861 #define TreeView_GetCount(hwnd) \
2862 (UINT)SNDMSG((hwnd), TVM_GETCOUNT, 0, 0)
2863 #define TreeView_GetIndent(hwnd) \
2864 (UINT)SNDMSG((hwnd), TVM_GETINDENT, 0, 0)
2865 #define TreeView_SetIndent(hwnd, indent) \
2866 (BOOL)SNDMSG((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
2868 #define TreeView_GetImageList(hwnd, iImage) \
2869 (HIMAGELIST)SNDMSG((hwnd), TVM_GETIMAGELIST, iImage, 0)
2871 #define TreeView_SetImageList(hwnd, himl, iImage) \
2872 (HIMAGELIST)SNDMSG((hwnd), TVM_SETIMAGELIST, iImage, \
2873 (LPARAM)(HIMAGELIST)(himl))
2875 #define TreeView_GetNextItem(hwnd, hitem, code) \
2876 (HTREEITEM)SNDMSG((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
2877 (LPARAM)(HTREEITEM) (hitem))
2879 #define TreeView_GetChild(hwnd, hitem) \
2880 TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
2881 #define TreeView_GetNextSibling(hwnd, hitem) \
2882 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
2883 #define TreeView_GetPrevSibling(hwnd, hitem) \
2884 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
2885 #define TreeView_GetParent(hwnd, hitem) \
2886 TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
2887 #define TreeView_GetFirstVisible(hwnd) \
2888 TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
2889 #define TreeView_GetLastVisible(hwnd) \
2890 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2891 #define TreeView_GetNextVisible(hwnd, hitem) \
2892 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
2893 #define TreeView_GetPrevVisible(hwnd, hitem) \
2894 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
2895 #define TreeView_GetSelection(hwnd) \
2896 TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
2897 #define TreeView_GetDropHilight(hwnd) \
2898 TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
2899 #define TreeView_GetRoot(hwnd) \
2900 TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
2901 #define TreeView_GetLastVisible(hwnd) \
2902 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2903 #define TreeView_GetNextSelected(hwnd) \
2904 TreeView_GetNextItem(hwnd, NULL, TVGN_NEXTSELECTED)
2907 #define TreeView_Select(hwnd, hitem, code) \
2908 (BOOL)SNDMSG((hwnd), TVM_SELECTITEM, (WPARAM)(code), \
2909 (LPARAM)(HTREEITEM)(hitem))
2912 #define TreeView_SelectItem(hwnd, hitem) \
2913 TreeView_Select(hwnd, hitem, TVGN_CARET)
2914 #define TreeView_SelectDropTarget(hwnd, hitem) \
2915 TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
2916 #define TreeView_SelectSetFirstVisible(hwnd, hitem) \
2917 TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
2920 #define TreeView_GetItemA(hwnd, pitem) \
2921 (BOOL)SNDMSGA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2922 #define TreeView_GetItemW(hwnd, pitem) \
2923 (BOOL)SNDMSGW((hwnd), TVM_GETITEMW, 0, (LPARAM) (TVITEMW *)(pitem))
2924 #define TreeView_GetItem WINELIB_NAME_AW(TreeView_GetItem)
2926 #define TreeView_SetItemA(hwnd, pitem) \
2927 (BOOL)SNDMSGA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2928 #define TreeView_SetItemW(hwnd, pitem) \
2929 (BOOL)SNDMSGW((hwnd), TVM_SETITEMW, 0, (LPARAM)(const TVITEMW *)(pitem))
2930 #define TreeView_SetItem WINELIB_NAME_AW(TreeView_SetItem)
2932 #define TreeView_EditLabel(hwnd, hitem) \
2933 (HWND)SNDMSG((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
2935 #define TreeView_GetEditControl(hwnd) \
2936 (HWND)SNDMSG((hwnd), TVM_GETEDITCONTROL, 0, 0)
2938 #define TreeView_GetVisibleCount(hwnd) \
2939 (UINT)SNDMSG((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
2941 #define TreeView_HitTest(hwnd, lpht) \
2942 (HTREEITEM)SNDMSG((hwnd), TVM_HITTEST, 0,\
2943 (LPARAM)(LPTVHITTESTINFO)(lpht))
2945 #define TreeView_CreateDragImage(hwnd, hitem) \
2946 (HIMAGELIST)SNDMSG((hwnd), TVM_CREATEDRAGIMAGE, 0,\
2947 (LPARAM)(HTREEITEM)(hitem))
2949 #define TreeView_SortChildren(hwnd, hitem, recurse) \
2950 (BOOL)SNDMSG((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
2951 (LPARAM)(HTREEITEM)(hitem))
2953 #define TreeView_EnsureVisible(hwnd, hitem) \
2954 (BOOL)SNDMSG((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
2956 #define TreeView_SortChildrenCB(hwnd, psort, recurse) \
2957 (BOOL)SNDMSG((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
2958 (LPARAM)(LPTV_SORTCB)(psort))
2960 #define TreeView_EndEditLabelNow(hwnd, fCancel) \
2961 (BOOL)SNDMSG((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
2963 #define TreeView_GetISearchString(hwnd, lpsz) \
2964 (BOOL)SNDMSG((hwnd), TVM_GETISEARCHSTRING, 0, \
2965 (LPARAM)(LPTSTR)lpsz)
2967 #define TreeView_SetToolTips(hwnd, hwndTT) \
2968 (HWND)SNDMSG((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
2970 #define TreeView_GetToolTips(hwnd) \
2971 (HWND)SNDMSG((hwnd), TVM_GETTOOLTIPS, 0, 0)
2973 #define TreeView_SetItemHeight(hwnd, iHeight) \
2974 (INT)SNDMSG((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
2976 #define TreeView_GetItemHeight(hwnd) \
2977 (INT)SNDMSG((hwnd), TVM_GETITEMHEIGHT, 0, 0)
2979 #define TreeView_SetBkColor(hwnd, clr) \
2980 (COLORREF)SNDMSG((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
2982 #define TreeView_SetTextColor(hwnd, clr) \
2983 (COLORREF)SNDMSG((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
2985 #define TreeView_GetBkColor(hwnd) \
2986 (COLORREF)SNDMSG((hwnd), TVM_GETBKCOLOR, 0, 0)
2988 #define TreeView_GetTextColor(hwnd) \
2989 (COLORREF)SNDMSG((hwnd), TVM_GETTEXTCOLOR, 0, 0)
2991 #define TreeView_SetScrollTime(hwnd, uTime) \
2992 (UINT)SNDMSG((hwnd), TVM_SETSCROLLTIME, uTime, 0)
2994 #define TreeView_GetScrollTime(hwnd) \
2995 (UINT)SNDMSG((hwnd), TVM_GETSCROLLTIME, 0, 0)
2997 #define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
2998 (BOOL)SNDMSG((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
2999 (LPARAM) (hItem))
3001 #define TreeView_SetInsertMarkColor(hwnd, clr) \
3002 (COLORREF)SNDMSG((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
3004 #define TreeView_GetInsertMarkColor(hwnd) \
3005 (COLORREF)SNDMSG((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
3007 #define TreeView_SetItemState(hwndTV, hti, data, _mask) \
3008 { TVITEM _TVi; \
3009 _TVi.mask = TVIF_STATE; \
3010 _TVi.hItem = hti; \
3011 _TVi.stateMask = _mask; \
3012 _TVi.state = data; \
3013 SNDMSG((hwndTV), TVM_SETITEM, 0, (LPARAM)&_TVi); \
3016 #define TreeView_GetItemState(hwndTV, hti, mask) \
3017 (UINT)SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
3018 #define TreeView_GetCheckState(hwndTV, hti) \
3019 ((((UINT)(SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
3020 TVIS_STATEIMAGEMASK))) >> 12) -1)
3022 #define TreeView_SetLineColor(hwnd, clr) \
3023 (COLORREF)SNDMSG((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
3025 #define TreeView_GetLineColor(hwnd) \
3026 (COLORREF)SNDMSG((hwnd), TVM_GETLINECOLOR, 0, 0)
3028 #define TreeView_MapAccIDToHTREEITEM(hwnd, id) \
3029 (HTREEITEM)SNDMSG((hwnd), TVM_MAPACCIDTOHTREEITEM, id, 0)
3031 #define TreeView_MapHTREEITEMToAccID(hwnd, htreeitem) \
3032 (UINT)SNDMSG((hwnd), TVM_MAPHTREEITEMTOACCID, (WPARAM)htreeitem, 0)
3034 #define TreeView_SetUnicodeFormat(hwnd, fUnicode) \
3035 (BOOL)SNDMSG((hwnd), TVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
3036 #define TreeView_GetUnicodeFormat(hwnd) \
3037 (BOOL)SNDMSG((hwnd), TVM_GETUNICODEFORMAT, 0, 0)
3039 /* Listview control */
3041 #define WC_LISTVIEWA "SysListView32"
3042 #if defined(_MSC_VER) || defined(__MINGW32__)
3043 # define WC_LISTVIEWW L"SysListView32"
3044 #else
3045 static const WCHAR WC_LISTVIEWW[] = { 'S','y','s',
3046 'L','i','s','t','V','i','e','w','3','2',0 };
3047 #endif
3048 #define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
3050 #define LVSCW_AUTOSIZE -1
3051 #define LVSCW_AUTOSIZE_USEHEADER -2
3054 #define LVS_EX_GRIDLINES 0x0001
3055 #define LVS_EX_SUBITEMIMAGES 0x0002
3056 #define LVS_EX_CHECKBOXES 0x0004
3057 #define LVS_EX_TRACKSELECT 0x0008
3058 #define LVS_EX_HEADERDRAGDROP 0x0010
3059 #define LVS_EX_FULLROWSELECT 0x0020
3060 #define LVS_EX_ONECLICKACTIVATE 0x0040
3061 #define LVS_EX_TWOCLICKACTIVATE 0x0080
3062 #define LVS_EX_FLATSB 0x0100
3063 #define LVS_EX_REGIONAL 0x0200
3064 #define LVS_EX_INFOTIP 0x0400
3065 #define LVS_EX_UNDERLINEHOT 0x0800
3066 #define LVS_EX_UNDERLINECOLD 0x1000
3067 #define LVS_EX_MULTIWORKAREAS 0x2000
3068 #define LVS_EX_LABELTIP 0x4000
3069 #define LVS_EX_BORDERSELECT 0x8000
3070 #define LVS_EX_DOUBLEBUFFER 0x00010000
3071 #define LVS_EX_HIDELABELS 0x00020000
3072 #define LVS_EX_SINGLEROW 0x00040000
3073 #define LVS_EX_SNAPTOGRID 0x00080000
3074 #define LVS_EX_SIMPLESELECT 0x00100000
3075 #define LVS_EX_JUSTIFYCOLUMNS 0x00200000
3076 #define LVS_EX_TRANSPARENTBKGND 0x00400000
3077 #define LVS_EX_TRANSPARENTSHADOWTEXT 0x00800000
3078 #define LVS_EX_AUTOAUTOARRANGE 0x01000000
3079 #define LVS_EX_HEADERINALLVIEWS 0x02000000
3080 #define LVS_EX_AUTOCHECKSELECT 0x08000000
3081 #define LVS_EX_AUTOSIZECOLUMNS 0x10000000
3082 #define LVS_EX_COLUMNSNAPPOINTS 0x40000000
3083 #define LVS_EX_COLUMNOVERFLOW 0x80000000
3085 #define LVCF_FMT 0x0001
3086 #define LVCF_WIDTH 0x0002
3087 #define LVCF_TEXT 0x0004
3088 #define LVCF_SUBITEM 0x0008
3089 #define LVCF_IMAGE 0x0010
3090 #define LVCF_ORDER 0x0020
3091 #define LVCF_MINWIDTH 0x0040
3092 #define LVCF_DEFAULTWIDTH 0x0080
3093 #define LVCF_IDEALWIDTH 0x0100
3095 #define LVCFMT_LEFT 0x0000
3096 #define LVCFMT_RIGHT 0x0001
3097 #define LVCFMT_CENTER 0x0002
3098 #define LVCFMT_JUSTIFYMASK 0x0003
3099 #define LVCFMT_FIXED_WIDTH 0x0100
3100 #define LVCFMT_IMAGE 0x0800
3101 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
3102 #define LVCFMT_COL_HAS_IMAGES 0x8000
3103 #define LVCFMT_NO_DPI_SCALE 0x00040000
3104 #define LVCFMT_FIXED_RATIO 0x00080000
3105 #define LVCFMT_LINE_BREAK 0x00100000
3106 #define LVCFMT_FILL 0x00200000
3107 #define LVCFMT_WRAP 0x00400000
3108 #define LVCFMT_NO_TITLE 0x00800000
3109 #define LVCFMT_SPLIT_BUTTON 0x01000000
3110 #define LVCFMT_TILE_PLACEMENTMASK (LVCFMT_LINE_BREAK | LVCFMT_FILL)
3112 #define LVSIL_NORMAL 0
3113 #define LVSIL_SMALL 1
3114 #define LVSIL_STATE 2
3115 #define LVSIL_GROUPHEADER 3
3117 /* following 2 flags only for LVS_OWNERDATA listviews */
3118 /* and only in report or list mode */
3119 #define LVSICF_NOINVALIDATEALL 0x0001
3120 #define LVSICF_NOSCROLL 0x0002
3123 #define LVFI_PARAM 0x0001
3124 #define LVFI_STRING 0x0002
3125 #define LVFI_SUBSTRING 0x0004
3126 #define LVFI_PARTIAL 0x0008
3127 #define LVFI_WRAP 0x0020
3128 #define LVFI_NEARESTXY 0x0040
3130 #define LVIF_TEXT 0x0001
3131 #define LVIF_IMAGE 0x0002
3132 #define LVIF_PARAM 0x0004
3133 #define LVIF_STATE 0x0008
3134 #define LVIF_INDENT 0x0010
3135 #define LVIF_GROUPID 0x0100
3136 #define LVIF_COLUMNS 0x0200
3137 #define LVIF_NORECOMPUTE 0x0800
3138 #define LVIF_DI_SETITEM 0x1000
3139 #define LVIF_COLFMT 0x00010000
3141 #define LVIR_BOUNDS 0x0000
3142 #define LVIR_ICON 0x0001
3143 #define LVIR_LABEL 0x0002
3144 #define LVIR_SELECTBOUNDS 0x0003
3146 #define LVIS_FOCUSED 0x0001
3147 #define LVIS_SELECTED 0x0002
3148 #define LVIS_CUT 0x0004
3149 #define LVIS_DROPHILITED 0x0008
3150 #define LVIS_ACTIVATING 0x0020
3152 #define LVIS_OVERLAYMASK 0x0F00
3153 #define LVIS_STATEIMAGEMASK 0xF000
3155 #define LVNI_ALL 0x0000
3156 #define LVNI_FOCUSED 0x0001
3157 #define LVNI_SELECTED 0x0002
3158 #define LVNI_CUT 0x0004
3159 #define LVNI_DROPHILITED 0x0008
3161 #define LVNI_ABOVE 0x0100
3162 #define LVNI_BELOW 0x0200
3163 #define LVNI_TOLEFT 0x0400
3164 #define LVNI_TORIGHT 0x0800
3166 #define LVHT_NOWHERE 0x0001
3167 #define LVHT_ONITEMICON 0x0002
3168 #define LVHT_ONITEMLABEL 0x0004
3169 #define LVHT_ONITEMSTATEICON 0x0008
3170 #define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
3172 #define LVHT_ABOVE 0x0008
3173 #define LVHT_BELOW 0x0010
3174 #define LVHT_TORIGHT 0x0020
3175 #define LVHT_TOLEFT 0x0040
3177 #define LV_VIEW_ICON 0x0000
3178 #define LV_VIEW_DETAILS 0x0001
3179 #define LV_VIEW_SMALLICON 0x0002
3180 #define LV_VIEW_LIST 0x0003
3181 #define LV_VIEW_TILE 0x0004
3182 #define LV_VIEW_MAX 0x0004
3184 #define LVGF_NONE 0x00000000
3185 #define LVGF_HEADER 0x00000001
3186 #define LVGF_FOOTER 0x00000002
3187 #define LVGF_STATE 0x00000004
3188 #define LVGF_ALIGN 0x00000008
3189 #define LVGF_GROUPID 0x00000010
3190 #define LVGF_SUBTITLE 0x00000100
3191 #define LVGF_TASK 0x00000200
3192 #define LVGF_DESCRIPTIONTOP 0x00000400
3193 #define LVGF_DESCRIPTIONBOTTOM 0x00000800
3194 #define LVGF_TITLEIMAGE 0x00001000
3195 #define LVGF_EXTENDEDIMAGE 0x00002000
3196 #define LVGF_ITEMS 0x00004000
3197 #define LVGF_SUBSET 0x00008000
3198 #define LVGF_SUBSETITEMS 0x00010000
3200 #define LVGS_NORMAL 0x00000000
3201 #define LVGS_COLLAPSED 0x00000001
3202 #define LVGS_HIDDEN 0x00000002
3204 #define LVGA_HEADER_LEFT 0x00000001
3205 #define LVGA_HEADER_CENTER 0x00000002
3206 #define LVGA_HEADER_RIGHT 0x00000004
3207 #define LVGA_FOOTER_LEFT 0x00000008
3208 #define LVGA_FOOTER_CENTER 0x00000010
3209 #define LVGA_FOOTER_RIGHT 0x00000020
3211 #define LVGMF_NONE 0x00000000
3212 #define LVGMF_BORDERSIZE 0x00000001
3213 #define LVGMF_BORDERCOLOR 0x00000002
3214 #define LVGMF_TEXTCOLOR 0x00000004
3216 #define LVTVIF_AUTOSIZE 0x00000000
3217 #define LVTVIF_FIXEDWIDTH 0x00000001
3218 #define LVTVIF_FIXEDHEIGHT 0x00000002
3219 #define LVTVIF_FIXEDSIZE 0x00000003
3220 #define LVTVIF_EXTENDED 0x00000004
3222 #define LVTVIM_TILESIZE 0x00000001
3223 #define LVTVIM_COLUMNS 0x00000002
3224 #define LVTVIM_LABELMARGIN 0x00000004
3226 #define LVIM_AFTER 0x00000001
3228 #define LVM_FIRST 0x1000
3229 #define LVM_GETBKCOLOR (LVM_FIRST+0)
3230 #define LVM_SETBKCOLOR (LVM_FIRST+1)
3231 #define LVM_GETIMAGELIST (LVM_FIRST+2)
3232 #define LVM_SETIMAGELIST (LVM_FIRST+3)
3233 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
3234 #define LVM_GETITEMA (LVM_FIRST+5)
3235 #define LVM_GETITEMW (LVM_FIRST+75)
3236 #define LVM_GETITEM WINELIB_NAME_AW(LVM_GETITEM)
3237 #define LVM_SETITEMA (LVM_FIRST+6)
3238 #define LVM_SETITEMW (LVM_FIRST+76)
3239 #define LVM_SETITEM WINELIB_NAME_AW(LVM_SETITEM)
3240 #define LVM_INSERTITEMA (LVM_FIRST+7)
3241 #define LVM_INSERTITEMW (LVM_FIRST+77)
3242 #define LVM_INSERTITEM WINELIB_NAME_AW(LVM_INSERTITEM)
3243 #define LVM_DELETEITEM (LVM_FIRST+8)
3244 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
3245 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
3246 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
3247 #define LVM_GETNEXTITEM (LVM_FIRST+12)
3248 #define LVM_FINDITEMA (LVM_FIRST+13)
3249 #define LVM_FINDITEMW (LVM_FIRST+83)
3250 #define LVM_FINDITEM WINELIB_NAME_AW(LVM_FINDITEM)
3251 #define LVM_GETITEMRECT (LVM_FIRST+14)
3252 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
3253 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
3254 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
3255 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
3256 #define LVM_GETSTRINGWIDTH WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
3257 #define LVM_HITTEST (LVM_FIRST+18)
3258 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
3259 #define LVM_SCROLL (LVM_FIRST+20)
3260 #define LVM_REDRAWITEMS (LVM_FIRST+21)
3261 #define LVM_ARRANGE (LVM_FIRST+22)
3262 #define LVM_EDITLABELA (LVM_FIRST+23)
3263 #define LVM_EDITLABELW (LVM_FIRST+118)
3264 #define LVM_EDITLABEL WINELIB_NAME_AW(LVM_EDITLABEL)
3265 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
3266 #define LVM_GETCOLUMNA (LVM_FIRST+25)
3267 #define LVM_GETCOLUMNW (LVM_FIRST+95)
3268 #define LVM_GETCOLUMN WINELIB_NAME_AW(LVM_GETCOLUMN)
3269 #define LVM_SETCOLUMNA (LVM_FIRST+26)
3270 #define LVM_SETCOLUMNW (LVM_FIRST+96)
3271 #define LVM_SETCOLUMN WINELIB_NAME_AW(LVM_SETCOLUMN)
3272 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
3273 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
3274 #define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
3275 #define LVM_DELETECOLUMN (LVM_FIRST+28)
3276 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
3277 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
3278 #define LVM_GETHEADER (LVM_FIRST+31)
3280 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
3281 #define LVM_GETVIEWRECT (LVM_FIRST+34)
3282 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
3283 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
3284 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
3285 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
3286 #define LVM_GETTOPINDEX (LVM_FIRST+39)
3287 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
3288 #define LVM_GETORIGIN (LVM_FIRST+41)
3289 #define LVM_UPDATE (LVM_FIRST+42)
3290 #define LVM_SETITEMSTATE (LVM_FIRST+43)
3291 #define LVM_GETITEMSTATE (LVM_FIRST+44)
3292 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
3293 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
3294 #define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
3295 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
3296 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
3297 #define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
3298 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
3299 #define LVM_SORTITEMS (LVM_FIRST+48)
3300 #define LVM_SORTITEMSEX (LVM_FIRST+81)
3301 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
3302 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
3303 #define LVM_GETITEMSPACING (LVM_FIRST+51)
3304 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
3305 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
3306 #define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
3307 #define LVM_SETICONSPACING (LVM_FIRST+53)
3308 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
3309 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
3310 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
3311 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
3312 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
3313 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
3314 #define LVM_SETHOTITEM (LVM_FIRST+60)
3315 #define LVM_GETHOTITEM (LVM_FIRST+61)
3316 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
3317 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
3318 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
3319 #define LVM_SETWORKAREAS (LVM_FIRST+65)
3320 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
3321 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
3322 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
3323 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
3324 #define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
3325 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
3326 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
3327 #define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
3328 #define LVM_GETWORKAREAS (LVM_FIRST+70)
3329 #define LVM_SETHOVERTIME (LVM_FIRST+71)
3330 #define LVM_GETHOVERTIME (LVM_FIRST+72)
3331 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
3332 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
3333 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
3334 #define LVM_GETUNICODEFORMAT (CCM_GETUNICODEFORMAT)
3335 #define LVM_SETUNICODEFORMAT (CCM_SETUNICODEFORMAT)
3336 #define LVM_GETGROUPSTATE (LVM_FIRST + 92)
3337 #define LVM_GETFOCUSEDGROUP (LVM_FIRST + 93)
3338 #define LVM_GETGROUPRECT (LVM_FIRST + 98)
3339 #define LVM_SETSELECTEDCOLUMN (LVM_FIRST + 140)
3340 #define LVM_SETTILEWIDTH (LVM_FIRST + 141)
3341 #define LVM_SETVIEW (LVM_FIRST + 142)
3342 #define LVM_GETVIEW (LVM_FIRST + 143)
3343 #define LVM_INSERTGROUP (LVM_FIRST + 145)
3344 #define LVM_SETGROUPINFO (LVM_FIRST + 147)
3345 #define LVM_GETGROUPINFO (LVM_FIRST + 149)
3346 #define LVM_REMOVEGROUP (LVM_FIRST + 150)
3347 #define LVM_MOVEGROUP (LVM_FIRST + 151)
3348 #define LVM_GETGROUPCOUNT (LVM_FIRST + 152)
3349 #define LVM_GETGROUPINFOBYINDEX (LVM_FIRST + 153)
3350 #define LVM_MOVEITEMTOGROUP (LVM_FIRST + 154)
3351 #define LVM_SETGROUPMETRICS (LVM_FIRST + 155)
3352 #define LVM_GETGROUPMETRICS (LVM_FIRST + 156)
3353 #define LVM_ENABLEGROUPVIEW (LVM_FIRST + 157)
3354 #define LVM_SORTGROUPS (LVM_FIRST + 158)
3355 #define LVM_INSERTGROUPSORTED (LVM_FIRST + 159)
3356 #define LVM_REMOVEALLGROUPS (LVM_FIRST + 160)
3357 #define LVM_HASGROUP (LVM_FIRST + 161)
3358 #define LVM_SETTILEVIEWINFO (LVM_FIRST + 162)
3359 #define LVM_GETTILEVIEWINFO (LVM_FIRST + 163)
3360 #define LVM_SETTILEINFO (LVM_FIRST + 164)
3361 #define LVM_GETTILEINFO (LVM_FIRST + 165)
3362 #define LVM_SETINSERTMARK (LVM_FIRST + 166)
3363 #define LVM_GETINSERTMARK (LVM_FIRST + 167)
3364 #define LVM_INSERTMARKHITTEST (LVM_FIRST + 168)
3365 #define LVM_GETINSERTMARKRECT (LVM_FIRST + 169)
3366 #define LVM_SETINSERTMARKCOLOR (LVM_FIRST + 170)
3367 #define LVM_GETINSERTMARKCOLOR (LVM_FIRST + 171)
3368 #define LVM_SETINFOTIP (LVM_FIRST + 173)
3369 #define LVM_GETSELECTEDCOLUMN (LVM_FIRST + 174)
3370 #define LVM_ISGROUPVIEWENABLED (LVM_FIRST + 175)
3371 #define LVM_GETOUTLINECOLOR (LVM_FIRST + 176)
3372 #define LVM_SETOUTLINECOLOR (LVM_FIRST + 177)
3373 #define LVM_CANCELEDITLABEL (LVM_FIRST + 179)
3374 #define LVM_MAPINDEXTOID (LVM_FIRST + 180)
3375 #define LVM_MAPIDTOINDEX (LVM_FIRST + 181)
3376 #define LVM_ISITEMVISIBLE (LVM_FIRST + 182)
3377 #define LVM_GETEMPTYTEXT (LVM_FIRST + 204)
3378 #define LVM_GETFOOTERRECT (LVM_FIRST + 205)
3379 #define LVM_GETFOOTERINFO (LVM_FIRST + 206)
3380 #define LVM_GETFOOTERITEMRECT (LVM_FIRST + 207)
3381 #define LVM_GETFOOTERITEM (LVM_FIRST + 208)
3382 #define LVM_GETITEMINDEXRECT (LVM_FIRST + 209)
3383 #define LVM_SETITEMINDEXSTATE (LVM_FIRST + 210)
3384 #define LVM_GETNEXTITEMINDEX (LVM_FIRST + 211)
3386 #define LVN_FIRST (0U-100U)
3387 #define LVN_LAST (0U-199U)
3388 #define LVN_ITEMCHANGING (LVN_FIRST-0)
3389 #define LVN_ITEMCHANGED (LVN_FIRST-1)
3390 #define LVN_INSERTITEM (LVN_FIRST-2)
3391 #define LVN_DELETEITEM (LVN_FIRST-3)
3392 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
3393 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
3394 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
3395 #define LVN_BEGINLABELEDIT WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
3396 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
3397 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
3398 #define LVN_ENDLABELEDIT WINELIB_NAME_AW(LVN_ENDLABELEDIT)
3399 #define LVN_COLUMNCLICK (LVN_FIRST-8)
3400 #define LVN_BEGINDRAG (LVN_FIRST-9)
3401 #define LVN_BEGINRDRAG (LVN_FIRST-11)
3402 #define LVN_ODCACHEHINT (LVN_FIRST-13)
3403 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
3404 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
3405 #define LVN_HOTTRACK (LVN_FIRST-21)
3406 #define LVN_ODFINDITEMA (LVN_FIRST-52)
3407 #define LVN_ODFINDITEMW (LVN_FIRST-79)
3408 #define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
3409 #define LVN_GETDISPINFOA (LVN_FIRST-50)
3410 #define LVN_GETDISPINFOW (LVN_FIRST-77)
3411 #define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
3412 #define LVN_SETDISPINFOA (LVN_FIRST-51)
3413 #define LVN_SETDISPINFOW (LVN_FIRST-78)
3414 #define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
3415 #define LVN_KEYDOWN (LVN_FIRST-55)
3416 #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
3417 #define LVN_GETINFOTIPA (LVN_FIRST-57)
3418 #define LVN_GETINFOTIPW (LVN_FIRST-58)
3419 #define LVN_GETINFOTIP WINELIB_NAME_AW(LVN_GETINFOTIP)
3420 #define LVN_INCREMENTALSEARCHA (LVN_FIRST-62)
3421 #define LVN_INCREMENTALSEARCHW (LVN_FIRST-63)
3422 #define LVN_COLUMNDROPDOWN (LVN_FIRST-64)
3423 #define LVN_COLUMNOVERFLOWCLICK (LVN_FIRST-66)
3424 #define LVN_INCREMENTALSEARCH WINELIB_NAME_AW(LVN_INCREMENTALSEARCH)
3425 #define LVN_BEGINSCROLL (LVN_FIRST-80)
3426 #define LVN_ENDSCROLL (LVN_FIRST-81)
3427 #define LVN_LINKCLICK (LVN_FIRST-84)
3428 #define LVN_ASYNCDRAWN (LVN_FIRST-86)
3429 #define LVN_GETEMPTYMARKUP (LVN_FIRST-87)
3431 /* LVN_INCREMENTALSEARCH return codes */
3432 #define LVNSCH_DEFAULT -1
3433 #define LVNSCH_ERROR -2
3434 #define LVNSCH_IGNORE -3
3436 #define LVA_DEFAULT 0x0000
3437 #define LVA_ALIGNLEFT 0x0001
3438 #define LVA_ALIGNTOP 0x0002
3439 #define LVA_SNAPTOGRID 0x0005
3441 typedef struct tagLVITEMA
3443 UINT mask;
3444 INT iItem;
3445 INT iSubItem;
3446 UINT state;
3447 UINT stateMask;
3448 LPSTR pszText;
3449 INT cchTextMax;
3450 INT iImage;
3451 LPARAM lParam;
3452 /* (_WIN32_IE >= 0x0300) */
3453 INT iIndent;
3454 /* (_WIN32_IE >= 0x0560) */
3455 INT iGroupId;
3456 UINT cColumns;
3457 PUINT puColumns;
3458 /* (_WIN32_WINNT >= 0x0600) */
3459 PINT piColFmt;
3460 INT iGroup;
3461 } LVITEMA, *LPLVITEMA;
3463 typedef struct tagLVITEMW
3465 UINT mask;
3466 INT iItem;
3467 INT iSubItem;
3468 UINT state;
3469 UINT stateMask;
3470 LPWSTR pszText;
3471 INT cchTextMax;
3472 INT iImage;
3473 LPARAM lParam;
3474 /* (_WIN32_IE >= 0x0300) */
3475 INT iIndent;
3476 /* (_WIN32_IE >= 0x0560) */
3477 INT iGroupId;
3478 UINT cColumns;
3479 PUINT puColumns;
3480 /* (_WIN32_WINNT >= 0x0600) */
3481 PINT piColFmt;
3482 INT iGroup;
3483 } LVITEMW, *LPLVITEMW;
3485 #define LVITEM WINELIB_NAME_AW(LVITEM)
3486 #define LPLVITEM WINELIB_NAME_AW(LPLVITEM)
3488 #define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
3489 #define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
3490 #define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
3492 #define LVITEMA_V5_SIZE CCSIZEOF_STRUCT(LVITEMA, puColumns)
3493 #define LVITEMW_V5_SIZE CCSIZEOF_STRUCT(LVITEMW, puColumns)
3494 #define LVITEM_V5_SIZE WINELIB_NAME_AW(LVITEM_V5_SIZE)
3496 #define LV_ITEM LVITEM
3497 #define LV_ITEMA LVITEMA
3498 #define LV_ITEMW LVITEMW
3500 typedef struct LVSETINFOTIP
3502 UINT cbSize;
3503 DWORD dwFlags;
3504 LPWSTR pszText;
3505 int iItem;
3506 int iSubItem;
3507 } LVSETINFOTIP, *PLVSETINFOTIP;
3509 /* ListView background image structs and constants
3510 For _WIN32_IE version 0x400 and later. */
3512 typedef struct tagLVBKIMAGEA
3514 ULONG ulFlags;
3515 HBITMAP hbm;
3516 LPSTR pszImage;
3517 UINT cchImageMax;
3518 int xOffsetPercent;
3519 int yOffsetPercent;
3520 } LVBKIMAGEA, *LPLVBKIMAGEA;
3522 typedef struct tagLVBKIMAGEW
3524 ULONG ulFlags;
3525 HBITMAP hbm;
3526 LPWSTR pszImage;
3527 UINT cchImageMax;
3528 int xOffsetPercent;
3529 int yOffsetPercent;
3530 } LVBKIMAGEW, *LPLVBKIMAGEW;
3532 #define LVBKIMAGE WINELIB_NAME_AW(LVBKIMAGE)
3533 #define LPLVBKIMAGE WINELIB_NAME_AW(LPLVBKIMAGE)
3535 #define LVBKIF_SOURCE_NONE 0x00000000
3536 #define LVBKIF_SOURCE_HBITMAP 0x00000001
3537 #define LVBKIF_SOURCE_URL 0x00000002
3538 #define LVBKIF_SOURCE_MASK 0x00000003
3539 #define LVBKIF_STYLE_NORMAL 0x00000000
3540 #define LVBKIF_STYLE_TILE 0x00000010
3541 #define LVBKIF_STYLE_MASK 0x00000010
3542 #define LVBKIF_FLAG_TILEOFFSET 0x00000100
3543 #define LVBKIF_TYPE_WATERMARK 0x10000000
3544 #define LVBKIF_FLAG_ALPHABLEND 0x20000000
3546 #define ListView_SetBkImage(hwnd, plvbki) \
3547 (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)plvbki)
3549 #define ListView_GetBkImage(hwnd, plvbki) \
3550 (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)plvbki)
3552 typedef struct tagLVCOLUMNA
3554 UINT mask;
3555 INT fmt;
3556 INT cx;
3557 LPSTR pszText;
3558 INT cchTextMax;
3559 INT iSubItem;
3560 /* (_WIN32_IE >= 0x0300) */
3561 INT iImage;
3562 INT iOrder;
3563 /* (_WIN32_WINNT >= 0x0600) */
3564 INT cxMin;
3565 INT cxDefault;
3566 INT cxIdeal;
3567 } LVCOLUMNA, *LPLVCOLUMNA;
3569 typedef struct tagLVCOLUMNW
3571 UINT mask;
3572 INT fmt;
3573 INT cx;
3574 LPWSTR pszText;
3575 INT cchTextMax;
3576 INT iSubItem;
3577 /* (_WIN32_IE >= 0x0300) */
3578 INT iImage;
3579 INT iOrder;
3580 /* (_WIN32_WINNT >= 0x0600) */
3581 INT cxMin;
3582 INT cxDefault;
3583 INT cxIdeal;
3584 } LVCOLUMNW, *LPLVCOLUMNW;
3586 #define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
3587 #define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)
3589 #define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
3590 #define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
3591 #define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)
3593 #define LV_COLUMN LVCOLUMN
3596 typedef struct tagNMLISTVIEW
3598 NMHDR hdr;
3599 INT iItem;
3600 INT iSubItem;
3601 UINT uNewState;
3602 UINT uOldState;
3603 UINT uChanged;
3604 POINT ptAction;
3605 LPARAM lParam;
3606 } NMLISTVIEW, *LPNMLISTVIEW;
3608 #define NM_LISTVIEW NMLISTVIEW
3609 #define LPNM_LISTVIEW LPNMLISTVIEW
3611 typedef struct tagNMITEMACTIVATE
3613 NMHDR hdr;
3614 int iItem;
3615 int iSubItem;
3616 UINT uNewState;
3617 UINT uOldState;
3618 UINT uChanged;
3619 POINT ptAction;
3620 LPARAM lParam;
3621 UINT uKeyFlags;
3622 } NMITEMACTIVATE, *LPNMITEMACTIVATE;
3624 #define LVKF_ALT 0x0001
3625 #define LVKF_CONTROL 0x0002
3626 #define LVKF_SHIFT 0x0004
3628 typedef struct tagLVDISPINFO
3630 NMHDR hdr;
3631 LVITEMA item;
3632 } NMLVDISPINFOA, *LPNMLVDISPINFOA;
3634 typedef struct tagLVDISPINFOW
3636 NMHDR hdr;
3637 LVITEMW item;
3638 } NMLVDISPINFOW, *LPNMLVDISPINFOW;
3640 #define NMLVDISPINFO WINELIB_NAME_AW(NMLVDISPINFO)
3641 #define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
3643 #define LV_DISPINFO NMLVDISPINFO
3644 #define LV_DISPINFOA NMLVDISPINFOA
3645 #define LV_DISPINFOW NMLVDISPINFOW
3647 #include <pshpack1.h>
3648 typedef struct tagLVKEYDOWN
3650 NMHDR hdr;
3651 WORD wVKey;
3652 UINT flags;
3653 } NMLVKEYDOWN, *LPNMLVKEYDOWN;
3654 #include <poppack.h>
3656 #define LV_KEYDOWN NMLVKEYDOWN
3658 typedef struct tagNMLVGETINFOTIPA
3660 NMHDR hdr;
3661 DWORD dwFlags;
3662 LPSTR pszText;
3663 int cchTextMax;
3664 int iItem;
3665 int iSubItem;
3666 LPARAM lParam;
3667 } NMLVGETINFOTIPA, *LPNMLVGETINFOTIPA;
3669 typedef struct tagNMLVGETINFOTIPW
3671 NMHDR hdr;
3672 DWORD dwFlags;
3673 LPWSTR pszText;
3674 int cchTextMax;
3675 int iItem;
3676 int iSubItem;
3677 LPARAM lParam;
3678 } NMLVGETINFOTIPW, *LPNMLVGETINFOTIPW;
3680 #define NMLVGETINFOTIP WINELIB_NAME_AW(NMLVGETINFOTIP)
3681 #define LPNMLVGETINFOTIP WINELIB_NAME_AW(LPNMLVGETINFOTIP)
3683 typedef struct tagLVHITTESTINFO
3685 POINT pt;
3686 UINT flags;
3687 INT iItem;
3688 INT iSubItem;
3689 /* (_WIN32_WINNT >= 0x0600) */
3690 INT iGroup;
3691 } LVHITTESTINFO, *LPLVHITTESTINFO;
3693 #define LV_HITTESTINFO LVHITTESTINFO
3694 #define _LV_HITTESTINFO tagLVHITTESTINFO
3695 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
3697 typedef struct tagLVFINDINFOA
3699 UINT flags;
3700 LPCSTR psz;
3701 LPARAM lParam;
3702 POINT pt;
3703 UINT vkDirection;
3704 } LVFINDINFOA, *LPLVFINDINFOA;
3706 typedef struct tagLVFINDINFOW
3708 UINT flags;
3709 LPCWSTR psz;
3710 LPARAM lParam;
3711 POINT pt;
3712 UINT vkDirection;
3713 } LVFINDINFOW, *LPLVFINDINFOW;
3715 #define LVFINDINFO WINELIB_NAME_AW(LVFINDINFO)
3716 #define LPLVFINDINFO WINELIB_NAME_AW(LPLVFINDINFO)
3718 #define LV_FINDINFO LVFINDINFO
3719 #define LV_FINDINFOA LVFINDINFOA
3720 #define LV_FINDINFOW LVFINDINFOW
3722 /* Groups relates structures */
3724 typedef struct LVGROUP
3726 UINT cbSize;
3727 UINT mask;
3728 LPWSTR pszHeader;
3729 INT cchHeader;
3730 LPWSTR pszFooter;
3731 INT cchFooter;
3732 INT iGroupId;
3733 UINT stateMask;
3734 UINT state;
3735 UINT uAlign;
3736 /* (_WIN32_WINNT >= 0x0600) */
3737 LPWSTR pszSubtitle;
3738 UINT cchSubtitle;
3739 LPWSTR pszTask;
3740 UINT cchTask;
3741 LPWSTR pszDescriptionTop;
3742 UINT cchDescriptionTop;
3743 LPWSTR pszDescriptionBottom;
3744 UINT cchDescriptionBottom;
3745 INT iTitleImage;
3746 INT iExtendedImage;
3747 INT iFirstItem;
3748 UINT cItems;
3749 LPWSTR pszSubsetTitle;
3750 UINT cchSubsetTitle;
3751 } LVGROUP, *PLVGROUP;
3753 #define LVGROUP_V5_SIZE CCSIZEOF_STRUCT(LVGROUP, uAlign)
3755 typedef struct LVGROUPMETRICS
3757 UINT cbSize;
3758 UINT mask;
3759 UINT Left;
3760 UINT Top;
3761 UINT Right;
3762 UINT Bottom;
3763 COLORREF crLeft;
3764 COLORREF crTop;
3765 COLORREF crRight;
3766 COLORREF crBottom;
3767 COLORREF crRightHeader;
3768 COLORREF crFooter;
3769 } LVGROUPMETRICS, *PLVGROUPMETRICS;
3771 typedef INT (*PFNLVGROUPCOMPARE)(INT, INT, VOID*);
3773 typedef struct LVINSERTGROUPSORTED
3775 PFNLVGROUPCOMPARE pfnGroupCompare;
3776 LPVOID *pvData;
3777 LVGROUP lvGroup;
3778 } LVINSERTGROUPSORTED, *PLVINSERTGROUPSORTED;
3780 /* Tile related structures */
3782 typedef struct LVTILEINFO
3784 UINT cbSize;
3785 int iItem;
3786 UINT cColumns;
3787 PUINT puColumns;
3788 /* (_WIN32_WINNT >= 0x0600) */
3789 int* piColFmt;
3790 } LVTILEINFO, *PLVTILEINFO;
3792 typedef struct LVTILEVIEWINFO
3794 UINT cbSize;
3795 DWORD dwMask;
3796 DWORD dwFlags;
3797 SIZE sizeTile;
3798 int cLines;
3799 RECT rcLabelMargin;
3800 } LVTILEVIEWINFO, *PLVTILEVIEWINFO;
3802 typedef struct LVINSERTMARK
3804 UINT cbSize;
3805 DWORD dwFlags;
3806 int iItem;
3807 DWORD dwReserved;
3808 } LVINSERTMARK, *LPLVINSERTMARK;
3810 typedef struct tagTCHITTESTINFO
3812 POINT pt;
3813 UINT flags;
3814 } TCHITTESTINFO, *LPTCHITTESTINFO;
3816 #define TC_HITTESTINFO TCHITTESTINFO
3818 typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
3820 #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLCUSTOMDRW, clrTextBk)
3822 typedef struct tagNMLVCUSTOMDRAW
3824 NMCUSTOMDRAW nmcd;
3825 COLORREF clrText;
3826 COLORREF clrTextBk;
3827 int iSubItem; /* (_WIN32_IE >= 0x0400) */
3828 DWORD dwItemType; /* (_WIN32_IE >= 0x560) */
3829 COLORREF clrFace; /* (_WIN32_IE >= 0x560) */
3830 int iIconEffect; /* (_WIN32_IE >= 0x560) */
3831 int iIconPhase; /* (_WIN32_IE >= 0x560) */
3832 int iPartId; /* (_WIN32_IE >= 0x560) */
3833 int iStateId; /* (_WIN32_IE >= 0x560) */
3834 RECT rcText; /* (_WIN32_IE >= 0x560) */
3835 UINT uAlign; /* (_WIN32_IE >= 0x560) */
3836 } NMLVCUSTOMDRAW, *LPNMLVCUSTOMDRAW;
3838 typedef struct tagNMLVCACHEHINT
3840 NMHDR hdr;
3841 INT iFrom;
3842 INT iTo;
3843 } NMLVCACHEHINT, *LPNMLVCACHEHINT;
3845 #define LPNM_CACHEHINT LPNMLVCACHEHINT
3846 #define PNM_CACHEHINT LPNMLVCACHEHINT
3847 #define NM_CACHEHINT NMLVCACHEHINT
3849 typedef struct tagNMLVFINDITEMA
3851 NMHDR hdr;
3852 int iStart;
3853 LVFINDINFOA lvfi;
3854 } NMLVFINDITEMA, *LPNMLVFINDITEMA;
3856 typedef struct tagNMLVFINDITEMW
3858 NMHDR hdr;
3859 int iStart;
3860 LVFINDINFOW lvfi;
3861 } NMLVFINDITEMW, *LPNMLVFINDITEMW;
3863 #define NMLVFINDITEM WINELIB_NAME_AW(NMLVFINDITEM)
3864 #define LPNMLVFINDITEM WINELIB_NAME_AW(LPNMLVFINDITEM)
3865 #define NM_FINDITEM NMLVFINDITEM
3866 #define LPNM_FINDITEM LPNMLVFINDITEM
3867 #define PNM_FINDITEM LPNMLVFINDITEM
3869 typedef struct tagNMLVODSTATECHANGE
3871 NMHDR hdr;
3872 int iFrom;
3873 int iTo;
3874 UINT uNewState;
3875 UINT uOldState;
3876 } NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;
3878 #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3879 #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3880 #define NM_ODSTATECHANGE NMLVODSTATECHANGE
3882 typedef struct NMLVSCROLL
3884 NMHDR hdr;
3885 int dx;
3886 int dy;
3887 } NMLVSCROLL, *LPNMLVSCROLL;
3889 typedef struct tagLVITEMINDEX
3891 int iItem;
3892 int iGroup;
3893 } LVITEMINDEX, *PLVITEMINDEX;
3895 #define LVGGR_GROUP 0
3896 #define LVGGR_HEADER 1
3897 #define LVGGR_LABEL 2
3898 #define LVGGR_SUBSETLINK 3
3900 #define ListView_SetItemCount(hwnd,count) \
3901 (BOOL)SNDMSG((hwnd),LVM_SETITEMCOUNT,(WPARAM)(INT)(count),0)
3902 #define ListView_SetTextBkColor(hwnd,clrBk) \
3903 (BOOL)SNDMSG((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3904 #define ListView_SetTextColor(hwnd,clrBk) \
3905 (BOOL)SNDMSG((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3906 #define ListView_DeleteColumn(hwnd,col)\
3907 (LRESULT)SNDMSG((hwnd),LVM_DELETECOLUMN,0,(LPARAM)(INT)(col))
3908 #define ListView_GetColumnA(hwnd,x,col)\
3909 (LRESULT)SNDMSGA((hwnd),LVM_GETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3910 #define ListView_GetColumnW(hwnd,x,col)\
3911 (LRESULT)SNDMSGW((hwnd),LVM_GETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3912 #define ListView_GetColumn WINELIB_NAME_AW(ListView_GetColumn)
3913 #define ListView_SetColumnA(hwnd,x,col)\
3914 (LRESULT)SNDMSGA((hwnd),LVM_SETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3915 #define ListView_SetColumnW(hwnd,x,col)\
3916 (LRESULT)SNDMSGW((hwnd),LVM_SETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3917 #define ListView_SetColumn WINELIB_NAME_AW(ListView_SetColumn)
3918 #define ListView_GetColumnWidth(hwnd,x)\
3919 (INT)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(INT)(x), 0)
3920 #define ListView_SetColumnWidth(hwnd,x,width)\
3921 (BOOL)SNDMSG((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(INT)(x),(LPARAM)(MAKELPARAM(width,0)))
3924 #define ListView_GetNextItem(hwnd,nItem,flags) \
3925 (INT)SNDMSG((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
3926 #define ListView_FindItemA(hwnd,nItem,plvfi) \
3927 (INT)SNDMSGA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOA*)(plvfi))
3928 #define ListView_FindItemW(hwnd,nItem,plvfi) \
3929 (INT)SNDMSGW((hwnd),LVM_FINDITEMW,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOW*)(plvfi))
3930 #define ListView_FindItem WINELIB_NAME_AW(ListView_FindItem)
3932 #define ListView_Arrange(hwnd,code) \
3933 (INT)SNDMSG((hwnd), LVM_ARRANGE, (WPARAM)(INT)(code), 0)
3934 #define ListView_GetItemPosition(hwnd,i,ppt) \
3935 (INT)SNDMSG((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
3936 #define ListView_GetItemRect(hwnd,i,prc,code) \
3937 (BOOL)SNDMSG((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
3938 ((prc) ? (((RECT*)(prc))->left = (code),(LPARAM)(RECT \
3939 *)(prc)) : (LPARAM)(RECT*)NULL))
3940 #define ListView_SetItemA(hwnd,pitem) \
3941 (INT)SNDMSGA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3942 #define ListView_SetItemW(hwnd,pitem) \
3943 (INT)SNDMSGW((hwnd),LVM_SETITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3944 #define ListView_SetItem WINELIB_NAME_AW(ListView_SetItem)
3945 #define ListView_SetItemState(hwnd,i,data,dataMask) \
3946 { LVITEM _LVi; _LVi.state = data; _LVi.stateMask = dataMask;\
3947 SNDMSG(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEM)&_LVi);}
3948 #define ListView_GetItemState(hwnd,i,mask) \
3949 (UINT)SNDMSG((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
3950 #define ListView_SetCheckState(hwndLV, i, bCheck) \
3951 { LVITEM _LVi; _LVi.state = INDEXTOSTATEIMAGEMASK((bCheck)?2:1); _LVi.stateMask = LVIS_STATEIMAGEMASK; \
3952 SNDMSG(hwndLV, LVM_SETITEMSTATE, (WPARAM)(UINT)(i), (LPARAM)(LPLVITEM)&_LVi);}
3953 #define ListView_GetCheckState(hwndLV, i) \
3954 (((UINT)SNDMSG((hwndLV), LVM_GETITEMSTATE, (i), LVIS_STATEIMAGEMASK) >> 12) - 1)
3955 #define ListView_GetCountPerPage(hwnd) \
3956 (BOOL)SNDMSG((hwnd), LVM_GETCOUNTPERPAGE, 0, 0)
3957 #define ListView_GetImageList(hwnd,iImageList) \
3958 (HIMAGELIST)SNDMSG((hwnd), LVM_GETIMAGELIST, (WPARAM)(INT)(iImageList), 0)
3959 #define ListView_GetStringWidthA(hwnd,pstr) \
3960 (INT)SNDMSGA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
3961 #define ListView_GetStringWidthW(hwnd,pstr) \
3962 (INT)SNDMSGW((hwnd),LVM_GETSTRINGWIDTHW,0,(LPARAM)(LPCWSTR)(pstr))
3963 #define ListView_GetStringWidth WINELIB_NAME_AW(ListView_GetStringWidth)
3964 #define ListView_GetTopIndex(hwnd) \
3965 (BOOL)SNDMSG((hwnd), LVM_GETTOPINDEX, 0, 0)
3966 #define ListView_Scroll(hwnd,dx,dy) \
3967 (BOOL)SNDMSG((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
3968 #define ListView_EnsureVisible(hwnd,i,fPartialOk) \
3969 (BOOL)SNDMSG((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
3970 #define ListView_SetBkColor(hwnd,clrBk) \
3971 (BOOL)SNDMSG((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3972 #define ListView_SetImageList(hwnd,himl,iImageList) \
3973 (HIMAGELIST)SNDMSG((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(HIMAGELIST)(himl))
3974 #define ListView_GetItemCount(hwnd) \
3975 (INT)SNDMSG((hwnd), LVM_GETITEMCOUNT, 0, 0)
3976 #define ListView_RedrawItems(hwnd,first,last) \
3977 (BOOL)SNDMSG((hwnd),LVM_REDRAWITEMS,(WPARAM)(INT)(first),(LPARAM)(INT)(last))
3978 #define ListView_GetEditControl(hwnd) \
3979 (HWND)SNDMSG((hwnd), LVM_GETEDITCONTROL, 0, 0)
3980 #define ListView_GetTextColor(hwnd) \
3981 (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0)
3982 #define ListView_GetTextBkColor(hwnd) \
3983 (COLORREF)SNDMSG((hwnd), LVM_GETTEXTBKCOLOR, 0, 0)
3984 #define ListView_GetBkColor(hwnd) \
3985 (COLORREF)SNDMSG((hwnd), LVM_GETBKCOLOR, 0, 0)
3986 #define ListView_GetItemA(hwnd,pitem) \
3987 (BOOL)SNDMSGA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
3988 #define ListView_GetItemW(hwnd,pitem) \
3989 (BOOL)SNDMSGW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
3990 #define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
3991 #define ListView_GetOrigin(hwnd,ppt) \
3992 (BOOL)SNDMSG((hwnd),LVM_GETORIGIN,0,(LPARAM)(POINT *)(ppt))
3994 #define ListView_HitTest(hwnd,pinfo) \
3995 (INT)SNDMSG((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
3997 #define ListView_InsertItemA(hwnd,pitem) \
3998 (INT)SNDMSGA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3999 #define ListView_InsertItemW(hwnd,pitem) \
4000 (INT)SNDMSGW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
4001 #define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
4003 #define ListView_DeleteAllItems(hwnd) \
4004 (BOOL)SNDMSG((hwnd), LVM_DELETEALLITEMS, 0, 0)
4006 #define ListView_InsertColumnA(hwnd,iCol,pcol) \
4007 (INT)SNDMSGA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
4008 #define ListView_InsertColumnW(hwnd,iCol,pcol) \
4009 (INT)SNDMSGW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
4010 #define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
4012 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
4013 (BOOL)SNDMSG((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
4014 #define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm) \
4015 (BOOL)SNDMSG((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
4017 #define ListView_SetItemPosition(hwndLV, i, x, y) \
4018 (BOOL)SNDMSG((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
4019 #define ListView_GetSelectedCount(hwndLV) \
4020 (UINT)SNDMSG((hwndLV), LVM_GETSELECTEDCOUNT, 0, 0)
4022 #define ListView_EditLabelA(hwndLV, i) \
4023 (HWND)SNDMSG((hwndLV), LVM_EDITLABELA, (WPARAM)(int)(i), 0)
4024 #define ListView_EditLabelW(hwndLV, i) \
4025 (HWND)SNDMSG((hwndLV), LVM_EDITLABELW, (WPARAM)(int)(i), 0)
4026 #define ListView_EditLabel WINELIB_NAME_AW(ListView_EditLabel)
4028 #define ListView_GetItemTextA(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
4030 LVITEMA _LVi;\
4031 _LVi.iSubItem = _iSubItem;\
4032 _LVi.cchTextMax = _cchTextMax;\
4033 _LVi.pszText = _pszText;\
4034 SNDMSGA(hwndLV, LVM_GETITEMTEXTA, (WPARAM)(i), (LPARAM)&_LVi);\
4036 #define ListView_GetItemTextW(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
4038 LVITEMW _LVi;\
4039 _LVi.iSubItem = _iSubItem;\
4040 _LVi.cchTextMax = _cchTextMax;\
4041 _LVi.pszText = _pszText;\
4042 SNDMSGW(hwndLV, LVM_GETITEMTEXTW, (WPARAM)(i), (LPARAM)&_LVi);\
4044 #define ListView_GetItemText WINELIB_NAME_AW(ListView_GetItemText)
4045 #define ListView_SetItemPosition32(hwnd,n,x1,y1) \
4046 { POINT ptNewPos; ptNewPos.x = (x1); ptNewPos.y = (y1); SNDMSG((hwnd), LVM_SETITEMPOSITION32, (WPARAM)(int)(n), (LPARAM)&ptNewPos); }
4047 #define ListView_SetItemTextA(hwndLV, i, _iSubItem, _pszText) \
4048 { LVITEMA _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
4049 SNDMSGA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}
4050 #define ListView_SetItemTextW(hwndLV, i, _iSubItem, _pszText) \
4051 { LVITEMW _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
4052 SNDMSGW(hwndLV, LVM_SETITEMTEXTW, (WPARAM)i, (LPARAM) (LVITEMW*)& _LVi);}
4053 #define ListView_SetItemText WINELIB_NAME_AW(ListView_SetItemText)
4055 #define ListView_DeleteItem(hwndLV, i) \
4056 (BOOL)SNDMSG(hwndLV, LVM_DELETEITEM, (WPARAM)(int)(i), 0)
4057 #define ListView_Update(hwndLV, i) \
4058 (BOOL)SNDMSG((hwndLV), LVM_UPDATE, (WPARAM)(i), 0)
4059 #define ListView_GetColumnOrderArray(hwndLV, iCount, pi) \
4060 (BOOL)SNDMSG((hwndLV), LVM_GETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
4061 #define ListView_GetExtendedListViewStyle(hwndLV) \
4062 (DWORD)SNDMSG((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
4063 #define ListView_GetHotCursor(hwndLV) \
4064 (HCURSOR)SNDMSG((hwndLV), LVM_GETHOTCURSOR, 0, 0)
4065 #define ListView_GetHotItem(hwndLV) \
4066 (int)SNDMSG((hwndLV), LVM_GETHOTITEM, 0, 0)
4067 #define ListView_GetItemSpacing(hwndLV, fSmall) \
4068 (DWORD)SNDMSG((hwndLV), LVM_GETITEMSPACING, (WPARAM)fSmall, 0)
4069 #define ListView_GetSubItemRect(hwndLV, iItem, iSubItem, code, prc) \
4070 (BOOL)SNDMSG((hwndLV), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
4071 ((prc) ? ((((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code), (LPARAM)(prc)) : 0))
4072 #define ListView_GetToolTips(hwndLV) \
4073 (HWND)SNDMSG((hwndLV), LVM_GETTOOLTIPS, 0, 0)
4074 #define ListView_SetColumnOrderArray(hwndLV, iCount, pi) \
4075 (BOOL)SNDMSG((hwndLV), LVM_SETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
4076 #define ListView_SetExtendedListViewStyle(hwndLV, dw) \
4077 (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dw)
4078 #define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw) \
4079 (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)dwMask, (LPARAM)dw)
4080 #define ListView_SetHotCursor(hwndLV, hcur) \
4081 (HCURSOR)SNDMSG((hwndLV), LVM_SETHOTCURSOR, 0, (LPARAM)hcur)
4082 #define ListView_SetHotItem(hwndLV, i) \
4083 (int)SNDMSG((hwndLV), LVM_SETHOTITEM, (WPARAM)i, 0)
4084 #define ListView_SetIconSpacing(hwndLV, cx, cy) \
4085 (DWORD)SNDMSG((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
4086 #define ListView_SetToolTips(hwndLV, hwndNewHwnd) \
4087 (HWND)SNDMSG((hwndLV), LVM_SETTOOLTIPS, (WPARAM)hwndNewHwnd, 0)
4088 #define ListView_SubItemHitTest(hwndLV, plvhti) \
4089 (int)SNDMSG((hwndLV), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
4090 #define ListView_GetSelectionMark(hwndLV) \
4091 (int)SNDMSG((hwndLV), LVM_GETSELECTIONMARK, 0, 0)
4092 #define ListView_SetSelectionMark(hwndLV, iItem) \
4093 (int)SNDMSG((hwndLV), LVM_SETSELECTIONMARK, 0, (LPARAM)(iItem))
4094 #define ListView_GetViewRect(hwndLV, prc) \
4095 (BOOL)SNDMSG((hwndLV),LVM_GETVIEWRECT,0,(LPARAM)(LPRECT)(prc))
4096 #define ListView_GetHeader(hwndLV) \
4097 (HWND)SNDMSG((hwndLV), LVM_GETHEADER, 0, 0)
4098 #define ListView_SetSelectedColumn(hwnd, iCol) \
4099 SNDMSG((hwnd), LVM_SETSELECTEDCOLUMN, (WPARAM)iCol, 0)
4100 #define ListView_SetTileWidth(hwnd, cpWidth) \
4101 SNDMSG((hwnd), LVM_SETTILEWIDTH, (WPARAM)cpWidth, 0)
4102 #define ListView_SetView(hwnd, iView) \
4103 (DWORD)SNDMSG((hwnd), LVM_SETVIEW, (WPARAM)(DWORD)iView, 0)
4104 #define ListView_GetView(hwnd) \
4105 (DWORD)SNDMSG((hwnd), LVM_GETVIEW, 0, 0)
4106 #define ListView_InsertGroup(hwnd, index, pgrp) \
4107 SNDMSG((hwnd), LVM_INSERTGROUP, (WPARAM)index, (LPARAM)pgrp)
4108 #define ListView_SetGroupHeaderImageList(hwnd, himl) \
4109 SNDMSG((hwnd), LVM_SETIMAGELIST, (WPARAM)LVSIL_GROUPHEADER, (LPARAM)himl)
4110 #define ListView_GetGroupHeaderImageList(hwnd) \
4111 SNDMSG((hwnd), LVM_GETIMAGELIST, (WPARAM)LVSIL_GROUPHEADER, 0)
4112 #define ListView_SetGroupInfo(hwnd, iGroupId, pgrp) \
4113 SNDMSG((hwnd), LVM_SETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
4114 #define ListView_GetGroupInfo(hwnd, iGroupId, pgrp) \
4115 SNDMSG((hwnd), LVM_GETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
4116 #define ListView_RemoveGroup(hwnd, iGroupId) \
4117 SNDMSG((hwnd), LVM_REMOVEGROUP, (WPARAM)iGroupId, 0)
4118 #define ListView_MoveGroup(hwnd, iGroupId, toIndex) \
4119 SNDMSG((hwnd), LVM_MOVEGROUP, (WPARAM)iGroupId, (LPARAM)toIndex)
4120 #define ListView_MoveItemToGroup(hwnd, idItemFrom, idGroupTo) \
4121 SNDMSG((hwnd), LVM_MOVEITEMTOGROUP, (WPARAM)idItemFrom, (LPARAM)idGroupTo)
4122 #define ListView_SetGroupMetrics(hwnd, pGroupMetrics) \
4123 SNDMSG((hwnd), LVM_SETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
4124 #define ListView_GetGroupMetrics(hwnd, pGroupMetrics) \
4125 SNDMSG((hwnd), LVM_GETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
4126 #define ListView_EnableGroupView(hwnd, fEnable) \
4127 SNDMSG((hwnd), LVM_ENABLEGROUPVIEW, (WPARAM)fEnable, 0)
4128 #define ListView_SortGroups(hwnd, _pfnGroupCompate, _plv) \
4129 SNDMSG((hwnd), LVM_SORTGROUPS, (WPARAM)_pfnGroupCompate, (LPARAM)_plv)
4130 #define ListView_InsertGroupSorted(hwnd, structInsert) \
4131 SNDMSG((hwnd), LVM_INSERTGROUPSORTED, (WPARAM)structInsert, 0)
4132 #define ListView_RemoveAllGroups(hwnd) \
4133 SNDMSG((hwnd), LVM_REMOVEALLGROUPS, 0, 0)
4134 #define ListView_HasGroup(hwnd, dwGroupId) \
4135 SNDMSG((hwnd), LVM_HASGROUP, dwGroupId, 0)
4136 #define ListView_SetTileViewInfo(hwnd, ptvi) \
4137 SNDMSG((hwnd), LVM_SETTILEVIEWINFO, 0, (LPARAM)ptvi)
4138 #define ListView_GetTileViewInfo(hwnd, ptvi) \
4139 SNDMSG((hwnd), LVM_GETTILEVIEWINFO, 0, (LPARAM)ptvi)
4140 #define ListView_SetTileInfo(hwnd, pti) \
4141 SNDMSG((hwnd), LVM_SETTILEINFO, 0, (LPARAM)pti)
4142 #define ListView_GetTileInfo(hwnd, pti) \
4143 SNDMSG((hwnd), LVM_GETTILEINFO, 0, (LPARAM)pti)
4144 #define ListView_SetInsertMark(hwnd, lvim) \
4145 (BOOL)SNDMSG((hwnd), LVM_SETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
4146 #define ListView_GetInsertMark(hwnd, lvim) \
4147 (BOOL)SNDMSG((hwnd), LVM_GETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
4148 #define ListView_InsertMarkHitTest(hwnd, point, lvim) \
4149 (int)SNDMSG((hwnd), LVM_INSERTMARKHITTEST, (WPARAM)(LPPOINT)(point), (LPARAM)(LPLVINSERTMARK)(lvim))
4150 #define ListView_GetInsertMarkRect(hwnd, rc) \
4151 (int)SNDMSG((hwnd), LVM_GETINSERTMARKRECT, (WPARAM)0, (LPARAM)(LPRECT)(rc))
4152 #define ListView_SetInsertMarkColor(hwnd, color) \
4153 (COLORREF)SNDMSG((hwnd), LVM_SETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
4154 #define ListView_GetInsertMarkColor(hwnd) \
4155 (COLORREF)SNDMSG((hwnd), LVM_GETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)0)
4156 #define ListView_SetInfoTip(hwndLV, plvInfoTip)\
4157 (BOOL)SNDMSG((hwndLV), LVM_SETINFOTIP, (WPARAM)0, (LPARAM)plvInfoTip)
4158 #define ListView_GetSelectedColumn(hwnd) \
4159 (UINT)SNDMSG((hwnd), LVM_GETSELECTEDCOLUMN, 0, 0)
4160 #define ListView_IsGroupViewEnabled(hwnd) \
4161 (BOOL)SNDMSG((hwnd), LVM_ISGROUPVIEWENABLED, 0, 0)
4162 #define ListView_GetOutlineColor(hwnd) \
4163 (COLORREF)SNDMSG((hwnd), LVM_GETOUTLINECOLOR, 0, 0)
4164 #define ListView_SetOutlineColor(hwnd, color) \
4165 (COLORREF)SNDMSG((hwnd), LVM_SETOUTLINECOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
4166 #define ListView_CancelEditLabel(hwnd) \
4167 (VOID)SNDMSG((hwnd), LVM_CANCELEDITLABEL, (WPARAM)0, (LPARAM)0)
4168 #define ListView_MapIndexToID(hwnd, index) \
4169 (UINT)SNDMSG((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, (LPARAM)0)
4170 #define ListView_MapIDToIndex(hwnd, id) \
4171 (UINT)SNDMSG((hwnd), LVM_MAPIDTOINDEX, (WPARAM)id, (LPARAM)0)
4172 #define ListView_SetUnicodeFormat(hwnd, fUnicode) \
4173 (BOOL)SNDMSG((hwnd), LVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
4174 #define ListView_GetUnicodeFormat(hwnd) \
4175 (BOOL)SNDMSG((hwnd), LVM_GETUNICODEFORMAT, 0, 0)
4176 #define ListView_GetGroupInfoByIndex(hwnd, index, grp) \
4177 SNDMSG((hwnd), LVM_GETGROUPINFOBYINDEX, (WPARAM)(index), (LPARAM)(grp))
4178 #define ListView_SetGroupState(hwnd, group, masks, states) \
4179 { LVGROUP level; level.cbSize = sizeof(level); level.mask = LVGF_STATE; \
4180 level.stateMask = masks; level.state = states; \
4181 SNDMSG((hwnd), LVM_SETGROUPINFO, (WPARAM)(group), (LPARAM)(LVGROUP *)&level); }
4182 #define ListView_IsItemVisible(hwnd, index) \
4183 (UINT)SNDMSG((hwnd), LVM_ISITEMVISIBLE, (WPARAM)(index), (LPARAM)0)
4184 #define ListView_GetGroupState(hwnd, group, mask) \
4185 (UINT)SNDMSG((hwnd), LVM_GETGROUPSTATE, (WPARAM)(group), (LPARAM)(mask))
4186 #define ListView_GetFocusedGroup(hwnd) \
4187 SNDMSG((hwnd), LVM_GETFOCUSEDGROUP, 0, 0)
4188 #define ListView_GetGroupRect(hwnd, group, type, rc) \
4189 SNDMSG((hwnd), LVM_GETGROUPRECT, (WPARAM)(group), \
4190 ((rc) ? (((RECT*)(rc))->top = type), (LPARAM)(RECT*)(rc) : (LPARAM)(RECT*)NULL))
4191 #define ListView_GetGroupCount(hwnd) \
4192 SNDMSG((hwnd), LVM_GETGROUPCOUNT, (WPARAM)0, (LPARAM)0)
4193 #define ListView_GetItemIndexRect(hwnd, index, subitem, code, prc) \
4194 (BOOL)SNDMSG((hwnd), LVM_GETITEMINDEXRECT, (WPARAM)(LVITEMINDEX*)(index), \
4195 (prc ? ((((LPRECT)prc)->top = subitem), (((LPRECT)prc)->left = code), (LPARAM)prc) : (LPARAM)NULL)
4196 #define ListView_SetItemIndexState(hwndLV, index, data, mask) \
4197 { LV_ITEM macro; macro.stateMask = (mask); macro.state = data; \
4198 SNDMSG((hwndLV), LVM_SETITEMINDEXSTATE, (WPARAM)(LVITEMINDEX*)(index), (LPARAM)(LV_ITEM *)&macro); }
4199 #define ListView_GetNextItemIndex(hwnd, index, flags) \
4200 (BOOL)SNDMSG((hwnd), LVM_GETNEXTITEMINDEX, (WPARAM)(LVITEMINDEX*)(index), MAKELPARAM((flags),0))
4202 /* Tab Control */
4204 #define WC_TABCONTROLA "SysTabControl32"
4205 #if defined(_MSC_VER) || defined(__MINGW32__)
4206 # define WC_TABCONTROLW L"SysTabControl32"
4207 #else
4208 static const WCHAR WC_TABCONTROLW[] = { 'S','y','s',
4209 'T','a','b','C','o','n','t','r','o','l','3','2',0 };
4210 #endif
4211 #define WC_TABCONTROL WINELIB_NAME_AW(WC_TABCONTROL)
4213 /* tab control styles */
4214 #define TCS_EX_FLATSEPARATORS 0x00000001 /* to be used with */
4215 #define TCS_EX_REGISTERDROP 0x00000002 /* TCM_SETEXTENDEDSTYLE */
4218 #define TCM_FIRST 0x1300
4220 #define TCM_GETIMAGELIST (TCM_FIRST + 2)
4221 #define TCM_SETIMAGELIST (TCM_FIRST + 3)
4222 #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
4223 #define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
4224 #define TCM_GETITEMA (TCM_FIRST + 5)
4225 #define TCM_GETITEMW (TCM_FIRST + 60)
4226 #define TCM_SETITEMA (TCM_FIRST + 6)
4227 #define TCM_SETITEMW (TCM_FIRST + 61)
4228 #define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
4229 #define TCM_INSERTITEMA (TCM_FIRST + 7)
4230 #define TCM_INSERTITEMW (TCM_FIRST + 62)
4231 #define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
4232 #define TCM_DELETEITEM (TCM_FIRST + 8)
4233 #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
4234 #define TCM_GETITEMRECT (TCM_FIRST + 10)
4235 #define TCM_GETCURSEL (TCM_FIRST + 11)
4236 #define TCM_SETCURSEL (TCM_FIRST + 12)
4237 #define TCM_HITTEST (TCM_FIRST + 13)
4238 #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
4239 #define TCM_ADJUSTRECT (TCM_FIRST + 40)
4240 #define TCM_SETITEMSIZE (TCM_FIRST + 41)
4241 #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
4242 #define TCM_SETPADDING (TCM_FIRST + 43)
4243 #define TCM_GETROWCOUNT (TCM_FIRST + 44)
4244 #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
4245 #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
4246 #define TCM_GETCURFOCUS (TCM_FIRST + 47)
4247 #define TCM_SETCURFOCUS (TCM_FIRST + 48)
4248 #define TCM_SETMINTABWIDTH (TCM_FIRST + 49)
4249 #define TCM_DESELECTALL (TCM_FIRST + 50)
4250 #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
4251 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
4252 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
4253 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4254 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4257 #define TCIF_TEXT 0x0001
4258 #define TCIF_IMAGE 0x0002
4259 #define TCIF_RTLREADING 0x0004
4260 #define TCIF_PARAM 0x0008
4261 #define TCIF_STATE 0x0010
4263 #define TCIS_BUTTONPRESSED 0x0001
4264 #define TCIS_HIGHLIGHTED 0x0002
4266 /* TabCtrl Macros */
4267 #define TabCtrl_GetImageList(hwnd) \
4268 (HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, 0)
4269 #define TabCtrl_SetImageList(hwnd, himl) \
4270 (HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
4271 #define TabCtrl_GetItemCount(hwnd) \
4272 (int)SNDMSG((hwnd), TCM_GETITEMCOUNT, 0, 0)
4273 #define TabCtrl_GetItemA(hwnd, iItem, pitem) \
4274 (BOOL)SNDMSGA((hwnd), TCM_GETITEMA, (WPARAM)(int)iItem, (LPARAM)(TCITEMA *)(pitem))
4275 #define TabCtrl_GetItemW(hwnd, iItem, pitem) \
4276 (BOOL)SNDMSGW((hwnd), TCM_GETITEMW, (WPARAM)(int)iItem, (LPARAM)(TCITEMW *)(pitem))
4277 #define TabCtrl_GetItem WINELIB_NAME_AW(TabCtrl_GetItem)
4278 #define TabCtrl_SetItemA(hwnd, iItem, pitem) \
4279 (BOOL)SNDMSGA((hwnd), TCM_SETITEMA, (WPARAM)(int)iItem, (LPARAM)(TCITEMA *)(pitem))
4280 #define TabCtrl_SetItemW(hwnd, iItem, pitem) \
4281 (BOOL)SNDMSGW((hwnd), TCM_SETITEMW, (WPARAM)(int)iItem, (LPARAM)(TCITEMW *)(pitem))
4282 #define TabCtrl_SetItem WINELIB_NAME_AW(TabCtrl_SetItem)
4283 #define TabCtrl_InsertItemA(hwnd, iItem, pitem) \
4284 (int)SNDMSGA((hwnd), TCM_INSERTITEMA, (WPARAM)(int)iItem, (LPARAM)(const TCITEMA *)(pitem))
4285 #define TabCtrl_InsertItemW(hwnd, iItem, pitem) \
4286 (int)SNDMSGW((hwnd), TCM_INSERTITEMW, (WPARAM)(int)iItem, (LPARAM)(const TCITEMW *)(pitem))
4287 #define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
4288 #define TabCtrl_DeleteItem(hwnd, i) \
4289 (BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0)
4290 #define TabCtrl_DeleteAllItems(hwnd) \
4291 (BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, 0)
4292 #define TabCtrl_GetItemRect(hwnd, i, prc) \
4293 (BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
4294 #define TabCtrl_GetCurSel(hwnd) \
4295 (int)SNDMSG((hwnd), TCM_GETCURSEL, 0, 0)
4296 #define TabCtrl_SetCurSel(hwnd, i) \
4297 (int)SNDMSG((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
4298 #define TabCtrl_HitTest(hwndTC, pinfo) \
4299 (int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
4300 #define TabCtrl_SetItemExtra(hwndTC, cb) \
4301 (BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0)
4302 #define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
4303 (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
4304 #define TabCtrl_SetItemSize(hwnd, x, y) \
4305 (DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
4306 #define TabCtrl_RemoveImage(hwnd, i) \
4307 (void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, 0)
4308 #define TabCtrl_SetPadding(hwnd, cx, cy) \
4309 (void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
4310 #define TabCtrl_GetRowCount(hwnd) \
4311 (int)SNDMSG((hwnd), TCM_GETROWCOUNT, 0, 0)
4312 #define TabCtrl_GetToolTips(hwnd) \
4313 (HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, 0)
4314 #define TabCtrl_SetToolTips(hwnd, hwndTT) \
4315 (void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0)
4316 #define TabCtrl_GetCurFocus(hwnd) \
4317 (int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0)
4318 #define TabCtrl_SetCurFocus(hwnd, i) \
4319 SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0)
4320 #define TabCtrl_SetMinTabWidth(hwnd, x) \
4321 (int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x)
4322 #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
4323 (void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
4324 #define TabCtrl_GetUnicodeFormat(hwnd) \
4325 (BOOL)SNDMSG((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
4326 #define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) \
4327 (BOOL)SNDMSG((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)fUnicode, 0)
4328 #define TabCtrl_GetExtendedStyle(hwnd) \
4329 (BOOL)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
4330 #define TabCtrl_SetExtendedStyle(hwnd, dwExStyle) \
4331 (BOOL)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, (LPARAM)dwExStyle)
4332 #define TabCtrl_HighlightItem(hwnd, i, fHighlight) \
4333 (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)i, (LPARAM)MAKELONG(fHighlight, 0))
4335 /* constants for TCHITTESTINFO */
4337 #define TCHT_NOWHERE 0x01
4338 #define TCHT_ONITEMICON 0x02
4339 #define TCHT_ONITEMLABEL 0x04
4340 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
4342 typedef struct tagTCITEMHEADERA
4344 UINT mask;
4345 UINT lpReserved1;
4346 UINT lpReserved2;
4347 LPSTR pszText;
4348 int cchTextMax;
4349 int iImage;
4350 } TCITEMHEADERA, *LPTCITEMHEADERA;
4352 typedef struct tagTCITEMHEADERW
4354 UINT mask;
4355 UINT lpReserved1;
4356 UINT lpReserved2;
4357 LPWSTR pszText;
4358 int cchTextMax;
4359 int iImage;
4360 } TCITEMHEADERW, *LPTCITEMHEADERW;
4362 #define TCITEMHEADER WINELIB_NAME_AW(TCITEMHEADER)
4363 #define LPTCITEMHEADER WINELIB_NAME_AW(LPTCITEMHEADER)
4364 #define TC_ITEMHEADER WINELIB_NAME_AW(TCITEMHEADER)
4365 #define LPTC_ITEMHEADER WINELIB_NAME_AW(LPTCITEMHEADER)
4367 typedef struct tagTCITEMA
4369 UINT mask;
4370 UINT dwState;
4371 UINT dwStateMask;
4372 LPSTR pszText;
4373 INT cchTextMax;
4374 INT iImage;
4375 LPARAM lParam;
4376 } TCITEMA, *LPTCITEMA;
4378 typedef struct tagTCITEMW
4380 UINT mask;
4381 DWORD dwState;
4382 DWORD dwStateMask;
4383 LPWSTR pszText;
4384 INT cchTextMax;
4385 INT iImage;
4386 LPARAM lParam;
4387 } TCITEMW, *LPTCITEMW;
4389 #define TCITEM WINELIB_NAME_AW(TCITEM)
4390 #define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
4391 #define TC_ITEM WINELIB_NAME_AW(TCITEM)
4392 #define LPTC_ITEM WINELIB_NAME_AW(LPTCITEM)
4394 #define TCN_FIRST (0U-550U)
4395 #define TCN_LAST (0U-580U)
4396 #define TCN_KEYDOWN (TCN_FIRST - 0)
4397 #define TCN_SELCHANGE (TCN_FIRST - 1)
4398 #define TCN_SELCHANGING (TCN_FIRST - 2)
4399 #define TCN_GETOBJECT (TCN_FIRST - 3)
4400 #define TCN_FOCUSCHANGE (TCN_FIRST - 4)
4402 #include <pshpack1.h>
4403 typedef struct tagTCKEYDOWN
4405 NMHDR hdr;
4406 WORD wVKey;
4407 UINT flags;
4408 } NMTCKEYDOWN;
4409 #include <poppack.h>
4411 #define TC_KEYDOWN NMTCKEYDOWN
4413 /* ComboBoxEx control */
4415 #define WC_COMBOBOXEXA "ComboBoxEx32"
4416 #if defined(_MSC_VER) || defined(__MINGW32__)
4417 # define WC_COMBOBOXEXW L"ComboBoxEx32"
4418 #else
4419 static const WCHAR WC_COMBOBOXEXW[] = { 'C','o','m','b','o',
4420 'B','o','x','E','x','3','2',0 };
4421 #endif
4422 #define WC_COMBOBOXEX WINELIB_NAME_AW(WC_COMBOBOXEX)
4424 #define CBEIF_TEXT 0x00000001
4425 #define CBEIF_IMAGE 0x00000002
4426 #define CBEIF_SELECTEDIMAGE 0x00000004
4427 #define CBEIF_OVERLAY 0x00000008
4428 #define CBEIF_INDENT 0x00000010
4429 #define CBEIF_LPARAM 0x00000020
4430 #define CBEIF_DI_SETITEM 0x10000000
4432 #define CBEM_INSERTITEMA (WM_USER+1)
4433 #define CBEM_INSERTITEMW (WM_USER+11)
4434 #define CBEM_INSERTITEM WINELIB_NAME_AW(CBEM_INSERTITEM)
4435 #define CBEM_SETIMAGELIST (WM_USER+2)
4436 #define CBEM_GETIMAGELIST (WM_USER+3)
4437 #define CBEM_GETITEMA (WM_USER+4)
4438 #define CBEM_GETITEMW (WM_USER+13)
4439 #define CBEM_GETITEM WINELIB_NAME_AW(CBEM_GETITEM)
4440 #define CBEM_SETITEMA (WM_USER+5)
4441 #define CBEM_SETITEMW (WM_USER+12)
4442 #define CBEM_SETITEM WINELIB_NAME_AW(CBEM_SETITEM)
4443 #define CBEM_DELETEITEM CB_DELETESTRING
4444 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
4445 #define CBEM_GETEDITCONTROL (WM_USER+7)
4446 #define CBEM_SETEXSTYLE (WM_USER+8)
4447 #define CBEM_GETEXSTYLE (WM_USER+9)
4448 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
4449 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
4450 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4451 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4452 #define CBEM_HASEDITCHANGED (WM_USER+10)
4453 #define CBEM_SETWINDOWTHEME CCM_SETWINDOWTHEME
4455 #define CBEIF_TEXT 0x00000001
4456 #define CBEIF_IMAGE 0x00000002
4457 #define CBEIF_SELECTEDIMAGE 0x00000004
4458 #define CBEIF_OVERLAY 0x00000008
4459 #define CBEIF_INDENT 0x00000010
4460 #define CBEIF_LPARAM 0x00000020
4461 #define CBEIF_DI_SETITEM 0x10000000
4463 #define CBEN_FIRST (0U-800U)
4464 #define CBEN_LAST (0U-830U)
4466 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
4467 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
4468 #define CBEN_GETDISPINFO WINELIB_NAME_AW(CBEN_GETDISPINFO)
4469 #define CBEN_INSERTITEM (CBEN_FIRST - 1)
4470 #define CBEN_DELETEITEM (CBEN_FIRST - 2)
4471 #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
4472 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
4473 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
4474 #define CBEN_ENDEDIT WINELIB_NAME_AW(CBEN_ENDEDIT)
4475 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
4476 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
4477 #define CBEN_DRAGBEGIN WINELIB_NAME_AW(CBEN_DRAGBEGIN)
4479 #define CBES_EX_NOEDITIMAGE 0x00000001
4480 #define CBES_EX_NOEDITIMAGEINDENT 0x00000002
4481 #define CBES_EX_PATHWORDBREAKPROC 0x00000004
4482 #define CBES_EX_NOSIZELIMIT 0x00000008
4483 #define CBES_EX_CASESENSITIVE 0x00000010
4486 typedef struct tagCOMBOBOXEXITEMA
4488 UINT mask;
4489 INT_PTR iItem;
4490 LPSTR pszText;
4491 int cchTextMax;
4492 int iImage;
4493 int iSelectedImage;
4494 int iOverlay;
4495 int iIndent;
4496 LPARAM lParam;
4497 } COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
4498 typedef COMBOBOXEXITEMA const *PCCOMBOEXITEMA; /* Yes, there's a BOX missing */
4500 typedef struct tagCOMBOBOXEXITEMW
4502 UINT mask;
4503 INT_PTR iItem;
4504 LPWSTR pszText;
4505 int cchTextMax;
4506 int iImage;
4507 int iSelectedImage;
4508 int iOverlay;
4509 int iIndent;
4510 LPARAM lParam;
4511 } COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
4512 typedef COMBOBOXEXITEMW const *PCCOMBOEXITEMW; /* Yes, there's a BOX missing */
4514 #define COMBOBOXEXITEM WINELIB_NAME_AW(COMBOBOXEXITEM)
4515 #define PCOMBOBOXEXITEM WINELIB_NAME_AW(PCOMBOBOXEXITEM)
4516 #define PCCOMBOBOXEXITEM WINELIB_NAME_AW(PCCOMBOEXITEM) /* Yes, there's a BOX missing */
4518 #define CBENF_KILLFOCUS 1
4519 #define CBENF_RETURN 2
4520 #define CBENF_ESCAPE 3
4521 #define CBENF_DROPDOWN 4
4523 #define CBEMAXSTRLEN 260
4525 typedef struct tagNMCBEENDEDITW
4527 NMHDR hdr;
4528 BOOL fChanged;
4529 int iNewSelection;
4530 WCHAR szText[CBEMAXSTRLEN];
4531 int iWhy;
4532 } NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;
4534 typedef struct tagNMCBEENDEDITA
4536 NMHDR hdr;
4537 BOOL fChanged;
4538 int iNewSelection;
4539 char szText[CBEMAXSTRLEN];
4540 int iWhy;
4541 } NMCBEENDEDITA, *LPNMCBEENDEDITA, *PNMCBEENDEDITA;
4543 #define NMCBEENDEDIT WINELIB_NAME_AW(NMCBEENDEDIT)
4544 #define LPNMCBEENDEDIT WINELIB_NAME_AW(LPNMCBEENDEDIT)
4545 #define PNMCBEENDEDIT WINELIB_NAME_AW(PNMCBEENDEDIT)
4547 typedef struct
4549 NMHDR hdr;
4550 COMBOBOXEXITEMA ceItem;
4551 } NMCOMBOBOXEXA, *PNMCOMBOBOXEXA;
4553 typedef struct
4555 NMHDR hdr;
4556 COMBOBOXEXITEMW ceItem;
4557 } NMCOMBOBOXEXW, *PNMCOMBOBOXEXW;
4559 #define NMCOMBOBOXEX WINELIB_NAME_AW(NMCOMBOBOXEX)
4560 #define PNMCOMBOBOXEX WINELIB_NAME_AW(PNMCOMBOBOXEX)
4562 typedef struct
4564 NMHDR hdr;
4565 int iItemid;
4566 char szText[CBEMAXSTRLEN];
4567 } NMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA;
4569 typedef struct
4571 NMHDR hdr;
4572 int iItemid;
4573 WCHAR szText[CBEMAXSTRLEN];
4574 } NMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW;
4576 #define NMCBEDRAGBEGIN WINELIB_NAME_AW(NMCBEDRAGBEGIN)
4577 #define PNMCBEDRAGBEGIN WINELIB_NAME_AW(PNMCBEDRAGBEGIN)
4578 #define LPNMCBEDRAGBEGIN WINELIB_NAME_AW(LPNMCBEDRAGBEGIN)
4581 /* Hotkey control */
4583 #define HOTKEY_CLASSA "msctls_hotkey32"
4584 #if defined(_MSC_VER) || defined(__MINGW32__)
4585 # define HOTKEY_CLASSW L"msctls_hotkey32"
4586 #else
4587 static const WCHAR HOTKEY_CLASSW[] = { 'm','s','c','t','l','s','_',
4588 'h','o','t','k','e','y','3','2',0 };
4589 #endif
4590 #define HOTKEY_CLASS WINELIB_NAME_AW(HOTKEY_CLASS)
4592 #define HOTKEYF_SHIFT 0x01
4593 #define HOTKEYF_CONTROL 0x02
4594 #define HOTKEYF_ALT 0x04
4595 #define HOTKEYF_EXT 0x08
4597 #define HKCOMB_NONE 0x0001
4598 #define HKCOMB_S 0x0002
4599 #define HKCOMB_C 0x0004
4600 #define HKCOMB_A 0x0008
4601 #define HKCOMB_SC 0x0010
4602 #define HKCOMB_SA 0x0020
4603 #define HKCOMB_CA 0x0040
4604 #define HKCOMB_SCA 0x0080
4606 #define HKM_SETHOTKEY (WM_USER+1)
4607 #define HKM_GETHOTKEY (WM_USER+2)
4608 #define HKM_SETRULES (WM_USER+3)
4611 /* animate control */
4613 #define ANIMATE_CLASSA "SysAnimate32"
4614 #if defined(_MSC_VER) || defined(__MINGW32__)
4615 # define ANIMATE_CLASSW L"SysAnimate32"
4616 #else
4617 static const WCHAR ANIMATE_CLASSW[] = { 'S','y','s',
4618 'A','n','i','m','a','t','e','3','2',0 };
4619 #endif
4620 #define ANIMATE_CLASS WINELIB_NAME_AW(ANIMATE_CLASS)
4623 #define ACM_OPENA (WM_USER+100)
4624 #define ACM_OPENW (WM_USER+103)
4625 #define ACM_OPEN WINELIB_NAME_AW(ACM_OPEN)
4626 #define ACM_PLAY (WM_USER+101)
4627 #define ACM_STOP (WM_USER+102)
4628 #define ACM_ISPLAYING (WM_USER+104)
4630 #define ACN_START 1
4631 #define ACN_STOP 2
4633 #define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
4634 CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
4635 #define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
4636 CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
4637 #define Animate_Create WINELIB_NAME_AW(Animate_Create)
4638 #define Animate_OpenA(hwnd,szName) \
4639 (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
4640 #define Animate_OpenW(hwnd,szName) \
4641 (BOOL)SNDMSGW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
4642 #define Animate_Open WINELIB_NAME_AW(Animate_Open)
4643 #define Animate_OpenExA(hwnd,hInst,szName) \
4644 (BOOL)SNDMSGA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
4645 #define Animate_OpenExW(hwnd,hInst,szName) \
4646 (BOOL)SNDMSGW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
4647 #define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
4648 #define Animate_Play(hwnd,from,to,rep) \
4649 (BOOL)SNDMSG(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
4650 #define Animate_Stop(hwnd) \
4651 (BOOL)SNDMSG(hwnd,ACM_STOP,0,0)
4652 #define Animate_Close(hwnd) \
4653 (BOOL)SNDMSG(hwnd,ACM_OPENA,0,0)
4654 #define Animate_Seek(hwnd,frame) \
4655 (BOOL)SNDMSG(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
4656 #define Animate_IsPlaying(hwnd) \
4657 (BOOL)SNDMSG(hwnd, ACM_ISPLAYING, 0, 0)
4659 /**************************************************************************
4660 * IP Address control
4663 #define WC_IPADDRESSA "SysIPAddress32"
4664 #if defined(_MSC_VER) || defined(__MINGW32__)
4665 # define WC_IPADDRESSW L"SysIPAddress32"
4666 #else
4667 static const WCHAR WC_IPADDRESSW[] = { 'S','y','s',
4668 'I','P','A','d','d','r','e','s','s','3','2',0 };
4669 #endif
4670 #define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
4672 #define IPM_CLEARADDRESS (WM_USER+100)
4673 #define IPM_SETADDRESS (WM_USER+101)
4674 #define IPM_GETADDRESS (WM_USER+102)
4675 #define IPM_SETRANGE (WM_USER+103)
4676 #define IPM_SETFOCUS (WM_USER+104)
4677 #define IPM_ISBLANK (WM_USER+105)
4679 #define IPN_FIRST (0U-860U)
4680 #define IPN_LAST (0U-879U)
4681 #define IPN_FIELDCHANGED (IPN_FIRST-0)
4683 typedef struct tagNMIPADDRESS
4685 NMHDR hdr;
4686 INT iField;
4687 INT iValue;
4688 } NMIPADDRESS, *LPNMIPADDRESS;
4690 #define MAKEIPRANGE(low,high) \
4691 ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
4692 #define MAKEIPADDRESS(b1,b2,b3,b4) \
4693 ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
4695 #define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
4696 #define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
4697 #define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
4698 #define FOURTH_IPADDRESS(x) ((x)&0xff)
4701 /**************************************************************************
4702 * Native Font control
4705 #define WC_NATIVEFONTCTLA "NativeFontCtl"
4706 #if defined(_MSC_VER) || defined(__MINGW32__)
4707 # define WC_NATIVEFONTCTLW L"NativeFontCtl"
4708 #else
4709 static const WCHAR WC_NATIVEFONTCTLW[] = { 'N','a','t','i','v','e',
4710 'F','o','n','t','C','t','l',0 };
4711 #endif
4712 #define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
4715 /**************************************************************************
4716 * Month calendar control
4720 #define MONTHCAL_CLASSA "SysMonthCal32"
4721 #if defined(_MSC_VER) || defined(__MINGW32__)
4722 # define MONTHCAL_CLASSW L"SysMonthCal32"
4723 #else
4724 static const WCHAR MONTHCAL_CLASSW[] = { 'S','y','s',
4725 'M','o','n','t','h','C','a','l','3','2',0 };
4726 #endif
4727 #define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
4729 #define MCM_FIRST 0x1000
4730 #define MCN_FIRST (0U-750U)
4731 #define MCN_LAST (0U-759U)
4734 #define MCM_GETCURSEL (MCM_FIRST + 1)
4735 #define MCM_SETCURSEL (MCM_FIRST + 2)
4736 #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
4737 #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
4738 #define MCM_GETSELRANGE (MCM_FIRST + 5)
4739 #define MCM_SETSELRANGE (MCM_FIRST + 6)
4740 #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
4741 #define MCM_SETDAYSTATE (MCM_FIRST + 8)
4742 #define MCM_GETMINREQRECT (MCM_FIRST + 9)
4743 #define MCM_SETCOLOR (MCM_FIRST + 10)
4744 #define MCM_GETCOLOR (MCM_FIRST + 11)
4745 #define MCM_SETTODAY (MCM_FIRST + 12)
4746 #define MCM_GETTODAY (MCM_FIRST + 13)
4747 #define MCM_HITTEST (MCM_FIRST + 14)
4748 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
4749 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
4750 #define MCM_GETRANGE (MCM_FIRST + 17)
4751 #define MCM_SETRANGE (MCM_FIRST + 18)
4752 #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
4753 #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
4754 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
4755 #define MCM_GETCURRENTVIEW (MCM_FIRST + 22)
4756 #define MCM_GETCALENDARCOUNT (MCM_FIRST + 23)
4757 #define MCM_GETCALENDARGRIDINFO (MCM_FIRST + 24)
4758 #define MCM_GETCALID (MCM_FIRST + 27)
4759 #define MCM_SETCALID (MCM_FIRST + 28)
4760 #define MCM_SIZERECTTOMIN (MCM_FIRST + 29)
4761 #define MCM_SETCALENDARBORDER (MCM_FIRST + 30)
4762 #define MCM_GETCALENDARBORDER (MCM_FIRST + 31)
4763 #define MCM_SETCURRENTVIEW (MCM_FIRST + 32)
4764 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4765 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4768 /* Notifications */
4770 #define MCN_VIEWCHANGE MCN_FIRST
4771 #define MCN_SELCHANGE (MCN_FIRST + 1)
4772 #define MCN_GETDAYSTATE (MCN_FIRST + 3)
4773 #define MCN_SELECT (MCN_FIRST + 4)
4775 #define MCSC_BACKGROUND 0
4776 #define MCSC_TEXT 1
4777 #define MCSC_TITLEBK 2
4778 #define MCSC_TITLETEXT 3
4779 #define MCSC_MONTHBK 4
4780 #define MCSC_TRAILINGTEXT 5
4783 #define MCHT_TITLE 0x00010000
4784 #define MCHT_CALENDAR 0x00020000
4785 #define MCHT_TODAYLINK 0x00030000
4786 #define MCHT_CALENDARCONTROL 0x00100000
4788 #define MCHT_NEXT 0x01000000
4789 #define MCHT_PREV 0x02000000
4790 #define MCHT_NOWHERE 0x00000000
4791 #define MCHT_TITLEBK (MCHT_TITLE)
4792 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
4793 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
4794 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
4795 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
4797 #define MCHT_CALENDARBK (MCHT_CALENDAR)
4798 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
4799 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
4800 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
4801 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
4802 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
4803 #define MCHT_CALENDARDATEMIN (MCHT_CALENDAR | 0x0004)
4804 #define MCHT_CALENDARDATEMAX (MCHT_CALENDAR | 0x0005)
4807 #define GMR_VISIBLE 0
4808 #define GMR_DAYSTATE 1
4810 #define MCMV_MONTH 0
4811 #define MCMV_YEAR 1
4812 #define MCMV_DECADE 2
4813 #define MCMV_CENTURY 3
4814 #define MCMV_MAX MCMV_CENTURY
4816 /* Month calendar's structures */
4819 typedef struct {
4820 UINT cbSize;
4821 POINT pt;
4822 UINT uHit;
4823 SYSTEMTIME st;
4824 /* Vista */
4825 RECT rc;
4826 INT iOffset;
4827 INT iRow;
4828 INT iCol;
4829 } MCHITTESTINFO, *PMCHITTESTINFO;
4831 #define MCHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(MCHITTESTINFO, st)
4833 typedef struct tagNMSELCHANGE
4835 NMHDR nmhdr;
4836 SYSTEMTIME stSelStart;
4837 SYSTEMTIME stSelEnd;
4838 } NMSELCHANGE, *LPNMSELCHANGE;
4840 typedef NMSELCHANGE NMSELECT, *LPNMSELECT;
4841 typedef DWORD MONTHDAYSTATE, *LPMONTHDAYSTATE;
4843 typedef struct tagNMDAYSTATE
4845 NMHDR nmhdr;
4846 SYSTEMTIME stStart;
4847 int cDayState;
4848 LPMONTHDAYSTATE prgDayState;
4849 } NMDAYSTATE, *LPNMDAYSTATE;
4851 typedef struct tagMCGRIDINFO
4853 UINT cbSize;
4854 DWORD dwPart;
4855 DWORD dwFlags;
4856 INT iCalendar;
4857 INT iRow;
4858 INT iCol;
4859 BOOL bSelected;
4860 SYSTEMTIME stStart;
4861 SYSTEMTIME stEnd;
4862 RECT rc;
4863 WCHAR *pszName;
4864 SIZE_T cchName;
4865 } MCGRIDINFO, *PMCGRIDINFO;
4867 /* macros */
4869 #define MonthCal_GetCurSel(hmc, pst) \
4870 (BOOL)SNDMSG(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
4871 #define MonthCal_SetCurSel(hmc, pst) \
4872 (BOOL)SNDMSG(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
4873 #define MonthCal_GetMaxSelCount(hmc) \
4874 (DWORD)SNDMSG(hmc, MCM_GETMAXSELCOUNT, 0, 0)
4875 #define MonthCal_SetMaxSelCount(hmc, n) \
4876 (BOOL)SNDMSG(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0)
4877 #define MonthCal_GetSelRange(hmc, rgst) \
4878 SNDMSG(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst))
4879 #define MonthCal_SetSelRange(hmc, rgst) \
4880 SNDMSG(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst))
4881 #define MonthCal_GetMonthRange(hmc, gmr, rgst) \
4882 (DWORD)SNDMSG(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
4883 #define MonthCal_SetDayState(hmc, cbds, rgds) \
4884 SNDMSG(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
4885 #define MonthCal_GetMinReqRect(hmc, prc) \
4886 SNDMSG(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
4887 #define MonthCal_SetColor(hmc, iColor, clr)\
4888 SNDMSG(hmc, MCM_SETCOLOR, iColor, clr)
4889 #define MonthCal_GetColor(hmc, iColor) \
4890 SNDMSG(hmc, MCM_SETCOLOR, iColor, 0)
4891 #define MonthCal_GetToday(hmc, pst)\
4892 (BOOL)SNDMSG(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
4893 #define MonthCal_SetToday(hmc, pst)\
4894 SNDMSG(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
4895 #define MonthCal_HitTest(hmc, pinfo) \
4896 SNDMSG(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
4897 #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
4898 SNDMSG(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
4899 #define MonthCal_GetFirstDayOfWeek(hmc) \
4900 (DWORD)SNDMSG(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
4901 #define MonthCal_GetRange(hmc, rgst) \
4902 (DWORD)SNDMSG(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
4903 #define MonthCal_SetRange(hmc, gd, rgst) \
4904 (BOOL)SNDMSG(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4905 #define MonthCal_GetMonthDelta(hmc) \
4906 (int)SNDMSG(hmc, MCM_GETMONTHDELTA, 0, 0)
4907 #define MonthCal_SetMonthDelta(hmc, n) \
4908 (int)SNDMSG(hmc, MCM_SETMONTHDELTA, n, 0)
4909 #define MonthCal_GetMaxTodayWidth(hmc) \
4910 (DWORD)SNDMSG(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
4911 #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
4912 (BOOL)SNDMSG((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
4913 #define MonthCal_GetUnicodeFormat(hwnd) \
4914 (BOOL)SNDMSG((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
4915 #define MonthCal_SetCALID(hmc, calid) \
4916 SNDMSG(hmc, MCM_SETCALID, (WPARAM)(calid), 0)
4917 #define MonthCal_GetCALID(hmc) \
4918 (CALID)SNDMSG(hmc, MCM_GETCALID, 0, 0)
4919 #define MonthCal_GetCalendarCount(hmc) \
4920 (DWORD)SNDMSG(hmc, MCM_GETCALENDARCOUNT, 0, 0)
4921 #define MonthCal_GetCurrentView(hmc) \
4922 (DWORD)SNDMSG(hmc, MCM_GETCURRENTVIEW, 0, 0)
4923 #define MonthCal_SetCurrentView(hmc, view) \
4924 (BOOL)SNDMSG(hmc, MCM_SETCURRENTVIEW, 0, (LPARAM)view)
4925 #define MonthCal_SizeRectToMin(hmc, prc) \
4926 SNDMSG(hmc, MCM_SIZERECTTOMIN, 0, (LPARAM)prc)
4927 #define MonthCal_GetCalendarBorder(hmc) \
4928 (INT)SNDMSG(hmc, MCM_GETCALENDARBORDER, 0, 0)
4929 #define MonthCal_SetCalendarBorder(hmc, reset, xy) \
4930 SNDMSG(hmc, MCM_SETCALENDARBORDER, (WPARAM)reset, (LPARAM)xy)
4931 #define MonthCal_GetCalendarGridInfo(hmc, info) \
4932 (BOOL)SNDMSG(hmc, MCM_GETCALENDARGRIDINFO, 0, (LPARAM)(PMCGRIDINFO)info)
4934 /**************************************************************************
4935 * Date and time picker control
4938 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
4939 #if defined(_MSC_VER) || defined(__MINGW32__)
4940 # define DATETIMEPICK_CLASSW L"SysDateTimePick32"
4941 #else
4942 static const WCHAR DATETIMEPICK_CLASSW[] = { 'S','y','s',
4943 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 };
4944 #endif
4945 #define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
4947 #define DTM_FIRST 0x1000
4948 #define DTN_FIRST (0U-760U)
4949 #define DTN_LAST (0U-799U)
4952 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
4953 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
4954 #define DTM_GETRANGE (DTM_FIRST+3)
4955 #define DTM_SETRANGE (DTM_FIRST+4)
4956 #define DTM_SETFORMATA (DTM_FIRST+5)
4957 #define DTM_SETFORMATW (DTM_FIRST + 50)
4958 #define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
4959 #define DTM_SETMCCOLOR (DTM_FIRST+6)
4960 #define DTM_GETMCCOLOR (DTM_FIRST+7)
4961 #define DTM_GETMONTHCAL (DTM_FIRST+8)
4962 #define DTM_SETMCFONT (DTM_FIRST+9)
4963 #define DTM_GETMCFONT (DTM_FIRST+10)
4964 #define DTM_SETMCSTYLE (DTM_FIRST+11)
4965 #define DTM_GETMCSTYLE (DTM_FIRST+12)
4966 #define DTM_CLOSEMONTHCAL (DTM_FIRST+13)
4967 #define DTM_GETDATETIMEPICKERINFO (DTM_FIRST+14)
4968 #define DTM_GETIDEALSIZE (DTM_FIRST+15)
4970 /* Datetime Notifications */
4972 #define DTN_DATETIMECHANGE (DTN_FIRST + 1)
4973 #define DTN_USERSTRINGA (DTN_FIRST + 2)
4974 #define DTN_WMKEYDOWNA (DTN_FIRST + 3)
4975 #define DTN_FORMATA (DTN_FIRST + 4)
4976 #define DTN_FORMATQUERYA (DTN_FIRST + 5)
4977 #define DTN_DROPDOWN (DTN_FIRST + 6)
4978 #define DTN_CLOSEUP (DTN_FIRST + 7)
4979 #define DTN_USERSTRINGW (DTN_FIRST + 15)
4980 #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
4981 #define DTN_FORMATW (DTN_FIRST + 17)
4982 #define DTN_FORMATQUERYW (DTN_FIRST + 18)
4984 #define DTN_USERSTRING WINELIB_NAME_AW(DTN_USERSTRING)
4985 #define DTN_WMKEYDOWN WINELIB_NAME_AW(DTN_WMKEYDOWN)
4986 #define DTN_FORMAT WINELIB_NAME_AW(DTN_FORMAT)
4987 #define DTN_FORMATQUERY WINELIB_NAME_AW(DTN_FORMATQUERY)
4990 typedef struct tagNMDATETIMECHANGE
4992 NMHDR nmhdr;
4993 DWORD dwFlags;
4994 SYSTEMTIME st;
4995 } NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
4997 typedef struct tagNMDATETIMESTRINGA
4999 NMHDR nmhdr;
5000 LPCSTR pszUserString;
5001 SYSTEMTIME st;
5002 DWORD dwFlags;
5003 } NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;
5005 typedef struct tagNMDATETIMESTRINGW
5007 NMHDR nmhdr;
5008 LPCWSTR pszUserString;
5009 SYSTEMTIME st;
5010 DWORD dwFlags;
5011 } NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
5013 DECL_WINELIB_TYPE_AW(NMDATETIMESTRING)
5014 DECL_WINELIB_TYPE_AW(LPNMDATETIMESTRING)
5016 typedef struct tagNMDATETIMEWMKEYDOWNA
5018 NMHDR nmhdr;
5019 int nVirtKey;
5020 LPCSTR pszFormat;
5021 SYSTEMTIME st;
5022 } NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;
5024 typedef struct tagNMDATETIMEWMKEYDOWNW
5026 NMHDR nmhdr;
5027 int nVirtKey;
5028 LPCWSTR pszFormat;
5029 SYSTEMTIME st;
5030 } NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;
5032 DECL_WINELIB_TYPE_AW(NMDATETIMEWMKEYDOWN)
5033 DECL_WINELIB_TYPE_AW(LPNMDATETIMEWMKEYDOWN)
5035 typedef struct tagNMDATETIMEFORMATA
5037 NMHDR nmhdr;
5038 LPCSTR pszFormat;
5039 SYSTEMTIME st;
5040 LPCSTR pszDisplay;
5041 CHAR szDisplay[64];
5042 } NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;
5045 typedef struct tagNMDATETIMEFORMATW
5047 NMHDR nmhdr;
5048 LPCWSTR pszFormat;
5049 SYSTEMTIME st;
5050 LPCWSTR pszDisplay;
5051 WCHAR szDisplay[64];
5052 } NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;
5054 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMAT)
5055 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMAT)
5057 typedef struct tagNMDATETIMEFORMATQUERYA
5059 NMHDR nmhdr;
5060 LPCSTR pszFormat;
5061 SIZE szMax;
5062 } NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;
5064 typedef struct tagNMDATETIMEFORMATQUERYW
5066 NMHDR nmhdr;
5067 LPCWSTR pszFormat;
5068 SIZE szMax;
5069 } NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;
5071 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMATQUERY)
5072 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMATQUERY)
5074 typedef struct tagDATETIMEPICKERINFO
5076 DWORD cbSize;
5077 RECT rcCheck;
5078 DWORD stateCheck;
5079 RECT rcButton;
5080 DWORD stateButton;
5081 HWND hwndEdit;
5082 HWND hwndUD;
5083 HWND hwndDropDown;
5084 } DATETIMEPICKERINFO, *LPDATETIMEPICKERINFO;
5087 #define GDT_ERROR -1
5088 #define GDT_VALID 0
5089 #define GDT_NONE 1
5091 #define GDTR_MIN 0x0001
5092 #define GDTR_MAX 0x0002
5095 #define DateTime_GetSystemtime(hdp, pst) \
5096 (DWORD)SNDMSG (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
5097 #define DateTime_SetSystemtime(hdp, gd, pst) \
5098 (BOOL)SNDMSG (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
5099 #define DateTime_GetRange(hdp, rgst) \
5100 (DWORD)SNDMSG (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
5101 #define DateTime_SetRange(hdp, gd, rgst) \
5102 (BOOL)SNDMSG (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
5103 #define DateTime_SetFormatA(hdp, sz) \
5104 (BOOL)SNDMSGA (hdp, DTM_SETFORMATA, 0, (LPARAM)(sz))
5105 #define DateTime_SetFormatW(hdp, sz) \
5106 (BOOL)SNDMSGW (hdp, DTM_SETFORMATW, 0, (LPARAM)(sz))
5107 #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
5108 #define DateTime_GetMonthCalColor(hdp, iColor) \
5109 SNDMSG (hdp, DTM_GETMCCOLOR, iColor, 0)
5110 #define DateTime_SetMonthCalColor(hdp, iColor, clr) \
5111 SNDMSG (hdp, DTM_SETMCCOLOR, iColor, clr)
5112 #define DateTime_GetMonthCal(hdp) \
5113 (HWND) SNDMSG (hdp, DTM_GETMONTHCAL, 0, 0)
5114 #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \
5115 SNDMSG (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
5116 #define DateTime_GetMonthCalFont(hdp) \
5117 SNDMSG (hdp, DTM_GETMCFONT, 0, 0)
5118 #define DateTime_GetIdealSize(hdp, sz) \
5119 (BOOL) SNDMSG (hdp, DTM_GETIDEALSIZE, 0, (LPARAM)sz)
5120 #define DateTime_SetMonthCalStyle(hdp, style) \
5121 SNDMSG(hdp, DTM_SETMCSTYLE, 0, (LPARAM)style)
5122 #define DateTime_GetMonthCalStyle(hdp) \
5123 SNDMSG(hdp, DTM_GETMCSTYLE, 0, 0)
5124 #define DateTime_GetDateTimePickerInfo(hdp, info) \
5125 SNDMSG(hdp, DTM_GETDATETIMEPICKERINFO, 0, (LPARAM)info)
5126 #define DateTime_CloseMonthCal(hdp) \
5127 SNDMSG(hdp, DTM_CLOSEMONTHCAL, 0, 0)
5129 #define DA_LAST (0x7fffffff)
5130 #define DPA_APPEND (0x7fffffff)
5131 #define DPA_ERR (-1)
5133 #define DSA_APPEND (0x7fffffff)
5134 #define DSA_ERR (-1)
5136 struct _DSA;
5137 typedef struct _DSA *HDSA;
5139 typedef INT (CALLBACK *PFNDSAENUMCALLBACK)(LPVOID, LPVOID);
5141 HDSA WINAPI DSA_Create(INT, INT);
5142 BOOL WINAPI DSA_Destroy(HDSA);
5143 void WINAPI DSA_DestroyCallback(HDSA, PFNDSAENUMCALLBACK, LPVOID);
5144 LPVOID WINAPI DSA_GetItemPtr(HDSA, INT);
5145 INT WINAPI DSA_InsertItem(HDSA, INT, LPVOID);
5147 #define DPAS_SORTED 0x0001
5148 #define DPAS_INSERTBEFORE 0x0002
5149 #define DPAS_INSERTAFTER 0x0004
5152 struct _DPA;
5153 typedef struct _DPA *HDPA;
5155 #define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
5157 typedef INT (CALLBACK *PFNDPAENUMCALLBACK)(LPVOID, LPVOID);
5158 typedef INT (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
5159 typedef PVOID (CALLBACK *PFNDPAMERGE)(UINT,PVOID,PVOID,LPARAM);
5161 /* merge callback codes */
5162 #define DPAMM_MERGE 1
5163 #define DPAMM_DELETE 2
5164 #define DPAMM_INSERT 3
5166 /* merge options */
5167 #define DPAM_SORTED 0x00000001
5168 #define DPAM_NORMAL 0x00000002
5169 #define DPAM_UNION 0x00000004
5170 #define DPAM_INTERSECT 0x00000008
5172 HDPA WINAPI DPA_Create(INT);
5173 BOOL WINAPI DPA_Destroy(HDPA);
5174 LPVOID WINAPI DPA_DeletePtr(HDPA, INT);
5175 BOOL WINAPI DPA_DeleteAllPtrs(HDPA);
5176 BOOL WINAPI DPA_SetPtr(HDPA, INT, LPVOID);
5177 LPVOID WINAPI DPA_GetPtr(HDPA, INT);
5178 INT WINAPI DPA_GetPtrIndex(HDPA, LPCVOID);
5179 ULONGLONG WINAPI DPA_GetSize(HDPA);
5180 BOOL WINAPI DPA_Grow(HDPA, INT);
5181 INT WINAPI DPA_InsertPtr(HDPA, INT, LPVOID);
5182 BOOL WINAPI DPA_Sort(HDPA, PFNDPACOMPARE, LPARAM);
5183 void WINAPI DPA_EnumCallback(HDPA, PFNDPAENUMCALLBACK, LPVOID);
5184 void WINAPI DPA_DestroyCallback(HDPA, PFNDPAENUMCALLBACK, LPVOID);
5185 INT WINAPI DPA_Search(HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
5186 BOOL WINAPI DPA_Merge(HDPA, HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
5188 /* save/load from stream */
5189 typedef struct _DPASTREAMINFO
5191 INT iPos; /* item index */
5192 LPVOID pvItem;
5193 } DPASTREAMINFO;
5195 struct IStream;
5196 typedef HRESULT (CALLBACK *PFNDPASTREAM)(DPASTREAMINFO*, struct IStream*, LPVOID);
5198 HRESULT WINAPI DPA_LoadStream(HDPA*, PFNDPASTREAM, struct IStream*, LPVOID);
5199 HRESULT WINAPI DPA_SaveStream(HDPA, PFNDPASTREAM, struct IStream*, LPVOID);
5201 BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
5203 /**************************************************************************
5204 * SysLink control
5207 #if defined(_MSC_VER) || defined(__MINGW32__)
5208 # define WC_LINK L"SysLink"
5209 #else
5210 static const WCHAR WC_LINK[] = { 'S','y','s','L','i','n','k',0 };
5211 #endif
5213 /* SysLink styles */
5214 #define LWS_TRANSPARENT 0x0001
5215 #define LWS_IGNORERETURN 0x0002
5216 #define LWS_NOPREFIX 0x0004
5217 #define LWS_USEVISUALSTYLE 0x0008
5218 #define LWS_USECUSTOMTEXT 0x0010
5219 #define LWS_RIGHT 0x0020
5221 /* SysLink messages */
5222 #define LM_HITTEST (WM_USER + 768)
5223 #define LM_GETIDEALHEIGHT (WM_USER + 769)
5224 #define LM_GETIDEALSIZE (LM_GETIDEALHEIGHT)
5225 #define LM_SETITEM (WM_USER + 770)
5226 #define LM_GETITEM (WM_USER + 771)
5228 /* SysLink links flags */
5230 #define LIF_ITEMINDEX 1
5231 #define LIF_STATE 2
5232 #define LIF_ITEMID 4
5233 #define LIF_URL 8
5235 /* SysLink links states */
5237 #define LIS_FOCUSED 0x0001
5238 #define LIS_ENABLED 0x0002
5239 #define LIS_VISITED 0x0004
5240 #define LIS_HOTTRACK 0x0008
5241 #define LIS_DEFAULTCOLORS 0x0010
5243 /* SysLink misc. */
5245 #define INVALID_LINK_INDEX (-1)
5246 #define MAX_LINKID_TEXT 48
5247 #define L_MAX_URL_LENGTH 2084
5249 /* SysLink structures */
5251 typedef struct tagLITEM
5253 UINT mask;
5254 int iLink;
5255 UINT state;
5256 UINT stateMask;
5257 WCHAR szID[MAX_LINKID_TEXT];
5258 WCHAR szUrl[L_MAX_URL_LENGTH];
5259 } LITEM, *PLITEM;
5261 typedef struct tagLHITTESTINFO
5263 POINT pt;
5264 LITEM item;
5265 } LHITTESTINFO, *PLHITTESTINFO;
5267 typedef struct tagNMLINK
5269 NMHDR hdr;
5270 LITEM item;
5271 } NMLINK, *PNMLINK;
5273 typedef struct tagNMLVLINK
5275 NMHDR hdr;
5276 LITEM link;
5277 int iItem;
5278 int iSubItem;
5279 } NMLVLINK, *PNMLVLINK;
5281 /**************************************************************************
5282 * Static control
5285 #define WC_STATICA "Static"
5286 #if defined(_MSC_VER) || defined(__MINGW32__)
5287 # define WC_STATICW L"Static"
5288 #else
5289 static const WCHAR WC_STATICW[] = { 'S','t','a','t','i','c',0 };
5290 #endif
5291 #define WC_STATIC WINELIB_NAME_AW(WC_STATIC)
5293 /**************************************************************************
5294 * Combobox control
5297 #define WC_COMBOBOXA "ComboBox"
5298 #if defined(_MSC_VER) || defined(__MINGW32__)
5299 # define WC_COMBOBOXW L"ComboBox"
5300 #else
5301 static const WCHAR WC_COMBOBOXW[] = { 'C','o','m','b','o','B','o','x',0 };
5302 #endif
5303 #define WC_COMBOBOX WINELIB_NAME_AW(WC_COMBOBOX)
5305 #define CBM_FIRST 0x1700
5306 #define CB_SETMINVISIBLE (CBM_FIRST + 1)
5307 #define CB_GETMINVISIBLE (CBM_FIRST + 2)
5308 #define CB_SETCUEBANNER (CBM_FIRST + 3)
5309 #define CB_GETCUEBANNER (CBM_FIRST + 4)
5311 #define ComboBox_GetMinVisible(hwnd) \
5312 ((INT)SNDMSG((hwnd), CB_GETMINVISIBLE, 0, 0))
5313 #define ComboBox_SetMinVisible(hwnd, count) \
5314 ((BOOL)SNDMSG((hwnd), CB_SETMINVISIBLE, (WPARAM)(count), 0))
5315 #define ComboBox_SetCueBannerText(hwnd, text) \
5316 ((BOOL)SNDMSG((hwnd), CB_SETCUEBANNER, 0, (LPARAM)(text)))
5317 #define ComboBox_GetCueBannerText(hwnd, text, cnt) \
5318 ((BOOL)SNDMSG((hwnd), CB_GETCUEBANNER, (WPARAM)(text), (LPARAM)(cnt)))
5320 /**************************************************************************
5321 * Edit control
5324 #define WC_EDITA "Edit"
5325 #if defined(_MSC_VER) || defined(__MINGW32__)
5326 # define WC_EDITW L"Edit"
5327 #else
5328 static const WCHAR WC_EDITW[] = { 'E','d','i','t',0 };
5329 #endif
5330 #define WC_EDIT WINELIB_NAME_AW(WC_EDIT)
5332 typedef struct _tagEDITBALLOONTIP
5334 DWORD cbStruct;
5335 LPCWSTR pszTitle;
5336 LPCWSTR pszText;
5337 INT ttiIcon;
5338 } EDITBALLOONTIP, *PEDITBALLOONTIP;
5340 #define ECM_FIRST 0x1500
5341 #define EM_SETCUEBANNER (ECM_FIRST + 1)
5342 #define EM_GETCUEBANNER (ECM_FIRST + 2)
5343 #define EM_SHOWBALLOONTIP (ECM_FIRST + 3)
5344 #define EM_HIDEBALLOONTIP (ECM_FIRST + 4)
5345 #define EM_SETHILITE (ECM_FIRST + 5)
5346 #define EM_GETHILITE (ECM_FIRST + 6)
5347 #define EM_NOSETFOCUS (ECM_FIRST + 7)
5348 #define EM_TAKEFOCUS (ECM_FIRST + 8)
5350 #define Edit_SetCueBannerText(hwnd, text) \
5351 (BOOL)SNDMSG((hwnd), EM_SETCUEBANNER, 0, (LPARAM)(text))
5352 #define Edit_SetCueBannerTextFocused(hwnd, text, drawfocused) \
5353 (BOOL)SNDMSG((hwnd), EM_SETCUEBANNER, (WPARAM)(drawfocused), (LPARAM)(text))
5354 #define Edit_GetCueBannerText(hwnd, buff, buff_size) \
5355 (BOOL)SNDMSG((hwnd), EM_GETCUEBANNER, (WPARAM)(buff), (LPARAM)(buff_size))
5356 #define Edit_SetHilite(hwnd, start, end) \
5357 SNDMSG((hwnd), EM_SETHILITE, start, end)
5358 #define Edit_GetHilite(hwnd) \
5359 ((DWORD)SNDMSG((hwnd), EM_GETHILITE, 0L, 0L))
5360 #define Edit_ShowBalloonTip(hwnd, tip) \
5361 (BOOL)SNDMSG((hwnd), EM_SHOWBALLOONTIP, 0, (LPARAM)(tip))
5362 #define Edit_HideBalloonTip(hwnd) \
5363 (BOOL)SNDMSG((hwnd), EM_HIDEBALLOONTIP, 0, 0)
5365 /**************************************************************************
5366 * Listbox control
5369 #define WC_LISTBOXA "ListBox"
5370 #if defined(_MSC_VER) || defined(__MINGW32__)
5371 # define WC_LISTBOXW L"ListBox"
5372 #else
5373 static const WCHAR WC_LISTBOXW[] = { 'L','i','s','t','B','o','x',0 };
5374 #endif
5375 #define WC_LISTBOX WINELIB_NAME_AW(WC_LISTBOX)
5377 /**************************************************************************
5378 * Scrollbar control
5381 #define WC_SCROLLBARA "ScrollBar"
5382 #if defined(_MSC_VER) || defined(__MINGW32__)
5383 # define WC_SCROLLBARW L"ScrollBar"
5384 #else
5385 static const WCHAR WC_SCROLLBARW[] = { 'S','c','r','o','l','l','B','a','r',0 };
5386 #endif
5387 #define WC_SCROLLBAR WINELIB_NAME_AW(WC_SCROLLBAR)
5389 /**************************************************************************
5390 * Task dialog
5393 #ifndef NOTASKDIALOG
5395 #include <pshpack1.h>
5397 enum _TASKDIALOG_FLAGS
5399 TDF_ENABLE_HYPERLINKS = 0x0001,
5400 TDF_USE_HICON_MAIN = 0x0002,
5401 TDF_USE_HICON_FOOTER = 0x0004,
5402 TDF_ALLOW_DIALOG_CANCELLATION = 0x0008,
5403 TDF_USE_COMMAND_LINKS = 0x0010,
5404 TDF_USE_COMMAND_LINKS_NO_ICON = 0x0020,
5405 TDF_EXPAND_FOOTER_AREA = 0x0040,
5406 TDF_EXPANDED_BY_DEFAULT = 0x0080,
5407 TDF_VERIFICATION_FLAG_CHECKED = 0x0100,
5408 TDF_SHOW_PROGRESS_BAR = 0x0200,
5409 TDF_SHOW_MARQUEE_PROGRESS_BAR = 0x0400,
5410 TDF_CALLBACK_TIMER = 0x0800,
5411 TDF_POSITION_RELATIVE_TO_WINDOW = 0x1000,
5412 TDF_RTL_LAYOUT = 0x2000,
5413 TDF_NO_DEFAULT_RADIO_BUTTON = 0x4000,
5414 TDF_CAN_BE_MINIMIZED = 0x8000,
5415 TDF_NO_SET_FOREGROUND = 0x10000,
5416 TDF_SIZE_TO_CONTENT = 0x01000000
5418 typedef int TASKDIALOG_FLAGS;
5420 typedef enum _TASKDIALOG_MESSAGES
5422 TDM_NAVIGATE_PAGE = WM_USER + 101,
5423 TDM_CLICK_BUTTON = WM_USER + 102,
5424 TDM_SET_MARQUEE_PROGRESS_BAR = WM_USER + 103,
5425 TDM_SET_PROGRESS_BAR_STATE = WM_USER + 104,
5426 TDM_SET_PROGRESS_BAR_RANGE = WM_USER + 105,
5427 TDM_SET_PROGRESS_BAR_POS = WM_USER + 106,
5428 TDM_SET_PROGRESS_BAR_MARQUEE = WM_USER + 107,
5429 TDM_SET_ELEMENT_TEXT = WM_USER + 108,
5430 TDM_CLICK_RADIO_BUTTON = WM_USER + 110,
5431 TDM_ENABLE_BUTTON = WM_USER + 111,
5432 TDM_ENABLE_RADIO_BUTTON = WM_USER + 112,
5433 TDM_CLICK_VERIFICATION = WM_USER + 113,
5434 TDM_UPDATE_ELEMENT_TEXT = WM_USER + 114,
5435 TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = WM_USER + 115,
5436 TDM_UPDATE_ICON = WM_USER + 116,
5437 } TASKDIALOG_MESSAGES;
5439 typedef enum _TASKDIALOG_NOTIFICATIONS
5441 TDN_CREATED,
5442 TDN_NAVIGATED,
5443 TDN_BUTTON_CLICKED,
5444 TDN_HYPERLINK_CLICKED,
5445 TDN_TIMER,
5446 TDN_DESTROYED,
5447 TDN_RADIO_BUTTON_CLICKED,
5448 TDN_DIALOG_CONSTRUCTED,
5449 TDN_VERIFICATION_CLICKED,
5450 TDN_HELP,
5451 TDN_EXPANDO_BUTTON_CLICKED,
5452 } TASKDIALOG_NOTIFICATIONS;
5454 typedef enum _TASKDIALOG_ELEMENTS
5456 TDE_CONTENT,
5457 TDE_EXPANDED_INFORMATION,
5458 TDE_FOOTER,
5459 TDE_MAIN_INSTRUCTION,
5460 } TASKDIALOG_ELEMENTS;
5462 typedef enum _TASKDIALOG_ICON_ELEMENTS
5464 TDIE_ICON_MAIN,
5465 TDIE_ICON_FOOTER,
5466 } TASKDIALOG_ICON_ELEMENTS;
5468 #define TD_WARNING_ICON MAKEINTRESOURCEW(-1)
5469 #define TD_ERROR_ICON MAKEINTRESOURCEW(-2)
5470 #define TD_INFORMATION_ICON MAKEINTRESOURCEW(-3)
5471 #define TD_SHIELD_ICON MAKEINTRESOURCEW(-4)
5473 enum _TASKDIALOG_COMMON_BUTTON_FLAGS
5475 TDCBF_OK_BUTTON = 0x0001,
5476 TDCBF_YES_BUTTON = 0x0002,
5477 TDCBF_NO_BUTTON = 0x0004,
5478 TDCBF_CANCEL_BUTTON = 0x0008,
5479 TDCBF_RETRY_BUTTON = 0x0010,
5480 TDCBF_CLOSE_BUTTON = 0x0020
5482 typedef int TASKDIALOG_COMMON_BUTTON_FLAGS;
5484 typedef struct _TASKDIALOG_BUTTON
5486 int nButtonID;
5487 PCWSTR pszButtonText;
5488 } TASKDIALOG_BUTTON;
5490 typedef HRESULT (CALLBACK *PFTASKDIALOGCALLBACK)(HWND, UINT, WPARAM, LPARAM, LONG_PTR);
5492 typedef struct _TASKDIALOGCONFIG
5494 UINT cbSize;
5495 HWND hwndParent;
5496 HINSTANCE hInstance;
5497 TASKDIALOG_FLAGS dwFlags;
5498 TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons;
5499 PCWSTR pszWindowTitle;
5500 union
5502 HICON hMainIcon;
5503 PCWSTR pszMainIcon;
5504 } DUMMYUNIONNAME;
5505 PCWSTR pszMainInstruction;
5506 PCWSTR pszContent;
5507 UINT cButtons;
5508 const TASKDIALOG_BUTTON *pButtons;
5509 int nDefaultButton;
5510 UINT cRadioButtons;
5511 const TASKDIALOG_BUTTON *pRadioButtons;
5512 int nDefaultRadioButton;
5513 PCWSTR pszVerificationText;
5514 PCWSTR pszExpandedInformation;
5515 PCWSTR pszExpandedControlText;
5516 PCWSTR pszCollapsedControlText;
5517 union
5519 HICON hFooterIcon;
5520 PCWSTR pszFooterIcon;
5521 } DUMMYUNIONNAME2;
5522 PCWSTR pszFooter;
5523 PFTASKDIALOGCALLBACK pfCallback;
5524 LONG_PTR lpCallbackData;
5525 UINT cxWidth;
5526 } TASKDIALOGCONFIG;
5528 HRESULT WINAPI TaskDialog(HWND owner, HINSTANCE hinst, const WCHAR *title, const WCHAR *main_instruction,
5529 const WCHAR *content, TASKDIALOG_COMMON_BUTTON_FLAGS common_buttons, const WCHAR *icon, int *button);
5530 HRESULT WINAPI TaskDialogIndirect(const TASKDIALOGCONFIG *, int *, int *, BOOL *);
5532 #include <poppack.h>
5534 #endif /* NOTASKDIALOG */
5536 #ifdef __cplusplus
5538 #endif
5540 #endif /* __WINE_COMMCTRL_H */