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