VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/commctrl.h

Last change on this file was 53206, checked in by vboxsync, 10 years ago

Devices/vmsvga: header fixes

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette