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