services: Get rid of unnecessary locks.
[wine.git] / include / commctrl.h
blobaa33cabdab25c3cb037ee93dfa81a13c56d71ab8
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 0x0001
498 #define ILC_COLOR 0x0000
499 #define ILC_COLORDDB 0x00FE
500 #define ILC_COLOR4 0x0004
501 #define ILC_COLOR8 0x0008
502 #define ILC_COLOR16 0x0010
503 #define ILC_COLOR24 0x0018
504 #define ILC_COLOR32 0x0020
505 #define ILC_PALETTE 0x0800 /* no longer supported by M$ */
506 #define ILC_MIRROR 0x2000
507 #define ILC_PERITEMMIRROR 0x8000
509 #define ILD_NORMAL 0x0000
510 #define ILD_TRANSPARENT 0x0001
511 #define ILD_BLEND25 0x0002
512 #define ILD_BLEND50 0x0004
513 #define ILD_MASK 0x0010
514 #define ILD_IMAGE 0x0020
515 #define ILD_ROP 0x0040
516 #define ILD_OVERLAYMASK 0x0F00
517 #define ILD_PRESERVEALPHA 0x1000
518 #define ILD_SCALE 0x2000
519 #define ILD_DPISCALE 0x4000
520 #define ILD_ASYNC 0x8000
522 #define ILD_SELECTED ILD_BLEND50
523 #define ILD_FOCUS ILD_BLEND25
524 #define ILD_BLEND ILD_BLEND50
526 #define INDEXTOOVERLAYMASK(i) ((i)<<8)
527 #define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
529 #define ILCF_MOVE (0x00000000)
530 #define ILCF_SWAP (0x00000001)
532 #define ILGT_NORMAL 0x0000
533 #define ILGT_ASYNC 0x0001
535 #define ILS_NORMAL 0x0000
536 #define ILS_GLOW 0x0001
537 #define ILS_SHADOW 0x0002
538 #define ILS_SATURATE 0x0004
539 #define ILS_ALPHA 0x0008
541 typedef struct _IMAGEINFO
543 HBITMAP hbmImage;
544 HBITMAP hbmMask;
545 INT Unused1;
546 INT Unused2;
547 RECT rcImage;
548 } IMAGEINFO, *LPIMAGEINFO;
551 typedef struct _IMAGELISTDRAWPARAMS
553 DWORD cbSize;
554 HIMAGELIST himl;
555 INT i;
556 HDC hdcDst;
557 INT x;
558 INT y;
559 INT cx;
560 INT cy;
561 INT xBitmap; /* x offset from the upperleft of bitmap */
562 INT yBitmap; /* y offset from the upperleft of bitmap */
563 COLORREF rgbBk;
564 COLORREF rgbFg;
565 UINT fStyle;
566 DWORD dwRop;
567 DWORD fState;
568 DWORD Frame;
569 COLORREF crEffect;
570 } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
572 #define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS, dwRop)
574 HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST,REFIID,void **);
575 INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
576 INT WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
577 BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT);
578 BOOL WINAPI ImageList_Copy(HIMAGELIST,INT,HIMAGELIST,INT,UINT);
579 HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
580 BOOL WINAPI ImageList_Destroy(HIMAGELIST);
581 BOOL WINAPI ImageList_DragEnter(HWND,INT,INT);
582 BOOL WINAPI ImageList_DragLeave(HWND);
583 BOOL WINAPI ImageList_DragMove(INT,INT);
584 BOOL WINAPI ImageList_DragShowNolock (BOOL);
585 BOOL WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
586 BOOL WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
587 INT,COLORREF,COLORREF,UINT);
588 BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
589 HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
590 VOID WINAPI ImageList_EndDrag(VOID);
591 COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
592 HIMAGELIST WINAPI ImageList_GetDragImage(POINT*,POINT*);
593 HICON WINAPI ImageList_GetIcon(HIMAGELIST,INT,UINT);
594 BOOL WINAPI ImageList_GetIconSize(HIMAGELIST,INT*,INT*);
595 INT WINAPI ImageList_GetImageCount(HIMAGELIST);
596 BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST,INT,IMAGEINFO*);
597 BOOL WINAPI ImageList_GetImageRect(HIMAGELIST,INT,LPRECT);
598 HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,INT,INT,
599 COLORREF,UINT,UINT);
600 HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,INT,INT,
601 COLORREF,UINT,UINT);
602 #define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
603 HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
604 BOOL WINAPI ImageList_Remove(HIMAGELIST,INT);
605 BOOL WINAPI ImageList_Replace(HIMAGELIST,INT,HBITMAP,HBITMAP);
606 INT WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT,HICON);
607 COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
608 BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT,INT,INT);
610 BOOL WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
611 BOOL WINAPI ImageList_SetImageCount(HIMAGELIST,UINT);
612 BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
614 #ifdef __IStream_INTERFACE_DEFINED__
615 HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
616 BOOL WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
617 #endif
619 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
620 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
621 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
622 ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
623 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
626 #ifndef WM_MOUSEHOVER
627 #define WM_MOUSEHOVER 0x02A1
628 #define WM_MOUSELEAVE 0x02A3
629 #endif
631 #ifndef TME_HOVER
633 #define TME_HOVER 0x00000001
634 #define TME_LEAVE 0x00000002
635 #define TME_NONCLIENT 0x00000010
636 #define TME_QUERY 0x40000000
637 #define TME_CANCEL 0x80000000
640 #define HOVER_DEFAULT 0xFFFFFFFF
642 typedef struct tagTRACKMOUSEEVENT {
643 DWORD cbSize;
644 DWORD dwFlags;
645 HWND hwndTrack;
646 DWORD dwHoverTime;
647 } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
649 #endif
651 BOOL WINAPI _TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack);
653 /* Flat Scrollbar control */
655 #define FLATSB_CLASSA "flatsb_class32"
656 #if defined(__GNUC__)
657 # define FLATSB_CLASSW (const WCHAR []){ 'f','l','a','t','s','b','_', \
658 'c','l','a','s','s','3','2',0 }
659 #elif defined(_MSC_VER)
660 # define FLATSB_CLASSW L"flatsb_class32"
661 #else
662 static const WCHAR FLATSB_CLASSW[] = { 'f','l','a','t','s','b','_',
663 'c','l','a','s','s','3','2',0 };
664 #endif
665 #define FLATSB_CLASS WINELIB_NAME_AW(FLATSB_CLASS)
667 #define WSB_PROP_CYVSCROLL __MSABI_LONG(0x00000001)
668 #define WSB_PROP_CXHSCROLL __MSABI_LONG(0x00000002)
669 #define WSB_PROP_CYHSCROLL __MSABI_LONG(0x00000004)
670 #define WSB_PROP_CXVSCROLL __MSABI_LONG(0x00000008)
671 #define WSB_PROP_CXHTHUMB __MSABI_LONG(0x00000010)
672 #define WSB_PROP_CYVTHUMB __MSABI_LONG(0x00000020)
673 #define WSB_PROP_VBKGCOLOR __MSABI_LONG(0x00000040)
674 #define WSB_PROP_HBKGCOLOR __MSABI_LONG(0x00000080)
675 #define WSB_PROP_VSTYLE __MSABI_LONG(0x00000100)
676 #define WSB_PROP_HSTYLE __MSABI_LONG(0x00000200)
677 #define WSB_PROP_WINSTYLE __MSABI_LONG(0x00000400)
678 #define WSB_PROP_PALETTE __MSABI_LONG(0x00000800)
679 #define WSB_PROP_MASK __MSABI_LONG(0x00000FFF)
681 #define FSB_REGULAR_MODE 0
682 #define FSB_ENCARTA_MODE 1
683 #define FSB_FLAT_MODE 2
686 BOOL WINAPI FlatSB_EnableScrollBar(HWND, INT, UINT);
687 BOOL WINAPI FlatSB_ShowScrollBar(HWND, INT, BOOL);
688 BOOL WINAPI FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
689 BOOL WINAPI FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
690 INT WINAPI FlatSB_GetScrollPos(HWND, INT);
691 BOOL WINAPI FlatSB_GetScrollProp(HWND, INT, LPINT);
692 INT WINAPI FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
693 INT WINAPI FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
694 INT WINAPI FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
695 BOOL WINAPI FlatSB_SetScrollProp(HWND, UINT, INT, BOOL);
696 BOOL WINAPI InitializeFlatSB(HWND);
697 HRESULT WINAPI UninitializeFlatSB(HWND);
699 /* Subclassing stuff */
700 typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR);
701 BOOL WINAPI SetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
702 BOOL WINAPI GetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR*);
703 BOOL WINAPI RemoveWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR);
704 LRESULT WINAPI DefSubclassProc(HWND, UINT, WPARAM, LPARAM);
706 int WINAPI DrawShadowText(HDC, LPCWSTR, UINT, RECT*, DWORD, COLORREF, COLORREF, int, int);
708 /* Header control */
710 #define WC_HEADERA "SysHeader32"
711 #if defined(__GNUC__)
712 # define WC_HEADERW (const WCHAR []){ 'S','y','s','H','e','a','d','e','r','3','2',0 }
713 #elif defined(_MSC_VER)
714 # define WC_HEADERW L"SysHeader32"
715 #else
716 static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',0 };
717 #endif
718 #define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
721 #define HDI_WIDTH 0x0001
722 #define HDI_HEIGHT HDI_WIDTH
723 #define HDI_TEXT 0x0002
724 #define HDI_FORMAT 0x0004
725 #define HDI_LPARAM 0x0008
726 #define HDI_BITMAP 0x0010
727 #define HDI_IMAGE 0x0020
728 #define HDI_DI_SETITEM 0x0040
729 #define HDI_ORDER 0x0080
730 #define HDI_FILTER 0x0100
731 #define HDI_STATE 0x0200
733 #define HDIS_FOCUSED 0x00000001
735 #define HDF_LEFT 0x0000
736 #define HDF_RIGHT 0x0001
737 #define HDF_CENTER 0x0002
738 #define HDF_JUSTIFYMASK 0x0003
739 #define HDF_RTLREADING 0x0004
740 #define HDF_CHECKBOX 0x0040
741 #define HDF_CHECKED 0x0080
742 #define HDF_FIXEDWIDTH 0x0100
743 #define HDF_SORTDOWN 0x0200
744 #define HDF_SORTUP 0x0400
745 #define HDF_IMAGE 0x0800
746 #define HDF_BITMAP_ON_RIGHT 0x1000
747 #define HDF_BITMAP 0x2000
748 #define HDF_STRING 0x4000
749 #define HDF_OWNERDRAW 0x8000
750 #define HDF_SPLITBUTTON 0x1000000
752 #define HHT_NOWHERE 0x0001
753 #define HHT_ONHEADER 0x0002
754 #define HHT_ONDIVIDER 0x0004
755 #define HHT_ONDIVOPEN 0x0008
756 #define HHT_ONFILTER 0x0010
757 #define HHT_ONFILTERBUTTON 0x0020
758 #define HHT_ABOVE 0x0100
759 #define HHT_BELOW 0x0200
760 #define HHT_TORIGHT 0x0400
761 #define HHT_TOLEFT 0x0800
762 #define HHT_ONITEMSTATEICON 0x1000
763 #define HHT_ONDROPDOWN 0x2000
764 #define HHT_ONOVERFLOW 0x4000
766 #define HDM_FIRST 0x1200
767 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
768 #define HDM_INSERTITEMA (HDM_FIRST+1)
769 #define HDM_INSERTITEMW (HDM_FIRST+10)
770 #define HDM_INSERTITEM WINELIB_NAME_AW(HDM_INSERTITEM)
771 #define HDM_DELETEITEM (HDM_FIRST+2)
772 #define HDM_GETITEMA (HDM_FIRST+3)
773 #define HDM_GETITEMW (HDM_FIRST+11)
774 #define HDM_GETITEM WINELIB_NAME_AW(HDM_GETITEM)
775 #define HDM_SETITEMA (HDM_FIRST+4)
776 #define HDM_SETITEMW (HDM_FIRST+12)
777 #define HDM_SETITEM WINELIB_NAME_AW(HDM_SETITEM)
778 #define HDM_LAYOUT (HDM_FIRST+5)
779 #define HDM_HITTEST (HDM_FIRST+6)
780 #define HDM_GETITEMRECT (HDM_FIRST+7)
781 #define HDM_SETIMAGELIST (HDM_FIRST+8)
782 #define HDM_GETIMAGELIST (HDM_FIRST+9)
784 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
785 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
786 #define HDM_GETORDERARRAY (HDM_FIRST+17)
787 #define HDM_SETORDERARRAY (HDM_FIRST+18)
788 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
789 #define HDM_SETBITMAPMARGIN (HDM_FIRST+20)
790 #define HDM_GETBITMAPMARGIN (HDM_FIRST+21)
791 #define HDM_SETFILTERCHANGETIMEOUT (HDM_FIRST+22)
792 #define HDM_EDITFILTER (HDM_FIRST+23)
793 #define HDM_CLEARFILTER (HDM_FIRST+24)
794 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
795 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
797 #define HDN_FIRST (0U-300U)
798 #define HDN_LAST (0U-399U)
799 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
800 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
801 #define HDN_ITEMCHANGING WINELIB_NAME_AW(HDN_ITEMCHANGING)
802 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
803 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
804 #define HDN_ITEMCHANGED WINELIB_NAME_AW(HDN_ITEMCHANGED)
805 #define HDN_ITEMCLICKA (HDN_FIRST-2)
806 #define HDN_ITEMCLICKW (HDN_FIRST-22)
807 #define HDN_ITEMCLICK WINELIB_NAME_AW(HDN_ITEMCLICK)
808 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
809 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
810 #define HDN_ITEMDBLCLICK WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
811 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
812 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
813 #define HDN_DIVIDERDBLCLICK WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
814 #define HDN_BEGINTRACKA (HDN_FIRST-6)
815 #define HDN_BEGINTRACKW (HDN_FIRST-26)
816 #define HDN_BEGINTRACK WINELIB_NAME_AW(HDN_BEGINTRACK)
817 #define HDN_ENDTRACKA (HDN_FIRST-7)
818 #define HDN_ENDTRACKW (HDN_FIRST-27)
819 #define HDN_ENDTRACK WINELIB_NAME_AW(HDN_ENDTRACK)
820 #define HDN_TRACKA (HDN_FIRST-8)
821 #define HDN_TRACKW (HDN_FIRST-28)
822 #define HDN_TRACK WINELIB_NAME_AW(HDN_TRACK)
823 #define HDN_GETDISPINFOA (HDN_FIRST-9)
824 #define HDN_GETDISPINFOW (HDN_FIRST-29)
825 #define HDN_GETDISPINFO WINELIB_NAME_AW(HDN_GETDISPINFO)
826 #define HDN_BEGINDRAG (HDN_FIRST-10)
827 #define HDN_ENDDRAG (HDN_FIRST-11)
828 #define HDN_FILTERCHANGE (HDN_FIRST-12)
829 #define HDN_FILTERBTNCLICK (HDN_FIRST-13)
830 #define HDN_BEGINFILTEREDIT (HDN_FIRST-14)
831 #define HDN_ENDFILTEREDIT (HDN_FIRST-15)
832 #define HDN_ITEMSTATEICONCLICK (HDN_FIRST-16)
833 #define HDN_ITEMKEYDOWN (HDN_FIRST-17)
835 typedef struct _HD_LAYOUT
837 RECT *prc;
838 WINDOWPOS *pwpos;
839 } HDLAYOUT, *LPHDLAYOUT;
841 #define HD_LAYOUT HDLAYOUT
843 typedef struct _HD_ITEMA
845 UINT mask;
846 INT cxy;
847 LPSTR pszText;
848 HBITMAP hbm;
849 INT cchTextMax;
850 INT fmt;
851 LPARAM lParam;
852 /* (_WIN32_IE >= 0x0300) */
853 INT iImage;
854 INT iOrder;
855 /* (_WIN32_IE >= 0x0500) */
856 UINT type;
857 LPVOID pvFilter;
858 /* (_WIN32_WINNT >= 0x0600) */
859 UINT state;
860 } HDITEMA, *LPHDITEMA;
862 typedef struct _HD_ITEMW
864 UINT mask;
865 INT cxy;
866 LPWSTR pszText;
867 HBITMAP hbm;
868 INT cchTextMax;
869 INT fmt;
870 LPARAM lParam;
871 /* (_WIN32_IE >= 0x0300) */
872 INT iImage;
873 INT iOrder;
874 /* (_WIN32_IE >= 0x0500) */
875 UINT type;
876 LPVOID pvFilter;
877 /* (_WIN32_WINNT >= 0x0600) */
878 UINT state;
879 } HDITEMW, *LPHDITEMW;
881 #define HDITEM WINELIB_NAME_AW(HDITEM)
882 #define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
883 #define HD_ITEM HDITEM
885 #define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
886 #define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
887 #define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
889 #define HDFT_ISSTRING 0x0000
890 #define HDFT_ISNUMBER 0x0001
891 #define HDFT_HASNOVALUE 0x8000
893 typedef struct _HD_TEXTFILTERA
895 LPSTR pszText;
896 INT cchTextMax;
897 } HD_TEXTFILTERA, *LPHD_TEXTFILTERA;
899 typedef struct _HD_TEXTFILTERW
901 LPWSTR pszText;
902 INT cchTextMax;
903 } HD_TEXTFILTERW, *LPHD_TEXTFILTERW;
905 #define HD_TEXTFILTER WINELIB_NAME_AW(HD_TEXTFILTER)
906 #define HDTEXTFILTER WINELIB_NAME_AW(HD_TEXTFILTER)
907 #define LPHD_TEXTFILTER WINELIB_NAME_AW(LPHD_TEXTFILTER)
908 #define LPHDTEXTFILTER WINELIB_NAME_AW(LPHD_TEXTFILTER)
910 typedef struct _HD_HITTESTINFO
912 POINT pt;
913 UINT flags;
914 INT iItem;
915 } HDHITTESTINFO, *LPHDHITTESTINFO;
917 #define HD_HITTESTINFO HDHITTESTINFO
919 typedef struct tagNMHEADERA
921 NMHDR hdr;
922 INT iItem;
923 INT iButton;
924 HDITEMA *pitem;
925 } NMHEADERA, *LPNMHEADERA;
927 typedef struct tagNMHEADERW
929 NMHDR hdr;
930 INT iItem;
931 INT iButton;
932 HDITEMW *pitem;
933 } NMHEADERW, *LPNMHEADERW;
935 #define NMHEADER WINELIB_NAME_AW(NMHEADER)
936 #define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
937 #define HD_NOTIFY NMHEADER
939 typedef struct tagNMHDDISPINFOA
941 NMHDR hdr;
942 INT iItem;
943 UINT mask;
944 LPSTR pszText;
945 INT cchTextMax;
946 INT iImage;
947 LPARAM lParam;
948 } NMHDDISPINFOA, *LPNMHDDISPINFOA;
950 typedef struct tagNMHDDISPINFOW
952 NMHDR hdr;
953 INT iItem;
954 UINT mask;
955 LPWSTR pszText;
956 INT cchTextMax;
957 INT iImage;
958 LPARAM lParam;
959 } NMHDDISPINFOW, *LPNMHDDISPINFOW;
961 #define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
962 #define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
964 typedef struct tagNMHDFILTERBTNCLICK
966 NMHDR hdr;
967 INT iItem;
968 RECT rc;
969 } NMHDFILTERBTNCLICK, *LPNMHDFILTERBTNCLICK;
971 #define Header_GetItemCount(hwndHD) \
972 (INT)SNDMSG((hwndHD), HDM_GETITEMCOUNT, 0, 0)
973 #define Header_InsertItemA(hwndHD,i,phdi) \
974 (INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
975 #define Header_InsertItemW(hwndHD,i,phdi) \
976 (INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
977 #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
978 #define Header_DeleteItem(hwndHD,i) \
979 (BOOL)SNDMSG((hwndHD), HDM_DELETEITEM, (WPARAM)(INT)(i), 0)
980 #define Header_GetItemA(hwndHD,i,phdi) \
981 (BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
982 #define Header_GetItemW(hwndHD,i,phdi) \
983 (BOOL)SNDMSGW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
984 #define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
985 #define Header_SetItemA(hwndHD,i,phdi) \
986 (BOOL)SNDMSGA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
987 #define Header_SetItemW(hwndHD,i,phdi) \
988 (BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
989 #define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
990 #define Header_Layout(hwndHD,playout) \
991 (BOOL)SNDMSG((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
992 #define Header_GetItemRect(hwnd,iItem,lprc) \
993 (BOOL)SNDMSG((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
994 #define Header_SetImageList(hwnd,himl) \
995 (HIMAGELIST)SNDMSG((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
996 #define Header_GetImageList(hwnd) \
997 (HIMAGELIST)SNDMSG((hwnd),HDM_GETIMAGELIST,0,0)
998 #define Header_OrderToIndex(hwnd,i) \
999 (INT)SNDMSG((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
1000 #define Header_CreateDragImage(hwnd,i) \
1001 (HIMAGELIST)SNDMSG((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
1002 #define Header_GetOrderArray(hwnd,iCount,lpi) \
1003 (BOOL)SNDMSG((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
1004 #define Header_SetOrderArray(hwnd,iCount,lpi) \
1005 (BOOL)SNDMSG((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
1006 #define Header_SetHotDivider(hwnd,fPos,dw) \
1007 (INT)SNDMSG((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
1008 #define Header_SetUnicodeFormat(hwnd,fUnicode) \
1009 (BOOL)SNDMSG((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
1010 #define Header_GetUnicodeFormat(hwnd) \
1011 (BOOL)SNDMSG((hwnd),HDM_GETUNICODEFORMAT,0,0)
1013 /* Win32 5.1 Button Theme */
1014 #define WC_BUTTONA "Button"
1015 #if defined(__GNUC__)
1016 # define WC_BUTTONW (const WCHAR []){ 'B','u','t','t','o','n',0 }
1017 #elif defined(_MSC_VER)
1018 # define WC_BUTTONW L"Button"
1019 #else
1020 static const WCHAR WC_BUTTONW[] = { 'B','u','t','t','o','n',0 };
1021 #endif
1022 #define WC_BUTTON WINELIB_NAME_AW(WC_BUTTON)
1024 #define BCN_FIRST (0U-1250U)
1025 #define BCN_LAST (0U-1350U)
1027 #define BCN_HOTITEMCHANGE (BCN_FIRST + 0x0001)
1029 typedef struct tagNMBCHOTITEM
1031 NMHDR hdr;
1032 DWORD dwFlags;
1033 } NMBCHOTITEM, *LPNMBCHOTITEM;
1035 #define BST_HOT 0x0200
1037 /* Button control styles for _WIN32_WINNT >= 0x600 */
1038 #define BS_SPLITBUTTON 0x0000000C
1039 #define BS_DEFSPLITBUTTON 0x0000000D
1040 #define BS_COMMANDLINK 0x0000000E
1041 #define BS_DEFCOMMANDLINK 0x0000000F
1043 /* Toolbar */
1045 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
1046 #if defined(__GNUC__)
1047 # define TOOLBARCLASSNAMEW (const WCHAR []){ 'T','o','o','l','b','a','r', \
1048 'W','i','n','d','o','w','3','2',0 }
1049 #elif defined(_MSC_VER)
1050 # define TOOLBARCLASSNAMEW L"ToolbarWindow32"
1051 #else
1052 static const WCHAR TOOLBARCLASSNAMEW[] = { 'T','o','o','l','b','a','r',
1053 'W','i','n','d','o','w','3','2',0 };
1054 #endif
1055 #define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
1057 #define CMB_MASKED 0x02
1059 #define TBSTATE_CHECKED 0x01
1060 #define TBSTATE_PRESSED 0x02
1061 #define TBSTATE_ENABLED 0x04
1062 #define TBSTATE_HIDDEN 0x08
1063 #define TBSTATE_INDETERMINATE 0x10
1064 #define TBSTATE_WRAP 0x20
1065 #define TBSTATE_ELLIPSES 0x40
1066 #define TBSTATE_MARKED 0x80
1069 /* as of _WIN32_IE >= 0x0500 the following symbols are obsolete,
1070 * "everyone" should use the BTNS_... stuff below
1072 #define TBSTYLE_BUTTON 0x00
1073 #define TBSTYLE_SEP 0x01
1074 #define TBSTYLE_CHECK 0x02
1075 #define TBSTYLE_GROUP 0x04
1076 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
1077 #define TBSTYLE_DROPDOWN 0x08
1078 #define TBSTYLE_AUTOSIZE 0x10
1079 #define TBSTYLE_NOPREFIX 0x20
1080 #define BTNS_BUTTON TBSTYLE_BUTTON
1081 #define BTNS_SEP TBSTYLE_SEP
1082 #define BTNS_CHECK TBSTYLE_CHECK
1083 #define BTNS_GROUP TBSTYLE_GROUP
1084 #define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP
1085 #define BTNS_DROPDOWN TBSTYLE_DROPDOWN
1086 #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE
1087 #define BTNS_NOPREFIX TBSTYLE_NOPREFIX
1088 #define BTNS_SHOWTEXT 0x40 /* ignored unless TBSTYLE_EX_MIXEDB set */
1089 #define BTNS_WHOLEDROPDOWN 0x80 /* draw dropdown arrow, but without split arrow section */
1091 #define TBSTYLE_TOOLTIPS 0x0100
1092 #define TBSTYLE_WRAPABLE 0x0200
1093 #define TBSTYLE_ALTDRAG 0x0400
1094 #define TBSTYLE_FLAT 0x0800
1095 #define TBSTYLE_LIST 0x1000
1096 #define TBSTYLE_CUSTOMERASE 0x2000
1097 #define TBSTYLE_REGISTERDROP 0x4000
1098 #define TBSTYLE_TRANSPARENT 0x8000
1099 #define TBSTYLE_EX_DRAWDDARROWS 0x00000001
1100 #define TBSTYLE_EX_MULTICOLUMN 0x00000002
1101 #define TBSTYLE_EX_VERTICAL 0x00000004
1102 #define TBSTYLE_EX_MIXEDBUTTONS 0x00000008
1103 #define TBSTYLE_EX_HIDECLIPPEDBUTTONS 0x00000010 /* don't show partially obscured buttons */
1104 #define TBSTYLE_EX_DOUBLEBUFFER 0x00000080 /* Double Buffer the toolbar */
1106 #define TBIF_IMAGE 0x00000001
1107 #define TBIF_TEXT 0x00000002
1108 #define TBIF_STATE 0x00000004
1109 #define TBIF_STYLE 0x00000008
1110 #define TBIF_LPARAM 0x00000010
1111 #define TBIF_COMMAND 0x00000020
1112 #define TBIF_SIZE 0x00000040
1113 #define TBIF_BYINDEX 0x80000000
1115 #define TBBF_LARGE 0x0001
1117 #define TB_ENABLEBUTTON (WM_USER+1)
1118 #define TB_CHECKBUTTON (WM_USER+2)
1119 #define TB_PRESSBUTTON (WM_USER+3)
1120 #define TB_HIDEBUTTON (WM_USER+4)
1121 #define TB_INDETERMINATE (WM_USER+5)
1122 #define TB_MARKBUTTON (WM_USER+6)
1123 #define TB_ISBUTTONENABLED (WM_USER+9)
1124 #define TB_ISBUTTONCHECKED (WM_USER+10)
1125 #define TB_ISBUTTONPRESSED (WM_USER+11)
1126 #define TB_ISBUTTONHIDDEN (WM_USER+12)
1127 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
1128 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
1129 #define TB_SETSTATE (WM_USER+17)
1130 #define TB_GETSTATE (WM_USER+18)
1131 #define TB_ADDBITMAP (WM_USER+19)
1132 #define TB_ADDBUTTONSA (WM_USER+20)
1133 #define TB_ADDBUTTONSW (WM_USER+68)
1134 #define TB_ADDBUTTONS WINELIB_NAME_AW(TB_ADDBUTTONS)
1135 #define TB_HITTEST (WM_USER+69)
1136 #define TB_INSERTBUTTONA (WM_USER+21)
1137 #define TB_INSERTBUTTONW (WM_USER+67)
1138 #define TB_INSERTBUTTON WINELIB_NAME_AW(TB_INSERTBUTTON)
1139 #define TB_DELETEBUTTON (WM_USER+22)
1140 #define TB_GETBUTTON (WM_USER+23)
1141 #define TB_BUTTONCOUNT (WM_USER+24)
1142 #define TB_COMMANDTOINDEX (WM_USER+25)
1143 #define TB_SAVERESTOREA (WM_USER+26)
1144 #define TB_SAVERESTOREW (WM_USER+76)
1145 #define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
1146 #define TB_CUSTOMIZE (WM_USER+27)
1147 #define TB_ADDSTRINGA (WM_USER+28)
1148 #define TB_ADDSTRINGW (WM_USER+77)
1149 #define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
1150 #define TB_GETITEMRECT (WM_USER+29)
1151 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
1152 #define TB_SETBUTTONSIZE (WM_USER+31)
1153 #define TB_SETBITMAPSIZE (WM_USER+32)
1154 #define TB_AUTOSIZE (WM_USER+33)
1155 #define TB_GETTOOLTIPS (WM_USER+35)
1156 #define TB_SETTOOLTIPS (WM_USER+36)
1157 #define TB_SETPARENT (WM_USER+37)
1158 #define TB_SETROWS (WM_USER+39)
1159 #define TB_GETROWS (WM_USER+40)
1160 #define TB_GETBITMAPFLAGS (WM_USER+41)
1161 #define TB_SETCMDID (WM_USER+42)
1162 #define TB_CHANGEBITMAP (WM_USER+43)
1163 #define TB_GETBITMAP (WM_USER+44)
1164 #define TB_GETBUTTONTEXTA (WM_USER+45)
1165 #define TB_GETBUTTONTEXTW (WM_USER+75)
1166 #define TB_GETBUTTONTEXT WINELIB_NAME_AW(TB_GETBUTTONTEXT)
1167 #define TB_REPLACEBITMAP (WM_USER+46)
1168 #define TB_SETINDENT (WM_USER+47)
1169 #define TB_SETIMAGELIST (WM_USER+48)
1170 #define TB_GETIMAGELIST (WM_USER+49)
1171 #define TB_LOADIMAGES (WM_USER+50)
1172 #define TB_GETRECT (WM_USER+51) /* wParam is the Cmd instead of index */
1173 #define TB_SETHOTIMAGELIST (WM_USER+52)
1174 #define TB_GETHOTIMAGELIST (WM_USER+53)
1175 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
1176 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
1177 #define TB_SETSTYLE (WM_USER+56)
1178 #define TB_GETSTYLE (WM_USER+57)
1179 #define TB_GETBUTTONSIZE (WM_USER+58)
1180 #define TB_SETBUTTONWIDTH (WM_USER+59)
1181 #define TB_SETMAXTEXTROWS (WM_USER+60)
1182 #define TB_GETTEXTROWS (WM_USER+61)
1183 #define TB_GETOBJECT (WM_USER+62)
1184 #define TB_GETBUTTONINFOW (WM_USER+63)
1185 #define TB_GETBUTTONINFOA (WM_USER+65)
1186 #define TB_GETBUTTONINFO WINELIB_NAME_AW(TB_GETBUTTONINFO)
1187 #define TB_SETBUTTONINFOW (WM_USER+64)
1188 #define TB_SETBUTTONINFOA (WM_USER+66)
1189 #define TB_SETBUTTONINFO WINELIB_NAME_AW(TB_SETBUTTONINFO)
1190 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
1191 #define TB_GETHOTITEM (WM_USER+71)
1192 #define TB_SETHOTITEM (WM_USER+72)
1193 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
1194 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
1195 #define TB_MAPACCELERATORA (WM_USER+78)
1196 #define TB_MAPACCELERATORW (WM_USER+90)
1197 #define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
1198 #define TB_GETINSERTMARK (WM_USER+79)
1199 #define TB_SETINSERTMARK (WM_USER+80)
1200 #define TB_INSERTMARKHITTEST (WM_USER+81)
1201 #define TB_MOVEBUTTON (WM_USER+82)
1202 #define TB_GETMAXSIZE (WM_USER+83)
1203 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
1204 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
1205 #define TB_GETPADDING (WM_USER+86)
1206 #define TB_SETPADDING (WM_USER+87)
1207 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
1208 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
1209 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1210 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1211 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1212 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1213 #define TB_GETSTRINGW (WM_USER+91)
1214 #define TB_GETSTRINGA (WM_USER+92)
1215 #define TB_GETSTRING WINELIB_NAME_AW(TB_GETSTRING)
1216 #define TB_SETBOUNDINGSIZE (WM_USER+93)
1217 #define TB_SETHOTITEM2 (WM_USER+94)
1218 #define TB_HASACCELERATOR (WM_USER+95)
1219 #define TB_SETLISTGAP (WM_USER+96)
1220 #define TB_GETIMAGELISTCOUNT (WM_USER+98)
1221 #define TB_GETIDEALSIZE (WM_USER+99)
1223 /* undocumented messages in Toolbar */
1224 #ifdef __WINESRC__
1225 #define TB_UNKWN464 (WM_USER+100)
1226 #endif
1228 #define TB_GETMETRICS (WM_USER+101)
1229 #define TB_SETMETRICS (WM_USER+102)
1230 #define TB_SETWINDOWTHEME CCM_SETWINDOWTHEME
1232 #define TBN_FIRST (0U-700U)
1233 #define TBN_LAST (0U-720U)
1234 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
1235 #define TBN_GETBUTTONINFOW (TBN_FIRST-20)
1236 #define TBN_GETBUTTONINFO WINELIB_NAME_AW(TBN_GETBUTTONINFO)
1237 #define TBN_BEGINDRAG (TBN_FIRST-1)
1238 #define TBN_ENDDRAG (TBN_FIRST-2)
1239 #define TBN_BEGINADJUST (TBN_FIRST-3)
1240 #define TBN_ENDADJUST (TBN_FIRST-4)
1241 #define TBN_RESET (TBN_FIRST-5)
1242 #define TBN_QUERYINSERT (TBN_FIRST-6)
1243 #define TBN_QUERYDELETE (TBN_FIRST-7)
1244 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
1245 #define TBN_CUSTHELP (TBN_FIRST-9)
1246 #define TBN_DROPDOWN (TBN_FIRST-10)
1247 #define TBN_GETOBJECT (TBN_FIRST-12)
1248 #define TBN_HOTITEMCHANGE (TBN_FIRST-13)
1249 #define TBN_DRAGOUT (TBN_FIRST-14)
1250 #define TBN_DELETINGBUTTON (TBN_FIRST-15)
1251 #define TBN_GETDISPINFOA (TBN_FIRST-16)
1252 #define TBN_GETDISPINFOW (TBN_FIRST-17)
1253 #define TBN_GETDISPINFO WINELIB_NAME_AW(TBN_GETDISPINFO)
1254 #define TBN_GETINFOTIPA (TBN_FIRST-18)
1255 #define TBN_GETINFOTIPW (TBN_FIRST-19)
1256 #define TBN_GETINFOTIP WINELIB_NAME_AW(TBN_GETINFOTIP)
1257 #define TBN_RESTORE (TBN_FIRST-21)
1258 #define TBN_SAVE (TBN_FIRST-22)
1259 #define TBN_INITCUSTOMIZE (TBN_FIRST-23)
1260 #define TBN_WRAPHOTITEM (TBN_FIRST-24) /* this is undocumented and the name is a guess */
1261 #define TBNRF_HIDEHELP 0x00000001
1264 /* Return values from TBN_DROPDOWN */
1265 #define TBDDRET_DEFAULT 0
1266 #define TBDDRET_NODEFAULT 1
1267 #define TBDDRET_TREATPRESSED 2
1269 typedef struct _NMTBCUSTOMDRAW
1271 NMCUSTOMDRAW nmcd;
1272 HBRUSH hbrMonoDither;
1273 HBRUSH hbrLines;
1274 HPEN hpenLines;
1275 COLORREF clrText;
1276 COLORREF clrMark;
1277 COLORREF clrTextHighlight;
1278 COLORREF clrBtnFace;
1279 COLORREF clrBtnHighlight;
1280 COLORREF clrHighlightHotTrack;
1281 RECT rcText;
1282 int nStringBkMode;
1283 int nHLStringBkMode;
1284 int iListGap;
1285 } NMTBCUSTOMDRAW, *LPNMTBCUSTOMDRAW;
1287 /* return flags for Toolbar NM_CUSTOMDRAW notifications */
1288 #define TBCDRF_NOEDGES 0x00010000 /* Don't draw button edges */
1289 #define TBCDRF_HILITEHOTTRACK 0x00020000 /* Use color of the button bkgnd */
1290 /* when hottracked */
1291 #define TBCDRF_NOOFFSET 0x00040000 /* No offset button if pressed */
1292 #define TBCDRF_NOMARK 0x00080000 /* Don't draw default highlight */
1293 /* for TBSTATE_MARKED */
1294 #define TBCDRF_NOETCHEDEFFECT 0x00100000 /* No etched effect for */
1295 /* disabled items */
1296 #define TBCDRF_BLENDICON 0x00200000 /* ILD_BLEND50 on the icon image */
1297 #define TBCDRF_NOBACKGROUND 0x00400000 /* ILD_BLEND50 on the icon image */
1298 #define TBCDRF_USECDCOLORS 0x00800000
1301 /* This is just for old CreateToolbar. */
1302 /* Don't use it in new programs. */
1303 typedef struct _OLDTBBUTTON {
1304 INT iBitmap;
1305 INT idCommand;
1306 BYTE fsState;
1307 BYTE fsStyle;
1308 BYTE bReserved[2];
1309 DWORD dwData;
1310 } OLDTBBUTTON, *POLDTBBUTTON, *LPOLDTBBUTTON;
1311 typedef const OLDTBBUTTON *LPCOLDTBBUTTON;
1314 typedef struct _TBBUTTON {
1315 INT iBitmap;
1316 INT idCommand;
1317 BYTE fsState;
1318 BYTE fsStyle;
1319 #ifdef _WIN64
1320 BYTE bReserved[6];
1321 #else
1322 BYTE bReserved[2];
1323 #endif
1324 DWORD_PTR dwData;
1325 INT_PTR iString;
1326 } TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
1327 typedef const TBBUTTON *LPCTBBUTTON;
1330 typedef struct _COLORMAP {
1331 COLORREF from;
1332 COLORREF to;
1333 } COLORMAP, *LPCOLORMAP;
1336 typedef struct tagTBADDBITMAP {
1337 HINSTANCE hInst;
1338 UINT_PTR nID;
1339 } TBADDBITMAP, *LPTBADDBITMAP;
1341 #define HINST_COMMCTRL ((HINSTANCE)-1)
1342 #define IDB_STD_SMALL_COLOR 0
1343 #define IDB_STD_LARGE_COLOR 1
1344 #define IDB_VIEW_SMALL_COLOR 4
1345 #define IDB_VIEW_LARGE_COLOR 5
1346 #define IDB_HIST_SMALL_COLOR 8
1347 #define IDB_HIST_LARGE_COLOR 9
1349 #define STD_CUT 0
1350 #define STD_COPY 1
1351 #define STD_PASTE 2
1352 #define STD_UNDO 3
1353 #define STD_REDOW 4
1354 #define STD_DELETE 5
1355 #define STD_FILENEW 6
1356 #define STD_FILEOPEN 7
1357 #define STD_FILESAVE 8
1358 #define STD_PRINTPRE 9
1359 #define STD_PROPERTIES 10
1360 #define STD_HELP 11
1361 #define STD_FIND 12
1362 #define STD_REPLACE 13
1363 #define STD_PRINT 14
1365 #define VIEW_LARGEICONS 0
1366 #define VIEW_SMALLICONS 1
1367 #define VIEW_LIST 2
1368 #define VIEW_DETAILS 3
1369 #define VIEW_SORTNAME 4
1370 #define VIEW_SORTSIZE 5
1371 #define VIEW_SORTDATE 6
1372 #define VIEW_SORTTYPE 7
1373 #define VIEW_PARENTFOLDER 8
1374 #define VIEW_NETCONNECT 9
1375 #define VIEW_NETDISCONNECT 10
1376 #define VIEW_NEWFOLDER 11
1377 #define VIEW_VIEWMENU 12
1379 #define HIST_BACK 0
1380 #define HIST_FORWARD 1
1381 #define HIST_FAVORITES 2
1382 #define HIST_ADDTOFAVORITES 3
1383 #define HIST_VIEWTREE 4
1385 typedef struct tagTBSAVEPARAMSA {
1386 HKEY hkr;
1387 LPCSTR pszSubKey;
1388 LPCSTR pszValueName;
1389 } TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
1391 typedef struct tagTBSAVEPARAMSW {
1392 HKEY hkr;
1393 LPCWSTR pszSubKey;
1394 LPCWSTR pszValueName;
1395 } TBSAVEPARAMSW, *LPTBSAVEPARAMSW;
1397 #define TBSAVEPARAMS WINELIB_NAME_AW(TBSAVEPARAMS)
1398 #define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
1400 typedef struct
1402 UINT cbSize;
1403 DWORD dwMask;
1404 INT idCommand;
1405 INT iImage;
1406 BYTE fsState;
1407 BYTE fsStyle;
1408 WORD cx;
1409 DWORD_PTR lParam;
1410 LPSTR pszText;
1411 INT cchText;
1412 } TBBUTTONINFOA, *LPTBBUTTONINFOA;
1414 typedef struct
1416 UINT cbSize;
1417 DWORD dwMask;
1418 INT idCommand;
1419 INT iImage;
1420 BYTE fsState;
1421 BYTE fsStyle;
1422 WORD cx;
1423 DWORD_PTR lParam;
1424 LPWSTR pszText;
1425 INT cchText;
1426 } TBBUTTONINFOW, *LPTBBUTTONINFOW;
1428 #define TBBUTTONINFO WINELIB_NAME_AW(TBBUTTONINFO)
1429 #define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
1431 typedef struct tagNMTBHOTITEM
1433 NMHDR hdr;
1434 int idOld;
1435 int idNew;
1436 DWORD dwFlags;
1437 } NMTBHOTITEM, *LPNMTBHOTITEM;
1439 typedef struct tagNMTBGETINFOTIPA
1441 NMHDR hdr;
1442 LPSTR pszText;
1443 INT cchTextMax;
1444 INT iItem;
1445 LPARAM lParam;
1446 } NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
1448 typedef struct tagNMTBGETINFOTIPW
1450 NMHDR hdr;
1451 LPWSTR pszText;
1452 INT cchTextMax;
1453 INT iItem;
1454 LPARAM lParam;
1455 } NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
1457 #define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOTIP)
1458 #define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
1460 typedef struct
1462 NMHDR hdr;
1463 DWORD dwMask;
1464 int idCommand;
1465 DWORD_PTR lParam;
1466 int iImage;
1467 LPSTR pszText;
1468 int cchText;
1469 } NMTBDISPINFOA, *LPNMTBDISPINFOA;
1471 typedef struct
1473 NMHDR hdr;
1474 DWORD dwMask;
1475 int idCommand;
1476 DWORD_PTR lParam;
1477 int iImage;
1478 LPWSTR pszText;
1479 int cchText;
1480 } NMTBDISPINFOW, *LPNMTBDISPINFOW;
1482 #define NMTBDISPINFO WINELIB_NAME_AW(NMTBDISPINFO)
1483 #define LPNMTBDISPINFO WINELIB_NAME_AW(LPNMTBDISPINFO)
1485 /* contents of dwMask in the NMTBDISPINFO structure */
1486 #define TBNF_IMAGE 0x00000001
1487 #define TBNF_TEXT 0x00000002
1488 #define TBNF_DI_SETITEM 0x10000000
1491 typedef struct tagNMTOOLBARA
1493 NMHDR hdr;
1494 INT iItem;
1495 TBBUTTON tbButton;
1496 INT cchText;
1497 LPSTR pszText;
1498 RECT rcButton; /* Version 5.80 */
1499 } NMTOOLBARA, *LPNMTOOLBARA, TBNOTIFYA, *LPTBNOTIFYA;
1501 typedef struct tagNMTOOLBARW
1503 NMHDR hdr;
1504 INT iItem;
1505 TBBUTTON tbButton;
1506 INT cchText;
1507 LPWSTR pszText;
1508 RECT rcButton; /* Version 5.80 */
1509 } NMTOOLBARW, *LPNMTOOLBARW, TBNOTIFYW, *LPTBNOTIFYW;
1511 #define NMTOOLBAR WINELIB_NAME_AW(NMTOOLBAR)
1512 #define LPNMTOOLBAR WINELIB_NAME_AW(LPNMTOOLBAR)
1513 #define TBNOTIFY WINELIB_NAME_AW(TBNOTIFY)
1514 #define LPTBNOTIFY WINELIB_NAME_AW(LPTBNOTIFY)
1516 typedef struct
1518 HINSTANCE hInstOld;
1519 UINT_PTR nIDOld;
1520 HINSTANCE hInstNew;
1521 UINT_PTR nIDNew;
1522 INT nButtons;
1523 } TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
1525 #define HICF_OTHER 0x00000000
1526 #define HICF_MOUSE 0x00000001 /* Triggered by mouse */
1527 #define HICF_ARROWKEYS 0x00000002 /* Triggered by arrow keys */
1528 #define HICF_ACCELERATOR 0x00000004 /* Triggered by accelerator */
1529 #define HICF_DUPACCEL 0x00000008 /* This accelerator is not unique */
1530 #define HICF_ENTERING 0x00000010 /* idOld is invalid */
1531 #define HICF_LEAVING 0x00000020 /* idNew is invalid */
1532 #define HICF_RESELECT 0x00000040 /* hot item reselected */
1533 #define HICF_LMOUSE 0x00000080 /* left mouse button selected */
1534 #define HICF_TOGGLEDROPDOWN 0x00000100 /* Toggle button's dropdown state */
1536 typedef struct
1538 int iButton;
1539 DWORD dwFlags;
1540 } TBINSERTMARK, *LPTBINSERTMARK;
1541 #define TBIMHT_AFTER 0x00000001 /* TRUE = insert After iButton, otherwise before */
1542 #define TBIMHT_BACKGROUND 0x00000002 /* TRUE if and only if missed buttons completely */
1544 typedef struct tagNMTBSAVE
1546 NMHDR hdr;
1547 DWORD* pData;
1548 DWORD* pCurrent;
1549 UINT cbData;
1550 int iItem;
1551 int cButtons;
1552 TBBUTTON tbButton;
1553 } NMTBSAVE, *LPNMTBSAVE;
1555 typedef struct tagNMTBRESTORE
1557 NMHDR hdr;
1558 DWORD* pData;
1559 DWORD* pCurrent;
1560 UINT cbData;
1561 int iItem;
1562 int cButtons;
1563 int cbBytesPerRecord;
1564 TBBUTTON tbButton;
1565 } NMTBRESTORE, *LPNMTBRESTORE;
1567 #define TBMF_PAD 0x00000001
1568 #define TBMF_BARPAD 0x00000002
1569 #define TBMF_BUTTONSPACING 0x00000004
1571 typedef struct
1573 UINT cbSize;
1574 DWORD dwMask;
1575 INT cxPad;
1576 INT cyPad;
1577 INT cxBarPad;
1578 INT cyBarPad;
1579 INT cxButtonSpacing;
1580 INT cyButtonSpacing;
1581 } TBMETRICS, *LPTBMETRICS;
1583 /* these are undocumented and the names are guesses */
1584 typedef struct
1586 NMHDR hdr;
1587 HWND hwndDialog;
1588 } NMTBINITCUSTOMIZE;
1590 typedef struct
1592 NMHDR hdr;
1593 INT idNew;
1594 INT iDirection; /* left is -1, right is 1 */
1595 DWORD dwReason; /* HICF_* */
1596 } NMTBWRAPHOTITEM;
1599 HWND WINAPI
1600 CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
1601 UINT, LPCTBBUTTON, INT);
1603 HWND WINAPI
1604 CreateToolbarEx(HWND, DWORD, UINT, INT,
1605 HINSTANCE, UINT_PTR, LPCTBBUTTON,
1606 INT, INT, INT, INT, INT, UINT);
1608 HBITMAP WINAPI
1609 CreateMappedBitmap (HINSTANCE, INT_PTR, UINT, LPCOLORMAP, INT);
1612 /* Tool tips */
1614 #define TOOLTIPS_CLASSA "tooltips_class32"
1615 #if defined(__GNUC__)
1616 # define TOOLTIPS_CLASSW (const WCHAR []){ 't','o','o','l','t','i','p','s','_', \
1617 'c','l','a','s','s','3','2',0 }
1618 #elif defined(_MSC_VER)
1619 # define TOOLTIPS_CLASSW L"tooltips_class32"
1620 #else
1621 static const WCHAR TOOLTIPS_CLASSW[] = { 't','o','o','l','t','i','p','s','_',
1622 'c','l','a','s','s','3','2',0 };
1623 #endif
1624 #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
1626 #define INFOTIPSIZE 1024
1629 #define TTF_IDISHWND 0x0001
1630 #define TTF_CENTERTIP 0x0002
1631 #define TTF_RTLREADING 0x0004
1632 #define TTF_SUBCLASS 0x0010
1633 #define TTF_TRACK 0x0020
1634 #define TTF_ABSOLUTE 0x0080
1635 #define TTF_TRANSPARENT 0x0100
1636 #define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
1639 #define TTDT_AUTOMATIC 0
1640 #define TTDT_RESHOW 1
1641 #define TTDT_AUTOPOP 2
1642 #define TTDT_INITIAL 3
1645 #define TTI_NONE 0
1646 #define TTI_INFO 1
1647 #define TTI_WARNING 2
1648 #define TTI_ERROR 3
1651 #define TTM_ACTIVATE (WM_USER+1)
1652 #define TTM_SETDELAYTIME (WM_USER+3)
1653 #define TTM_ADDTOOLA (WM_USER+4)
1654 #define TTM_ADDTOOLW (WM_USER+50)
1655 #define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
1656 #define TTM_DELTOOLA (WM_USER+5)
1657 #define TTM_DELTOOLW (WM_USER+51)
1658 #define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
1659 #define TTM_NEWTOOLRECTA (WM_USER+6)
1660 #define TTM_NEWTOOLRECTW (WM_USER+52)
1661 #define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
1662 #define TTM_RELAYEVENT (WM_USER+7)
1663 #define TTM_GETTOOLINFOA (WM_USER+8)
1664 #define TTM_GETTOOLINFOW (WM_USER+53)
1665 #define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
1666 #define TTM_SETTOOLINFOA (WM_USER+9)
1667 #define TTM_SETTOOLINFOW (WM_USER+54)
1668 #define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
1669 #define TTM_HITTESTA (WM_USER+10)
1670 #define TTM_HITTESTW (WM_USER+55)
1671 #define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
1672 #define TTM_GETTEXTA (WM_USER+11)
1673 #define TTM_GETTEXTW (WM_USER+56)
1674 #define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
1675 #define TTM_UPDATETIPTEXTA (WM_USER+12)
1676 #define TTM_UPDATETIPTEXTW (WM_USER+57)
1677 #define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
1678 #define TTM_GETTOOLCOUNT (WM_USER+13)
1679 #define TTM_ENUMTOOLSA (WM_USER+14)
1680 #define TTM_ENUMTOOLSW (WM_USER+58)
1681 #define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
1682 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1683 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1684 #define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
1685 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1686 #define TTM_TRACKACTIVATE (WM_USER+17)
1687 #define TTM_TRACKPOSITION (WM_USER+18)
1688 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1689 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1690 #define TTM_GETDELAYTIME (WM_USER+21)
1691 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1692 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1693 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1694 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1695 #define TTM_SETMARGIN (WM_USER+26)
1696 #define TTM_GETMARGIN (WM_USER+27)
1697 #define TTM_POP (WM_USER+28)
1698 #define TTM_UPDATE (WM_USER+29)
1699 #define TTM_GETBUBBLESIZE (WM_USER+30)
1700 #define TTM_ADJUSTRECT (WM_USER+31)
1701 #define TTM_SETTITLEA (WM_USER+32)
1702 #define TTM_SETTITLEW (WM_USER+33)
1703 #define TTM_SETTITLE WINELIB_NAME_AW(TTM_SETTITLE)
1704 #define TTM_POPUP (WM_USER+34)
1705 #define TTM_GETTITLE (WM_USER+35)
1706 #define TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME
1709 #define TTN_FIRST (0U-520U)
1710 #define TTN_LAST (0U-549U)
1711 #define TTN_GETDISPINFOA (TTN_FIRST-0)
1712 #define TTN_GETDISPINFOW (TTN_FIRST-10)
1713 #define TTN_GETDISPINFO WINELIB_NAME_AW(TTN_GETDISPINFO)
1714 #define TTN_SHOW (TTN_FIRST-1)
1715 #define TTN_POP (TTN_FIRST-2)
1717 #define TTN_NEEDTEXT TTN_GETDISPINFO
1718 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1719 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1721 typedef struct tagTOOLINFOA {
1722 UINT cbSize;
1723 UINT uFlags;
1724 HWND hwnd;
1725 UINT_PTR uId;
1726 RECT rect;
1727 HINSTANCE hinst;
1728 LPSTR lpszText;
1729 LPARAM lParam;
1730 void *lpReserved;
1731 } TTTOOLINFOA, *LPTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
1733 typedef struct tagTOOLINFOW {
1734 UINT cbSize;
1735 UINT uFlags;
1736 HWND hwnd;
1737 UINT_PTR uId;
1738 RECT rect;
1739 HINSTANCE hinst;
1740 LPWSTR lpszText;
1741 LPARAM lParam;
1742 void *lpReserved;
1743 } TTTOOLINFOW, *LPTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW;
1745 #define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1746 #define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1747 #define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
1748 #define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
1749 #define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
1751 #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
1752 #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
1753 #define TTTOOLINFO_V1_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(TTTOOLINFO), lpszText)
1754 #define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lParam)
1755 #define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lParam)
1756 #define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpReserved)
1757 #define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpReserved)
1759 typedef struct _TT_HITTESTINFOA
1761 HWND hwnd;
1762 POINT pt;
1763 TTTOOLINFOA ti;
1764 } TTHITTESTINFOA, *LPTTHITTESTINFOA;
1765 #define LPHITTESTINFOA LPTTHITTESTINFOA
1767 typedef struct _TT_HITTESTINFOW
1769 HWND hwnd;
1770 POINT pt;
1771 TTTOOLINFOW ti;
1772 } TTHITTESTINFOW, *LPTTHITTESTINFOW;
1773 #define LPHITTESTINFOW LPTTHITTESTINFOW
1775 #define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
1776 #define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
1777 #define LPHITTESTINFO WINELIB_NAME_AW(LPHITTESTINFO)
1779 typedef struct tagNMTTDISPINFOA
1781 NMHDR hdr;
1782 LPSTR lpszText;
1783 CHAR szText[80];
1784 HINSTANCE hinst;
1785 UINT uFlags;
1786 LPARAM lParam;
1787 } NMTTDISPINFOA, *LPNMTTDISPINFOA;
1789 typedef struct tagNMTTDISPINFOW
1791 NMHDR hdr;
1792 LPWSTR lpszText;
1793 WCHAR szText[80];
1794 HINSTANCE hinst;
1795 UINT uFlags;
1796 LPARAM lParam;
1797 } NMTTDISPINFOW, *LPNMTTDISPINFOW;
1799 #define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
1800 #define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
1802 #define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
1803 #define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
1804 #define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)
1806 typedef struct _TTGETTITLE
1808 DWORD dwSize;
1809 UINT uTitleBitmap;
1810 UINT cch;
1811 WCHAR* pszTitle;
1812 } TTGETTITLE, *PTTGETTITLE;
1814 #define TOOLTIPTEXTW NMTTDISPINFOW
1815 #define TOOLTIPTEXTA NMTTDISPINFOA
1816 #define TOOLTIPTEXT NMTTDISPINFO
1817 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1818 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1819 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1822 /* Rebar control */
1824 #define REBARCLASSNAMEA "ReBarWindow32"
1825 #if defined(__GNUC__)
1826 # define REBARCLASSNAMEW (const WCHAR []){ 'R','e','B','a','r', \
1827 'W','i','n','d','o','w','3','2',0 }
1828 #elif defined(_MSC_VER)
1829 # define REBARCLASSNAMEW L"ReBarWindow32"
1830 #else
1831 static const WCHAR REBARCLASSNAMEW[] = { 'R','e','B','a','r',
1832 'W','i','n','d','o','w','3','2',0 };
1833 #endif
1834 #define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
1837 #define RBIM_IMAGELIST 0x00000001
1839 #define RBBIM_STYLE 0x00000001
1840 #define RBBIM_COLORS 0x00000002
1841 #define RBBIM_TEXT 0x00000004
1842 #define RBBIM_IMAGE 0x00000008
1843 #define RBBIM_CHILD 0x00000010
1844 #define RBBIM_CHILDSIZE 0x00000020
1845 #define RBBIM_SIZE 0x00000040
1846 #define RBBIM_BACKGROUND 0x00000080
1847 #define RBBIM_ID 0x00000100
1848 #define RBBIM_IDEALSIZE 0x00000200
1849 #define RBBIM_LPARAM 0x00000400
1850 #define RBBIM_HEADERSIZE 0x00000800
1852 #define RBBS_BREAK 0x00000001
1853 #define RBBS_FIXEDSIZE 0x00000002
1854 #define RBBS_CHILDEDGE 0x00000004
1855 #define RBBS_HIDDEN 0x00000008
1856 #define RBBS_NOVERT 0x00000010
1857 #define RBBS_FIXEDBMP 0x00000020
1858 #define RBBS_VARIABLEHEIGHT 0x00000040
1859 #define RBBS_GRIPPERALWAYS 0x00000080
1860 #define RBBS_NOGRIPPER 0x00000100
1861 #define RBBS_USECHEVRON 0x00000200
1862 #define RBBS_HIDETITLE 0x00000400
1863 #define RBBS_TOPALIGN 0x00000800
1865 #define RBNM_ID 0x00000001
1866 #define RBNM_STYLE 0x00000002
1867 #define RBNM_LPARAM 0x00000004
1869 #define RBHT_NOWHERE 0x0001
1870 #define RBHT_CAPTION 0x0002
1871 #define RBHT_CLIENT 0x0003
1872 #define RBHT_GRABBER 0x0004
1873 #define RBHT_CHEVRON 0x0008
1875 #define RB_INSERTBANDA (WM_USER+1)
1876 #define RB_INSERTBANDW (WM_USER+10)
1877 #define RB_INSERTBAND WINELIB_NAME_AW(RB_INSERTBAND)
1878 #define RB_DELETEBAND (WM_USER+2)
1879 #define RB_GETBARINFO (WM_USER+3)
1880 #define RB_SETBARINFO (WM_USER+4)
1881 #define RB_SETBANDINFOA (WM_USER+6)
1882 #define RB_SETBANDINFOW (WM_USER+11)
1883 #define RB_SETBANDINFO WINELIB_NAME_AW(RB_SETBANDINFO)
1884 #define RB_SETPARENT (WM_USER+7)
1885 #define RB_HITTEST (WM_USER+8)
1886 #define RB_GETRECT (WM_USER+9)
1887 #define RB_GETBANDCOUNT (WM_USER+12)
1888 #define RB_GETROWCOUNT (WM_USER+13)
1889 #define RB_GETROWHEIGHT (WM_USER+14)
1890 #define RB_IDTOINDEX (WM_USER+16)
1891 #define RB_GETTOOLTIPS (WM_USER+17)
1892 #define RB_SETTOOLTIPS (WM_USER+18)
1893 #define RB_SETBKCOLOR (WM_USER+19)
1894 #define RB_GETBKCOLOR (WM_USER+20)
1895 #define RB_SETTEXTCOLOR (WM_USER+21)
1896 #define RB_GETTEXTCOLOR (WM_USER+22)
1897 #define RB_SIZETORECT (WM_USER+23)
1898 #define RB_BEGINDRAG (WM_USER+24)
1899 #define RB_ENDDRAG (WM_USER+25)
1900 #define RB_DRAGMOVE (WM_USER+26)
1901 #define RB_GETBARHEIGHT (WM_USER+27)
1902 #define RB_GETBANDINFOW (WM_USER+28)
1903 #define RB_GETBANDINFOA (WM_USER+29)
1904 #define RB_GETBANDINFO WINELIB_NAME_AW(RB_GETBANDINFO)
1905 #define RB_MINIMIZEBAND (WM_USER+30)
1906 #define RB_MAXIMIZEBAND (WM_USER+31)
1907 #define RB_GETBANDBORDERS (WM_USER+34)
1908 #define RB_SHOWBAND (WM_USER+35)
1909 #define RB_SETPALETTE (WM_USER+37)
1910 #define RB_GETPALETTE (WM_USER+38)
1911 #define RB_MOVEBAND (WM_USER+39)
1912 #define RB_GETBANDMARGINS (WM_USER+40)
1913 #define RB_PUSHCHEVRON (WM_USER+43)
1914 #define RB_GETDROPTARGET CCM_GETDROPTARGET
1915 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1916 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1917 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1918 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1919 #define RB_SETWINDOWTHEME CCM_SETWINDOWTHEME
1921 #define RBN_FIRST (0U-831U)
1922 #define RBN_LAST (0U-859U)
1923 #define RBN_HEIGHTCHANGE (RBN_FIRST-0)
1924 #define RBN_GETOBJECT (RBN_FIRST-1)
1925 #define RBN_LAYOUTCHANGED (RBN_FIRST-2)
1926 #define RBN_AUTOSIZE (RBN_FIRST-3)
1927 #define RBN_BEGINDRAG (RBN_FIRST-4)
1928 #define RBN_ENDDRAG (RBN_FIRST-5)
1929 #define RBN_DELETINGBAND (RBN_FIRST-6)
1930 #define RBN_DELETEDBAND (RBN_FIRST-7)
1931 #define RBN_CHILDSIZE (RBN_FIRST-8)
1932 #define RBN_CHEVRONPUSHED (RBN_FIRST-10)
1933 #define RBN_MINMAX (RBN_FIRST-21)
1934 #define RBN_AUTOBREAK (RBN_FIRST-22)
1936 typedef struct tagREBARINFO
1938 UINT cbSize;
1939 UINT fMask;
1940 HIMAGELIST himl;
1941 } REBARINFO, *LPREBARINFO;
1943 typedef struct tagREBARBANDINFOA
1945 UINT cbSize;
1946 UINT fMask;
1947 UINT fStyle;
1948 COLORREF clrFore;
1949 COLORREF clrBack;
1950 LPSTR lpText;
1951 UINT cch;
1952 INT iImage;
1953 HWND hwndChild;
1954 UINT cxMinChild;
1955 UINT cyMinChild;
1956 UINT cx;
1957 HBITMAP hbmBack;
1958 UINT wID;
1959 UINT cyChild;
1960 UINT cyMaxChild;
1961 UINT cyIntegral;
1962 UINT cxIdeal;
1963 LPARAM lParam;
1964 UINT cxHeader;
1965 /* _WIN32_WINNT >= 0x0600 */
1966 RECT rcChevronLocation;
1967 UINT uChevronState;
1968 } REBARBANDINFOA, *LPREBARBANDINFOA;
1970 typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
1972 typedef struct tagREBARBANDINFOW
1974 UINT cbSize;
1975 UINT fMask;
1976 UINT fStyle;
1977 COLORREF clrFore;
1978 COLORREF clrBack;
1979 LPWSTR lpText;
1980 UINT cch;
1981 INT iImage;
1982 HWND hwndChild;
1983 UINT cxMinChild;
1984 UINT cyMinChild;
1985 UINT cx;
1986 HBITMAP hbmBack;
1987 UINT wID;
1988 UINT cyChild;
1989 UINT cyMaxChild;
1990 UINT cyIntegral;
1991 UINT cxIdeal;
1992 LPARAM lParam;
1993 UINT cxHeader;
1994 /* _WIN32_WINNT >= 0x0600 */
1995 RECT rcChevronLocation;
1996 UINT uChevronState;
1997 } REBARBANDINFOW, *LPREBARBANDINFOW;
1999 typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
2001 #define REBARBANDINFO WINELIB_NAME_AW(REBARBANDINFO)
2002 #define LPREBARBANDINFO WINELIB_NAME_AW(LPREBARBANDINFO)
2003 #define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
2005 #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
2006 #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
2007 #define REBARBANDINFO_V3_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(REBARBANDINFO), wID)
2008 #define REBARBANDINFOA_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, cxHeader)
2009 #define REBARBANDINFOW_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, cxHeader)
2010 #define REBARBANDINFO_V6_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(REBARBANDINFO), cxHeader)
2012 typedef struct tagNMREBARCHILDSIZE
2014 NMHDR hdr;
2015 UINT uBand;
2016 UINT wID;
2017 RECT rcChild;
2018 RECT rcBand;
2019 } NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;
2021 typedef struct tagNMREBAR
2023 NMHDR hdr;
2024 DWORD dwMask;
2025 UINT uBand;
2026 UINT fStyle;
2027 UINT wID;
2028 LPARAM lParam;
2029 } NMREBAR, *LPNMREBAR;
2031 typedef struct tagNMRBAUTOSIZE
2033 NMHDR hdr;
2034 BOOL fChanged;
2035 RECT rcTarget;
2036 RECT rcActual;
2037 } NMRBAUTOSIZE, *LPNMRBAUTOSIZE;
2039 typedef struct tagNMREBARCHEVRON
2041 NMHDR hdr;
2042 UINT uBand;
2043 UINT wID;
2044 LPARAM lParam;
2045 RECT rc;
2046 LPARAM lParamNM;
2047 } NMREBARCHEVRON, *LPNMREBARCHEVRON;
2049 typedef struct _RB_HITTESTINFO
2051 POINT pt;
2052 UINT flags;
2053 INT iBand;
2054 } RBHITTESTINFO, *LPRBHITTESTINFO;
2056 #define RBAB_AUTOSIZE 0x0001
2057 #define RBAB_ADDBAND 0x0002
2059 typedef struct tagNMREBARAUTOBREAK
2061 NMHDR hdr;
2062 UINT uBand;
2063 UINT wID;
2064 LPARAM lParam;
2065 UINT uMsg;
2066 UINT fStyleCurrent;
2067 BOOL fAutoBreak;
2068 } NMREBARAUTOBREAK, *LPNMREBARAUTOBREAK;
2071 /* Trackbar control */
2073 #define TRACKBAR_CLASSA "msctls_trackbar32"
2074 #if defined(__GNUC__)
2075 # define TRACKBAR_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
2076 't','r','a','c','k','b','a','r','3','2',0 }
2077 #elif defined(_MSC_VER)
2078 # define TRACKBAR_CLASSW L"msctls_trackbar32"
2079 #else
2080 static const WCHAR TRACKBAR_CLASSW[] = { 'm','s','c','t','l','s','_',
2081 't','r','a','c','k','b','a','r','3','2',0 };
2082 #endif
2083 #define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
2086 #define TBTS_TOP 0
2087 #define TBTS_LEFT 1
2088 #define TBTS_BOTTOM 2
2089 #define TBTS_RIGHT 3
2091 #define TB_LINEUP 0
2092 #define TB_LINEDOWN 1
2093 #define TB_PAGEUP 2
2094 #define TB_PAGEDOWN 3
2095 #define TB_THUMBPOSITION 4
2096 #define TB_THUMBTRACK 5
2097 #define TB_TOP 6
2098 #define TB_BOTTOM 7
2099 #define TB_ENDTRACK 8
2101 #define TBCD_TICS 0x0001
2102 #define TBCD_THUMB 0x0002
2103 #define TBCD_CHANNEL 0x0003
2105 #define TBM_GETPOS (WM_USER)
2106 #define TBM_GETRANGEMIN (WM_USER+1)
2107 #define TBM_GETRANGEMAX (WM_USER+2)
2108 #define TBM_GETTIC (WM_USER+3)
2109 #define TBM_SETTIC (WM_USER+4)
2110 #define TBM_SETPOS (WM_USER+5)
2111 #define TBM_SETRANGE (WM_USER+6)
2112 #define TBM_SETRANGEMIN (WM_USER+7)
2113 #define TBM_SETRANGEMAX (WM_USER+8)
2114 #define TBM_CLEARTICS (WM_USER+9)
2115 #define TBM_SETSEL (WM_USER+10)
2116 #define TBM_SETSELSTART (WM_USER+11)
2117 #define TBM_SETSELEND (WM_USER+12)
2118 #define TBM_GETPTICS (WM_USER+14)
2119 #define TBM_GETTICPOS (WM_USER+15)
2120 #define TBM_GETNUMTICS (WM_USER+16)
2121 #define TBM_GETSELSTART (WM_USER+17)
2122 #define TBM_GETSELEND (WM_USER+18)
2123 #define TBM_CLEARSEL (WM_USER+19)
2124 #define TBM_SETTICFREQ (WM_USER+20)
2125 #define TBM_SETPAGESIZE (WM_USER+21)
2126 #define TBM_GETPAGESIZE (WM_USER+22)
2127 #define TBM_SETLINESIZE (WM_USER+23)
2128 #define TBM_GETLINESIZE (WM_USER+24)
2129 #define TBM_GETTHUMBRECT (WM_USER+25)
2130 #define TBM_GETCHANNELRECT (WM_USER+26)
2131 #define TBM_SETTHUMBLENGTH (WM_USER+27)
2132 #define TBM_GETTHUMBLENGTH (WM_USER+28)
2133 #define TBM_SETTOOLTIPS (WM_USER+29)
2134 #define TBM_GETTOOLTIPS (WM_USER+30)
2135 #define TBM_SETTIPSIDE (WM_USER+31)
2136 #define TBM_SETBUDDY (WM_USER+32)
2137 #define TBM_GETBUDDY (WM_USER+33)
2138 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2139 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2142 /* Pager control */
2144 #define WC_PAGESCROLLERA "SysPager"
2145 #if defined(__GNUC__)
2146 # define WC_PAGESCROLLERW (const WCHAR []){ 'S','y','s','P','a','g','e','r',0 }
2147 #elif defined(_MSC_VER)
2148 # define WC_PAGESCROLLERW L"SysPager"
2149 #else
2150 static const WCHAR WC_PAGESCROLLERW[] = { 'S','y','s','P','a','g','e','r',0 };
2151 #endif
2152 #define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
2155 #define PGF_INVISIBLE 0
2156 #define PGF_NORMAL 1
2157 #define PGF_GRAYED 2
2158 #define PGF_DEPRESSED 4
2159 #define PGF_HOT 8
2161 #define PGB_TOPORLEFT 0
2162 #define PGB_BOTTOMORRIGHT 1
2164 /* only used with PGN_SCROLL */
2165 #define PGF_SCROLLUP 1
2166 #define PGF_SCROLLDOWN 2
2167 #define PGF_SCROLLLEFT 4
2168 #define PGF_SCROLLRIGHT 8
2170 #define PGK_SHIFT 1
2171 #define PGK_CONTROL 2
2172 #define PGK_MENU 4
2174 /* only used with PGN_CALCSIZE */
2175 #define PGF_CALCWIDTH 1
2176 #define PGF_CALCHEIGHT 2
2178 #define PGM_FIRST 0x1400
2179 #define PGM_SETCHILD (PGM_FIRST+1)
2180 #define PGM_RECALCSIZE (PGM_FIRST+2)
2181 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
2182 #define PGM_SETBKCOLOR (PGM_FIRST+4)
2183 #define PGM_GETBKCOLOR (PGM_FIRST+5)
2184 #define PGM_SETBORDER (PGM_FIRST+6)
2185 #define PGM_GETBORDER (PGM_FIRST+7)
2186 #define PGM_SETPOS (PGM_FIRST+8)
2187 #define PGM_GETPOS (PGM_FIRST+9)
2188 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
2189 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
2190 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
2191 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
2193 #define PGN_FIRST (0U-900U)
2194 #define PGN_LAST (0U-950U)
2195 #define PGN_SCROLL (PGN_FIRST-1)
2196 #define PGN_CALCSIZE (PGN_FIRST-2)
2198 #include <pshpack1.h>
2200 typedef struct
2202 NMHDR hdr;
2203 WORD fwKeys;
2204 RECT rcParent;
2205 INT iDir;
2206 INT iXpos;
2207 INT iYpos;
2208 INT iScroll;
2209 } NMPGSCROLL, *LPNMPGSCROLL;
2211 #include <poppack.h>
2213 typedef struct
2215 NMHDR hdr;
2216 DWORD dwFlag;
2217 INT iWidth;
2218 INT iHeight;
2219 } NMPGCALCSIZE, *LPNMPGCALCSIZE;
2222 /* Treeview control */
2224 #define WC_TREEVIEWA "SysTreeView32"
2225 #if defined(__GNUC__)
2226 # define WC_TREEVIEWW (const WCHAR []){ 'S','y','s', \
2227 'T','r','e','e','V','i','e','w','3','2',0 }
2228 #elif defined(_MSC_VER)
2229 # define WC_TREEVIEWW L"SysTreeView32"
2230 #else
2231 static const WCHAR WC_TREEVIEWW[] = { 'S','y','s',
2232 'T','r','e','e','V','i','e','w','3','2',0 };
2233 #endif
2234 #define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
2236 #define TVSIL_NORMAL 0
2237 #define TVSIL_STATE 2
2239 #define TV_FIRST 0x1100
2240 #define TVM_INSERTITEMA (TV_FIRST+0)
2241 #define TVM_INSERTITEMW (TV_FIRST+50)
2242 #define TVM_INSERTITEM WINELIB_NAME_AW(TVM_INSERTITEM)
2243 #define TVM_DELETEITEM (TV_FIRST+1)
2244 #define TVM_EXPAND (TV_FIRST+2)
2245 #define TVM_GETITEMRECT (TV_FIRST+4)
2246 #define TVM_GETCOUNT (TV_FIRST+5)
2247 #define TVM_GETINDENT (TV_FIRST+6)
2248 #define TVM_SETINDENT (TV_FIRST+7)
2249 #define TVM_GETIMAGELIST (TV_FIRST+8)
2250 #define TVM_SETIMAGELIST (TV_FIRST+9)
2251 #define TVM_GETNEXTITEM (TV_FIRST+10)
2252 #define TVM_SELECTITEM (TV_FIRST+11)
2253 #define TVM_GETITEMA (TV_FIRST+12)
2254 #define TVM_GETITEMW (TV_FIRST+62)
2255 #define TVM_GETITEM WINELIB_NAME_AW(TVM_GETITEM)
2256 #define TVM_SETITEMA (TV_FIRST+13)
2257 #define TVM_SETITEMW (TV_FIRST+63)
2258 #define TVM_SETITEM WINELIB_NAME_AW(TVM_SETITEM)
2259 #define TVM_EDITLABELA (TV_FIRST+14)
2260 #define TVM_EDITLABELW (TV_FIRST+65)
2261 #define TVM_EDITLABEL WINELIB_NAME_AW(TVM_EDITLABEL)
2262 #define TVM_GETEDITCONTROL (TV_FIRST+15)
2263 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
2264 #define TVM_HITTEST (TV_FIRST+17)
2265 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
2266 #define TVM_SORTCHILDREN (TV_FIRST+19)
2267 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
2268 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
2269 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
2270 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
2271 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
2272 #define TVM_GETISEARCHSTRING WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
2273 #define TVM_SETTOOLTIPS (TV_FIRST+24)
2274 #define TVM_GETTOOLTIPS (TV_FIRST+25)
2275 #define TVM_SETINSERTMARK (TV_FIRST+26)
2276 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
2277 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
2278 #define TVM_SETBKCOLOR (TV_FIRST+29)
2279 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
2280 #define TVM_GETBKCOLOR (TV_FIRST+31)
2281 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
2282 #define TVM_SETSCROLLTIME (TV_FIRST+33)
2283 #define TVM_GETSCROLLTIME (TV_FIRST+34)
2284 #define TVM_UNKNOWN35 (TV_FIRST+35)
2285 #define TVM_UNKNOWN36 (TV_FIRST+36)
2286 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
2287 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
2288 #define TVM_GETITEMSTATE (TV_FIRST+39)
2289 #define TVM_SETLINECOLOR (TV_FIRST+40)
2290 #define TVM_GETLINECOLOR (TV_FIRST+41)
2291 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2292 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2293 #define TVM_MAPACCIDTOHTREEITEM (TV_FIRST + 42)
2294 #define TVM_MAPHTREEITEMTOACCID (TV_FIRST + 43)
2295 #define TVM_SETEXTENDEDSTYLE (TV_FIRST + 44)
2296 #define TVM_GETEXTENDEDSTYLE (TV_FIRST + 45)
2297 #define TVM_SETAUTOSCROLLINFO (TV_FIRST + 59)
2298 #define TVM_GETSELECTEDCOUNT (TV_FIRST + 70)
2299 #define TVM_SHOWINFOTIP (TV_FIRST + 71)
2300 #define TVM_GETITEMPARTRECT (TV_FIRST + 72)
2303 #define TVN_FIRST (0U-400U)
2304 #define TVN_LAST (0U-499U)
2306 #define TVN_SELCHANGINGA (TVN_FIRST-1)
2307 #define TVN_SELCHANGINGW (TVN_FIRST-50)
2308 #define TVN_SELCHANGING WINELIB_NAME_AW(TVN_SELCHANGING)
2310 #define TVN_SELCHANGEDA (TVN_FIRST-2)
2311 #define TVN_SELCHANGEDW (TVN_FIRST-51)
2312 #define TVN_SELCHANGED WINELIB_NAME_AW(TVN_SELCHANGED)
2314 #define TVN_GETDISPINFOA (TVN_FIRST-3)
2315 #define TVN_GETDISPINFOW (TVN_FIRST-52)
2316 #define TVN_GETDISPINFO WINELIB_NAME_AW(TVN_GETDISPINFO)
2318 #define TVN_SETDISPINFOA (TVN_FIRST-4)
2319 #define TVN_SETDISPINFOW (TVN_FIRST-53)
2320 #define TVN_SETDISPINFO WINELIB_NAME_AW(TVN_SETDISPINFO)
2322 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
2323 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
2324 #define TVN_ITEMEXPANDING WINELIB_NAME_AW(TVN_ITEMEXPANDING)
2326 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
2327 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
2328 #define TVN_ITEMEXPANDED WINELIB_NAME_AW(TVN_ITEMEXPANDED)
2330 #define TVN_BEGINDRAGA (TVN_FIRST-7)
2331 #define TVN_BEGINDRAGW (TVN_FIRST-56)
2332 #define TVN_BEGINDRAG WINELIB_NAME_AW(TVN_BEGINDRAG)
2334 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
2335 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
2336 #define TVN_BEGINRDRAG WINELIB_NAME_AW(TVN_BEGINRDRAG)
2338 #define TVN_DELETEITEMA (TVN_FIRST-9)
2339 #define TVN_DELETEITEMW (TVN_FIRST-58)
2340 #define TVN_DELETEITEM WINELIB_NAME_AW(TVN_DELETEITEM)
2342 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
2343 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
2344 #define TVN_BEGINLABELEDIT WINELIB_NAME_AW(TVN_BEGINLABELEDIT)
2346 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
2347 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
2348 #define TVN_ENDLABELEDIT WINELIB_NAME_AW(TVN_ENDLABELEDIT)
2350 #define TVN_KEYDOWN (TVN_FIRST-12)
2352 #define TVN_GETINFOTIPA (TVN_FIRST-13)
2353 #define TVN_GETINFOTIPW (TVN_FIRST-14)
2354 #define TVN_GETINFOTIP WINELIB_NAME_AW(TVN_GETINFOTIP)
2356 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
2362 #define TVIF_TEXT 0x0001
2363 #define TVIF_IMAGE 0x0002
2364 #define TVIF_PARAM 0x0004
2365 #define TVIF_STATE 0x0008
2366 #define TVIF_HANDLE 0x0010
2367 #define TVIF_SELECTEDIMAGE 0x0020
2368 #define TVIF_CHILDREN 0x0040
2369 #define TVIF_INTEGRAL 0x0080
2370 #define TVIF_STATEEX 0x0100
2371 #define TVIF_EXPANDEDIMAGE 0x0200
2372 #define TVIF_DI_SETITEM 0x1000
2374 #define TVI_ROOT ((HTREEITEM)-65536)
2375 #define TVI_FIRST ((HTREEITEM)-65535)
2376 #define TVI_LAST ((HTREEITEM)-65534)
2377 #define TVI_SORT ((HTREEITEM)-65533)
2379 #define TVIS_FOCUSED 0x0001
2380 #define TVIS_SELECTED 0x0002
2381 #define TVIS_CUT 0x0004
2382 #define TVIS_DROPHILITED 0x0008
2383 #define TVIS_BOLD 0x0010
2384 #define TVIS_EXPANDED 0x0020
2385 #define TVIS_EXPANDEDONCE 0x0040
2386 #define TVIS_EXPANDPARTIAL 0x0080
2387 #define TVIS_OVERLAYMASK 0x0f00
2388 #define TVIS_STATEIMAGEMASK 0xf000
2389 #define TVIS_USERMASK 0xf000
2391 #define TVIS_EX_FLAT 0x0001
2392 #define TVIS_EX_DISABLED 0x0002
2393 /* TVIS_EX_HWND is listed on MSDN but apparently not in any header. */
2394 #define TVIS_EX_ALL 0x0002
2396 #define TVHT_NOWHERE 0x0001
2397 #define TVHT_ONITEMICON 0x0002
2398 #define TVHT_ONITEMLABEL 0x0004
2399 #define TVHT_ONITEMINDENT 0x0008
2400 #define TVHT_ONITEMBUTTON 0x0010
2401 #define TVHT_ONITEMRIGHT 0x0020
2402 #define TVHT_ONITEMSTATEICON 0x0040
2403 #define TVHT_ONITEM 0x0046
2404 #define TVHT_ABOVE 0x0100
2405 #define TVHT_BELOW 0x0200
2406 #define TVHT_TORIGHT 0x0400
2407 #define TVHT_TOLEFT 0x0800
2409 #define TVS_SHAREDIMAGELISTS 0x0000
2410 #define TVS_PRIVATEIMAGELISTS 0x0400
2412 #define TVS_EX_MULTISELECT 0x0002
2413 #define TVS_EX_DOUBLEBUFFER 0x0004
2414 #define TVS_EX_NOINDENTSTATE 0x0008
2415 #define TVS_EX_RICHTOOLTIP 0x0010
2416 #define TVS_EX_AUTOHSCROLL 0x0020
2417 #define TVS_EX_FADEINOUTEXPANDOS 0x0040
2418 #define TVS_EX_PARTIALCHECKBOXES 0x0080
2419 #define TVS_EX_EXCLUSIONCHECKBOXES 0x0100
2420 #define TVS_EX_DIMMEDCHECKBOXES 0x0200
2421 #define TVS_EX_DRAWIMAGEASYNC 0x0400
2423 #define TVE_COLLAPSE 0x0001
2424 #define TVE_EXPAND 0x0002
2425 #define TVE_TOGGLE 0x0003
2426 #define TVE_EXPANDPARTIAL 0x4000
2427 #define TVE_COLLAPSERESET 0x8000
2429 #define TVGN_ROOT 0
2430 #define TVGN_NEXT 1
2431 #define TVGN_PREVIOUS 2
2432 #define TVGN_PARENT 3
2433 #define TVGN_CHILD 4
2434 #define TVGN_FIRSTVISIBLE 5
2435 #define TVGN_NEXTVISIBLE 6
2436 #define TVGN_PREVIOUSVISIBLE 7
2437 #define TVGN_DROPHILITE 8
2438 #define TVGN_CARET 9
2439 #define TVGN_LASTVISIBLE 10
2440 #define TVSI_NOSINGLEEXPAND 0x8000
2442 #define TVC_UNKNOWN 0x00
2443 #define TVC_BYMOUSE 0x01
2444 #define TVC_BYKEYBOARD 0x02
2447 typedef struct _TREEITEM *HTREEITEM;
2449 typedef struct {
2450 UINT mask;
2451 HTREEITEM hItem;
2452 UINT state;
2453 UINT stateMask;
2454 LPSTR pszText;
2455 INT cchTextMax;
2456 INT iImage;
2457 INT iSelectedImage;
2458 INT cChildren;
2459 LPARAM lParam;
2460 } TVITEMA, *LPTVITEMA;
2462 typedef struct {
2463 UINT mask;
2464 HTREEITEM hItem;
2465 UINT state;
2466 UINT stateMask;
2467 LPWSTR pszText;
2468 INT cchTextMax;
2469 INT iImage;
2470 INT iSelectedImage;
2471 INT cChildren;
2472 LPARAM lParam;
2473 } TVITEMW, *LPTVITEMW;
2475 #define TV_ITEMA TVITEMA
2476 #define TV_ITEMW TVITEMW
2477 #define LPTV_ITEMA LPTVITEMA
2478 #define LPTV_ITEMW LPTVITEMW
2480 #define TVITEM WINELIB_NAME_AW(TVITEM)
2481 #define LPTVITEM WINELIB_NAME_AW(LPTVITEM)
2482 #define TV_ITEM WINELIB_NAME_AW(TV_ITEM)
2483 #define LPTV_ITEM WINELIB_NAME_AW(LPTV_ITEM)
2485 typedef struct {
2486 UINT mask;
2487 HTREEITEM hItem;
2488 UINT state;
2489 UINT stateMask;
2490 LPSTR pszText;
2491 INT cchTextMax;
2492 INT iImage;
2493 INT iSelectedImage;
2494 INT cChildren;
2495 LPARAM lParam;
2496 INT iIntegral;
2497 UINT uStateEx; /* _WIN32_IE >= 0x600 */
2498 HWND hwnd; /* _WIN32_IE >= 0x600 */
2499 INT iExpandedImage; /* _WIN32_IE >= 0x600 */
2500 } TVITEMEXA, *LPTVITEMEXA;
2502 typedef struct {
2503 UINT mask;
2504 HTREEITEM hItem;
2505 UINT state;
2506 UINT stateMask;
2507 LPWSTR pszText;
2508 INT cchTextMax;
2509 INT iImage;
2510 INT iSelectedImage;
2511 INT cChildren;
2512 LPARAM lParam;
2513 INT iIntegral;
2514 UINT uStateEx; /* _WIN32_IE >= 0x600 */
2515 HWND hwnd; /* _WIN32_IE >= 0x600 */
2516 INT iExpandedImage; /* _WIN32_IE >= 0x600 */
2517 } TVITEMEXW, *LPTVITEMEXW;
2519 #define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
2520 #define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
2522 typedef struct tagTVINSERTSTRUCTA {
2523 HTREEITEM hParent;
2524 HTREEITEM hInsertAfter;
2525 union {
2526 TVITEMEXA itemex;
2527 TVITEMA item;
2528 } DUMMYUNIONNAME;
2529 } TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
2531 typedef struct tagTVINSERTSTRUCTW {
2532 HTREEITEM hParent;
2533 HTREEITEM hInsertAfter;
2534 union {
2535 TVITEMEXW itemex;
2536 TVITEMW item;
2537 } DUMMYUNIONNAME;
2538 } TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
2540 #define TVINSERTSTRUCT WINELIB_NAME_AW(TVINSERTSTRUCT)
2541 #define LPTVINSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
2543 #define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
2544 #define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
2545 #define TVINSERTSTRUCT_V1_SIZE WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)
2547 #define TV_INSERTSTRUCT TVINSERTSTRUCT
2548 #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
2549 #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
2550 #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
2551 #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
2552 #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
2556 typedef struct tagNMTREEVIEWA {
2557 NMHDR hdr;
2558 UINT action;
2559 TVITEMA itemOld;
2560 TVITEMA itemNew;
2561 POINT ptDrag;
2562 } NMTREEVIEWA, *LPNMTREEVIEWA;
2564 typedef struct tagNMTREEVIEWW {
2565 NMHDR hdr;
2566 UINT action;
2567 TVITEMW itemOld;
2568 TVITEMW itemNew;
2569 POINT ptDrag;
2570 } NMTREEVIEWW, *LPNMTREEVIEWW;
2572 #define NMTREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2573 #define NM_TREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2574 #define NM_TREEVIEWA NMTREEVIEWA
2575 #define NM_TREEVIEWW NMTREEVIEWW
2576 #define LPNMTREEVIEW WINELIB_NAME_AW(LPNMTREEVIEW)
2578 #define LPNM_TREEVIEW LPNMTREEVIEW
2579 #define LPNM_TREEVIEWA LPNMTREEVIEWA
2580 #define LPNM_TREEVIEWW LPNMTREEVIEWW
2582 typedef struct tagTVDISPINFOA {
2583 NMHDR hdr;
2584 TVITEMA item;
2585 } NMTVDISPINFOA, *LPNMTVDISPINFOA;
2587 typedef struct tagTVDISPINFOW {
2588 NMHDR hdr;
2589 TVITEMW item;
2590 } NMTVDISPINFOW, *LPNMTVDISPINFOW;
2592 typedef struct tagTVDISPINFOEXA {
2593 NMHDR hdr;
2594 TVITEMEXA item;
2595 } NMTVDISPINFOEXA, *LPNMTVDISPINFOEXA;
2597 typedef struct tagTVDISPINFOEXW {
2598 NMHDR hdr;
2599 TVITEMEXW item;
2600 } NMTVDISPINFOEXW, *LPNMTVDISPINFOEXW;
2602 #define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
2603 #define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
2604 #define NMTVDISPINFOEX WINELIB_NAME_AW(NMTVDISPINFOEX)
2605 #define LPNMTVDISPINFOEX WINELIB_NAME_AW(LPNMTVDISPINFOEX)
2606 #define TV_DISPINFOA NMTVDISPINFOA
2607 #define TV_DISPINFOW NMTVDISPINFOW
2608 #define TV_DISPINFO NMTVDISPINFO
2610 typedef INT (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
2612 typedef struct tagTVSORTCB
2614 HTREEITEM hParent;
2615 PFNTVCOMPARE lpfnCompare;
2616 LPARAM lParam;
2617 } TVSORTCB, *LPTVSORTCB;
2619 #define TV_SORTCB TVSORTCB
2620 #define LPTV_SORTCB LPTVSORTCB
2622 typedef struct tagTVHITTESTINFO {
2623 POINT pt;
2624 UINT flags;
2625 HTREEITEM hItem;
2626 } TVHITTESTINFO, *LPTVHITTESTINFO;
2628 #define TV_HITTESTINFO TVHITTESTINFO
2631 /* Custom Draw Treeview */
2633 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
2635 #define TVCDRF_NOIMAGES 0x00010000
2637 typedef struct tagNMTVCUSTOMDRAW
2639 NMCUSTOMDRAW nmcd;
2640 COLORREF clrText;
2641 COLORREF clrTextBk;
2642 INT iLevel; /* IE>0x0400 */
2643 } NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
2645 /* Treeview tooltips */
2647 typedef struct tagNMTVGETINFOTIPA
2649 NMHDR hdr;
2650 LPSTR pszText;
2651 INT cchTextMax;
2652 HTREEITEM hItem;
2653 LPARAM lParam;
2654 } NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
2656 typedef struct tagNMTVGETINFOTIPW
2658 NMHDR hdr;
2659 LPWSTR pszText;
2660 INT cchTextMax;
2661 HTREEITEM hItem;
2662 LPARAM lParam;
2663 } NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
2665 #define NMTVGETINFOTIP WINELIB_NAME_AW(NMTVGETINFOTIP)
2666 #define LPNMTVGETINFOTIP WINELIB_NAME_AW(LPNMTVGETINFOTIP)
2668 #include <pshpack1.h>
2669 typedef struct tagTVKEYDOWN
2671 NMHDR hdr;
2672 WORD wVKey;
2673 UINT flags;
2674 } NMTVKEYDOWN, *LPNMTVKEYDOWN;
2675 #include <poppack.h>
2677 #define TV_KEYDOWN NMTVKEYDOWN
2679 #define TreeView_InsertItemA(hwnd, phdi) \
2680 (HTREEITEM)SNDMSGA((hwnd), TVM_INSERTITEMA, 0, \
2681 (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
2682 #define TreeView_InsertItemW(hwnd,phdi) \
2683 (HTREEITEM)SNDMSGW((hwnd), TVM_INSERTITEMW, 0, \
2684 (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
2685 #define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem)
2687 #define TreeView_DeleteItem(hwnd, hItem) \
2688 (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
2689 #define TreeView_DeleteAllItems(hwnd) \
2690 (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
2691 #define TreeView_Expand(hwnd, hitem, code) \
2692 (BOOL)SNDMSG((hwnd), TVM_EXPAND, (WPARAM)code, \
2693 (LPARAM)(HTREEITEM)(hitem))
2695 #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
2696 (*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSG((hwnd), \
2697 TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
2699 #define TreeView_GetCount(hwnd) \
2700 (UINT)SNDMSG((hwnd), TVM_GETCOUNT, 0, 0)
2701 #define TreeView_GetIndent(hwnd) \
2702 (UINT)SNDMSG((hwnd), TVM_GETINDENT, 0, 0)
2703 #define TreeView_SetIndent(hwnd, indent) \
2704 (BOOL)SNDMSG((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
2706 #define TreeView_GetImageList(hwnd, iImage) \
2707 (HIMAGELIST)SNDMSG((hwnd), TVM_GETIMAGELIST, iImage, 0)
2709 #define TreeView_SetImageList(hwnd, himl, iImage) \
2710 (HIMAGELIST)SNDMSG((hwnd), TVM_SETIMAGELIST, iImage, \
2711 (LPARAM)(HIMAGELIST)(himl))
2713 #define TreeView_GetNextItem(hwnd, hitem, code) \
2714 (HTREEITEM)SNDMSG((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
2715 (LPARAM)(HTREEITEM) (hitem))
2717 #define TreeView_GetChild(hwnd, hitem) \
2718 TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
2719 #define TreeView_GetNextSibling(hwnd, hitem) \
2720 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
2721 #define TreeView_GetPrevSibling(hwnd, hitem) \
2722 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
2723 #define TreeView_GetParent(hwnd, hitem) \
2724 TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
2725 #define TreeView_GetFirstVisible(hwnd) \
2726 TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
2727 #define TreeView_GetLastVisible(hwnd) \
2728 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2729 #define TreeView_GetNextVisible(hwnd, hitem) \
2730 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
2731 #define TreeView_GetPrevVisible(hwnd, hitem) \
2732 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
2733 #define TreeView_GetSelection(hwnd) \
2734 TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
2735 #define TreeView_GetDropHilight(hwnd) \
2736 TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
2737 #define TreeView_GetRoot(hwnd) \
2738 TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
2739 #define TreeView_GetLastVisible(hwnd) \
2740 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2743 #define TreeView_Select(hwnd, hitem, code) \
2744 (BOOL)SNDMSG((hwnd), TVM_SELECTITEM, (WPARAM)(code), \
2745 (LPARAM)(HTREEITEM)(hitem))
2748 #define TreeView_SelectItem(hwnd, hitem) \
2749 TreeView_Select(hwnd, hitem, TVGN_CARET)
2750 #define TreeView_SelectDropTarget(hwnd, hitem) \
2751 TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
2752 #define TreeView_SelectSetFirstVisible(hwnd, hitem) \
2753 TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
2756 #define TreeView_GetItemA(hwnd, pitem) \
2757 (BOOL)SNDMSGA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2758 #define TreeView_GetItemW(hwnd, pitem) \
2759 (BOOL)SNDMSGW((hwnd), TVM_GETITEMW, 0, (LPARAM) (TVITEMW *)(pitem))
2760 #define TreeView_GetItem WINELIB_NAME_AW(TreeView_GetItem)
2762 #define TreeView_SetItemA(hwnd, pitem) \
2763 (BOOL)SNDMSGA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2764 #define TreeView_SetItemW(hwnd, pitem) \
2765 (BOOL)SNDMSGW((hwnd), TVM_SETITEMW, 0, (LPARAM)(const TVITEMW *)(pitem))
2766 #define TreeView_SetItem WINELIB_NAME_AW(TreeView_SetItem)
2768 #define TreeView_EditLabel(hwnd, hitem) \
2769 (HWND)SNDMSG((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
2771 #define TreeView_GetEditControl(hwnd) \
2772 (HWND)SNDMSG((hwnd), TVM_GETEDITCONTROL, 0, 0)
2774 #define TreeView_GetVisibleCount(hwnd) \
2775 (UINT)SNDMSG((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
2777 #define TreeView_HitTest(hwnd, lpht) \
2778 (HTREEITEM)SNDMSG((hwnd), TVM_HITTEST, 0,\
2779 (LPARAM)(LPTVHITTESTINFO)(lpht))
2781 #define TreeView_CreateDragImage(hwnd, hitem) \
2782 (HIMAGELIST)SNDMSG((hwnd), TVM_CREATEDRAGIMAGE, 0,\
2783 (LPARAM)(HTREEITEM)(hitem))
2785 #define TreeView_SortChildren(hwnd, hitem, recurse) \
2786 (BOOL)SNDMSG((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
2787 (LPARAM)(HTREEITEM)(hitem))
2789 #define TreeView_EnsureVisible(hwnd, hitem) \
2790 (BOOL)SNDMSG((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
2792 #define TreeView_SortChildrenCB(hwnd, psort, recurse) \
2793 (BOOL)SNDMSG((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
2794 (LPARAM)(LPTV_SORTCB)(psort))
2796 #define TreeView_EndEditLabelNow(hwnd, fCancel) \
2797 (BOOL)SNDMSG((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
2799 #define TreeView_GetISearchString(hwnd, lpsz) \
2800 (BOOL)SNDMSG((hwnd), TVM_GETISEARCHSTRING, 0, \
2801 (LPARAM)(LPTSTR)lpsz)
2803 #define TreeView_SetToolTips(hwnd, hwndTT) \
2804 (HWND)SNDMSG((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
2806 #define TreeView_GetToolTips(hwnd) \
2807 (HWND)SNDMSG((hwnd), TVM_GETTOOLTIPS, 0, 0)
2809 #define TreeView_SetItemHeight(hwnd, iHeight) \
2810 (INT)SNDMSG((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
2812 #define TreeView_GetItemHeight(hwnd) \
2813 (INT)SNDMSG((hwnd), TVM_GETITEMHEIGHT, 0, 0)
2815 #define TreeView_SetBkColor(hwnd, clr) \
2816 (COLORREF)SNDMSG((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
2818 #define TreeView_SetTextColor(hwnd, clr) \
2819 (COLORREF)SNDMSG((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
2821 #define TreeView_GetBkColor(hwnd) \
2822 (COLORREF)SNDMSG((hwnd), TVM_GETBKCOLOR, 0, 0)
2824 #define TreeView_GetTextColor(hwnd) \
2825 (COLORREF)SNDMSG((hwnd), TVM_GETTEXTCOLOR, 0, 0)
2827 #define TreeView_SetScrollTime(hwnd, uTime) \
2828 (UINT)SNDMSG((hwnd), TVM_SETSCROLLTIME, uTime, 0)
2830 #define TreeView_GetScrollTime(hwnd) \
2831 (UINT)SNDMSG((hwnd), TVM_GETSCROLLTIME, 0, 0)
2833 #define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
2834 (BOOL)SNDMSG((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
2835 (LPARAM) (hItem))
2837 #define TreeView_SetInsertMarkColor(hwnd, clr) \
2838 (COLORREF)SNDMSG((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
2840 #define TreeView_GetInsertMarkColor(hwnd) \
2841 (COLORREF)SNDMSG((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
2843 #define TreeView_SetItemState(hwndTV, hti, data, _mask) \
2844 { TVITEM _TVi; \
2845 _TVi.mask = TVIF_STATE; \
2846 _TVi.hItem = hti; \
2847 _TVi.stateMask = _mask; \
2848 _TVi.state = data; \
2849 SNDMSG((hwndTV), TVM_SETITEM, 0, (LPARAM)&_TVi); \
2852 #define TreeView_GetItemState(hwndTV, hti, mask) \
2853 (UINT)SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
2854 #define TreeView_GetCheckState(hwndTV, hti) \
2855 ((((UINT)(SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
2856 TVIS_STATEIMAGEMASK))) >> 12) -1)
2858 #define TreeView_SetLineColor(hwnd, clr) \
2859 (COLORREF)SNDMSG((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
2861 #define TreeView_GetLineColor(hwnd) \
2862 (COLORREF)SNDMSG((hwnd), TVM_GETLINECOLOR, 0, 0)
2864 #define TreeView_MapAccIDToHTREEITEM(hwnd, id) \
2865 (HTREEITEM)SNDMSG((hwnd), TVM_MAPACCIDTOHTREEITEM, id, 0)
2867 #define TreeView_MapHTREEITEMToAccID(hwnd, htreeitem) \
2868 (UINT)SNDMSG((hwnd), TVM_MAPHTREEITEMTOACCID, (WPARAM)htreeitem, 0)
2870 #define TreeView_SetUnicodeFormat(hwnd, fUnicode) \
2871 (BOOL)SNDMSG((hwnd), TVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
2872 #define TreeView_GetUnicodeFormat(hwnd) \
2873 (BOOL)SNDMSG((hwnd), TVM_GETUNICODEFORMAT, 0, 0)
2875 /* Listview control */
2877 #define WC_LISTVIEWA "SysListView32"
2878 #if defined(__GNUC__)
2879 # define WC_LISTVIEWW (const WCHAR []){ 'S','y','s', \
2880 'L','i','s','t','V','i','e','w','3','2',0 }
2881 #elif defined(_MSC_VER)
2882 # define WC_LISTVIEWW L"SysListView32"
2883 #else
2884 static const WCHAR WC_LISTVIEWW[] = { 'S','y','s',
2885 'L','i','s','t','V','i','e','w','3','2',0 };
2886 #endif
2887 #define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
2889 #define LVSCW_AUTOSIZE -1
2890 #define LVSCW_AUTOSIZE_USEHEADER -2
2893 #define LVS_EX_GRIDLINES 0x0001
2894 #define LVS_EX_SUBITEMIMAGES 0x0002
2895 #define LVS_EX_CHECKBOXES 0x0004
2896 #define LVS_EX_TRACKSELECT 0x0008
2897 #define LVS_EX_HEADERDRAGDROP 0x0010
2898 #define LVS_EX_FULLROWSELECT 0x0020
2899 #define LVS_EX_ONECLICKACTIVATE 0x0040
2900 #define LVS_EX_TWOCLICKACTIVATE 0x0080
2901 #define LVS_EX_FLATSB 0x0100
2902 #define LVS_EX_REGIONAL 0x0200
2903 #define LVS_EX_INFOTIP 0x0400
2904 #define LVS_EX_UNDERLINEHOT 0x0800
2905 #define LVS_EX_UNDERLINECOLD 0x1000
2906 #define LVS_EX_MULTIWORKAREAS 0x2000
2907 #define LVS_EX_LABELTIP 0x4000
2908 #define LVS_EX_BORDERSELECT 0x8000
2909 #define LVS_EX_DOUBLEBUFFER 0x00010000
2910 #define LVS_EX_HIDELABELS 0x00020000
2911 #define LVS_EX_SINGLEROW 0x00040000
2912 #define LVS_EX_SNAPTOGRID 0x00080000
2913 #define LVS_EX_SIMPLESELECT 0x00100000
2914 #define LVS_EX_JUSTIFYCOLUMNS 0x00200000
2915 #define LVS_EX_TRANSPARENTBKGND 0x00400000
2916 #define LVS_EX_TRANSPARENTSHADOWTEXT 0x00800000
2917 #define LVS_EX_AUTOAUTOARRANGE 0x01000000
2918 #define LVS_EX_HEADERINALLVIEWS 0x02000000
2919 #define LVS_EX_AUTOCHECKSELECT 0x08000000
2920 #define LVS_EX_AUTOSIZECOLUMNS 0x10000000
2921 #define LVS_EX_COLUMNSNAPPOINTS 0x40000000
2922 #define LVS_EX_COLUMNOVERFLOW 0x80000000
2924 #define LVCF_FMT 0x0001
2925 #define LVCF_WIDTH 0x0002
2926 #define LVCF_TEXT 0x0004
2927 #define LVCF_SUBITEM 0x0008
2928 #define LVCF_IMAGE 0x0010
2929 #define LVCF_ORDER 0x0020
2930 #define LVCF_MINWIDTH 0x0040
2932 #define LVCFMT_LEFT 0x0000
2933 #define LVCFMT_RIGHT 0x0001
2934 #define LVCFMT_CENTER 0x0002
2935 #define LVCFMT_JUSTIFYMASK 0x0003
2936 #define LVCFMT_FIXED_WIDTH 0x0100
2937 #define LVCFMT_IMAGE 0x0800
2938 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2939 #define LVCFMT_COL_HAS_IMAGES 0x8000
2940 #define LVCFMT_NO_DPI_SCALE 0x00040000
2941 #define LVCFMT_FIXED_RATIO 0x00080000
2942 #define LVCFMT_LINE_BREAK 0x00100000
2943 #define LVCFMT_FILL 0x00200000
2944 #define LVCFMT_WRAP 0x00400000
2945 #define LVCFMT_NO_TITLE 0x00800000
2946 #define LVCFMT_SPLIT_BUTTON 0x01000000
2947 #define LVCFMT_TILE_PLACEMENTMASK (LVCFMT_LINE_BREAK | LVCFMT_FILL)
2949 #define LVSIL_NORMAL 0
2950 #define LVSIL_SMALL 1
2951 #define LVSIL_STATE 2
2952 #define LVSIL_GROUPHEADER 3
2954 /* following 2 flags only for LVS_OWNERDATA listviews */
2955 /* and only in report or list mode */
2956 #define LVSICF_NOINVALIDATEALL 0x0001
2957 #define LVSICF_NOSCROLL 0x0002
2960 #define LVFI_PARAM 0x0001
2961 #define LVFI_STRING 0x0002
2962 #define LVFI_SUBSTRING 0x0004
2963 #define LVFI_PARTIAL 0x0008
2964 #define LVFI_WRAP 0x0020
2965 #define LVFI_NEARESTXY 0x0040
2967 #define LVIF_TEXT 0x0001
2968 #define LVIF_IMAGE 0x0002
2969 #define LVIF_PARAM 0x0004
2970 #define LVIF_STATE 0x0008
2971 #define LVIF_INDENT 0x0010
2972 #define LVIF_GROUPID 0x0100
2973 #define LVIF_COLUMNS 0x0200
2974 #define LVIF_NORECOMPUTE 0x0800
2975 #define LVIF_DI_SETITEM 0x1000
2976 #define LVIF_COLFMT 0x00010000
2978 #define LVIR_BOUNDS 0x0000
2979 #define LVIR_ICON 0x0001
2980 #define LVIR_LABEL 0x0002
2981 #define LVIR_SELECTBOUNDS 0x0003
2983 #define LVIS_FOCUSED 0x0001
2984 #define LVIS_SELECTED 0x0002
2985 #define LVIS_CUT 0x0004
2986 #define LVIS_DROPHILITED 0x0008
2987 #define LVIS_ACTIVATING 0x0020
2989 #define LVIS_OVERLAYMASK 0x0F00
2990 #define LVIS_STATEIMAGEMASK 0xF000
2992 #define LVNI_ALL 0x0000
2993 #define LVNI_FOCUSED 0x0001
2994 #define LVNI_SELECTED 0x0002
2995 #define LVNI_CUT 0x0004
2996 #define LVNI_DROPHILITED 0x0008
2998 #define LVNI_ABOVE 0x0100
2999 #define LVNI_BELOW 0x0200
3000 #define LVNI_TOLEFT 0x0400
3001 #define LVNI_TORIGHT 0x0800
3003 #define LVHT_NOWHERE 0x0001
3004 #define LVHT_ONITEMICON 0x0002
3005 #define LVHT_ONITEMLABEL 0x0004
3006 #define LVHT_ONITEMSTATEICON 0x0008
3007 #define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
3009 #define LVHT_ABOVE 0x0008
3010 #define LVHT_BELOW 0x0010
3011 #define LVHT_TORIGHT 0x0020
3012 #define LVHT_TOLEFT 0x0040
3014 #define LV_VIEW_ICON 0x0000
3015 #define LV_VIEW_DETAILS 0x0001
3016 #define LV_VIEW_SMALLICON 0x0002
3017 #define LV_VIEW_LIST 0x0003
3018 #define LV_VIEW_TILE 0x0004
3019 #define LV_VIEW_MAX 0x0004
3021 #define LVGF_NONE 0x00000000
3022 #define LVGF_HEADER 0x00000001
3023 #define LVGF_FOOTER 0x00000002
3024 #define LVGF_STATE 0x00000004
3025 #define LVGF_ALIGN 0x00000008
3026 #define LVGF_GROUPID 0x00000010
3027 #define LVGF_SUBTITLE 0x00000100
3028 #define LVGF_TASK 0x00000200
3029 #define LVGF_DESCRIPTIONTOP 0x00000400
3030 #define LVGF_DESCRIPTIONBOTTOM 0x00000800
3031 #define LVGF_TITLEIMAGE 0x00001000
3032 #define LVGF_EXTENDEDIMAGE 0x00002000
3033 #define LVGF_ITEMS 0x00004000
3034 #define LVGF_SUBSET 0x00008000
3035 #define LVGF_SUBSETITEMS 0x00010000
3037 #define LVGS_NORMAL 0x00000000
3038 #define LVGS_COLLAPSED 0x00000001
3039 #define LVGS_HIDDEN 0x00000002
3041 #define LVGA_HEADER_LEFT 0x00000001
3042 #define LVGA_HEADER_CENTER 0x00000002
3043 #define LVGA_HEADER_RIGHT 0x00000004
3044 #define LVGA_FOOTER_LEFT 0x00000008
3045 #define LVGA_FOOTER_CENTER 0x00000010
3046 #define LVGA_FOOTER_RIGHT 0x00000020
3048 #define LVGMF_NONE 0x00000000
3049 #define LVGMF_BORDERSIZE 0x00000001
3050 #define LVGMF_BORDERCOLOR 0x00000002
3051 #define LVGMF_TEXTCOLOR 0x00000004
3053 #define LVTVIF_AUTOSIZE 0x00000000
3054 #define LVTVIF_FIXEDWIDTH 0x00000001
3055 #define LVTVIF_FIXEDHEIGHT 0x00000002
3056 #define LVTVIF_FIXEDSIZE 0x00000003
3057 #define LVTVIF_EXTENDED 0x00000004
3059 #define LVTVIM_TILESIZE 0x00000001
3060 #define LVTVIM_COLUMNS 0x00000002
3061 #define LVTVIM_LABELMARGIN 0x00000004
3063 #define LVIM_AFTER 0x00000001
3065 #define LVM_FIRST 0x1000
3066 #define LVM_GETBKCOLOR (LVM_FIRST+0)
3067 #define LVM_SETBKCOLOR (LVM_FIRST+1)
3068 #define LVM_GETIMAGELIST (LVM_FIRST+2)
3069 #define LVM_SETIMAGELIST (LVM_FIRST+3)
3070 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
3071 #define LVM_GETITEMA (LVM_FIRST+5)
3072 #define LVM_GETITEMW (LVM_FIRST+75)
3073 #define LVM_GETITEM WINELIB_NAME_AW(LVM_GETITEM)
3074 #define LVM_SETITEMA (LVM_FIRST+6)
3075 #define LVM_SETITEMW (LVM_FIRST+76)
3076 #define LVM_SETITEM WINELIB_NAME_AW(LVM_SETITEM)
3077 #define LVM_INSERTITEMA (LVM_FIRST+7)
3078 #define LVM_INSERTITEMW (LVM_FIRST+77)
3079 #define LVM_INSERTITEM WINELIB_NAME_AW(LVM_INSERTITEM)
3080 #define LVM_DELETEITEM (LVM_FIRST+8)
3081 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
3082 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
3083 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
3084 #define LVM_GETNEXTITEM (LVM_FIRST+12)
3085 #define LVM_FINDITEMA (LVM_FIRST+13)
3086 #define LVM_FINDITEMW (LVM_FIRST+83)
3087 #define LVM_FINDITEM WINELIB_NAME_AW(LVM_FINDITEM)
3088 #define LVM_GETITEMRECT (LVM_FIRST+14)
3089 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
3090 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
3091 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
3092 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
3093 #define LVM_GETSTRINGWIDTH WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
3094 #define LVM_HITTEST (LVM_FIRST+18)
3095 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
3096 #define LVM_SCROLL (LVM_FIRST+20)
3097 #define LVM_REDRAWITEMS (LVM_FIRST+21)
3098 #define LVM_ARRANGE (LVM_FIRST+22)
3099 #define LVM_EDITLABELA (LVM_FIRST+23)
3100 #define LVM_EDITLABELW (LVM_FIRST+118)
3101 #define LVM_EDITLABEL WINELIB_NAME_AW(LVM_EDITLABEL)
3102 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
3103 #define LVM_GETCOLUMNA (LVM_FIRST+25)
3104 #define LVM_GETCOLUMNW (LVM_FIRST+95)
3105 #define LVM_GETCOLUMN WINELIB_NAME_AW(LVM_GETCOLUMN)
3106 #define LVM_SETCOLUMNA (LVM_FIRST+26)
3107 #define LVM_SETCOLUMNW (LVM_FIRST+96)
3108 #define LVM_SETCOLUMN WINELIB_NAME_AW(LVM_SETCOLUMN)
3109 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
3110 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
3111 #define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
3112 #define LVM_DELETECOLUMN (LVM_FIRST+28)
3113 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
3114 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
3115 #define LVM_GETHEADER (LVM_FIRST+31)
3117 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
3118 #define LVM_GETVIEWRECT (LVM_FIRST+34)
3119 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
3120 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
3121 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
3122 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
3123 #define LVM_GETTOPINDEX (LVM_FIRST+39)
3124 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
3125 #define LVM_GETORIGIN (LVM_FIRST+41)
3126 #define LVM_UPDATE (LVM_FIRST+42)
3127 #define LVM_SETITEMSTATE (LVM_FIRST+43)
3128 #define LVM_GETITEMSTATE (LVM_FIRST+44)
3129 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
3130 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
3131 #define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
3132 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
3133 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
3134 #define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
3135 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
3136 #define LVM_SORTITEMS (LVM_FIRST+48)
3137 #define LVM_SORTITEMSEX (LVM_FIRST+81)
3138 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
3139 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
3140 #define LVM_GETITEMSPACING (LVM_FIRST+51)
3141 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
3142 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
3143 #define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
3144 #define LVM_SETICONSPACING (LVM_FIRST+53)
3145 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
3146 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
3147 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
3148 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
3149 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
3150 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
3151 #define LVM_SETHOTITEM (LVM_FIRST+60)
3152 #define LVM_GETHOTITEM (LVM_FIRST+61)
3153 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
3154 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
3155 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
3156 #define LVM_SETWORKAREAS (LVM_FIRST+65)
3157 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
3158 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
3159 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
3160 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
3161 #define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
3162 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
3163 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
3164 #define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
3165 #define LVM_GETWORKAREAS (LVM_FIRST+70)
3166 #define LVM_SETHOVERTIME (LVM_FIRST+71)
3167 #define LVM_GETHOVERTIME (LVM_FIRST+72)
3168 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
3169 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
3170 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
3171 #define LVM_GETUNICODEFORMAT (CCM_GETUNICODEFORMAT)
3172 #define LVM_SETUNICODEFORMAT (CCM_SETUNICODEFORMAT)
3173 #define LVM_SETSELECTEDCOLUMN (LVM_FIRST + 140)
3174 #define LVM_SETTILEWIDTH (LVM_FIRST + 141)
3175 #define LVM_SETVIEW (LVM_FIRST + 142)
3176 #define LVM_GETVIEW (LVM_FIRST + 143)
3177 #define LVM_INSERTGROUP (LVM_FIRST + 145)
3178 #define LVM_SETGROUPINFO (LVM_FIRST + 147)
3179 #define LVM_GETGROUPINFO (LVM_FIRST + 149)
3180 #define LVM_REMOVEGROUP (LVM_FIRST + 150)
3181 #define LVM_MOVEGROUP (LVM_FIRST + 151)
3182 #define LVM_MOVEITEMTOGROUP (LVM_FIRST + 154)
3183 #define LVM_SETGROUPMETRICS (LVM_FIRST + 155)
3184 #define LVM_GETGROUPMETRICS (LVM_FIRST + 156)
3185 #define LVM_ENABLEGROUPVIEW (LVM_FIRST + 157)
3186 #define LVM_SORTGROUPS (LVM_FIRST + 158)
3187 #define LVM_INSERTGROUPSORTED (LVM_FIRST + 159)
3188 #define LVM_REMOVEALLGROUPS (LVM_FIRST + 160)
3189 #define LVM_HASGROUP (LVM_FIRST + 161)
3190 #define LVM_SETTILEVIEWINFO (LVM_FIRST + 162)
3191 #define LVM_GETTILEVIEWINFO (LVM_FIRST + 163)
3192 #define LVM_SETTILEINFO (LVM_FIRST + 164)
3193 #define LVM_GETTILEINFO (LVM_FIRST + 165)
3194 #define LVM_SETINSERTMARK (LVM_FIRST + 166)
3195 #define LVM_GETINSERTMARK (LVM_FIRST + 167)
3196 #define LVM_INSERTMARKHITTEST (LVM_FIRST + 168)
3197 #define LVM_GETINSERTMARKRECT (LVM_FIRST + 169)
3198 #define LVM_SETINSERTMARKCOLOR (LVM_FIRST + 170)
3199 #define LVM_GETINSERTMARKCOLOR (LVM_FIRST + 171)
3200 #define LVM_SETINFOTIP (LVM_FIRST + 173)
3201 #define LVM_GETSELECTEDCOLUMN (LVM_FIRST + 174)
3202 #define LVM_ISGROUPVIEWENABLED (LVM_FIRST + 175)
3203 #define LVM_GETOUTLINECOLOR (LVM_FIRST + 176)
3204 #define LVM_SETOUTLINECOLOR (LVM_FIRST + 177)
3205 #define LVM_CANCELEDITLABEL (LVM_FIRST + 179)
3206 #define LVM_MAPINDEXTOID (LVM_FIRST + 180)
3207 #define LVM_MAPIDTOINDEX (LVM_FIRST + 181)
3208 #define LVM_ISITEMVISIBLE (LVM_FIRST + 182)
3210 #define LVN_FIRST (0U-100U)
3211 #define LVN_LAST (0U-199U)
3212 #define LVN_ITEMCHANGING (LVN_FIRST-0)
3213 #define LVN_ITEMCHANGED (LVN_FIRST-1)
3214 #define LVN_INSERTITEM (LVN_FIRST-2)
3215 #define LVN_DELETEITEM (LVN_FIRST-3)
3216 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
3217 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
3218 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
3219 #define LVN_BEGINLABELEDIT WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
3220 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
3221 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
3222 #define LVN_ENDLABELEDIT WINELIB_NAME_AW(LVN_ENDLABELEDIT)
3223 #define LVN_COLUMNCLICK (LVN_FIRST-8)
3224 #define LVN_BEGINDRAG (LVN_FIRST-9)
3225 #define LVN_BEGINRDRAG (LVN_FIRST-11)
3226 #define LVN_ODCACHEHINT (LVN_FIRST-13)
3227 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
3228 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
3229 #define LVN_HOTTRACK (LVN_FIRST-21)
3230 #define LVN_ODFINDITEMA (LVN_FIRST-52)
3231 #define LVN_ODFINDITEMW (LVN_FIRST-79)
3232 #define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
3233 #define LVN_GETDISPINFOA (LVN_FIRST-50)
3234 #define LVN_GETDISPINFOW (LVN_FIRST-77)
3235 #define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
3236 #define LVN_SETDISPINFOA (LVN_FIRST-51)
3237 #define LVN_SETDISPINFOW (LVN_FIRST-78)
3238 #define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
3239 #define LVN_KEYDOWN (LVN_FIRST-55)
3240 #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
3241 #define LVN_GETINFOTIPA (LVN_FIRST-57)
3242 #define LVN_GETINFOTIPW (LVN_FIRST-58)
3243 #define LVN_GETINFOTIP WINELIB_NAME_AW(LVN_GETINFOTIP)
3244 #define LVN_INCREMENTALSEARCHA (LVN_FIRST-62)
3245 #define LVN_INCREMENTALSEARCHW (LVN_FIRST-63)
3246 #define LVN_INCREMENTALSEARCH WINELIB_NAME_AW(LVN_INCREMENTALSEARCH)
3247 #define LVN_BEGINSCROLL (LVN_FIRST-80)
3248 #define LVN_ENDSCROLL (LVN_FIRST-81)
3249 #define LVN_LINKCLICK (LVN_FIRST-84)
3250 #define LVN_ASYNCDRAWN (LVN_FIRST-86)
3251 #define LVN_GETEMPTYMARKUP (LVN_FIRST-87)
3253 /* LVN_INCREMENTALSEARCH return codes */
3254 #define LVNSCH_DEFAULT -1
3255 #define LVNSCH_ERROR -2
3256 #define LVNSCH_IGNORE -3
3258 #define LVA_DEFAULT 0x0000
3259 #define LVA_ALIGNLEFT 0x0001
3260 #define LVA_ALIGNTOP 0x0002
3261 #define LVA_SNAPTOGRID 0x0005
3263 typedef struct tagLVITEMA
3265 UINT mask;
3266 INT iItem;
3267 INT iSubItem;
3268 UINT state;
3269 UINT stateMask;
3270 LPSTR pszText;
3271 INT cchTextMax;
3272 INT iImage;
3273 LPARAM lParam;
3274 /* (_WIN32_IE >= 0x0300) */
3275 INT iIndent;
3276 /* (_WIN32_IE >= 0x0560) */
3277 INT iGroupId;
3278 UINT cColumns;
3279 PUINT puColumns;
3280 /* (_WIN32_WINNT >= 0x0600) */
3281 PINT piColFmt;
3282 INT iGroup;
3283 } LVITEMA, *LPLVITEMA;
3285 typedef struct tagLVITEMW
3287 UINT mask;
3288 INT iItem;
3289 INT iSubItem;
3290 UINT state;
3291 UINT stateMask;
3292 LPWSTR pszText;
3293 INT cchTextMax;
3294 INT iImage;
3295 LPARAM lParam;
3296 /* (_WIN32_IE >= 0x0300) */
3297 INT iIndent;
3298 /* (_WIN32_IE >= 0x0560) */
3299 INT iGroupId;
3300 UINT cColumns;
3301 PUINT puColumns;
3302 /* (_WIN32_WINNT >= 0x0600) */
3303 PINT piColFmt;
3304 INT iGroup;
3305 } LVITEMW, *LPLVITEMW;
3307 #define LVITEM WINELIB_NAME_AW(LVITEM)
3308 #define LPLVITEM WINELIB_NAME_AW(LPLVITEM)
3310 #define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
3311 #define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
3312 #define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
3314 #define LVITEMA_V5_SIZE CCSIZEOF_STRUCT(LVITEMA, puColumns)
3315 #define LVITEMW_V5_SIZE CCSIZEOF_STRUCT(LVITEMW, puColumns)
3316 #define LVITEM_V5_SIZE WINELIB_NAME_AW(LVITEM_V5_SIZE)
3318 #define LV_ITEM LVITEM
3319 #define LV_ITEMA LVITEMA
3320 #define LV_ITEMW LVITEMW
3322 typedef struct LVSETINFOTIP
3324 UINT cbSize;
3325 DWORD dwFlags;
3326 LPWSTR pszText;
3327 int iItem;
3328 int iSubItem;
3329 } LVSETINFOTIP, *PLVSETINFOTIP;
3331 /* ListView background image structs and constants
3332 For _WIN32_IE version 0x400 and later. */
3334 typedef struct tagLVBKIMAGEA
3336 ULONG ulFlags;
3337 HBITMAP hbm;
3338 LPSTR pszImage;
3339 UINT cchImageMax;
3340 int xOffsetPercent;
3341 int yOffsetPercent;
3342 } LVBKIMAGEA, *LPLVBKIMAGEA;
3344 typedef struct tagLVBKIMAGEW
3346 ULONG ulFlags;
3347 HBITMAP hbm;
3348 LPWSTR pszImage;
3349 UINT cchImageMax;
3350 int xOffsetPercent;
3351 int yOffsetPercent;
3352 } LVBKIMAGEW, *LPLVBKIMAGEW;
3354 #define LVBKIMAGE WINELIB_NAME_AW(LVBKIMAGE)
3355 #define LPLVBKIMAGE WINELIB_NAME_AW(LPLVBKIMAGE)
3357 #define LVBKIF_SOURCE_NONE 0x00000000
3358 #define LVBKIF_SOURCE_HBITMAP 0x00000001
3359 #define LVBKIF_SOURCE_URL 0x00000002
3360 #define LVBKIF_SOURCE_MASK 0x00000003
3361 #define LVBKIF_STYLE_NORMAL 0x00000000
3362 #define LVBKIF_STYLE_TILE 0x00000010
3363 #define LVBKIF_STYLE_MASK 0x00000010
3364 #define LVBKIF_FLAG_TILEOFFSET 0x00000100
3365 #define LVBKIF_TYPE_WATERMARK 0x10000000
3367 #define ListView_SetBkImage(hwnd, plvbki) \
3368 (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)plvbki)
3370 #define ListView_GetBkImage(hwnd, plvbki) \
3371 (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)plvbki)
3373 typedef struct tagLVCOLUMNA
3375 UINT mask;
3376 INT fmt;
3377 INT cx;
3378 LPSTR pszText;
3379 INT cchTextMax;
3380 INT iSubItem;
3381 /* (_WIN32_IE >= 0x0300) */
3382 INT iImage;
3383 INT iOrder;
3384 /* (_WIN32_WINNT >= 0x0600) */
3385 INT cxMin;
3386 INT cxDefault;
3387 INT cxIdeal;
3388 } LVCOLUMNA, *LPLVCOLUMNA;
3390 typedef struct tagLVCOLUMNW
3392 UINT mask;
3393 INT fmt;
3394 INT cx;
3395 LPWSTR pszText;
3396 INT cchTextMax;
3397 INT iSubItem;
3398 /* (_WIN32_IE >= 0x0300) */
3399 INT iImage;
3400 INT iOrder;
3401 /* (_WIN32_WINNT >= 0x0600) */
3402 INT cxMin;
3403 INT cxDefault;
3404 INT cxIdeal;
3405 } LVCOLUMNW, *LPLVCOLUMNW;
3407 #define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
3408 #define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)
3410 #define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
3411 #define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
3412 #define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)
3414 #define LV_COLUMN LVCOLUMN
3417 typedef struct tagNMLISTVIEW
3419 NMHDR hdr;
3420 INT iItem;
3421 INT iSubItem;
3422 UINT uNewState;
3423 UINT uOldState;
3424 UINT uChanged;
3425 POINT ptAction;
3426 LPARAM lParam;
3427 } NMLISTVIEW, *LPNMLISTVIEW;
3429 #define NM_LISTVIEW NMLISTVIEW
3430 #define LPNM_LISTVIEW LPNMLISTVIEW
3432 typedef struct tagNMITEMACTIVATE
3434 NMHDR hdr;
3435 int iItem;
3436 int iSubItem;
3437 UINT uNewState;
3438 UINT uOldState;
3439 UINT uChanged;
3440 POINT ptAction;
3441 LPARAM lParam;
3442 UINT uKeyFlags;
3443 } NMITEMACTIVATE, *LPNMITEMACTIVATE;
3445 #define LVKF_ALT 0x0001
3446 #define LVKF_CONTROL 0x0002
3447 #define LVKF_SHIFT 0x0004
3449 typedef struct tagLVDISPINFO
3451 NMHDR hdr;
3452 LVITEMA item;
3453 } NMLVDISPINFOA, *LPNMLVDISPINFOA;
3455 typedef struct tagLVDISPINFOW
3457 NMHDR hdr;
3458 LVITEMW item;
3459 } NMLVDISPINFOW, *LPNMLVDISPINFOW;
3461 #define NMLVDISPINFO WINELIB_NAME_AW(NMLVDISPINFO)
3462 #define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
3464 #define LV_DISPINFO NMLVDISPINFO
3465 #define LV_DISPINFOA NMLVDISPINFOA
3466 #define LV_DISPINFOW NMLVDISPINFOW
3468 #include <pshpack1.h>
3469 typedef struct tagLVKEYDOWN
3471 NMHDR hdr;
3472 WORD wVKey;
3473 UINT flags;
3474 } NMLVKEYDOWN, *LPNMLVKEYDOWN;
3475 #include <poppack.h>
3477 #define LV_KEYDOWN NMLVKEYDOWN
3479 typedef struct tagNMLVGETINFOTIPA
3481 NMHDR hdr;
3482 DWORD dwFlags;
3483 LPSTR pszText;
3484 int cchTextMax;
3485 int iItem;
3486 int iSubItem;
3487 LPARAM lParam;
3488 } NMLVGETINFOTIPA, *LPNMLVGETINFOTIPA;
3490 typedef struct tagNMLVGETINFOTIPW
3492 NMHDR hdr;
3493 DWORD dwFlags;
3494 LPWSTR pszText;
3495 int cchTextMax;
3496 int iItem;
3497 int iSubItem;
3498 LPARAM lParam;
3499 } NMLVGETINFOTIPW, *LPNMLVGETINFOTIPW;
3501 #define NMLVGETINFOTIP WINELIB_NAME_AW(NMLVGETINFOTIP)
3502 #define LPNMLVGETINFOTIP WINELIB_NAME_AW(LPNMLVGETINFOTIP)
3504 typedef struct tagLVHITTESTINFO
3506 POINT pt;
3507 UINT flags;
3508 INT iItem;
3509 INT iSubItem;
3510 /* (_WIN32_WINNT >= 0x0600) */
3511 INT iGroup;
3512 } LVHITTESTINFO, *LPLVHITTESTINFO;
3514 #define LV_HITTESTINFO LVHITTESTINFO
3515 #define _LV_HITTESTINFO tagLVHITTESTINFO
3516 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
3518 typedef struct tagLVFINDINFOA
3520 UINT flags;
3521 LPCSTR psz;
3522 LPARAM lParam;
3523 POINT pt;
3524 UINT vkDirection;
3525 } LVFINDINFOA, *LPLVFINDINFOA;
3527 typedef struct tagLVFINDINFOW
3529 UINT flags;
3530 LPCWSTR psz;
3531 LPARAM lParam;
3532 POINT pt;
3533 UINT vkDirection;
3534 } LVFINDINFOW, *LPLVFINDINFOW;
3536 #define LVFINDINFO WINELIB_NAME_AW(LVFINDINFO)
3537 #define LPLVFINDINFO WINELIB_NAME_AW(LPLVFINDINFO)
3539 #define LV_FINDINFO LVFINDINFO
3540 #define LV_FINDINFOA LVFINDINFOA
3541 #define LV_FINDINFOW LVFINDINFOW
3543 /* Groups relates structures */
3545 typedef struct LVGROUP
3547 UINT cbSize;
3548 UINT mask;
3549 LPWSTR pszHeader;
3550 INT cchHeader;
3551 LPWSTR pszFooter;
3552 INT cchFooter;
3553 INT iGroupId;
3554 UINT stateMask;
3555 UINT state;
3556 UINT uAlign;
3557 /* (_WIN32_WINNT >= 0x0600) */
3558 LPWSTR pszSubtitle;
3559 UINT cchSubtitle;
3560 LPWSTR pszTask;
3561 UINT cchTask;
3562 LPWSTR pszDescriptionTop;
3563 UINT cchDescriptionTop;
3564 LPWSTR pszDescriptionBottom;
3565 UINT cchDescriptionBottom;
3566 INT iTitleImage;
3567 INT iExtendedImage;
3568 INT iFirstItem;
3569 UINT cItems;
3570 LPWSTR pszSubsetTitle;
3571 UINT cchSubsetTitle;
3572 } LVGROUP, *PLVGROUP;
3574 #define LVGROUP_V5_SIZE CCSIZEOF_STRUCT(LVGROUP, uAlign)
3576 typedef struct LVGROUPMETRICS
3578 UINT cbSize;
3579 UINT mask;
3580 UINT Left;
3581 UINT Top;
3582 UINT Right;
3583 UINT Bottom;
3584 COLORREF crLeft;
3585 COLORREF crTop;
3586 COLORREF crRight;
3587 COLORREF crBottom;
3588 COLORREF crRightHeader;
3589 COLORREF crFooter;
3590 } LVGROUPMETRICS, *PLVGROUPMETRICS;
3592 typedef INT (*PFNLVGROUPCOMPARE)(INT, INT, VOID*);
3594 typedef struct LVINSERTGROUPSORTED
3596 PFNLVGROUPCOMPARE pfnGroupCompare;
3597 LPVOID *pvData;
3598 LVGROUP lvGroup;
3599 } LVINSERTGROUPSORTED, *PLVINSERTGROUPSORTED;
3601 /* Tile related structures */
3603 typedef struct LVTILEINFO
3605 UINT cbSize;
3606 int iItem;
3607 UINT cColumns;
3608 PUINT puColumns;
3609 /* (_WIN32_WINNT >= 0x0600) */
3610 int* piColFmt;
3611 } LVTILEINFO, *PLVTILEINFO;
3613 typedef struct LVTILEVIEWINFO
3615 UINT cbSize;
3616 DWORD dwMask;
3617 DWORD dwFlags;
3618 SIZE sizeTile;
3619 int cLines;
3620 RECT rcLabelMargin;
3621 } LVTILEVIEWINFO, *PLVTILEVIEWINFO;
3623 typedef struct LVINSERTMARK
3625 UINT cbSize;
3626 DWORD dwFlags;
3627 int iItem;
3628 DWORD dwReserved;
3629 } LVINSERTMARK, *PLVINSERTMARK;
3631 typedef struct tagTCHITTESTINFO
3633 POINT pt;
3634 UINT flags;
3635 } TCHITTESTINFO, *LPTCHITTESTINFO;
3637 #define TC_HITTESTINFO TCHITTESTINFO
3639 typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
3641 #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLCUSTOMDRW, clrTextBk)
3643 typedef struct tagNMLVCUSTOMDRAW
3645 NMCUSTOMDRAW nmcd;
3646 COLORREF clrText;
3647 COLORREF clrTextBk;
3648 int iSubItem; /* (_WIN32_IE >= 0x0400) */
3649 DWORD dwItemType; /* (_WIN32_IE >= 0x560) */
3650 COLORREF clrFace; /* (_WIN32_IE >= 0x560) */
3651 int iIconEffect; /* (_WIN32_IE >= 0x560) */
3652 int iIconPhase; /* (_WIN32_IE >= 0x560) */
3653 int iPartId; /* (_WIN32_IE >= 0x560) */
3654 int iStateId; /* (_WIN32_IE >= 0x560) */
3655 RECT rcText; /* (_WIN32_IE >= 0x560) */
3656 UINT uAlign; /* (_WIN32_IE >= 0x560) */
3657 } NMLVCUSTOMDRAW, *LPNMLVCUSTOMDRAW;
3659 typedef struct tagNMLVCACHEHINT
3661 NMHDR hdr;
3662 INT iFrom;
3663 INT iTo;
3664 } NMLVCACHEHINT, *LPNMLVCACHEHINT;
3666 #define LPNM_CACHEHINT LPNMLVCACHEHINT
3667 #define PNM_CACHEHINT LPNMLVCACHEHINT
3668 #define NM_CACHEHINT NMLVCACHEHINT
3670 typedef struct tagNMLVFINDITEMA
3672 NMHDR hdr;
3673 int iStart;
3674 LVFINDINFOA lvfi;
3675 } NMLVFINDITEMA, *LPNMLVFINDITEMA;
3677 typedef struct tagNMLVFINDITEMW
3679 NMHDR hdr;
3680 int iStart;
3681 LVFINDINFOW lvfi;
3682 } NMLVFINDITEMW, *LPNMLVFINDITEMW;
3684 #define NMLVFINDITEM WINELIB_NAME_AW(NMLVFINDITEM)
3685 #define LPNMLVFINDITEM WINELIB_NAME_AW(LPNMLVFINDITEM)
3686 #define NM_FINDITEM NMLVFINDITEM
3687 #define LPNM_FINDITEM LPNMLVFINDITEM
3688 #define PNM_FINDITEM LPNMLVFINDITEM
3690 typedef struct tagNMLVODSTATECHANGE
3692 NMHDR hdr;
3693 int iFrom;
3694 int iTo;
3695 UINT uNewState;
3696 UINT uOldState;
3697 } NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;
3699 #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3700 #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3701 #define NM_ODSTATECHANGE NMLVODSTATECHANGE
3703 typedef struct NMLVSCROLL
3705 NMHDR hdr;
3706 int dx;
3707 int dy;
3708 } NMLVSCROLL, *LPNMLVSCROLL;
3710 #define ListView_SetItemCount(hwnd,count) \
3711 (BOOL)SNDMSG((hwnd),LVM_SETITEMCOUNT,(WPARAM)(INT)(count),0)
3712 #define ListView_SetTextBkColor(hwnd,clrBk) \
3713 (BOOL)SNDMSG((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3714 #define ListView_SetTextColor(hwnd,clrBk) \
3715 (BOOL)SNDMSG((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3716 #define ListView_DeleteColumn(hwnd,col)\
3717 (LRESULT)SNDMSG((hwnd),LVM_DELETECOLUMN,0,(LPARAM)(INT)(col))
3718 #define ListView_GetColumnA(hwnd,x,col)\
3719 (LRESULT)SNDMSGA((hwnd),LVM_GETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3720 #define ListView_GetColumnW(hwnd,x,col)\
3721 (LRESULT)SNDMSGW((hwnd),LVM_GETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3722 #define ListView_GetColumn WINELIB_NAME_AW(ListView_GetColumn)
3723 #define ListView_SetColumnA(hwnd,x,col)\
3724 (LRESULT)SNDMSGA((hwnd),LVM_SETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3725 #define ListView_SetColumnW(hwnd,x,col)\
3726 (LRESULT)SNDMSGW((hwnd),LVM_SETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3727 #define ListView_SetColumn WINELIB_NAME_AW(ListView_SetColumn)
3728 #define ListView_GetColumnWidth(hwnd,x)\
3729 (INT)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(INT)(x), 0)
3730 #define ListView_SetColumnWidth(hwnd,x,width)\
3731 (BOOL)SNDMSG((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(INT)(x),(LPARAM)(MAKELPARAM(width,0)))
3734 #define ListView_GetNextItem(hwnd,nItem,flags) \
3735 (INT)SNDMSG((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
3736 #define ListView_FindItemA(hwnd,nItem,plvfi) \
3737 (INT)SNDMSGA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOA*)(plvfi))
3738 #define ListView_FindItemW(hwnd,nItem,plvfi) \
3739 (INT)SNDMSGW((hwnd),LVM_FINDITEMW,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOW*)(plvfi))
3740 #define ListView_FindItem WINELIB_NAME_AW(ListView_FindItem)
3742 #define ListView_Arrange(hwnd,code) \
3743 (INT)SNDMSG((hwnd), LVM_ARRANGE, (WPARAM)(INT)(code), 0)
3744 #define ListView_GetItemPosition(hwnd,i,ppt) \
3745 (INT)SNDMSG((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
3746 #define ListView_GetItemRect(hwnd,i,prc,code) \
3747 (BOOL)SNDMSG((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
3748 ((prc) ? (((RECT*)(prc))->left = (code),(LPARAM)(RECT \
3749 *)(prc)) : (LPARAM)(RECT*)NULL))
3750 #define ListView_SetItemA(hwnd,pitem) \
3751 (INT)SNDMSGA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3752 #define ListView_SetItemW(hwnd,pitem) \
3753 (INT)SNDMSGW((hwnd),LVM_SETITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3754 #define ListView_SetItem WINELIB_NAME_AW(ListView_SetItem)
3755 #define ListView_SetItemState(hwnd,i,data,dataMask) \
3756 { LVITEM _LVi; _LVi.state = data; _LVi.stateMask = dataMask;\
3757 SNDMSG(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEM)&_LVi);}
3758 #define ListView_GetItemState(hwnd,i,mask) \
3759 (UINT)SNDMSG((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
3760 #define ListView_SetCheckState(hwndLV, i, bCheck) \
3761 { LVITEM _LVi; _LVi.state = INDEXTOSTATEIMAGEMASK((bCheck)?2:1); _LVi.stateMask = LVIS_STATEIMAGEMASK; \
3762 SNDMSG(hwndLV, LVM_SETITEMSTATE, (WPARAM)(UINT)(i), (LPARAM)(LPLVITEM)&_LVi);}
3763 #define ListView_GetCheckState(hwndLV, i) \
3764 (((UINT)SNDMSG((hwndLV), LVM_GETITEMSTATE, (i), LVIS_STATEIMAGEMASK) >> 12) - 1)
3765 #define ListView_GetCountPerPage(hwnd) \
3766 (BOOL)SNDMSG((hwnd), LVM_GETCOUNTPERPAGE, 0, 0)
3767 #define ListView_GetImageList(hwnd,iImageList) \
3768 (HIMAGELIST)SNDMSG((hwnd), LVM_GETIMAGELIST, (WPARAM)(INT)(iImageList), 0)
3769 #define ListView_GetStringWidthA(hwnd,pstr) \
3770 (INT)SNDMSGA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
3771 #define ListView_GetStringWidthW(hwnd,pstr) \
3772 (INT)SNDMSGW((hwnd),LVM_GETSTRINGWIDTHW,0,(LPARAM)(LPCWSTR)(pstr))
3773 #define ListView_GetStringWidth WINELIB_NAME_AW(ListView_GetStringWidth)
3774 #define ListView_GetTopIndex(hwnd) \
3775 (BOOL)SNDMSG((hwnd), LVM_GETTOPINDEX, 0, 0)
3776 #define ListView_Scroll(hwnd,dx,dy) \
3777 (BOOL)SNDMSG((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
3778 #define ListView_EnsureVisible(hwnd,i,fPartialOk) \
3779 (BOOL)SNDMSG((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
3780 #define ListView_SetBkColor(hwnd,clrBk) \
3781 (BOOL)SNDMSG((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3782 #define ListView_SetImageList(hwnd,himl,iImageList) \
3783 (HIMAGELIST)SNDMSG((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(HIMAGELIST)(himl))
3784 #define ListView_GetItemCount(hwnd) \
3785 (INT)SNDMSG((hwnd), LVM_GETITEMCOUNT, 0, 0)
3786 #define ListView_RedrawItems(hwnd,first,last) \
3787 (BOOL)SNDMSG((hwnd),LVM_REDRAWITEMS,(WPARAM)(INT)(first),(LPARAM)(INT)(last))
3788 #define ListView_GetEditControl(hwnd) \
3789 (HWND)SNDMSG((hwnd), LVM_GETEDITCONTROL, 0, 0)
3790 #define ListView_GetTextColor(hwnd) \
3791 (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0)
3792 #define ListView_GetTextBkColor(hwnd) \
3793 (COLORREF)SNDMSG((hwnd), LVM_GETTEXTBKCOLOR, 0, 0)
3794 #define ListView_GetBkColor(hwnd) \
3795 (COLORREF)SNDMSG((hwnd), LVM_GETBKCOLOR, 0, 0)
3796 #define ListView_GetItemA(hwnd,pitem) \
3797 (BOOL)SNDMSGA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
3798 #define ListView_GetItemW(hwnd,pitem) \
3799 (BOOL)SNDMSGW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
3800 #define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
3801 #define ListView_GetOrigin(hwnd,ppt) \
3802 (BOOL)SNDMSG((hwnd),LVM_GETORIGIN,0,(LPARAM)(POINT *)(ppt))
3804 #define ListView_HitTest(hwnd,pinfo) \
3805 (INT)SNDMSG((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
3807 #define ListView_InsertItemA(hwnd,pitem) \
3808 (INT)SNDMSGA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3809 #define ListView_InsertItemW(hwnd,pitem) \
3810 (INT)SNDMSGW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3811 #define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
3813 #define ListView_DeleteAllItems(hwnd) \
3814 (BOOL)SNDMSG((hwnd), LVM_DELETEALLITEMS, 0, 0)
3816 #define ListView_InsertColumnA(hwnd,iCol,pcol) \
3817 (INT)SNDMSGA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
3818 #define ListView_InsertColumnW(hwnd,iCol,pcol) \
3819 (INT)SNDMSGW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
3820 #define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
3822 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
3823 (BOOL)SNDMSG((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
3824 #define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm) \
3825 (BOOL)SNDMSG((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
3827 #define ListView_SetItemPosition(hwndLV, i, x, y) \
3828 (BOOL)SNDMSG((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
3829 #define ListView_GetSelectedCount(hwndLV) \
3830 (UINT)SNDMSG((hwndLV), LVM_GETSELECTEDCOUNT, 0, 0)
3832 #define ListView_EditLabelA(hwndLV, i) \
3833 (HWND)SNDMSG((hwndLV), LVM_EDITLABELA, (WPARAM)(int)(i), 0)
3834 #define ListView_EditLabelW(hwndLV, i) \
3835 (HWND)SNDMSG((hwndLV), LVM_EDITLABELW, (WPARAM)(int)(i), 0)
3836 #define ListView_EditLabel WINELIB_NAME_AW(ListView_EditLabel)
3838 #define ListView_GetItemTextA(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
3840 LVITEMA _LVi;\
3841 _LVi.iSubItem = _iSubItem;\
3842 _LVi.cchTextMax = _cchTextMax;\
3843 _LVi.pszText = _pszText;\
3844 SNDMSGA(hwndLV, LVM_GETITEMTEXTA, (WPARAM)(i), (LPARAM)&_LVi);\
3846 #define ListView_GetItemTextW(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
3848 LVITEMW _LVi;\
3849 _LVi.iSubItem = _iSubItem;\
3850 _LVi.cchTextMax = _cchTextMax;\
3851 _LVi.pszText = _pszText;\
3852 SNDMSGW(hwndLV, LVM_GETITEMTEXTW, (WPARAM)(i), (LPARAM)&_LVi);\
3854 #define ListView_GetItemText WINELIB_NAME_AW(ListView_GetItemText)
3855 #define ListView_SetItemPosition32(hwnd,n,x1,y1) \
3856 { POINT ptNewPos; ptNewPos.x = (x1); ptNewPos.y = (y1); SNDMSG((hwnd), LVM_SETITEMPOSITION32, (WPARAM)(int)(n), (LPARAM)&ptNewPos); }
3857 #define ListView_SetItemTextA(hwndLV, i, _iSubItem, _pszText) \
3858 { LVITEMA _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3859 SNDMSGA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}
3860 #define ListView_SetItemTextW(hwndLV, i, _iSubItem, _pszText) \
3861 { LVITEMW _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3862 SNDMSGW(hwndLV, LVM_SETITEMTEXTW, (WPARAM)i, (LPARAM) (LVITEMW*)& _LVi);}
3863 #define ListView_SetItemText WINELIB_NAME_AW(ListView_SetItemText)
3865 #define ListView_DeleteItem(hwndLV, i) \
3866 (BOOL)SNDMSG(hwndLV, LVM_DELETEITEM, (WPARAM)(int)(i), 0)
3867 #define ListView_Update(hwndLV, i) \
3868 (BOOL)SNDMSG((hwndLV), LVM_UPDATE, (WPARAM)(i), 0)
3869 #define ListView_GetColumnOrderArray(hwndLV, iCount, pi) \
3870 (BOOL)SNDMSG((hwndLV), LVM_GETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3871 #define ListView_GetExtendedListViewStyle(hwndLV) \
3872 (DWORD)SNDMSG((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
3873 #define ListView_GetHotCursor(hwndLV) \
3874 (HCURSOR)SNDMSG((hwndLV), LVM_GETHOTCURSOR, 0, 0)
3875 #define ListView_GetHotItem(hwndLV) \
3876 (int)SNDMSG((hwndLV), LVM_GETHOTITEM, 0, 0)
3877 #define ListView_GetItemSpacing(hwndLV, fSmall) \
3878 (DWORD)SNDMSG((hwndLV), LVM_GETITEMSPACING, (WPARAM)fSmall, 0)
3879 #define ListView_GetSubItemRect(hwndLV, iItem, iSubItem, code, prc) \
3880 (BOOL)SNDMSG((hwndLV), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
3881 ((prc) ? ((((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code), (LPARAM)(prc)) : 0))
3882 #define ListView_GetToolTips(hwndLV) \
3883 (HWND)SNDMSG((hwndLV), LVM_GETTOOLTIPS, 0, 0)
3884 #define ListView_SetColumnOrderArray(hwndLV, iCount, pi) \
3885 (BOOL)SNDMSG((hwndLV), LVM_SETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3886 #define ListView_SetExtendedListViewStyle(hwndLV, dw) \
3887 (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dw)
3888 #define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw) \
3889 (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)dwMask, (LPARAM)dw)
3890 #define ListView_SetHotCursor(hwndLV, hcur) \
3891 (HCURSOR)SNDMSG((hwndLV), LVM_SETHOTCURSOR, 0, (LPARAM)hcur)
3892 #define ListView_SetHotItem(hwndLV, i) \
3893 (int)SNDMSG((hwndLV), LVM_SETHOTITEM, (WPARAM)i, 0)
3894 #define ListView_SetIconSpacing(hwndLV, cx, cy) \
3895 (DWORD)SNDMSG((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
3896 #define ListView_SetToolTips(hwndLV, hwndNewHwnd) \
3897 (HWND)SNDMSG((hwndLV), LVM_SETTOOLTIPS, (WPARAM)hwndNewHwnd, 0)
3898 #define ListView_SubItemHitTest(hwndLV, plvhti) \
3899 (int)SNDMSG((hwndLV), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
3900 #define ListView_GetSelectionMark(hwndLV) \
3901 (int)SNDMSG((hwndLV), LVM_GETSELECTIONMARK, 0, 0)
3902 #define ListView_SetSelectionMark(hwndLV, iItem) \
3903 (int)SNDMSG((hwndLV), LVM_SETSELECTIONMARK, 0, (LPARAM)(iItem))
3904 #define ListView_GetViewRect(hwndLV, prc) \
3905 (BOOL)SNDMSG((hwndLV),LVM_GETVIEWRECT,0,(LPARAM)(LPRECT)(prc))
3906 #define ListView_GetHeader(hwndLV) \
3907 (HWND)SNDMSG((hwndLV), LVM_GETHEADER, 0, 0)
3908 #define ListView_SetSelectedColumn(hwnd, iCol) \
3909 SNDMSG((hwnd), LVM_SETSELECTEDCOLUMN, (WPARAM)iCol, 0)
3910 #define ListView_SetTileWidth(hwnd, cpWidth) \
3911 SNDMSG((hwnd), LVM_SETTILEWIDTH, (WPARAM)cpWidth, 0)
3912 #define ListView_SetView(hwnd, iView) \
3913 (DWORD)SNDMSG((hwnd), LVM_SETVIEW, (WPARAM)(DWORD)iView, 0)
3914 #define ListView_GetView(hwnd) \
3915 (DWORD)SNDMSG((hwnd), LVM_GETVIEW, 0, 0)
3916 #define ListView_InsertGroup(hwnd, index, pgrp) \
3917 SNDMSG((hwnd), LVM_INSERTGROUP, (WPARAM)index, (LPARAM)pgrp)
3918 #define ListView_SetGroupHeaderImageList(hwnd, himl) \
3919 SNDMSG((hwnd), LVM_SETIMAGELIST, (WPARAM)LVSIL_GROUPHEADER, (LPARAM)himl)
3920 #define ListView_GetGroupHeaderImageList(hwnd) \
3921 SNDMSG((hwnd), LVM_GETIMAGELIST, (WPARAM)LVSIL_GROUPHEADER, 0)
3922 #define ListView_SetGroupInfo(hwnd, iGroupId, pgrp) \
3923 SNDMSG((hwnd), LVM_SETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
3924 #define ListView_GetGroupInfo(hwnd, iGroupId, pgrp) \
3925 SNDMSG((hwnd), LVM_GETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
3926 #define ListView_RemoveGroup(hwnd, iGroupId) \
3927 SNDMSG((hwnd), LVM_REMOVEGROUP, (WPARAM)iGroupId, 0)
3928 #define ListView_MoveGroup(hwnd, iGroupId, toIndex) \
3929 SNDMSG((hwnd), LVM_MOVEGROUP, (WPARAM)iGroupId, (LPARAM)toIndex)
3930 #define ListView_MoveItemToGroup(hwnd, idItemFrom, idGroupTo) \
3931 SNDMSG((hwnd), LVM_MOVEITEMTOGROUP, (WPARAM)idItemFrom, (LPARAM)idGroupTo)
3932 #define ListView_SetGroupMetrics(hwnd, pGroupMetrics) \
3933 SNDMSG((hwnd), LVM_SETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
3934 #define ListView_GetGroupMetrics(hwnd, pGroupMetrics) \
3935 SNDMSG((hwnd), LVM_GETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
3936 #define ListView_EnableGroupView(hwnd, fEnable) \
3937 SNDMSG((hwnd), LVM_ENABLEGROUPVIEW, (WPARAM)fEnable, 0)
3938 #define ListView_SortGroups(hwnd, _pfnGroupCompate, _plv) \
3939 SNDMSG((hwnd), LVM_SORTGROUPS, (WPARAM)_pfnGroupCompate, (LPARAM)_plv)
3940 #define ListView_InsertGroupSorted(hwnd, structInsert) \
3941 SNDMSG((hwnd), LVM_INSERTGROUPSORTED, (WPARAM)structInsert, 0)
3942 #define ListView_RemoveAllGroups(hwnd) \
3943 SNDMSG((hwnd), LVM_REMOVEALLGROUPS, 0, 0)
3944 #define ListView_HasGroup(hwnd, dwGroupId) \
3945 SNDMSG((hwnd), LVM_HASGROUP, dwGroupId, 0)
3946 #define ListView_SetTileViewInfo(hwnd, ptvi) \
3947 SNDMSG((hwnd), LVM_SETTILEVIEWINFO, 0, (LPARAM)ptvi)
3948 #define ListView_GetTileViewInfo(hwnd, ptvi) \
3949 SNDMSG((hwnd), LVM_GETTILEVIEWINFO, 0, (LPARAM)ptvi)
3950 #define ListView_SetTileInfo(hwnd, pti) \
3951 SNDMSG((hwnd), LVM_SETTILEINFO, 0, (LPARAM)pti)
3952 #define ListView_GetTileInfo(hwnd, pti) \
3953 SNDMSG((hwnd), LVM_GETTILEINFO, 0, (LPARAM)pti)
3954 #define ListView_SetInsertMark(hwnd, lvim) \
3955 (BOOL)SNDMSG((hwnd), LVM_SETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
3956 #define ListView_GetInsertMark(hwnd, lvim) \
3957 (BOOL)SNDMSG((hwnd), LVM_GETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
3958 #define ListView_InsertMarkHitTest(hwnd, point, lvim) \
3959 (int)SNDMSG((hwnd), LVM_INSERTMARKHITTEST, (WPARAM)(LPPOINT)(point), (LPARAM)(LPLVINSERTMARK)(lvim))
3960 #define ListView_GetInsertMarkRect(hwnd, rc) \
3961 (int)SNDMSG((hwnd), LVM_GETINSERTMARKRECT, (WPARAM)0, (LPARAM)(LPRECT)(rc))
3962 #define ListView_SetInsertMarkColor(hwnd, color) \
3963 (COLORREF)SNDMSG((hwnd), LVM_SETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
3964 #define ListView_GetInsertMarkColor(hwnd) \
3965 (COLORREF)SNDMSG((hwnd), LVM_GETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)0)
3966 #define ListView_SetInfoTip(hwndLV, plvInfoTip)\
3967 (BOOL)SNDMSG((hwndLV), LVM_SETINFOTIP, (WPARAM)0, (LPARAM)plvInfoTip)
3968 #define ListView_GetSelectedColumn(hwnd) \
3969 (UINT)SNDMSG((hwnd), LVM_GETSELECTEDCOLUMN, 0, 0)
3970 #define ListView_IsGroupViewEnabled(hwnd) \
3971 (BOOL)SNDMSG((hwnd), LVM_ISGROUPVIEWENABLED, 0, 0)
3972 #define ListView_GetOutlineColor(hwnd) \
3973 (COLORREF)SNDMSG((hwnd), LVM_GETOUTLINECOLOR, 0, 0)
3974 #define ListView_SetOutlineColor(hwnd, color) \
3975 (COLORREF)SNDMSG((hwnd), LVM_SETOUTLINECOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
3976 #define ListView_CancelEditLabel(hwnd) \
3977 (VOID)SNDMSG((hwnd), LVM_CANCELEDITLABEL, (WPARAM)0, (LPARAM)0)
3978 #define ListView_MapIndexToID(hwnd, index) \
3979 (UINT)SNDMSG((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, (LPARAM)0)
3980 #define ListView_MapIDToIndex(hwnd, id) \
3981 (UINT)SNDMSG((hwnd), LVM_MAPIDTOINDEX, (WPARAM)id, (LPARAM)0)
3982 #define ListView_SetUnicodeFormat(hwnd, fUnicode) \
3983 (BOOL)SNDMSG((hwnd), LVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
3984 #define ListView_GetUnicodeFormat(hwnd) \
3985 (BOOL)SNDMSG((hwnd), LVM_GETUNICODEFORMAT, 0, 0)
3987 /* Tab Control */
3989 #define WC_TABCONTROLA "SysTabControl32"
3990 #if defined(__GNUC__)
3991 # define WC_TABCONTROLW (const WCHAR []){ 'S','y','s', \
3992 'T','a','b','C','o','n','t','r','o','l','3','2',0 }
3993 #elif defined(_MSC_VER)
3994 # define WC_TABCONTROLW L"SysTabControl32"
3995 #else
3996 static const WCHAR WC_TABCONTROLW[] = { 'S','y','s',
3997 'T','a','b','C','o','n','t','r','o','l','3','2',0 };
3998 #endif
3999 #define WC_TABCONTROL WINELIB_NAME_AW(WC_TABCONTROL)
4001 /* tab control styles */
4002 #define TCS_EX_FLATSEPARATORS 0x00000001 /* to be used with */
4003 #define TCS_EX_REGISTERDROP 0x00000002 /* TCM_SETEXTENDEDSTYLE */
4006 #define TCM_FIRST 0x1300
4008 #define TCM_GETIMAGELIST (TCM_FIRST + 2)
4009 #define TCM_SETIMAGELIST (TCM_FIRST + 3)
4010 #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
4011 #define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
4012 #define TCM_GETITEMA (TCM_FIRST + 5)
4013 #define TCM_GETITEMW (TCM_FIRST + 60)
4014 #define TCM_SETITEMA (TCM_FIRST + 6)
4015 #define TCM_SETITEMW (TCM_FIRST + 61)
4016 #define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
4017 #define TCM_INSERTITEMA (TCM_FIRST + 7)
4018 #define TCM_INSERTITEMW (TCM_FIRST + 62)
4019 #define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
4020 #define TCM_DELETEITEM (TCM_FIRST + 8)
4021 #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
4022 #define TCM_GETITEMRECT (TCM_FIRST + 10)
4023 #define TCM_GETCURSEL (TCM_FIRST + 11)
4024 #define TCM_SETCURSEL (TCM_FIRST + 12)
4025 #define TCM_HITTEST (TCM_FIRST + 13)
4026 #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
4027 #define TCM_ADJUSTRECT (TCM_FIRST + 40)
4028 #define TCM_SETITEMSIZE (TCM_FIRST + 41)
4029 #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
4030 #define TCM_SETPADDING (TCM_FIRST + 43)
4031 #define TCM_GETROWCOUNT (TCM_FIRST + 44)
4032 #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
4033 #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
4034 #define TCM_GETCURFOCUS (TCM_FIRST + 47)
4035 #define TCM_SETCURFOCUS (TCM_FIRST + 48)
4036 #define TCM_SETMINTABWIDTH (TCM_FIRST + 49)
4037 #define TCM_DESELECTALL (TCM_FIRST + 50)
4038 #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
4039 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
4040 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
4041 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4042 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4045 #define TCIF_TEXT 0x0001
4046 #define TCIF_IMAGE 0x0002
4047 #define TCIF_RTLREADING 0x0004
4048 #define TCIF_PARAM 0x0008
4049 #define TCIF_STATE 0x0010
4051 #define TCIS_BUTTONPRESSED 0x0001
4052 #define TCIS_HIGHLIGHTED 0x0002
4054 /* TabCtrl Macros */
4055 #define TabCtrl_GetImageList(hwnd) \
4056 (HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, 0)
4057 #define TabCtrl_SetImageList(hwnd, himl) \
4058 (HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
4059 #define TabCtrl_GetItemCount(hwnd) \
4060 (int)SNDMSG((hwnd), TCM_GETITEMCOUNT, 0, 0)
4061 #define TabCtrl_GetItemA(hwnd, iItem, pitem) \
4062 (BOOL)SNDMSGA((hwnd), TCM_GETITEMA, (WPARAM)(int)iItem, (LPARAM)(TCITEMA *)(pitem))
4063 #define TabCtrl_GetItemW(hwnd, iItem, pitem) \
4064 (BOOL)SNDMSGW((hwnd), TCM_GETITEMW, (WPARAM)(int)iItem, (LPARAM)(TCITEMW *)(pitem))
4065 #define TabCtrl_GetItem WINELIB_NAME_AW(TabCtrl_GetItem)
4066 #define TabCtrl_SetItemA(hwnd, iItem, pitem) \
4067 (BOOL)SNDMSGA((hwnd), TCM_SETITEMA, (WPARAM)(int)iItem, (LPARAM)(TCITEMA *)(pitem))
4068 #define TabCtrl_SetItemW(hwnd, iItem, pitem) \
4069 (BOOL)SNDMSGW((hwnd), TCM_SETITEMW, (WPARAM)(int)iItem, (LPARAM)(TCITEMW *)(pitem))
4070 #define TabCtrl_SetItem WINELIB_NAME_AW(TabCtrl_SetItem)
4071 #define TabCtrl_InsertItemA(hwnd, iItem, pitem) \
4072 (int)SNDMSGA((hwnd), TCM_INSERTITEMA, (WPARAM)(int)iItem, (LPARAM)(const TCITEMA *)(pitem))
4073 #define TabCtrl_InsertItemW(hwnd, iItem, pitem) \
4074 (int)SNDMSGW((hwnd), TCM_INSERTITEMW, (WPARAM)(int)iItem, (LPARAM)(const TCITEMW *)(pitem))
4075 #define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
4076 #define TabCtrl_DeleteItem(hwnd, i) \
4077 (BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0)
4078 #define TabCtrl_DeleteAllItems(hwnd) \
4079 (BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, 0)
4080 #define TabCtrl_GetItemRect(hwnd, i, prc) \
4081 (BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
4082 #define TabCtrl_GetCurSel(hwnd) \
4083 (int)SNDMSG((hwnd), TCM_GETCURSEL, 0, 0)
4084 #define TabCtrl_SetCurSel(hwnd, i) \
4085 (int)SNDMSG((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
4086 #define TabCtrl_HitTest(hwndTC, pinfo) \
4087 (int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
4088 #define TabCtrl_SetItemExtra(hwndTC, cb) \
4089 (BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0)
4090 #define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
4091 (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
4092 #define TabCtrl_SetItemSize(hwnd, x, y) \
4093 (DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
4094 #define TabCtrl_RemoveImage(hwnd, i) \
4095 (void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, 0)
4096 #define TabCtrl_SetPadding(hwnd, cx, cy) \
4097 (void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
4098 #define TabCtrl_GetRowCount(hwnd) \
4099 (int)SNDMSG((hwnd), TCM_GETROWCOUNT, 0, 0)
4100 #define TabCtrl_GetToolTips(hwnd) \
4101 (HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, 0)
4102 #define TabCtrl_SetToolTips(hwnd, hwndTT) \
4103 (void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0)
4104 #define TabCtrl_GetCurFocus(hwnd) \
4105 (int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0)
4106 #define TabCtrl_SetCurFocus(hwnd, i) \
4107 SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0)
4108 #define TabCtrl_SetMinTabWidth(hwnd, x) \
4109 (int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x)
4110 #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
4111 (void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
4112 #define TabCtrl_GetUnicodeFormat(hwnd) \
4113 (BOOL)SNDMSG((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
4114 #define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) \
4115 (BOOL)SNDMSG((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)fUnicode, 0)
4116 #define TabCtrl_GetExtendedStyle(hwnd) \
4117 (BOOL)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
4118 #define TabCtrl_SetExtendedStyle(hwnd, dwExStyle) \
4119 (BOOL)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, (LPARAM)dwExStyle)
4120 #define TabCtrl_HighlightItem(hwnd, i, fHighlight) \
4121 (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)i, (LPARAM)MAKELONG(fHighlight, 0))
4123 /* constants for TCHITTESTINFO */
4125 #define TCHT_NOWHERE 0x01
4126 #define TCHT_ONITEMICON 0x02
4127 #define TCHT_ONITEMLABEL 0x04
4128 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
4130 typedef struct tagTCITEMHEADERA
4132 UINT mask;
4133 UINT lpReserved1;
4134 UINT lpReserved2;
4135 LPSTR pszText;
4136 int cchTextMax;
4137 int iImage;
4138 } TCITEMHEADERA, *LPTCITEMHEADERA;
4140 typedef struct tagTCITEMHEADERW
4142 UINT mask;
4143 UINT lpReserved1;
4144 UINT lpReserved2;
4145 LPWSTR pszText;
4146 int cchTextMax;
4147 int iImage;
4148 } TCITEMHEADERW, *LPTCITEMHEADERW;
4150 #define TCITEMHEADER WINELIB_NAME_AW(TCITEMHEADER)
4151 #define LPTCITEMHEADER WINELIB_NAME_AW(LPTCITEMHEADER)
4152 #define TC_ITEMHEADER WINELIB_NAME_AW(TCITEMHEADER)
4153 #define LPTC_ITEMHEADER WINELIB_NAME_AW(LPTCITEMHEADER)
4155 typedef struct tagTCITEMA
4157 UINT mask;
4158 UINT dwState;
4159 UINT dwStateMask;
4160 LPSTR pszText;
4161 INT cchTextMax;
4162 INT iImage;
4163 LPARAM lParam;
4164 } TCITEMA, *LPTCITEMA;
4166 typedef struct tagTCITEMW
4168 UINT mask;
4169 DWORD dwState;
4170 DWORD dwStateMask;
4171 LPWSTR pszText;
4172 INT cchTextMax;
4173 INT iImage;
4174 LPARAM lParam;
4175 } TCITEMW, *LPTCITEMW;
4177 #define TCITEM WINELIB_NAME_AW(TCITEM)
4178 #define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
4179 #define TC_ITEM WINELIB_NAME_AW(TCITEM)
4180 #define LPTC_ITEM WINELIB_NAME_AW(LPTCITEM)
4182 #define TCN_FIRST (0U-550U)
4183 #define TCN_LAST (0U-580U)
4184 #define TCN_KEYDOWN (TCN_FIRST - 0)
4185 #define TCN_SELCHANGE (TCN_FIRST - 1)
4186 #define TCN_SELCHANGING (TCN_FIRST - 2)
4187 #define TCN_GETOBJECT (TCN_FIRST - 3)
4188 #define TCN_FOCUSCHANGE (TCN_FIRST - 4)
4190 #include <pshpack1.h>
4191 typedef struct tagTCKEYDOWN
4193 NMHDR hdr;
4194 WORD wVKey;
4195 UINT flags;
4196 } NMTCKEYDOWN;
4197 #include <poppack.h>
4199 #define TC_KEYDOWN NMTCKEYDOWN
4201 /* ComboBoxEx control */
4203 #define WC_COMBOBOXEXA "ComboBoxEx32"
4204 #if defined(__GNUC__)
4205 # define WC_COMBOBOXEXW (const WCHAR []){ 'C','o','m','b','o', \
4206 'B','o','x','E','x','3','2',0 }
4207 #elif defined(_MSC_VER)
4208 # define WC_COMBOBOXEXW L"ComboBoxEx32"
4209 #else
4210 static const WCHAR WC_COMBOBOXEXW[] = { 'C','o','m','b','o',
4211 'B','o','x','E','x','3','2',0 };
4212 #endif
4213 #define WC_COMBOBOXEX WINELIB_NAME_AW(WC_COMBOBOXEX)
4215 #define CBEIF_TEXT 0x00000001
4216 #define CBEIF_IMAGE 0x00000002
4217 #define CBEIF_SELECTEDIMAGE 0x00000004
4218 #define CBEIF_OVERLAY 0x00000008
4219 #define CBEIF_INDENT 0x00000010
4220 #define CBEIF_LPARAM 0x00000020
4221 #define CBEIF_DI_SETITEM 0x10000000
4223 #define CBEM_INSERTITEMA (WM_USER+1)
4224 #define CBEM_INSERTITEMW (WM_USER+11)
4225 #define CBEM_INSERTITEM WINELIB_NAME_AW(CBEM_INSERTITEM)
4226 #define CBEM_SETIMAGELIST (WM_USER+2)
4227 #define CBEM_GETIMAGELIST (WM_USER+3)
4228 #define CBEM_GETITEMA (WM_USER+4)
4229 #define CBEM_GETITEMW (WM_USER+13)
4230 #define CBEM_GETITEM WINELIB_NAME_AW(CBEM_GETITEM)
4231 #define CBEM_SETITEMA (WM_USER+5)
4232 #define CBEM_SETITEMW (WM_USER+12)
4233 #define CBEM_SETITEM WINELIB_NAME_AW(CBEM_SETITEM)
4234 #define CBEM_DELETEITEM CB_DELETESTRING
4235 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
4236 #define CBEM_GETEDITCONTROL (WM_USER+7)
4237 #define CBEM_SETEXSTYLE (WM_USER+8)
4238 #define CBEM_GETEXSTYLE (WM_USER+9)
4239 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
4240 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
4241 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4242 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4243 #define CBEM_HASEDITCHANGED (WM_USER+10)
4244 #define CBEM_SETWINDOWTHEME CCM_SETWINDOWTHEME
4246 #define CBEIF_TEXT 0x00000001
4247 #define CBEIF_IMAGE 0x00000002
4248 #define CBEIF_SELECTEDIMAGE 0x00000004
4249 #define CBEIF_OVERLAY 0x00000008
4250 #define CBEIF_INDENT 0x00000010
4251 #define CBEIF_LPARAM 0x00000020
4252 #define CBEIF_DI_SETITEM 0x10000000
4254 #define CBEN_FIRST (0U-800U)
4255 #define CBEN_LAST (0U-830U)
4257 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
4258 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
4259 #define CBEN_GETDISPINFO WINELIB_NAME_AW(CBEN_GETDISPINFO)
4260 #define CBEN_INSERTITEM (CBEN_FIRST - 1)
4261 #define CBEN_DELETEITEM (CBEN_FIRST - 2)
4262 #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
4263 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
4264 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
4265 #define CBEN_ENDEDIT WINELIB_NAME_AW(CBEN_ENDEDIT)
4266 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
4267 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
4268 #define CBEN_DRAGBEGIN WINELIB_NAME_AW(CBEN_DRAGBEGIN)
4270 #define CBES_EX_NOEDITIMAGE 0x00000001
4271 #define CBES_EX_NOEDITIMAGEINDENT 0x00000002
4272 #define CBES_EX_PATHWORDBREAKPROC 0x00000004
4273 #define CBES_EX_NOSIZELIMIT 0x00000008
4274 #define CBES_EX_CASESENSITIVE 0x00000010
4277 typedef struct tagCOMBOBOXEXITEMA
4279 UINT mask;
4280 INT_PTR iItem;
4281 LPSTR pszText;
4282 int cchTextMax;
4283 int iImage;
4284 int iSelectedImage;
4285 int iOverlay;
4286 int iIndent;
4287 LPARAM lParam;
4288 } COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
4289 typedef COMBOBOXEXITEMA const *PCCOMBOEXITEMA; /* Yes, there's a BOX missing */
4291 typedef struct tagCOMBOBOXEXITEMW
4293 UINT mask;
4294 INT_PTR iItem;
4295 LPWSTR pszText;
4296 int cchTextMax;
4297 int iImage;
4298 int iSelectedImage;
4299 int iOverlay;
4300 int iIndent;
4301 LPARAM lParam;
4302 } COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
4303 typedef COMBOBOXEXITEMW const *PCCOMBOEXITEMW; /* Yes, there's a BOX missing */
4305 #define COMBOBOXEXITEM WINELIB_NAME_AW(COMBOBOXEXITEM)
4306 #define PCOMBOBOXEXITEM WINELIB_NAME_AW(PCOMBOBOXEXITEM)
4307 #define PCCOMBOBOXEXITEM WINELIB_NAME_AW(PCCOMBOEXITEM) /* Yes, there's a BOX missing */
4309 #define CBENF_KILLFOCUS 1
4310 #define CBENF_RETURN 2
4311 #define CBENF_ESCAPE 3
4312 #define CBENF_DROPDOWN 4
4314 #define CBEMAXSTRLEN 260
4316 typedef struct tagNMCBEENDEDITW
4318 NMHDR hdr;
4319 BOOL fChanged;
4320 int iNewSelection;
4321 WCHAR szText[CBEMAXSTRLEN];
4322 int iWhy;
4323 } NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;
4325 typedef struct tagNMCBEENDEDITA
4327 NMHDR hdr;
4328 BOOL fChanged;
4329 int iNewSelection;
4330 char szText[CBEMAXSTRLEN];
4331 int iWhy;
4332 } NMCBEENDEDITA, *LPNMCBEENDEDITA, *PNMCBEENDEDITA;
4334 #define NMCBEENDEDIT WINELIB_NAME_AW(NMCBEENDEDIT)
4335 #define LPNMCBEENDEDIT WINELIB_NAME_AW(LPNMCBEENDEDIT)
4336 #define PNMCBEENDEDIT WINELIB_NAME_AW(PNMCBEENDEDIT)
4338 typedef struct
4340 NMHDR hdr;
4341 COMBOBOXEXITEMA ceItem;
4342 } NMCOMBOBOXEXA, *PNMCOMBOBOXEXA;
4344 typedef struct
4346 NMHDR hdr;
4347 COMBOBOXEXITEMW ceItem;
4348 } NMCOMBOBOXEXW, *PNMCOMBOBOXEXW;
4350 #define NMCOMBOBOXEX WINELIB_NAME_AW(NMCOMBOBOXEX)
4351 #define PNMCOMBOBOXEX WINELIB_NAME_AW(PNMCOMBOBOXEX)
4353 typedef struct
4355 NMHDR hdr;
4356 int iItemid;
4357 char szText[CBEMAXSTRLEN];
4358 } NMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA;
4360 typedef struct
4362 NMHDR hdr;
4363 int iItemid;
4364 WCHAR szText[CBEMAXSTRLEN];
4365 } NMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW;
4367 #define NMCBEDRAGBEGIN WINELIB_NAME_AW(NMCBEDRAGBEGIN)
4368 #define PNMCBEDRAGBEGIN WINELIB_NAME_AW(PNMCBEDRAGBEGIN)
4369 #define LPNMCBEDRAGBEGIN WINELIB_NAME_AW(LPNMCBEDRAGBEGIN)
4372 /* Hotkey control */
4374 #define HOTKEY_CLASSA "msctls_hotkey32"
4375 #if defined(__GNUC__)
4376 # define HOTKEY_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
4377 'h','o','t','k','e','y','3','2',0 }
4378 #elif defined(_MSC_VER)
4379 # define HOTKEY_CLASSW L"msctls_hotkey32"
4380 #else
4381 static const WCHAR HOTKEY_CLASSW[] = { 'm','s','c','t','l','s','_',
4382 'h','o','t','k','e','y','3','2',0 };
4383 #endif
4384 #define HOTKEY_CLASS WINELIB_NAME_AW(HOTKEY_CLASS)
4386 #define HOTKEYF_SHIFT 0x01
4387 #define HOTKEYF_CONTROL 0x02
4388 #define HOTKEYF_ALT 0x04
4389 #define HOTKEYF_EXT 0x08
4391 #define HKCOMB_NONE 0x0001
4392 #define HKCOMB_S 0x0002
4393 #define HKCOMB_C 0x0004
4394 #define HKCOMB_A 0x0008
4395 #define HKCOMB_SC 0x0010
4396 #define HKCOMB_SA 0x0020
4397 #define HKCOMB_CA 0x0040
4398 #define HKCOMB_SCA 0x0080
4400 #define HKM_SETHOTKEY (WM_USER+1)
4401 #define HKM_GETHOTKEY (WM_USER+2)
4402 #define HKM_SETRULES (WM_USER+3)
4405 /* animate control */
4407 #define ANIMATE_CLASSA "SysAnimate32"
4408 #if defined(__GNUC__)
4409 # define ANIMATE_CLASSW (const WCHAR []){ 'S','y','s', \
4410 'A','n','i','m','a','t','e','3','2',0 }
4411 #elif defined(_MSC_VER)
4412 # define ANIMATE_CLASSW L"SysAnimate32"
4413 #else
4414 static const WCHAR ANIMATE_CLASSW[] = { 'S','y','s',
4415 'A','n','i','m','a','t','e','3','2',0 };
4416 #endif
4417 #define ANIMATE_CLASS WINELIB_NAME_AW(ANIMATE_CLASS)
4420 #define ACM_OPENA (WM_USER+100)
4421 #define ACM_OPENW (WM_USER+103)
4422 #define ACM_OPEN WINELIB_NAME_AW(ACM_OPEN)
4423 #define ACM_PLAY (WM_USER+101)
4424 #define ACM_STOP (WM_USER+102)
4426 #define ACN_START 1
4427 #define ACN_STOP 2
4429 #define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
4430 CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
4431 #define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
4432 CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
4433 #define Animate_Create WINELIB_NAME_AW(Animate_Create)
4434 #define Animate_OpenA(hwnd,szName) \
4435 (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
4436 #define Animate_OpenW(hwnd,szName) \
4437 (BOOL)SNDMSGW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
4438 #define Animate_Open WINELIB_NAME_AW(Animate_Open)
4439 #define Animate_OpenExA(hwnd,hInst,szName) \
4440 (BOOL)SNDMSGA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
4441 #define Animate_OpenExW(hwnd,hInst,szName) \
4442 (BOOL)SNDMSGW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
4443 #define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
4444 #define Animate_Play(hwnd,from,to,rep) \
4445 (BOOL)SNDMSG(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
4446 #define Animate_Stop(hwnd) \
4447 (BOOL)SNDMSG(hwnd,ACM_STOP,0,0)
4448 #define Animate_Close(hwnd) \
4449 (BOOL)SNDMSG(hwnd,ACM_OPENA,0,0)
4450 #define Animate_Seek(hwnd,frame) \
4451 (BOOL)SNDMSG(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
4454 /**************************************************************************
4455 * IP Address control
4458 #define WC_IPADDRESSA "SysIPAddress32"
4459 #if defined(__GNUC__)
4460 # define WC_IPADDRESSW (const WCHAR []){ 'S','y','s', \
4461 'I','P','A','d','d','r','e','s','s','3','2',0 }
4462 #elif defined(_MSC_VER)
4463 # define WC_IPADDRESSW L"SysIPAddress32"
4464 #else
4465 static const WCHAR WC_IPADDRESSW[] = { 'S','y','s',
4466 'I','P','A','d','d','r','e','s','s','3','2',0 };
4467 #endif
4468 #define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
4470 #define IPM_CLEARADDRESS (WM_USER+100)
4471 #define IPM_SETADDRESS (WM_USER+101)
4472 #define IPM_GETADDRESS (WM_USER+102)
4473 #define IPM_SETRANGE (WM_USER+103)
4474 #define IPM_SETFOCUS (WM_USER+104)
4475 #define IPM_ISBLANK (WM_USER+105)
4477 #define IPN_FIRST (0U-860U)
4478 #define IPN_LAST (0U-879U)
4479 #define IPN_FIELDCHANGED (IPN_FIRST-0)
4481 typedef struct tagNMIPADDRESS
4483 NMHDR hdr;
4484 INT iField;
4485 INT iValue;
4486 } NMIPADDRESS, *LPNMIPADDRESS;
4488 #define MAKEIPRANGE(low,high) \
4489 ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
4490 #define MAKEIPADDRESS(b1,b2,b3,b4) \
4491 ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
4493 #define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
4494 #define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
4495 #define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
4496 #define FOURTH_IPADDRESS(x) ((x)&0xff)
4499 /**************************************************************************
4500 * Native Font control
4503 #define WC_NATIVEFONTCTLA "NativeFontCtl"
4504 #if defined(__GNUC__)
4505 # define WC_NATIVEFONTCTLW (const WCHAR []){ 'N','a','t','i','v','e', \
4506 'F','o','n','t','C','t','l',0 }
4507 #elif defined(_MSC_VER)
4508 # define WC_NATIVEFONTCTLW L"NativeFontCtl"
4509 #else
4510 static const WCHAR WC_NATIVEFONTCTLW[] = { 'N','a','t','i','v','e',
4511 'F','o','n','t','C','t','l',0 };
4512 #endif
4513 #define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
4516 /**************************************************************************
4517 * Month calendar control
4521 #define MONTHCAL_CLASSA "SysMonthCal32"
4522 #if defined(__GNUC__)
4523 # define MONTHCAL_CLASSW (const WCHAR []){ 'S','y','s', \
4524 'M','o','n','t','h','C','a','l','3','2',0 }
4525 #elif defined(_MSC_VER)
4526 # define MONTHCAL_CLASSW L"SysMonthCal32"
4527 #else
4528 static const WCHAR MONTHCAL_CLASSW[] = { 'S','y','s',
4529 'M','o','n','t','h','C','a','l','3','2',0 };
4530 #endif
4531 #define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
4533 #define MCM_FIRST 0x1000
4534 #define MCN_FIRST (0U-750U)
4535 #define MCN_LAST (0U-759U)
4538 #define MCM_GETCURSEL (MCM_FIRST + 1)
4539 #define MCM_SETCURSEL (MCM_FIRST + 2)
4540 #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
4541 #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
4542 #define MCM_GETSELRANGE (MCM_FIRST + 5)
4543 #define MCM_SETSELRANGE (MCM_FIRST + 6)
4544 #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
4545 #define MCM_SETDAYSTATE (MCM_FIRST + 8)
4546 #define MCM_GETMINREQRECT (MCM_FIRST + 9)
4547 #define MCM_SETCOLOR (MCM_FIRST + 10)
4548 #define MCM_GETCOLOR (MCM_FIRST + 11)
4549 #define MCM_SETTODAY (MCM_FIRST + 12)
4550 #define MCM_GETTODAY (MCM_FIRST + 13)
4551 #define MCM_HITTEST (MCM_FIRST + 14)
4552 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
4553 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
4554 #define MCM_GETRANGE (MCM_FIRST + 17)
4555 #define MCM_SETRANGE (MCM_FIRST + 18)
4556 #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
4557 #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
4558 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
4559 #define MCM_GETCALENDARCOUNT (MCM_FIRST + 23)
4560 #define MCM_SIZERECTTOMIN (MCM_FIRST + 29)
4561 #define MCM_SETCALENDARBORDER (MCM_FIRST + 30)
4562 #define MCM_GETCALENDARBORDER (MCM_FIRST + 31)
4563 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4564 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4567 /* Notifications */
4569 #define MCN_SELCHANGE (MCN_FIRST + 1)
4570 #define MCN_GETDAYSTATE (MCN_FIRST + 3)
4571 #define MCN_SELECT (MCN_FIRST + 4)
4573 #define MCSC_BACKGROUND 0
4574 #define MCSC_TEXT 1
4575 #define MCSC_TITLEBK 2
4576 #define MCSC_TITLETEXT 3
4577 #define MCSC_MONTHBK 4
4578 #define MCSC_TRAILINGTEXT 5
4581 #define MCHT_TITLE 0x00010000
4582 #define MCHT_CALENDAR 0x00020000
4583 #define MCHT_TODAYLINK 0x00030000
4585 #define MCHT_NEXT 0x01000000
4586 #define MCHT_PREV 0x02000000
4587 #define MCHT_NOWHERE 0x00000000
4588 #define MCHT_TITLEBK (MCHT_TITLE)
4589 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
4590 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
4591 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
4592 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
4594 #define MCHT_CALENDARBK (MCHT_CALENDAR)
4595 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
4596 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
4597 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
4598 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
4599 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
4603 #define GMR_VISIBLE 0
4604 #define GMR_DAYSTATE 1
4607 /* Month calendar's structures */
4610 typedef struct {
4611 UINT cbSize;
4612 POINT pt;
4613 UINT uHit;
4614 SYSTEMTIME st;
4615 /* Vista */
4616 RECT rc;
4617 INT iOffset;
4618 INT iRow;
4619 INT iCol;
4620 } MCHITTESTINFO, *PMCHITTESTINFO;
4622 #define MCHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(MCHITTESTINFO, st)
4624 typedef struct tagNMSELCHANGE
4626 NMHDR nmhdr;
4627 SYSTEMTIME stSelStart;
4628 SYSTEMTIME stSelEnd;
4629 } NMSELCHANGE, *LPNMSELCHANGE;
4631 typedef NMSELCHANGE NMSELECT, *LPNMSELECT;
4632 typedef DWORD MONTHDAYSTATE, *LPMONTHDAYSTATE;
4634 typedef struct tagNMDAYSTATE
4636 NMHDR nmhdr;
4637 SYSTEMTIME stStart;
4638 int cDayState;
4639 LPMONTHDAYSTATE prgDayState;
4640 } NMDAYSTATE, *LPNMDAYSTATE;
4643 /* macros */
4645 #define MonthCal_GetCurSel(hmc, pst) \
4646 (BOOL)SNDMSG(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
4647 #define MonthCal_SetCurSel(hmc, pst) \
4648 (BOOL)SNDMSG(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
4649 #define MonthCal_GetMaxSelCount(hmc) \
4650 (DWORD)SNDMSG(hmc, MCM_GETMAXSELCOUNT, 0, 0)
4651 #define MonthCal_SetMaxSelCount(hmc, n) \
4652 (BOOL)SNDMSG(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0)
4653 #define MonthCal_GetSelRange(hmc, rgst) \
4654 SNDMSG(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst))
4655 #define MonthCal_SetSelRange(hmc, rgst) \
4656 SNDMSG(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst))
4657 #define MonthCal_GetMonthRange(hmc, gmr, rgst) \
4658 (DWORD)SNDMSG(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
4659 #define MonthCal_SetDayState(hmc, cbds, rgds) \
4660 SNDMSG(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
4661 #define MonthCal_GetMinReqRect(hmc, prc) \
4662 SNDMSG(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
4663 #define MonthCal_SetColor(hmc, iColor, clr)\
4664 SNDMSG(hmc, MCM_SETCOLOR, iColor, clr)
4665 #define MonthCal_GetColor(hmc, iColor) \
4666 SNDMSG(hmc, MCM_SETCOLOR, iColor, 0)
4667 #define MonthCal_GetToday(hmc, pst)\
4668 (BOOL)SNDMSG(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
4669 #define MonthCal_SetToday(hmc, pst)\
4670 SNDMSG(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
4671 #define MonthCal_HitTest(hmc, pinfo) \
4672 SNDMSG(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
4673 #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
4674 SNDMSG(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
4675 #define MonthCal_GetFirstDayOfWeek(hmc) \
4676 (DWORD)SNDMSG(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
4677 #define MonthCal_GetRange(hmc, rgst) \
4678 (DWORD)SNDMSG(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
4679 #define MonthCal_SetRange(hmc, gd, rgst) \
4680 (BOOL)SNDMSG(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4681 #define MonthCal_GetMonthDelta(hmc) \
4682 (int)SNDMSG(hmc, MCM_GETMONTHDELTA, 0, 0)
4683 #define MonthCal_SetMonthDelta(hmc, n) \
4684 (int)SNDMSG(hmc, MCM_SETMONTHDELTA, n, 0)
4685 #define MonthCal_GetMaxTodayWidth(hmc) \
4686 (DWORD)SNDMSG(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
4687 #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
4688 (BOOL)SNDMSG((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
4689 #define MonthCal_GetUnicodeFormat(hwnd) \
4690 (BOOL)SNDMSG((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
4693 /**************************************************************************
4694 * Date and time picker control
4697 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
4698 #if defined(__GNUC__)
4699 # define DATETIMEPICK_CLASSW (const WCHAR []){ 'S','y','s', \
4700 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 }
4701 #elif defined(_MSC_VER)
4702 # define DATETIMEPICK_CLASSW L"SysDateTimePick32"
4703 #else
4704 static const WCHAR DATETIMEPICK_CLASSW[] = { 'S','y','s',
4705 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 };
4706 #endif
4707 #define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
4709 #define DTM_FIRST 0x1000
4710 #define DTN_FIRST (0U-760U)
4711 #define DTN_LAST (0U-799U)
4714 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
4715 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
4716 #define DTM_GETRANGE (DTM_FIRST+3)
4717 #define DTM_SETRANGE (DTM_FIRST+4)
4718 #define DTM_SETFORMATA (DTM_FIRST+5)
4719 #define DTM_SETFORMATW (DTM_FIRST + 50)
4720 #define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
4721 #define DTM_SETMCCOLOR (DTM_FIRST+6)
4722 #define DTM_GETMCCOLOR (DTM_FIRST+7)
4723 #define DTM_GETMONTHCAL (DTM_FIRST+8)
4724 #define DTM_SETMCFONT (DTM_FIRST+9)
4725 #define DTM_GETMCFONT (DTM_FIRST+10)
4728 /* Datetime Notifications */
4730 #define DTN_DATETIMECHANGE (DTN_FIRST + 1)
4731 #define DTN_USERSTRINGA (DTN_FIRST + 2)
4732 #define DTN_WMKEYDOWNA (DTN_FIRST + 3)
4733 #define DTN_FORMATA (DTN_FIRST + 4)
4734 #define DTN_FORMATQUERYA (DTN_FIRST + 5)
4735 #define DTN_DROPDOWN (DTN_FIRST + 6)
4736 #define DTN_CLOSEUP (DTN_FIRST + 7)
4737 #define DTN_USERSTRINGW (DTN_FIRST + 15)
4738 #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
4739 #define DTN_FORMATW (DTN_FIRST + 17)
4740 #define DTN_FORMATQUERYW (DTN_FIRST + 18)
4742 #define DTN_USERSTRING WINELIB_NAME_AW(DTN_USERSTRING)
4743 #define DTN_WMKEYDOWN WINELIB_NAME_AW(DTN_WMKEYDOWN)
4744 #define DTN_FORMAT WINELIB_NAME_AW(DTN_FORMAT)
4745 #define DTN_FORMATQUERY WINELIB_NAME_AW(DTN_FORMATQUERY)
4748 typedef struct tagNMDATETIMECHANGE
4750 NMHDR nmhdr;
4751 DWORD dwFlags;
4752 SYSTEMTIME st;
4753 } NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
4755 typedef struct tagNMDATETIMESTRINGA
4757 NMHDR nmhdr;
4758 LPCSTR pszUserString;
4759 SYSTEMTIME st;
4760 DWORD dwFlags;
4761 } NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;
4763 typedef struct tagNMDATETIMESTRINGW
4765 NMHDR nmhdr;
4766 LPCWSTR pszUserString;
4767 SYSTEMTIME st;
4768 DWORD dwFlags;
4769 } NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
4771 DECL_WINELIB_TYPE_AW(NMDATETIMESTRING)
4772 DECL_WINELIB_TYPE_AW(LPNMDATETIMESTRING)
4774 typedef struct tagNMDATETIMEWMKEYDOWNA
4776 NMHDR nmhdr;
4777 int nVirtKey;
4778 LPCSTR pszFormat;
4779 SYSTEMTIME st;
4780 } NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;
4782 typedef struct tagNMDATETIMEWMKEYDOWNW
4784 NMHDR nmhdr;
4785 int nVirtKey;
4786 LPCWSTR pszFormat;
4787 SYSTEMTIME st;
4788 } NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;
4790 DECL_WINELIB_TYPE_AW(NMDATETIMEWMKEYDOWN)
4791 DECL_WINELIB_TYPE_AW(LPNMDATETIMEWMKEYDOWN)
4793 typedef struct tagNMDATETIMEFORMATA
4795 NMHDR nmhdr;
4796 LPCSTR pszFormat;
4797 SYSTEMTIME st;
4798 LPCSTR pszDisplay;
4799 CHAR szDisplay[64];
4800 } NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;
4803 typedef struct tagNMDATETIMEFORMATW
4805 NMHDR nmhdr;
4806 LPCWSTR pszFormat;
4807 SYSTEMTIME st;
4808 LPCWSTR pszDisplay;
4809 WCHAR szDisplay[64];
4810 } NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;
4812 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMAT)
4813 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMAT)
4815 typedef struct tagNMDATETIMEFORMATQUERYA
4817 NMHDR nmhdr;
4818 LPCSTR pszFormat;
4819 SIZE szMax;
4820 } NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;
4822 typedef struct tagNMDATETIMEFORMATQUERYW
4824 NMHDR nmhdr;
4825 LPCWSTR pszFormat;
4826 SIZE szMax;
4827 } NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;
4829 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMATQUERY)
4830 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMATQUERY)
4834 #define GDT_ERROR -1
4835 #define GDT_VALID 0
4836 #define GDT_NONE 1
4838 #define GDTR_MIN 0x0001
4839 #define GDTR_MAX 0x0002
4842 #define DateTime_GetSystemtime(hdp, pst) \
4843 (DWORD)SNDMSG (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
4844 #define DateTime_SetSystemtime(hdp, gd, pst) \
4845 (BOOL)SNDMSG (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
4846 #define DateTime_GetRange(hdp, rgst) \
4847 (DWORD)SNDMSG (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
4848 #define DateTime_SetRange(hdp, gd, rgst) \
4849 (BOOL)SNDMSG (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4850 #define DateTime_SetFormatA(hdp, sz) \
4851 (BOOL)SNDMSGA (hdp, DTM_SETFORMATA, 0, (LPARAM)(sz))
4852 #define DateTime_SetFormatW(hdp, sz) \
4853 (BOOL)SNDMSGW (hdp, DTM_SETFORMATW, 0, (LPARAM)(sz))
4854 #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
4855 #define DateTime_GetMonthCalColor(hdp, iColor) \
4856 SNDMSG (hdp, DTM_GETMCCOLOR, iColor, 0)
4857 #define DateTime_SetMonthCalColor(hdp, iColor, clr) \
4858 SNDMSG (hdp, DTM_SETMCCOLOR, iColor, clr)
4859 #define DateTime_GetMonthCal(hdp) \
4860 (HWND) SNDMSG (hdp, DTM_GETMONTHCAL, 0, 0)
4861 #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \
4862 SNDMSG (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
4863 #define DateTime_GetMonthCalFont(hdp) \
4864 SNDMSG (hdp, DTM_GETMCFONT, 0, 0)
4866 #define DA_LAST (0x7fffffff)
4867 #define DPA_APPEND (0x7fffffff)
4868 #define DPA_ERR (-1)
4870 #define DSA_APPEND (0x7fffffff)
4871 #define DSA_ERR (-1)
4873 struct _DSA;
4874 typedef struct _DSA *HDSA;
4876 typedef INT (CALLBACK *PFNDSAENUMCALLBACK)(LPVOID, LPVOID);
4878 HDSA WINAPI DSA_Create(INT, INT);
4879 BOOL WINAPI DSA_Destroy(HDSA);
4880 void WINAPI DSA_DestroyCallback(HDSA, PFNDSAENUMCALLBACK, LPVOID);
4881 LPVOID WINAPI DSA_GetItemPtr(HDSA, INT);
4882 INT WINAPI DSA_InsertItem(HDSA, INT, LPVOID);
4884 #define DPAS_SORTED 0x0001
4885 #define DPAS_INSERTBEFORE 0x0002
4886 #define DPAS_INSERTAFTER 0x0004
4889 struct _DPA;
4890 typedef struct _DPA *HDPA;
4892 #define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
4894 typedef INT (CALLBACK *PFNDPAENUMCALLBACK)(LPVOID, LPVOID);
4895 typedef INT (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
4896 typedef PVOID (CALLBACK *PFNDPAMERGE)(UINT,PVOID,PVOID,LPARAM);
4898 /* merge callback codes */
4899 #define DPAMM_MERGE 1
4900 #define DPAMM_DELETE 2
4901 #define DPAMM_INSERT 3
4903 /* merge options */
4904 #define DPAM_SORTED 0x00000001
4905 #define DPAM_NORMAL 0x00000002
4906 #define DPAM_UNION 0x00000004
4907 #define DPAM_INTERSECT 0x00000008
4909 HDPA WINAPI DPA_Create(INT);
4910 BOOL WINAPI DPA_Destroy(HDPA);
4911 LPVOID WINAPI DPA_DeletePtr(HDPA, INT);
4912 BOOL WINAPI DPA_DeleteAllPtrs(HDPA);
4913 BOOL WINAPI DPA_SetPtr(HDPA, INT, LPVOID);
4914 LPVOID WINAPI DPA_GetPtr(HDPA, INT);
4915 INT WINAPI DPA_GetPtrIndex(HDPA, LPCVOID);
4916 ULONGLONG WINAPI DPA_GetSize(HDPA);
4917 BOOL WINAPI DPA_Grow(HDPA, INT);
4918 INT WINAPI DPA_InsertPtr(HDPA, INT, LPVOID);
4919 BOOL WINAPI DPA_Sort(HDPA, PFNDPACOMPARE, LPARAM);
4920 void WINAPI DPA_EnumCallback(HDPA, PFNDPAENUMCALLBACK, LPVOID);
4921 void WINAPI DPA_DestroyCallback(HDPA, PFNDPAENUMCALLBACK, LPVOID);
4922 INT WINAPI DPA_Search(HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
4923 BOOL WINAPI DPA_Merge(HDPA, HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
4925 /* save/load from stream */
4926 typedef struct _DPASTREAMINFO
4928 INT iPos; /* item index */
4929 LPVOID pvItem;
4930 } DPASTREAMINFO;
4932 struct IStream;
4933 typedef HRESULT (CALLBACK *PFNDPASTREAM)(DPASTREAMINFO*, struct IStream*, LPVOID);
4935 HRESULT WINAPI DPA_LoadStream(HDPA*, PFNDPASTREAM, struct IStream*, LPVOID);
4936 HRESULT WINAPI DPA_SaveStream(HDPA, PFNDPASTREAM, struct IStream*, LPVOID);
4938 BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
4940 /**************************************************************************
4941 * SysLink control
4944 #if defined(__GNUC__)
4945 # define WC_LINK (const WCHAR []){ 'S','y','s','L','i','n','k',0 }
4946 #elif defined(_MSC_VER)
4947 # define WC_LINK L"SysLink"
4948 #else
4949 static const WCHAR WC_LINK[] = { 'S','y','s','L','i','n','k',0 };
4950 #endif
4952 /* SysLink styles */
4953 #define LWS_TRANSPARENT 0x0001
4954 #define LWS_IGNORERETURN 0x0002
4955 #define LWS_NOPREFIX 0x0004
4956 #define LWS_USEVISUALSTYLE 0x0008
4957 #define LWS_USECUSTOMTEXT 0x0010
4958 #define LWS_RIGHT 0x0020
4960 /* SysLink messages */
4961 #define LM_HITTEST (WM_USER + 768)
4962 #define LM_GETIDEALHEIGHT (WM_USER + 769)
4963 #define LM_GETIDEALSIZE (LM_GETIDEALHEIGHT)
4964 #define LM_SETITEM (WM_USER + 770)
4965 #define LM_GETITEM (WM_USER + 771)
4967 /* SysLink links flags */
4969 #define LIF_ITEMINDEX 1
4970 #define LIF_STATE 2
4971 #define LIF_ITEMID 4
4972 #define LIF_URL 8
4974 /* SysLink links states */
4976 #define LIS_FOCUSED 0x0001
4977 #define LIS_ENABLED 0x0002
4978 #define LIS_VISITED 0x0004
4979 #define LIS_HOTTRACK 0x0008
4980 #define LIS_DEFAULTCOLORS 0x0010
4982 /* SysLink misc. */
4984 #define INVALID_LINK_INDEX (-1)
4985 #define MAX_LINKID_TEXT 48
4986 #define L_MAX_URL_LENGTH 2084
4988 /* SysLink structures */
4990 typedef struct tagLITEM
4992 UINT mask;
4993 int iLink;
4994 UINT state;
4995 UINT stateMask;
4996 WCHAR szID[MAX_LINKID_TEXT];
4997 WCHAR szUrl[L_MAX_URL_LENGTH];
4998 } LITEM, *PLITEM;
5000 typedef struct tagLHITTESTINFO
5002 POINT pt;
5003 LITEM item;
5004 } LHITTESTINFO, *PLHITTESTINFO;
5006 typedef struct tagNMLINK
5008 NMHDR hdr;
5009 LITEM item;
5010 } NMLINK, *PNMLINK;
5012 typedef struct tagNMLVLINK
5014 NMHDR hdr;
5015 LITEM link;
5016 int iItem;
5017 int iSubItem;
5018 } NMLVLINK, *PNMLVLINK;
5020 /**************************************************************************
5021 * Static control
5024 #define WC_STATICA "Static"
5025 #if defined(__GNUC__)
5026 # define WC_STATICW (const WCHAR []){ 'S','t','a','t','i','c',0 }
5027 #elif defined(_MSC_VER)
5028 # define WC_STATICW L"Static"
5029 #else
5030 static const WCHAR WC_STATICW[] = { 'S','t','a','t','i','c',0 };
5031 #endif
5032 #define WC_STATIC WINELIB_NAME_AW(WC_STATIC)
5034 /**************************************************************************
5035 * Combobox control
5038 #define WC_COMBOBOXA "ComboBox"
5039 #if defined(__GNUC__)
5040 # define WC_COMBOBOXW (const WCHAR []){ 'C','o','m','b','o','B','o','x',0 }
5041 #elif defined(_MSC_VER)
5042 # define WC_COMBOBOXW L"ComboBox"
5043 #else
5044 static const WCHAR WC_COMBOBOXW[] = { 'C','o','m','b','o','B','o','x',0 };
5045 #endif
5046 #define WC_COMBOBOX WINELIB_NAME_AW(WC_COMBOBOX)
5048 /**************************************************************************
5049 * Edit control
5052 #define WC_EDITA "Edit"
5053 #if defined(__GNUC__)
5054 # define WC_EDITW (const WCHAR []){ 'E','d','i','t',0 }
5055 #elif defined(_MSC_VER)
5056 # define WC_EDITW L"Edit"
5057 #else
5058 static const WCHAR WC_EDITW[] = { 'E','d','i','t',0 };
5059 #endif
5060 #define WC_EDIT WINELIB_NAME_AW(WC_EDIT)
5062 /**************************************************************************
5063 * Listbox control
5066 #define WC_LISTBOXA "ListBox"
5067 #if defined(__GNUC__)
5068 # define WC_LISTBOXW (const WCHAR []){ 'L','i','s','t','B','o','x',0 }
5069 #elif defined(_MSC_VER)
5070 # define WC_LISTBOXW L"ListBox"
5071 #else
5072 static const WCHAR WC_LISTBOXW[] = { 'L','i','s','t','B','o','x',0 };
5073 #endif
5074 #define WC_LISTBOX WINELIB_NAME_AW(WC_LISTBOX)
5076 /**************************************************************************
5077 * Scrollbar control
5080 #define WC_SCROLLBARA "ScrollBar"
5081 #if defined(__GNUC__)
5082 # define WC_SCROLLBARW (const WCHAR []){ 'S','c','r','o','l','l','B','a','r',0 }
5083 #elif defined(_MSC_VER)
5084 # define WC_SCROLLBARW L"ScrollBar"
5085 #else
5086 static const WCHAR WC_SCROLLBARW[] = { 'S','c','r','o','l','l','B','a','r',0 };
5087 #endif
5088 #define WC_SCROLLBAR WINELIB_NAME_AW(WC_SCROLLBAR)
5090 /**************************************************************************
5091 * Task dialog
5094 #ifndef NOTASKDIALOG
5096 #include <pshpack1.h>
5098 enum _TASKDIALOG_FLAGS
5100 TDF_ENABLE_HYPERLINKS = 0x0001,
5101 TDF_USE_HICON_MAIN = 0x0002,
5102 TDF_USE_HICON_FOOTER = 0x0004,
5103 TDF_ALLOW_DIALOG_CANCELLATION = 0x0008,
5104 TDF_USE_COMMAND_LINKS = 0x0010,
5105 TDF_USE_COMMAND_LINKS_NO_ICON = 0x0020,
5106 TDF_EXPAND_FOOTER_AREA = 0x0040,
5107 TDF_EXPANDED_BY_DEFAULT = 0x0080,
5108 TDF_VERIFICATION_FLAG_CHECKED = 0x0100,
5109 TDF_SHOW_PROGRESS_BAR = 0x0200,
5110 TDF_SHOW_MARQUEE_PROGRESS_BAR = 0x0400,
5111 TDF_CALLBACK_TIMER = 0x0800,
5112 TDF_POSITION_RELATIVE_TO_WINDOW = 0x1000,
5113 TDF_RTL_LAYOUT = 0x2000,
5114 TDF_NO_DEFAULT_RADIO_BUTTON = 0x4000,
5115 TDF_CAN_BE_MINIMIZED = 0x8000
5117 typedef int TASKDIALOG_FLAGS;
5119 enum _TASKDIALOG_COMMON_BUTTON_FLAGS
5121 TDCBF_OK_BUTTON = 0x0001,
5122 TDCBF_YES_BUTTON = 0x0002,
5123 TDCBF_NO_BUTTON = 0x0004,
5124 TDCBF_CANCEL_BUTTON = 0x0008,
5125 TDCBF_RETRY_BUTTON = 0x0010,
5126 TDCBF_CLOSE_BUTTON = 0x0020
5128 typedef int TASKDIALOG_COMMON_BUTTON_FLAGS;
5130 typedef struct _TASKDIALOG_BUTTON
5132 int nButtonID;
5133 PCWSTR pszButtonText;
5134 } TASKDIALOG_BUTTON;
5136 typedef HRESULT (CALLBACK *PFTASKDIALOGCALLBACK)(HWND, UINT, WPARAM, LPARAM, LONG_PTR);
5138 typedef struct _TASKDIALOGCONFIG
5140 UINT cbSize;
5141 HWND hwndParent;
5142 HINSTANCE hInstance;
5143 TASKDIALOG_FLAGS dwFlags;
5144 TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons;
5145 PCWSTR pszWindowTitle;
5146 union
5148 HICON hMainIcon;
5149 PCWSTR pszMainIcon;
5150 } DUMMYUNIONNAME;
5151 PCWSTR pszMainInstruction;
5152 PCWSTR pszContent;
5153 UINT cButtons;
5154 const TASKDIALOG_BUTTON *pButtons;
5155 int nDefaultButton;
5156 UINT cRadioButtons;
5157 const TASKDIALOG_BUTTON *pRadioButtons;
5158 int nDefaultRadioButton;
5159 PCWSTR pszVerificationText;
5160 PCWSTR pszExpandedInformation;
5161 PCWSTR pszExpandedControlText;
5162 PCWSTR pszCollapsedControlText;
5163 union
5165 HICON hFooterIcon;
5166 PCWSTR pszFooterIcon;
5167 } DUMMYUNIONNAME2;
5168 PCWSTR pszFooter;
5169 PFTASKDIALOGCALLBACK pfCallback;
5170 LONG_PTR lpCallbackData;
5171 UINT cxWidth;
5172 } TASKDIALOGCONFIG;
5174 HRESULT WINAPI TaskDialogIndirect(const TASKDIALOGCONFIG *, int *, int *, BOOL *);
5176 #include <poppack.h>
5178 #endif /* NOTASKDIALOG */
5180 #ifdef __cplusplus
5182 #endif
5184 #endif /* __WINE_COMMCTRL_H */