VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/commctrl.h@ 33252

Last change on this file since 33252 was 25949, checked in by vboxsync, 15 years ago

crOpenGL: update to wine 1.1.36 and disable unnecessary fbo state poll

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