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