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