blob: 0386f1319b9aeaa5c404e2de24d5546bb8dbd956 [file] [log] [blame]
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +00001/*
2 * Common controls definitions
3 */
4
5#ifndef __WINE_COMMCTRL_H
6#define __WINE_COMMCTRL_H
7
Jim Aston2e1cafa1999-03-14 16:35:05 +00008#include "windef.h"
Luc Tourangeauce2b1411999-02-17 12:58:48 +00009#include "winuser.h"
Alexandre Julliard767e6f61998-08-09 12:47:43 +000010#include "imagelist.h"
Francois Gougete5814091999-04-06 07:07:44 +000011#include "prsht.h"
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +000012
Zygo Blaxell50d41fa1999-02-09 14:20:05 +000013/* c++ likes nameless unions whereas c doesnt */
14/* (used in property sheet structures) */
15#ifdef __cplusplus
16#define DUMMYUNIONNAME
17#define DUMMYUNIONNAME1
18#define DUMMYUNIONNAME2
19#define DUMMYUNIONNAME3
20#define DUMMYUNIONNAME4
21#define DUMMYUNIONNAME5
22#else
23#define DUMMYUNIONNAME u
24#define DUMMYUNIONNAME1 u1
25#define DUMMYUNIONNAME2 u2
26#define DUMMYUNIONNAME3 u3
27#define DUMMYUNIONNAME4 u4
28#define DUMMYUNIONNAME5 u5
29#endif
30
Uwe Bonnes627702d1998-11-08 13:14:55 +000031#ifdef __cplusplus
32extern "C" {
33#endif
34
Alexandre Julliarda3960291999-02-26 11:11:13 +000035BOOL WINAPI ShowHideMenuCtl (HWND, UINT, LPINT);
36VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, LPINT);
Alexandre Julliard642d3131998-07-12 19:29:36 +000037VOID WINAPI InitCommonControls (VOID);
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +000038
Alexandre Julliarddadf78f1998-05-17 17:13:43 +000039typedef struct tagINITCOMMONCONTROLSEX {
40 DWORD dwSize;
41 DWORD dwICC;
42} INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
43
Alexandre Julliarda3960291999-02-26 11:11:13 +000044BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
Alexandre Julliarddadf78f1998-05-17 17:13:43 +000045
46#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
47#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
48#define ICC_BAR_CLASSES 0x00000004 /* toolbar, statusbar, trackbar, tooltips */
49#define ICC_TAB_CLASSES 0x00000008 /* tab, tooltips */
50#define ICC_UPDOWN_CLASS 0x00000010 /* updown */
51#define ICC_PROGRESS_CLASS 0x00000020 /* progress */
52#define ICC_HOTKEY_CLASS 0x00000040 /* hotkey */
53#define ICC_ANIMATE_CLASS 0x00000080 /* animate */
54#define ICC_WIN95_CLASSES 0x000000FF
55#define ICC_DATE_CLASSES 0x00000100 /* month picker, date picker, time picker, updown */
56#define ICC_USEREX_CLASSES 0x00000200 /* comboex */
57#define ICC_COOL_CLASSES 0x00000400 /* rebar (coolbar) */
58#define ICC_INTERNET_CLASSES 0x00000800 /* IP address, ... */
59#define ICC_PAGESCROLLER_CLASS 0x00001000 /* page scroller */
60#define ICC_NATIVEFNTCTL_CLASS 0x00002000 /* native font control ???*/
61
62
Alexandre Julliard54c27111998-03-29 19:44:57 +000063/* common control styles */
Alexandre Julliard54c27111998-03-29 19:44:57 +000064#define CCS_TOP 0x00000001L
65#define CCS_NOMOVEY 0x00000002L
66#define CCS_BOTTOM 0x00000003L
67#define CCS_NORESIZE 0x00000004L
68#define CCS_NOPARENTALIGN 0x00000008L
69#define CCS_ADJUSTABLE 0x00000020L
70#define CCS_NODIVIDER 0x00000040L
71#define CCS_VERT 0x00000080L
72#define CCS_LEFT (CCS_VERT|CCS_TOP)
73#define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
74#define CCS_NOMOVEX (CCS_VERT|CCS_NOMOVEY)
75
76
Alexandre Julliardc7c217b1998-04-13 12:21:30 +000077/* common control shared messages */
Alexandre Julliard642d3131998-07-12 19:29:36 +000078#define CCM_FIRST 0x2000
Alexandre Julliardc7c217b1998-04-13 12:21:30 +000079
Alexandre Julliard642d3131998-07-12 19:29:36 +000080#define CCM_SETBKCOLOR (CCM_FIRST+1) /* lParam = bkColor */
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000081#define CCM_SETCOLORSCHEME (CCM_FIRST+2)
82#define CCM_GETCOLORSCHEME (CCM_FIRST+3)
83#define CCM_GETDROPTARGET (CCM_FIRST+4)
Alexandre Julliard642d3131998-07-12 19:29:36 +000084#define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
85#define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
Alexandre Julliarddadf78f1998-05-17 17:13:43 +000086
87
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000088/* common notification codes (WM_NOTIFY)*/
Alexandre Julliarda0d77311998-09-13 16:32:00 +000089#define NM_FIRST (0U- 0U)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000090#define NM_LAST (0U- 99U)
Alexandre Julliarda0d77311998-09-13 16:32:00 +000091#define NM_OUTOFMEMORY (NM_FIRST-1)
92#define NM_CLICK (NM_FIRST-2)
93#define NM_DBLCLK (NM_FIRST-3)
94#define NM_RETURN (NM_FIRST-4)
95#define NM_RCLICK (NM_FIRST-5)
96#define NM_RDBLCLK (NM_FIRST-6)
97#define NM_SETFOCUS (NM_FIRST-7)
98#define NM_KILLFOCUS (NM_FIRST-8)
99#define NM_CUSTOMDRAW (NM_FIRST-12)
100#define NM_HOVER (NM_FIRST-13)
101#define NM_NCHITTEST (NM_FIRST-14)
102#define NM_KEYDOWN (NM_FIRST-15)
103#define NM_RELEASEDCAPTURE (NM_FIRST-16)
104#define NM_SETCURSOR (NM_FIRST-17)
105#define NM_CHAR (NM_FIRST-18)
106#define NM_TOOLTIPSCREATED (NM_FIRST-19)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000107
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000108
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000109/* callback constants */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000110#define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
111#define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000112#define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
113
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000114#define I_IMAGECALLBACK (-1)
115#define I_INDENTCALLBACK (-1)
Alexandre Julliard638f1691999-01-17 16:32:32 +0000116#define I_CHILDRENCALLBACK (-1)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000117
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000118
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000119/* owner drawn types */
120#define ODT_HEADER 100
121#define ODT_TAB 101
122#define ODT_LISTVIEW 102
123
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000124/* common notification structures */
125typedef struct tagNMTOOLTIPSCREATED
126{
127 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000128 HWND hwndToolTips;
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000129} NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;
130
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000131
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000132#ifndef CCSIZEOF_STRUCT
133#define CCSIZEOF_STRUCT(name, member) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000134 (((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000135 sizeof(((name*)0)->member))
136#endif
137
Eric Kohlb406c7d1999-01-24 19:12:34 +0000138
139/* This is only for Winelib applications. DON't use it wine itself!!! */
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000140#define SNDMSG WINELIB_NAME_AW(SendMessage)
141
142
Alexandre Julliard638f1691999-01-17 16:32:32 +0000143
144/* Custom Draw messages */
145
146#define CDRF_DODEFAULT 0x0
147#define CDRF_NEWFONT 0x00000002
148#define CDRF_SKIPDEFAULT 0x00000004
149#define CDRF_NOTIFYPOSTPAINT 0x00000010
150#define CDRF_NOTIFYITEMDRAW 0x00000020
151#define CDRF_NOTIFYSUBITEMDRAW 0x00000020
152#define CDRF_NOTIFYPOSTERASE 0x00000040
153/* #define CDRF_NOTIFYITEMERASE 0x00000080 obsolete ? */
154
155
156/* drawstage flags */
157
158#define CDDS_PREPAINT 1
159#define CDDS_POSTPAINT 2
160#define CDDS_PREERASE 3
161#define CDDS_POSTERASE 4
162
163#define CDDS_ITEM 0x00010000
164#define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
165#define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
166#define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
167#define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
168#define CDDS_SUBITEM 0x00020000
169
170/* itemState flags */
171
172#define CDIS_SELECTED 0x0001
173#define CDIS_GRAYED 0x0002
174#define CDIS_DISABLED 0x0004
175#define CDIS_CHECKED 0x0008
176#define CDIS_FOCUS 0x0010
177#define CDIS_DEFAULT 0x0020
178#define CDIS_HOT 0x0040
179#define CDIS_MARKED 0x0080
180#define CDIS_INDETERMINATE 0x0100
181
182
183typedef struct tagNMCUSTOMDRAWINFO
184{
185 NMHDR hdr;
186 DWORD dwDrawStage;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000187 HDC hdc;
188 RECT rc;
Alexandre Julliard638f1691999-01-17 16:32:32 +0000189 DWORD dwItemSpec;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000190 UINT uItemState;
Alexandre Julliard638f1691999-01-17 16:32:32 +0000191 LPARAM lItemlParam;
192} NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
193
194typedef struct tagNMTTCUSTOMDRAW
195{
Eric Kohlb406c7d1999-01-24 19:12:34 +0000196 NMCUSTOMDRAW nmcd;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000197 UINT uDrawFlags;
Alexandre Julliard638f1691999-01-17 16:32:32 +0000198} NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
199
200
201
202
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000203/* StatusWindow */
204
Eric Kohl8d2933d1998-11-22 18:12:12 +0000205#define STATUSCLASSNAME16 "msctls_statusbar"
Alexandre Julliarda3960291999-02-26 11:11:13 +0000206#define STATUSCLASSNAMEA "msctls_statusbar32"
Alex Priemd2d7f961999-01-30 13:02:30 +0000207/* Does not work. gcc creates 4 byte wide strings.
208 * #define STATUSCLASSNAME32W L"msctls_statusbar32"
209 */
210static const WCHAR _scn32w[] = {
211'm','s','c','t','l','s','_','s','t','a','t','u','s','b','a','r','3','2',0
212};
Alexandre Julliarda3960291999-02-26 11:11:13 +0000213#define STATUSCLASSNAMEW _scn32w
Eric Kohl8d2933d1998-11-22 18:12:12 +0000214#define STATUSCLASSNAME WINELIB_NAME_AW(STATUSCLASSNAME)
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000215
Eric Kohl8d2933d1998-11-22 18:12:12 +0000216#define SBT_NOBORDERS 0x0100
217#define SBT_POPOUT 0x0200
218#define SBT_RTLREADING 0x0400 /* not supported */
219#define SBT_TOOLTIPS 0x0800
220#define SBT_OWNERDRAW 0x1000
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000221
Eric Kohl8d2933d1998-11-22 18:12:12 +0000222#define SBARS_SIZEGRIP 0x0100
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000223
Alexandre Julliarda3960291999-02-26 11:11:13 +0000224#define SB_SETTEXTA (WM_USER+1)
225#define SB_SETTEXTW (WM_USER+11)
Eric Kohl8d2933d1998-11-22 18:12:12 +0000226#define SB_SETTEXT WINELIB_NAME_AW(SB_SETTEXT)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000227#define SB_GETTEXTA (WM_USER+2)
228#define SB_GETTEXTW (WM_USER+13)
Eric Kohl8d2933d1998-11-22 18:12:12 +0000229#define SB_GETTEXT WINELIB_NAME_AW(SB_GETTEXT)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000230#define SB_GETTEXTLENGTHA (WM_USER+3)
231#define SB_GETTEXTLENGTHW (WM_USER+12)
Eric Kohl8d2933d1998-11-22 18:12:12 +0000232#define SB_GETTEXTLENGTH WINELIB_NAME_AW(SB_GETTEXTLENGTH)
233#define SB_SETPARTS (WM_USER+4)
234#define SB_GETPARTS (WM_USER+6)
235#define SB_GETBORDERS (WM_USER+7)
236#define SB_SETMINHEIGHT (WM_USER+8)
237#define SB_SIMPLE (WM_USER+9)
238#define SB_GETRECT (WM_USER+10)
239#define SB_ISSIMPLE (WM_USER+14)
240#define SB_SETICON (WM_USER+15)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000241#define SB_SETTIPTEXTA (WM_USER+16)
242#define SB_SETTIPTEXTW (WM_USER+17)
Eric Kohl8d2933d1998-11-22 18:12:12 +0000243#define SB_SETTIPTEXT WINELIB_NAME_AW(SB_SETTIPTEXT)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000244#define SB_GETTIPTEXTA (WM_USER+18)
245#define SB_GETTIPTEXTW (WM_USER+19)
Eric Kohl8d2933d1998-11-22 18:12:12 +0000246#define SB_GETTIPTEXT WINELIB_NAME_AW(SB_GETTIPTEXT)
247#define SB_GETICON (WM_USER+20)
248#define SB_SETBKCOLOR CCM_SETBKCOLOR /* lParam = bkColor */
249#define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
250#define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000251
Eric Kohl8d2933d1998-11-22 18:12:12 +0000252#define SBN_FIRST (0U-880U)
253#define SBN_LAST (0U-899U)
254#define SBN_SIMPLEMODECHANGE (SBN_FIRST-0)
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000255
Alexandre Julliarda3960291999-02-26 11:11:13 +0000256HWND WINAPI CreateStatusWindowA (INT, LPCSTR, HWND, UINT);
257HWND WINAPI CreateStatusWindowW (INT, LPCWSTR, HWND, UINT);
Eric Kohl8d2933d1998-11-22 18:12:12 +0000258#define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000259VOID WINAPI DrawStatusTextA (HDC, LPRECT, LPCSTR, UINT);
260VOID WINAPI DrawStatusTextW (HDC, LPRECT, LPCWSTR, UINT);
Eric Kohl8d2933d1998-11-22 18:12:12 +0000261#define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000262VOID WINAPI MenuHelp (UINT, WPARAM, LPARAM, HMENU,
263 HINSTANCE, HWND, LPUINT);
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000264
Eric Kohlb406c7d1999-01-24 19:12:34 +0000265/**************************************************************************
266 * Drag List control
267 */
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000268
Eric Kohlb406c7d1999-01-24 19:12:34 +0000269typedef struct tagDRAGLISTINFO
270{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000271 UINT uNotification;
272 HWND hWnd;
273 POINT ptCursor;
Paul Quinn1beaae51998-12-15 15:38:36 +0000274} DRAGLISTINFO, *LPDRAGLISTINFO;
275
276#define DL_BEGINDRAG (WM_USER+133)
277#define DL_DRAGGING (WM_USER+134)
278#define DL_DROPPED (WM_USER+135)
279#define DL_CANCELDRAG (WM_USER+136)
280
281#define DL_CURSORSET 0
282#define DL_STOPCURSOR 1
283#define DL_COPYCURSOR 2
284#define DL_MOVECURSOR 3
285
286#define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
287
Alexandre Julliarda3960291999-02-26 11:11:13 +0000288BOOL WINAPI MakeDragList (HWND);
289VOID WINAPI DrawInsert (HWND, HWND, INT);
290INT WINAPI LBItemFromPt (HWND, POINT, BOOL);
Eric Kohlb406c7d1999-01-24 19:12:34 +0000291
Paul Quinn1beaae51998-12-15 15:38:36 +0000292
Alexandre Julliard77b99181997-09-14 17:17:23 +0000293/* UpDown */
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000294
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000295#define UPDOWN_CLASS16 "msctls_updown"
Alexandre Julliarda3960291999-02-26 11:11:13 +0000296#define UPDOWN_CLASSA "msctls_updown32"
297#define UPDOWN_CLASSW L"msctls_updown32"
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000298#define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000299
300typedef struct tagUDACCEL
301{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000302 UINT nSec;
303 UINT nInc;
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000304} UDACCEL;
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000305
306#define UD_MAXVAL 0x7fff
307#define UD_MINVAL 0x8001
308
309#define UDS_WRAP 0x0001
310#define UDS_SETBUDDYINT 0x0002
311#define UDS_ALIGNRIGHT 0x0004
312#define UDS_ALIGNLEFT 0x0008
313#define UDS_AUTOBUDDY 0x0010
314#define UDS_ARROWKEYS 0x0020
315#define UDS_HORZ 0x0040
316#define UDS_NOTHOUSANDS 0x0080
317
318#define UDN_FIRST (0U-721)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000319#define UDN_LAST (0U-740)
Alexandre Julliard77b99181997-09-14 17:17:23 +0000320#define UDN_DELTAPOS (UDN_FIRST-1)
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000321
Eric Kohlfa8ae2f1999-03-12 17:40:32 +0000322#define UDM_SETRANGE (WM_USER+101)
323#define UDM_GETRANGE (WM_USER+102)
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000324#define UDM_SETPOS (WM_USER+103)
325#define UDM_GETPOS (WM_USER+104)
326#define UDM_SETBUDDY (WM_USER+105)
327#define UDM_GETBUDDY (WM_USER+106)
328#define UDM_SETACCEL (WM_USER+107)
329#define UDM_GETACCEL (WM_USER+108)
330#define UDM_SETBASE (WM_USER+109)
331#define UDM_GETBASE (WM_USER+110)
Eric Kohlfa8ae2f1999-03-12 17:40:32 +0000332#define UDM_SETRANGE32 (WM_USER+111)
333#define UDM_GETRANGE32 (WM_USER+112)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000334
Alexandre Julliarda3960291999-02-26 11:11:13 +0000335HWND WINAPI CreateUpDownControl (DWORD, INT, INT, INT, INT,
336 HWND, INT, HINSTANCE, HWND,
337 INT, INT, INT);
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000338
Alexandre Julliard77b99181997-09-14 17:17:23 +0000339/* Progress Bar */
340
Alexandre Julliarda3960291999-02-26 11:11:13 +0000341#define PROGRESS_CLASSA "msctls_progress32"
342#define PROGRESS_CLASSW L"msctls_progress32"
Alexandre Julliard77b99181997-09-14 17:17:23 +0000343#define PROGRESS_CLASS16 "msctls_progress"
Alexandre Julliard77b99181997-09-14 17:17:23 +0000344#define PROGRESS_CLASS WINELIB_NAME_AW(PROGRESS_CLASS)
345
Eric Kohlfa8ae2f1999-03-12 17:40:32 +0000346#define PBM_SETRANGE (WM_USER+1)
Alexandre Julliard77b99181997-09-14 17:17:23 +0000347#define PBM_SETPOS (WM_USER+2)
348#define PBM_DELTAPOS (WM_USER+3)
349#define PBM_SETSTEP (WM_USER+4)
350#define PBM_STEPIT (WM_USER+5)
Eric Kohlfa8ae2f1999-03-12 17:40:32 +0000351#define PBM_SETRANGE32 (WM_USER+6)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000352#define PBM_GETRANGE (WM_USER+7)
353#define PBM_GETPOS (WM_USER+8)
354#define PBM_SETBARCOLOR (WM_USER+9)
355#define PBM_SETBKCOLOR CCM_SETBKCOLOR
356
357#define PBS_SMOOTH 0x01
358#define PBS_VERTICAL 0x04
359
360typedef struct
361{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000362 INT iLow;
363 INT iHigh;
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000364} PBRANGE, *PPBRANGE;
365
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000366
367/* ImageList */
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000368/*
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000369#if !defined(__WINE__) || !defined(__WINE_IMAGELIST_C)
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000370struct _IMAGELIST;
371typedef struct _IMAGELIST *HIMAGELIST;
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000372#endif */ /* __WINE__ */
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000373
Alexandre Julliard54c27111998-03-29 19:44:57 +0000374#define CLR_NONE 0xFFFFFFFF
375#define CLR_DEFAULT 0xFF000000
376#define CLR_HILIGHT CLR_DEFAULT
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000377
Alexandre Julliard54c27111998-03-29 19:44:57 +0000378#define ILC_MASK 0x0001
379#define ILC_COLOR 0x0000
380#define ILC_COLORDDB 0x00FE
381#define ILC_COLOR4 0x0004
382#define ILC_COLOR8 0x0008
383#define ILC_COLOR16 0x0010
384#define ILC_COLOR24 0x0018
385#define ILC_COLOR32 0x0020
386#define ILC_PALETTE 0x0800 /* no longer supported by M$ */
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000387
388#define ILD_NORMAL 0x0000
389#define ILD_TRANSPARENT 0x0001
390#define ILD_BLEND25 0x0002
391#define ILD_BLEND50 0x0004
392#define ILD_MASK 0x0010
393#define ILD_IMAGE 0x0020
394#define ILD_ROP 0x0040
395#define ILD_OVERLAYMASK 0x0F00
396
397#define ILD_SELECTED ILD_BLEND50
398#define ILD_FOCUS ILD_BLEND25
399#define ILD_BLEND ILD_BLEND50
400
401#define INDEXTOOVERLAYMASK(i) ((i)<<8)
402
Alexandre Julliard54c27111998-03-29 19:44:57 +0000403#define ILCF_MOVE (0x00000000)
404#define ILCF_SWAP (0x00000001)
405
406
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000407typedef struct _IMAGEINFO
408{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000409 HBITMAP hbmImage;
410 HBITMAP hbmMask;
411 INT Unused1;
412 INT Unused2;
413 RECT rcImage;
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000414} IMAGEINFO;
415
416
Alexandre Julliard54c27111998-03-29 19:44:57 +0000417typedef struct _IMAGELISTDRAWPARAMS
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000418{
419 DWORD cbSize;
420 HIMAGELIST himl;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000421 INT i;
422 HDC hdcDst;
423 INT x;
424 INT y;
425 INT cx;
426 INT cy;
427 INT xBitmap; /* x offest from the upperleft of bitmap */
428 INT yBitmap; /* y offset from the upperleft of bitmap */
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000429 COLORREF rgbBk;
430 COLORREF rgbFg;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000431 UINT fStyle;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000432 DWORD dwRop;
433} IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
Alexandre Julliard54c27111998-03-29 19:44:57 +0000434
435
Alexandre Julliarda3960291999-02-26 11:11:13 +0000436INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
437INT WINAPI ImageList_AddIcon (HIMAGELIST, HICON);
438INT WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
439BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT);
440BOOL WINAPI ImageList_Copy(HIMAGELIST,INT,HIMAGELIST,INT,INT);
441HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
442BOOL WINAPI ImageList_Destroy(HIMAGELIST);
443BOOL WINAPI ImageList_DragEnter(HWND,INT,INT);
444BOOL WINAPI ImageList_DragLeave(HWND);
445BOOL WINAPI ImageList_DragMove(INT,INT);
446BOOL WINAPI ImageList_DragShowNolock (BOOL);
447BOOL WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
448BOOL WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
449 INT,COLORREF,COLORREF,UINT);
450BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
Alexandre Julliard54c27111998-03-29 19:44:57 +0000451HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
Alexandre Julliarda3960291999-02-26 11:11:13 +0000452BOOL WINAPI ImageList_EndDrag(VOID);
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000453COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
Alexandre Julliarda3960291999-02-26 11:11:13 +0000454HIMAGELIST WINAPI ImageList_GetDragImage(POINT*,POINT*);
455HICON WINAPI ImageList_GetIcon(HIMAGELIST,INT,UINT);
456BOOL WINAPI ImageList_GetIconSize(HIMAGELIST,INT*,INT*);
457INT WINAPI ImageList_GetImageCount(HIMAGELIST);
458BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST,INT,IMAGEINFO*);
459BOOL WINAPI ImageList_GetImageRect(HIMAGELIST,INT,LPRECT);
460HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,INT,INT,
461 COLORREF,UINT,UINT);
462HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,INT,INT,
463 COLORREF,UINT,UINT);
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000464#define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000465HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
Alexandre Julliarda845b881998-06-01 10:44:35 +0000466#ifdef __IStream_INTREFACE_DEFINED__
Alexandre Julliarda3960291999-02-26 11:11:13 +0000467HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
Alexandre Julliarda845b881998-06-01 10:44:35 +0000468#endif
Alexandre Julliarda3960291999-02-26 11:11:13 +0000469BOOL WINAPI ImageList_Remove(HIMAGELIST,INT);
470BOOL WINAPI ImageList_Replace(HIMAGELIST,INT,HBITMAP,HBITMAP);
471INT WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT,HICON);
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000472COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
Alexandre Julliarda3960291999-02-26 11:11:13 +0000473BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT,INT,INT);
Alexandre Julliarda845b881998-06-01 10:44:35 +0000474
Alexandre Julliarda3960291999-02-26 11:11:13 +0000475BOOL WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
476BOOL WINAPI ImageList_SetImageCount(HIMAGELIST,INT);
477BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
Alexandre Julliarda845b881998-06-01 10:44:35 +0000478#ifdef __IStream_INTREFACE_DEFINED__
Alexandre Julliarda3960291999-02-26 11:11:13 +0000479BOOL WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
Alexandre Julliarda845b881998-06-01 10:44:35 +0000480#endif
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000481
Alexandre Julliarda845b881998-06-01 10:44:35 +0000482#ifndef __WINE__
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000483#define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000484#endif
Alexandre Julliard54c27111998-03-29 19:44:57 +0000485#define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000486#define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
487 ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
Alexandre Julliard54c27111998-03-29 19:44:57 +0000488#define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
489
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000490
Alexandre Julliard638f1691999-01-17 16:32:32 +0000491/* Flat Scrollbar control */
492
493#define FLATSB_CLASS16 "flatsb_class"
Alexandre Julliarda3960291999-02-26 11:11:13 +0000494#define FLATSB_CLASSA "flatsb_class32"
495#define FLATSB_CLASSW L"flatsb_class32"
Alexandre Julliard638f1691999-01-17 16:32:32 +0000496#define FLATSB_CLASS WINELIB_NAME_AW(FLATSB_CLASS)
497
Alexandre Julliarda3960291999-02-26 11:11:13 +0000498BOOL WINAPI FlatSB_EnableScrollBar(HWND, INT, UINT);
499BOOL WINAPI FlatSB_ShowScrollBar(HWND, INT, BOOL);
500BOOL WINAPI FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
501BOOL WINAPI FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
502INT WINAPI FlatSB_GetScrollPos(HWND, INT);
503BOOL WINAPI FlatSB_GetScrollProp(HWND, INT, LPINT);
504INT WINAPI FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
505INT WINAPI FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
506INT WINAPI FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
507BOOL WINAPI FlatSB_SetScrollProp(HWND, UINT, INT, BOOL);
508BOOL WINAPI InitializeFlatSB(HWND);
509HRESULT WINAPI UninitializeFlatSB(HWND);
Alexandre Julliard638f1691999-01-17 16:32:32 +0000510
511
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000512/* Header control */
513
Eric Kohl17216d31998-10-11 13:21:17 +0000514#define WC_HEADER16 "SysHeader"
Alexandre Julliarda3960291999-02-26 11:11:13 +0000515#define WC_HEADERA "SysHeader32"
516#define WC_HEADERW L"SysHeader32"
Eric Kohl17216d31998-10-11 13:21:17 +0000517#define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000518
519#define HDS_HORZ 0x0000
520#define HDS_BUTTONS 0x0002
521#define HDS_HOTTRACK 0x0004
522#define HDS_HIDDEN 0x0008
523#define HDS_DRAGDROP 0x0040
524#define HDS_FULLDRAG 0x0080
525
526#define HDI_WIDTH 0x0001
527#define HDI_HEIGHT HDI_WIDTH
528#define HDI_TEXT 0x0002
529#define HDI_FORMAT 0x0004
530#define HDI_LPARAM 0x0008
531#define HDI_BITMAP 0x0010
532#define HDI_IMAGE 0x0020
533#define HDI_DI_SETITEM 0x0040
534#define HDI_ORDER 0x0080
535
536#define HDF_LEFT 0x0000
537#define HDF_RIGHT 0x0001
538#define HDF_CENTER 0x0002
539#define HDF_JUSTIFYMASK 0x0003
540
541#define HDF_IMAGE 0x0800
542#define HDF_BITMAP_ON_RIGHT 0x1000
543#define HDF_BITMAP 0x2000
544#define HDF_STRING 0x4000
545#define HDF_OWNERDRAW 0x8000
546
547#define HHT_NOWHERE 0x0001
548#define HHT_ONHEADER 0x0002
549#define HHT_ONDIVIDER 0x0004
550#define HHT_ONDIVOPEN 0x0008
551#define HHT_ABOVE 0x0100
552#define HHT_BELOW 0x0200
553#define HHT_TORIGHT 0x0400
554#define HHT_TOLEFT 0x0800
555
556#define HDM_FIRST 0x1200
557#define HDM_GETITEMCOUNT (HDM_FIRST+0)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000558#define HDM_INSERTITEMA (HDM_FIRST+1)
559#define HDM_INSERTITEMW (HDM_FIRST+10)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000560#define HDM_INSERTITEM WINELIB_NAME_AW(HDM_INSERTITEM)
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000561#define HDM_DELETEITEM (HDM_FIRST+2)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000562#define HDM_GETITEMA (HDM_FIRST+3)
563#define HDM_GETITEMW (HDM_FIRST+11)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000564#define HDM_GETITEM WINELIB_NAME_AW(HDM_GETITEM)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000565#define HDM_SETITEMA (HDM_FIRST+4)
566#define HDM_SETITEMW (HDM_FIRST+12)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000567#define HDM_SETITEM WINELIB_NAME_AW(HDM_SETITEM)
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000568#define HDM_LAYOUT (HDM_FIRST+5)
569#define HDM_HITTEST (HDM_FIRST+6)
570#define HDM_GETITEMRECT (HDM_FIRST+7)
571#define HDM_SETIMAGELIST (HDM_FIRST+8)
572#define HDM_GETIMAGELIST (HDM_FIRST+9)
573
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000574#define HDM_ORDERTOINDEX (HDM_FIRST+15)
575#define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
576#define HDM_GETORDERARRAY (HDM_FIRST+17)
577#define HDM_SETORDERARRAY (HDM_FIRST+18)
578#define HDM_SETHOTDIVIDER (HDM_FIRST+19)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000579#define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
580#define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000581
582#define HDN_FIRST (0U-300U)
583#define HDN_LAST (0U-399U)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000584#define HDN_ITEMCHANGINGA (HDN_FIRST-0)
585#define HDN_ITEMCHANGINGW (HDN_FIRST-20)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000586#define HDN_ITEMCHANGING WINELIB_NAME_AW(HDN_ITEMCHANGING)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000587#define HDN_ITEMCHANGEDA (HDN_FIRST-1)
588#define HDN_ITEMCHANGEDW (HDN_FIRST-21)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000589#define HDN_ITEMCHANGED WINELIB_NAME_AW(HDN_ITEMCHANGED)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000590#define HDN_ITEMCLICKA (HDN_FIRST-2)
591#define HDN_ITEMCLICKW (HDN_FIRST-22)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000592#define HDN_ITEMCLICK WINELIB_NAME_AW(HDN_ITEMCLICK)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000593#define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
594#define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000595#define HDN_ITEMDBLCLICK WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000596#define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
597#define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000598#define HDN_DIVIDERDBLCLICK WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000599#define HDN_BEGINTRACKA (HDN_FIRST-6)
600#define HDN_BEGINTRACKW (HDN_FIRST-26)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000601#define HDN_BEGINTRACK WINELIB_NAME_AW(HDN_BEGINTRACK)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000602#define HDN_ENDTRACKA (HDN_FIRST-7)
603#define HDN_ENDTRACKW (HDN_FIRST-27)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000604#define HDN_ENDTRACK WINELIB_NAME_AW(HDN_ENDTRACK)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000605#define HDN_TRACKA (HDN_FIRST-8)
606#define HDN_TRACKW (HDN_FIRST-28)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000607#define HDN_TRACK WINELIB_NAME_AW(HDN_TRACK)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000608#define HDN_GETDISPINFOA (HDN_FIRST-9)
609#define HDN_GETDISPINFOW (HDN_FIRST-29)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000610#define HDN_GETDISPINFO WINELIB_NAME_AW(HDN_GETDISPINFO)
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000611#define HDN_BEGINDRACK (HDN_FIRST-10)
612#define HDN_ENDDRACK (HDN_FIRST-11)
613
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000614typedef struct _HD_LAYOUT
615{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000616 RECT *prc;
617 WINDOWPOS *pwpos;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000618} HDLAYOUT, *LPHDLAYOUT;
619
620#define HD_LAYOUT HDLAYOUT
621
Alexandre Julliarda3960291999-02-26 11:11:13 +0000622typedef struct _HD_ITEMA
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000623{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000624 UINT mask;
625 INT cxy;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000626 LPSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000627 HBITMAP hbm;
628 INT cchTextMax;
629 INT fmt;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000630 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000631 INT iImage;
632 INT iOrder;
633} HDITEMA, *LPHDITEMA;
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000634
Alexandre Julliarda3960291999-02-26 11:11:13 +0000635typedef struct _HD_ITEMW
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000636{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000637 UINT mask;
638 INT cxy;
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000639 LPWSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000640 HBITMAP hbm;
641 INT cchTextMax;
642 INT fmt;
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000643 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000644 INT iImage;
645 INT iOrder;
646} HDITEMW, *LPHDITEMW;
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000647
648#define HDITEM WINELIB_NAME_AW(HDITEM)
649#define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
Alexandre Julliard8da12c41999-01-17 16:55:11 +0000650#define HD_ITEM HDITEM
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000651
Alexandre Julliarda3960291999-02-26 11:11:13 +0000652#define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
653#define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000654#define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000655
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000656typedef struct _HD_HITTESTINFO
657{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000658 POINT pt;
659 UINT flags;
660 INT iItem;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000661} HDHITTESTINFO, *LPHDHITTESTINFO;
662
663#define HD_HITTESTINFO HDHITTESTINFO
664
Alexandre Julliarda3960291999-02-26 11:11:13 +0000665typedef struct tagNMHEADERA
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000666{
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000667 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000668 INT iItem;
669 INT iButton;
670 HDITEMA *pitem;
671} NMHEADERA, *LPNMHEADERA;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000672
Alexandre Julliarda3960291999-02-26 11:11:13 +0000673typedef struct tagNMHEADERW
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000674{
675 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000676 INT iItem;
677 INT iButton;
678 HDITEMW *pitem;
679} NMHEADERW, *LPNMHEADERW;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000680
681#define NMHEADER WINELIB_NAME_AW(NMHEADER)
682#define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
Alexandre Julliarde32be241999-02-10 06:43:59 +0000683#define HD_NOTIFY NMHEADER
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000684
Alexandre Julliarda3960291999-02-26 11:11:13 +0000685typedef struct tagNMHDDISPINFOA
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000686{
687 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000688 INT iItem;
689 UINT mask;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000690 LPSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000691 INT cchTextMax;
692 INT iImage;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000693 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000694} NMHDDISPINFOA, *LPNMHDDISPINFOA;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000695
Alexandre Julliarda3960291999-02-26 11:11:13 +0000696typedef struct tagNMHDDISPINFOW
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000697{
698 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000699 INT iItem;
700 UINT mask;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000701 LPWSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000702 INT cchTextMax;
703 INT iImage;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000704 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000705} NMHDDISPINFOW, *LPNMHDDISPINFOW;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000706
707#define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
708#define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
709
Alexandre Julliarda845b881998-06-01 10:44:35 +0000710#define Header_GetItemCount(hwndHD) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000711 (INT)SendMessageA((hwndHD),HDM_GETITEMCOUNT,0,0L)
712#define Header_InsertItemA(hwndHD,i,phdi) \
713 (INT)SendMessageA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
714#define Header_InsertItemW(hwndHD,i,phdi) \
715 (INT)SendMessageW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000716#define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000717#define Header_DeleteItem(hwndHD,i) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000718 (BOOL)SendMessageA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
719#define Header_GetItemA(hwndHD,i,phdi) \
720 (BOOL)SendMessageA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
721#define Header_GetItemW(hwndHD,i,phdi) \
722 (BOOL)SendMessageW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000723#define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000724#define Header_SetItemA(hwndHD,i,phdi) \
725 (BOOL)SendMessageA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
726#define Header_SetItemW(hwndHD,i,phdi) \
727 (BOOL)SendMessageW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000728#define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000729#define Header_Layout(hwndHD,playout) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000730 (BOOL)SendMessageA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
Alexandre Julliarda845b881998-06-01 10:44:35 +0000731#define Header_GetItemRect(hwnd,iItem,lprc) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000732 (BOOL)SendMessageA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000733#define Header_SetImageList(hwnd,himl) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000734 (HIMAGELIST)SendMessageA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000735#define Header_GetImageList(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000736 (HIMAGELIST)SendMessageA((hwnd),HDM_GETIMAGELIST,0,0)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000737#define Header_OrderToIndex(hwnd,i) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000738 (INT)SendMessageA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000739#define Header_CreateDragImage(hwnd,i) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000740 (HIMAGELIST)SendMessageA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000741#define Header_GetOrderArray(hwnd,iCount,lpi) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000742 (BOOL)SendMessageA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000743#define Header_SetOrderArray(hwnd,iCount,lpi) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000744 (BOOL)SendMessageA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000745#define Header_SetHotDivider(hwnd,fPos,dw) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000746 (INT)SendMessageA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000747#define Header_SetUnicodeFormat(hwnd,fUnicode) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000748 (BOOL)SendMessageA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000749#define Header_GetUnicodeFormat(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +0000750 (BOOL)SendMessageA((hwnd),HDM_GETUNICODEFORMAT,0,0)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000751
752
753/* Toolbar */
754
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000755#define TOOLBARCLASSNAME16 "ToolbarWindow"
Pascal Lessard60935ec1999-03-25 16:42:27 +0000756#define TOOLBARCLASSNAMEW "ToolbarWindow32"
Alexandre Julliarda3960291999-02-26 11:11:13 +0000757#define TOOLBARCLASSNAMEA "ToolbarWindow32"
Alexandre Julliarda845b881998-06-01 10:44:35 +0000758#define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
759
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000760#define CMB_MASKED 0x02
761
762#define TBSTATE_CHECKED 0x01
763#define TBSTATE_PRESSED 0x02
764#define TBSTATE_ENABLED 0x04
765#define TBSTATE_HIDDEN 0x08
766#define TBSTATE_INDETERMINATE 0x10
767#define TBSTATE_WRAP 0x20
768#define TBSTATE_ELLIPSES 0x40
769#define TBSTATE_MARKED 0x80
770
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000771#define TBSTYLE_BUTTON 0x00
772#define TBSTYLE_SEP 0x01
773#define TBSTYLE_CHECK 0x02
774#define TBSTYLE_GROUP 0x04
775#define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
776#define TBSTYLE_DROPDOWN 0x08
777
778#define TBSTYLE_TOOLTIPS 0x0100
779#define TBSTYLE_WRAPABLE 0x0200
780#define TBSTYLE_ALTDRAG 0x0400
781#define TBSTYLE_FLAT 0x0800
782#define TBSTYLE_LIST 0x1000
783#define TBSTYLE_CUSTOMERASE 0x2000
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000784
785#define TBIF_IMAGE 0x00000001
786#define TBIF_TEXT 0x00000002
787#define TBIF_STATE 0x00000004
788#define TBIF_STYLE 0x00000008
789#define TBIF_LPARAM 0x00000010
790#define TBIF_COMMAND 0x00000020
791#define TBIF_SIZE 0x00000040
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000792
793#define TBBF_LARGE 0x0001
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000794
Alexandre Julliarda845b881998-06-01 10:44:35 +0000795#define TB_ENABLEBUTTON (WM_USER+1)
796#define TB_CHECKBUTTON (WM_USER+2)
797#define TB_PRESSBUTTON (WM_USER+3)
798#define TB_HIDEBUTTON (WM_USER+4)
799#define TB_INDETERMINATE (WM_USER+5)
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000800#define TB_ISBUTTONENABLED (WM_USER+9)
801#define TB_ISBUTTONCHECKED (WM_USER+10)
802#define TB_ISBUTTONPRESSED (WM_USER+11)
803#define TB_ISBUTTONHIDDEN (WM_USER+12)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000804#define TB_ISBUTTONINDETERMINATE (WM_USER+13)
805#define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
806#define TB_SETSTATE (WM_USER+17)
807#define TB_GETSTATE (WM_USER+18)
808#define TB_ADDBITMAP (WM_USER+19)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000809#define TB_ADDBUTTONSA (WM_USER+20)
810#define TB_ADDBUTTONSW (WM_USER+68)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000811#define TB_ADDBUTTONS WINELIB_NAME_AW(TB_ADDBUTTONS)
812#define TB_HITTEST (WM_USER+69)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000813#define TB_INSERTBUTTONA (WM_USER+21)
814#define TB_INSERTBUTTONW (WM_USER+67)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000815#define TB_INSERTBUTTON WINELIB_NAME_AW(TB_INSERTBUTTON)
816#define TB_DELETEBUTTON (WM_USER+22)
817#define TB_GETBUTTON (WM_USER+23)
818#define TB_BUTTONCOUNT (WM_USER+24)
819#define TB_COMMANDTOINDEX (WM_USER+25)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000820#define TB_SAVERESTOREA (WM_USER+26)
821#define TB_SAVERESTOREW (WM_USER+76)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000822#define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
823#define TB_CUSTOMIZE (WM_USER+27)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000824#define TB_ADDSTRINGA (WM_USER+28)
825#define TB_ADDSTRINGW (WM_USER+77)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000826#define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
827#define TB_GETITEMRECT (WM_USER+29)
828#define TB_BUTTONSTRUCTSIZE (WM_USER+30)
829#define TB_SETBUTTONSIZE (WM_USER+31)
830#define TB_SETBITMAPSIZE (WM_USER+32)
831#define TB_AUTOSIZE (WM_USER+33)
832#define TB_GETTOOLTIPS (WM_USER+35)
833#define TB_SETTOOLTIPS (WM_USER+36)
834#define TB_SETPARENT (WM_USER+37)
835#define TB_SETROWS (WM_USER+39)
836#define TB_GETROWS (WM_USER+40)
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000837#define TB_GETBITMAPFLAGS (WM_USER+41)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000838#define TB_SETCMDID (WM_USER+42)
839#define TB_CHANGEBITMAP (WM_USER+43)
840#define TB_GETBITMAP (WM_USER+44)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000841#define TB_GETBUTTONTEXTA (WM_USER+45)
842#define TB_GETBUTTONTEXTW (WM_USER+75)
Alexandre Julliarda845b881998-06-01 10:44:35 +0000843#define TB_GETBUTTONTEXT WINELIB_NAME_AW(TB_GETBUTTONTEXT)
844#define TB_REPLACEBITMAP (WM_USER+46)
845#define TB_SETINDENT (WM_USER+47)
846#define TB_SETIMAGELIST (WM_USER+48)
847#define TB_GETIMAGELIST (WM_USER+49)
848#define TB_LOADIMAGES (WM_USER+50)
849#define TB_GETRECT (WM_USER+51) /* wParam is the Cmd instead of index */
850#define TB_SETHOTIMAGELIST (WM_USER+52)
851#define TB_GETHOTIMAGELIST (WM_USER+53)
852#define TB_SETDISABLEDIMAGELIST (WM_USER+54)
853#define TB_GETDISABLEDIMAGELIST (WM_USER+55)
854#define TB_SETSTYLE (WM_USER+56)
855#define TB_GETSTYLE (WM_USER+57)
856#define TB_GETBUTTONSIZE (WM_USER+58)
857#define TB_SETBUTTONWIDTH (WM_USER+59)
858#define TB_SETMAXTEXTROWS (WM_USER+60)
859#define TB_GETTEXTROWS (WM_USER+61)
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000860#define TB_GETOBJECT (WM_USER+62)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000861#define TB_GETBUTTONINFOW (WM_USER+63)
862#define TB_GETBUTTONINFOA (WM_USER+65)
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000863#define TB_GETBUTTONINFO WINELIB_NAME_AW(TB_GETBUTTONINFO)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000864#define TB_SETBUTTONINFOW (WM_USER+64)
865#define TB_SETBUTTONINFOA (WM_USER+66)
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000866#define TB_SETBUTTONINFO WINELIB_NAME_AW(TB_SETBUTTONINFO)
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000867#define TB_SETDRAWTEXTFLAGS (WM_USER+70)
868#define TB_GETHOTITEM (WM_USER+71)
869#define TB_SETHOTITEM (WM_USER+72)
870#define TB_SETANCHORHIGHLIGHT (WM_USER+73)
871#define TB_GETANCHORHIGHLIGHT (WM_USER+74)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000872#define TB_MAPACCELERATORA (WM_USER+78)
873#define TB_MAPACCELERATORW (WM_USER+90)
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000874#define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000875#define TB_GETINSERTMARK (WM_USER+79)
876#define TB_SETINSERTMARK (WM_USER+80)
877#define TB_INSERTMARKHITTEST (WM_USER+81)
878#define TB_MOVEBUTTON (WM_USER+82)
879#define TB_GETMAXSIZE (WM_USER+83)
880#define TB_SETEXTENDEDSTYLE (WM_USER+84)
881#define TB_GETEXTENDEDSTYLE (WM_USER+85)
882#define TB_GETPADDING (WM_USER+86)
883#define TB_SETPADDING (WM_USER+87)
884#define TB_SETINSERTMARKCOLOR (WM_USER+88)
885#define TB_GETINSERTMARKCOLOR (WM_USER+89)
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000886#define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
887#define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000888#define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
889#define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000890
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000891#define TBN_FIRST (0U-700U)
892#define TBN_LAST (0U-720U)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000893#define TBN_GETBUTTONINFOA (TBN_FIRST-0)
894#define TBN_GETBUTTONINFOW (TBN_FIRST-20)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000895#define TBN_GETBUTTONINFO WINELIB_NAME_AW(TBN_GETBUTTONINFO)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000896#define TBN_GETINFOTIPA (TBN_FIRST-18)
897#define TBN_GETINFOTIPW (TBN_FIRST-19)
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000898#define TBN_GETINFOTIP WINELIB_NAME_AW(TBN_GETINFOTIP)
899
Alexandre Julliarda845b881998-06-01 10:44:35 +0000900
901/* This is just for old CreateToolbar. */
902/* Don't use it in new programs. */
903typedef struct _OLDTBBUTTON {
Alexandre Julliarda3960291999-02-26 11:11:13 +0000904 INT iBitmap;
905 INT idCommand;
Alexandre Julliarda845b881998-06-01 10:44:35 +0000906 BYTE fsState;
907 BYTE fsStyle;
908 BYTE bReserved[2];
909 DWORD dwData;
910} OLDTBBUTTON, *POLDTBBUTTON, *LPOLDTBBUTTON;
911typedef const OLDTBBUTTON *LPCOLDTBBUTTON;
912
913
914typedef struct _TBBUTTON {
Alexandre Julliarda3960291999-02-26 11:11:13 +0000915 INT iBitmap;
916 INT idCommand;
Alexandre Julliarda845b881998-06-01 10:44:35 +0000917 BYTE fsState;
918 BYTE fsStyle;
919 BYTE bReserved[2];
920 DWORD dwData;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000921 INT iString;
Alexandre Julliarda845b881998-06-01 10:44:35 +0000922} TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
923typedef const TBBUTTON *LPCTBBUTTON;
924
925
926typedef struct _COLORMAP {
927 COLORREF from;
928 COLORREF to;
929} COLORMAP, *LPCOLORMAP;
930
931typedef struct tagTBADDBITMAP {
Alexandre Julliarda3960291999-02-26 11:11:13 +0000932 HINSTANCE hInst;
933 UINT nID;
Alexandre Julliarda845b881998-06-01 10:44:35 +0000934} TBADDBITMAP, *LPTBADDBITMAP;
935
Alexandre Julliarda3960291999-02-26 11:11:13 +0000936#define HINST_COMMCTRL ((HINSTANCE)-1)
Juergen Schmied0128d041998-11-05 10:33:18 +0000937#define IDB_STD_SMALL_COLOR 0
938#define IDB_STD_LARGE_COLOR 1
939#define IDB_VIEW_SMALL_COLOR 4
940#define IDB_VIEW_LARGE_COLOR 5
941#define IDB_HIST_SMALL_COLOR 8
942#define IDB_HIST_LARGE_COLOR 9
Alexandre Julliarda845b881998-06-01 10:44:35 +0000943
Juergen Schmied0128d041998-11-05 10:33:18 +0000944#define STD_CUT 0
945#define STD_COPY 1
946#define STD_PASTE 2
947#define STD_UNDO 3
948#define STD_REDOW 4
949#define STD_DELETE 5
950#define STD_FILENEW 6
951#define STD_FILEOPEN 7
952#define STD_FILESAVE 8
953#define STD_PRINTPRE 9
954#define STD_PROPERTIES 10
955#define STD_HELP 11
956#define STD_FIND 12
957#define STD_REPLACE 13
958#define STD_PRINT 14
959
960#define VIEW_LARGEICONS 0
961#define VIEW_SMALLICONS 1
962#define VIEW_LIST 2
963#define VIEW_DETAILS 3
964#define VIEW_SORTNAME 4
965#define VIEW_SORTSIZE 5
966#define VIEW_SORTDATE 6
967#define VIEW_SORTTYPE 7
968#define VIEW_PARENTFOLDER 8
969#define VIEW_NETCONNECT 9
970#define VIEW_NETDISCONNECT 10
971#define VIEW_NEWFOLDER 11
Alexandre Julliarda845b881998-06-01 10:44:35 +0000972
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000973typedef struct tagTBSAVEPARAMSA {
974 HKEY hkr;
975 LPCSTR pszSubKey;
976 LPCSTR pszValueName;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000977} TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000978
979typedef struct tagTBSAVEPARAMSW {
980 HKEY hkr;
981 LPCWSTR pszSubKey;
982 LPCWSTR pszValueName;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000983} TBSAVEPARAMSAW, *LPTBSAVEPARAMSAW;
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000984
Paul Quinn1beaae51998-12-15 15:38:36 +0000985#define TBSAVEPARAMS WINELIB_NAME_AW(TBSAVEPARAMS)
986#define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000987
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000988typedef struct
989{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000990 UINT cbSize;
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000991 DWORD dwMask;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000992 INT idCommand;
993 INT iImage;
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000994 BYTE fsState;
995 BYTE fsStyle;
996 WORD cx;
997 DWORD lParam;
998 LPSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000999 INT cchText;
1000} TBBUTTONINFOA, *LPTBBUTTONINFOA;
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001001
1002typedef struct
1003{
Alexandre Julliarda3960291999-02-26 11:11:13 +00001004 UINT cbSize;
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001005 DWORD dwMask;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001006 INT idCommand;
1007 INT iImage;
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001008 BYTE fsState;
1009 BYTE fsStyle;
1010 WORD cx;
1011 DWORD lParam;
1012 LPWSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001013 INT cchText;
1014} TBBUTTONINFOW, *LPTBBUTTONINFOW;
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001015
Paul Quinn1beaae51998-12-15 15:38:36 +00001016#define TBBUTTONINFO WINELIB_NAME_AW(TBBUTTONINFO)
1017#define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001018
1019typedef struct tagNMTBGETINFOTIPA
1020{
1021 NMHDR hdr;
1022 LPSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001023 INT cchTextMax;
1024 INT iItem;
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001025 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001026} NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001027
1028typedef struct tagNMTBGETINFOTIPW
1029{
1030 NMHDR hdr;
1031 LPWSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001032 INT cchTextMax;
1033 INT iItem;
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001034 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001035} NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001036
Paul Quinn1beaae51998-12-15 15:38:36 +00001037#define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOFTIP)
1038#define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001039
Paul Quinn1beaae51998-12-15 15:38:36 +00001040typedef struct
1041{
Alexandre Julliarda3960291999-02-26 11:11:13 +00001042 HINSTANCE hInstOld;
1043 UINT nIDOld;
1044 HINSTANCE hInstNew;
1045 UINT nIDNew;
1046 INT nButtons;
Paul Quinn1beaae51998-12-15 15:38:36 +00001047} TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +00001048
Alexandre Julliarda3960291999-02-26 11:11:13 +00001049HWND WINAPI
1050CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
1051 UINT, LPCOLDTBBUTTON, INT);
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +00001052
Alexandre Julliarda3960291999-02-26 11:11:13 +00001053HWND WINAPI
1054CreateToolbarEx(HWND, DWORD, UINT, INT,
1055 HINSTANCE, UINT, LPCTBBUTTON,
1056 INT, INT, INT, INT, INT, UINT);
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +00001057
Alexandre Julliarda3960291999-02-26 11:11:13 +00001058HBITMAP WINAPI
1059CreateMappedBitmap (HINSTANCE, INT, UINT, LPCOLORMAP, INT);
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +00001060
Alexandre Julliarda845b881998-06-01 10:44:35 +00001061
Alexandre Julliard642d3131998-07-12 19:29:36 +00001062/* Tool tips */
1063
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001064#define TOOLTIPS_CLASS16 "tooltips_class"
Alexandre Julliarda3960291999-02-26 11:11:13 +00001065#define TOOLTIPS_CLASSA "tooltips_class32"
Alexandre Julliard642d3131998-07-12 19:29:36 +00001066#define TOOLTIPS_CLASS32W L"tooltips_class32"
Alexandre Julliard642d3131998-07-12 19:29:36 +00001067#define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
Alexandre Julliard829fe321998-07-26 14:27:39 +00001068
1069#define INFOTIPSIZE 1024
Alexandre Julliard642d3131998-07-12 19:29:36 +00001070
1071#define TTS_ALWAYSTIP 0x01
1072#define TTS_NOPREFIX 0x02
Alexandre Julliard829fe321998-07-26 14:27:39 +00001073
Alexandre Julliard642d3131998-07-12 19:29:36 +00001074#define TTF_IDISHWND 0x0001
1075#define TTF_CENTERTIP 0x0002
1076#define TTF_RTLREADING 0x0004
1077#define TTF_SUBCLASS 0x0010
1078#define TTF_TRACK 0x0020
1079#define TTF_ABSOLUTE 0x0080
1080#define TTF_TRANSPARENT 0x0100
1081#define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
1082
1083
1084#define TTDT_AUTOMATIC 0
1085#define TTDT_RESHOW 1
1086#define TTDT_AUTOPOP 2
1087#define TTDT_INITIAL 3
1088
1089
1090#define TTM_ACTIVATE (WM_USER+1)
1091#define TTM_SETDELAYTIME (WM_USER+3)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001092#define TTM_ADDTOOLA (WM_USER+4)
1093#define TTM_ADDTOOLW (WM_USER+50)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001094#define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001095#define TTM_DELTOOLA (WM_USER+5)
1096#define TTM_DELTOOLW (WM_USER+51)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001097#define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001098#define TTM_NEWTOOLRECTA (WM_USER+6)
1099#define TTM_NEWTOOLRECTW (WM_USER+52)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001100#define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
1101#define TTM_RELAYEVENT (WM_USER+7)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001102#define TTM_GETTOOLINFOA (WM_USER+8)
1103#define TTM_GETTOOLINFOW (WM_USER+53)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001104#define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001105#define TTM_SETTOOLINFOA (WM_USER+9)
1106#define TTM_SETTOOLINFOW (WM_USER+54)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001107#define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001108#define TTM_HITTESTA (WM_USER+10)
1109#define TTM_HITTESTW (WM_USER+55)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001110#define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001111#define TTM_GETTEXTA (WM_USER+11)
1112#define TTM_GETTEXTW (WM_USER+56)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001113#define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001114#define TTM_UPDATETIPTEXTA (WM_USER+12)
1115#define TTM_UPDATETIPTEXTW (WM_USER+57)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001116#define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
1117#define TTM_GETTOOLCOUNT (WM_USER+13)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001118#define TTM_ENUMTOOLSA (WM_USER+14)
1119#define TTM_ENUMTOOLSW (WM_USER+58)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001120#define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001121#define TTM_GETCURRENTTOOLA (WM_USER+15)
1122#define TTM_GETCURRENTTOOLW (WM_USER+59)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001123#define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
1124#define TTM_WINDOWFROMPOINT (WM_USER+16)
1125#define TTM_TRACKACTIVATE (WM_USER+17)
1126#define TTM_TRACKPOSITION (WM_USER+18)
1127#define TTM_SETTIPBKCOLOR (WM_USER+19)
1128#define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1129#define TTM_GETDELAYTIME (WM_USER+21)
1130#define TTM_GETTIPBKCOLOR (WM_USER+22)
1131#define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1132#define TTM_SETMAXTIPWIDTH (WM_USER+24)
1133#define TTM_GETMAXTIPWIDTH (WM_USER+25)
1134#define TTM_SETMARGIN (WM_USER+26)
1135#define TTM_GETMARGIN (WM_USER+27)
1136#define TTM_POP (WM_USER+28)
1137#define TTM_UPDATE (WM_USER+29)
1138
Alexandre Julliard829fe321998-07-26 14:27:39 +00001139
1140#define TTN_FIRST (0U-520U)
1141#define TTN_LAST (0U-549U)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001142#define TTN_GETDISPINFOA (TTN_FIRST-0)
1143#define TTN_GETDISPINFOW (TTN_FIRST-10)
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001144#define TTN_GETDISPINFO WINELIB_NAME_AW(TTN_GETDISPINFO)
Alexandre Julliard829fe321998-07-26 14:27:39 +00001145#define TTN_SHOW (TTN_FIRST-1)
1146#define TTN_POP (TTN_FIRST-2)
1147
Paul Quinn1beaae51998-12-15 15:38:36 +00001148#define TTN_NEEDTEXT TTN_GETDISPINFO
Alexandre Julliarda3960291999-02-26 11:11:13 +00001149#define TTN_NEEDTEXTA TTN_GETDISPINFOA
1150#define TTN_NEEDTEXTW TTN_GETDISPINFOW
Paul Quinn1beaae51998-12-15 15:38:36 +00001151
Alexandre Julliard642d3131998-07-12 19:29:36 +00001152typedef struct tagTOOLINFOA {
Alexandre Julliarda3960291999-02-26 11:11:13 +00001153 UINT cbSize;
1154 UINT uFlags;
1155 HWND hwnd;
1156 UINT uId;
1157 RECT rect;
1158 HINSTANCE hinst;
Alexandre Julliard642d3131998-07-12 19:29:36 +00001159 LPSTR lpszText;
1160 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001161} TTTOOLINFOA, *LPTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
Alexandre Julliard642d3131998-07-12 19:29:36 +00001162
1163typedef struct tagTOOLINFOW {
Alexandre Julliarda3960291999-02-26 11:11:13 +00001164 UINT cbSize;
1165 UINT uFlags;
1166 HWND hwnd;
1167 UINT uId;
1168 RECT rect;
1169 HINSTANCE hinst;
Alexandre Julliard642d3131998-07-12 19:29:36 +00001170 LPWSTR lpszText;
1171 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001172} TTTOOLINFOW, *LPTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW;
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001173
1174#define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
Eric Kohl8b1a2a71998-12-07 10:59:40 +00001175#define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001176#define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
1177#define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
Paul Quinn1beaae51998-12-15 15:38:36 +00001178#define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001179
Alexandre Julliarda3960291999-02-26 11:11:13 +00001180#define TTTOOLINFO_V1_SIZEA CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
1181#define TTTOOLINFO_V1_SIZEW CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001182#define TTTOOLINFO_V1_SIZE WINELIB_NAME_AW(TTTOOLINFO_V1_SIZE)
1183
Alexandre Julliard829fe321998-07-26 14:27:39 +00001184typedef struct _TT_HITTESTINFOA
1185{
Alexandre Julliarda3960291999-02-26 11:11:13 +00001186 HWND hwnd;
1187 POINT pt;
1188 TTTOOLINFOA ti;
1189} TTHITTESTINFOA, *LPTTHITTESTINFOA;
Alexandre Julliard642d3131998-07-12 19:29:36 +00001190
Alexandre Julliard829fe321998-07-26 14:27:39 +00001191typedef struct _TT_HITTESTINFOW
1192{
Alexandre Julliarda3960291999-02-26 11:11:13 +00001193 HWND hwnd;
1194 POINT pt;
1195 TTTOOLINFOW ti;
1196} TTHITTESTINFOW, *LPTTHITTESTINFOW;
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001197
1198#define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
1199#define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
Alexandre Julliard829fe321998-07-26 14:27:39 +00001200
1201typedef struct tagNMTTDISPINFOA
1202{
1203 NMHDR hdr;
1204 LPSTR lpszText;
1205 CHAR szText[80];
Alexandre Julliarda3960291999-02-26 11:11:13 +00001206 HINSTANCE hinst;
1207 UINT uFlags;
Alexandre Julliard829fe321998-07-26 14:27:39 +00001208 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001209} NMTTDISPINFOA, *LPNMTTDISPINFOA;
Alexandre Julliard829fe321998-07-26 14:27:39 +00001210
1211typedef struct tagNMTTDISPINFOW
1212{
1213 NMHDR hdr;
1214 LPWSTR lpszText;
1215 WCHAR szText[80];
Alexandre Julliarda3960291999-02-26 11:11:13 +00001216 HINSTANCE hinst;
1217 UINT uFlags;
Alexandre Julliard829fe321998-07-26 14:27:39 +00001218 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001219} NMTTDISPINFOW, *LPNMTTDISPINFOW;
Alexandre Julliard642d3131998-07-12 19:29:36 +00001220
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001221#define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
1222#define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001223
Alexandre Julliarda3960291999-02-26 11:11:13 +00001224#define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
1225#define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001226#define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)
1227
Alexandre Julliarda3960291999-02-26 11:11:13 +00001228#define TOOLTIPTEXTW NMTTDISPINFOW
1229#define TOOLTIPTEXTA NMTTDISPINFOA
Paul Quinn1beaae51998-12-15 15:38:36 +00001230#define TOOLTIPTEXT NMTTDISPINFO
1231#define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1232#define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1233#define LPTOOLTIPTEXT LPNMTTDISPINFO
Alexandre Julliard642d3131998-07-12 19:29:36 +00001234
Eric Kohlb406c7d1999-01-24 19:12:34 +00001235
Alexandre Julliard642d3131998-07-12 19:29:36 +00001236/* Rebar control */
1237
1238#define REBARCLASSNAME16 "ReBarWindow"
Alexandre Julliarda3960291999-02-26 11:11:13 +00001239#define REBARCLASSNAMEA "ReBarWindow32"
1240#define REBARCLASSNAMEW L"ReBarWindow32"
Eric Kohl9d8e8641998-10-24 10:49:27 +00001241#define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
1242
1243#define RBS_TOOLTIPS 0x0100
1244#define RBS_VARHEIGHT 0x0200
1245#define RBS_BANDBORDERS 0x0400
1246#define RBS_FIXEDORDER 0x0800
1247#define RBS_REGISTERDROP 0x1000
1248#define RBS_AUTOSIZE 0x2000
1249#define RBS_VERTICALGRIPPER 0x4000
1250#define RBS_DBLCLKTOGGLE 0x8000
Alexandre Julliard642d3131998-07-12 19:29:36 +00001251
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001252#define RBIM_IMAGELIST 0x00000001
1253
1254#define RBBIM_STYLE 0x00000001
1255#define RBBIM_COLORS 0x00000002
1256#define RBBIM_TEXT 0x00000004
1257#define RBBIM_IMAGE 0x00000008
1258#define RBBIM_CHILD 0x00000010
1259#define RBBIM_CHILDSIZE 0x00000020
1260#define RBBIM_SIZE 0x00000040
1261#define RBBIM_BACKGROUND 0x00000080
1262#define RBBIM_ID 0x00000100
1263#define RBBIM_IDEALSIZE 0x00000200
1264#define RBBIM_LPARAM 0x00000400
1265#define RBBIM_HEADERSIZE 0x00000800
1266
Eric Kohl9d8e8641998-10-24 10:49:27 +00001267#define RBBS_BREAK 0x00000001
1268#define RBBS_FIXEDSIZE 0x00000002
1269#define RBBS_CHILDEDGE 0x00000004
1270#define RBBS_HIDDEN 0x00000008
1271#define RBBS_NOVERT 0x00000010
1272#define RBBS_FIXEDBMP 0x00000020
1273#define RBBS_VARIABLEHEIGHT 0x00000040
1274#define RBBS_GRIPPERALWAYS 0x00000080
1275#define RBBS_NOGRIPPER 0x00000100
1276
1277#define RBNM_ID 0x00000001
1278#define RBNM_STYLE 0x00000002
1279#define RBNM_LPARAM 0x00000004
1280
1281#define RBHT_NOWHERE 0x0001
1282#define RBHT_CAPTION 0x0002
1283#define RBHT_CLIENT 0x0003
1284#define RBHT_GRABBER 0x0004
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001285
Alexandre Julliarda3960291999-02-26 11:11:13 +00001286#define RB_INSERTBANDA (WM_USER+1)
1287#define RB_INSERTBANDW (WM_USER+10)
Eric Kohl9d8e8641998-10-24 10:49:27 +00001288#define RB_INSERTBAND WINELIB_NAME_AW(RB_INSERTBAND)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001289#define RB_DELETEBAND (WM_USER+2)
1290#define RB_GETBARINFO (WM_USER+3)
1291#define RB_SETBARINFO (WM_USER+4)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001292#define RB_GETBANDINFO (WM_USER+5) /* just for compatibility */
1293#define RB_SETBANDINFOA (WM_USER+6)
1294#define RB_SETBANDINFOW (WM_USER+11)
Eric Kohl9d8e8641998-10-24 10:49:27 +00001295#define RB_SETBANDINFO WINELIB_NAME_AW(RB_SETBANDINFO)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001296#define RB_SETPARENT (WM_USER+7)
1297#define RB_HITTEST (WM_USER+8)
1298#define RB_GETRECT (WM_USER+9)
1299#define RB_GETBANDCOUNT (WM_USER+12)
1300#define RB_GETROWCOUNT (WM_USER+13)
1301#define RB_GETROWHEIGHT (WM_USER+14)
1302#define RB_IDTOINDEX (WM_USER+16)
1303#define RB_GETTOOLTIPS (WM_USER+17)
1304#define RB_SETTOOLTIPS (WM_USER+18)
1305#define RB_SETBKCOLOR (WM_USER+19)
1306#define RB_GETBKCOLOR (WM_USER+20)
1307#define RB_SETTEXTCOLOR (WM_USER+21)
1308#define RB_GETTEXTCOLOR (WM_USER+22)
1309#define RB_SIZETORECT (WM_USER+23)
1310#define RB_BEGINDRAG (WM_USER+24)
1311#define RB_ENDDRAG (WM_USER+25)
1312#define RB_DRAGMOVE (WM_USER+26)
1313#define RB_GETBARHEIGHT (WM_USER+27)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001314#define RB_GETBANDINFOW (WM_USER+28)
1315#define RB_GETBANDINFOA (WM_USER+29)
1316#define RB_GETBANDINFO16 WINELIB_NAME_AW(RB_GETBANDINFO16)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001317#define RB_MINIMIZEBAND (WM_USER+30)
1318#define RB_MAXIMIZEBAND (WM_USER+31)
Eric Kohlb406c7d1999-01-24 19:12:34 +00001319#define RB_GETBANDBORDERS (WM_USER+34)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001320#define RB_SHOWBAND (WM_USER+35)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001321#define RB_SETPALETTE (WM_USER+37)
1322#define RB_GETPALETTE (WM_USER+38)
1323#define RB_MOVEBAND (WM_USER+39)
Eric Kohl8d2933d1998-11-22 18:12:12 +00001324#define RB_GETDROPTARGET CCM_GETDROPTARGET
1325#define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1326#define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1327#define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1328#define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001329
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001330#define RBN_FIRST (0U-831U)
1331#define RBN_LAST (0U-859U)
Eric Kohl9d8e8641998-10-24 10:49:27 +00001332#define RBN_HEIGHTCHANGE (RBN_FIRST-0)
1333#define RBN_GETOBJECT (RBN_FIRST-1)
1334#define RBN_LAYOUTCHANGED (RBN_FIRST-2)
1335#define RBN_AUTOSIZE (RBN_FIRST-3)
1336#define RBN_BEGINDRAG (RBN_FIRST-4)
1337#define RBN_ENDDRAG (RBN_FIRST-5)
1338#define RBN_DELETINGBAND (RBN_FIRST-6)
1339#define RBN_DELETEDBAND (RBN_FIRST-7)
1340#define RBN_CHILDSIZE (RBN_FIRST-8)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001341
1342typedef struct tagREBARINFO
1343{
Alexandre Julliarda3960291999-02-26 11:11:13 +00001344 UINT cbSize;
1345 UINT fMask;
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001346 HIMAGELIST himl;
1347} REBARINFO, *LPREBARINFO;
1348
1349typedef struct tagREBARBANDINFOA
1350{
Alexandre Julliarda3960291999-02-26 11:11:13 +00001351 UINT cbSize;
1352 UINT fMask;
1353 UINT fStyle;
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001354 COLORREF clrFore;
1355 COLORREF clrBack;
1356 LPSTR lpText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001357 UINT cch;
1358 INT iImage;
1359 HWND hwndChild;
1360 UINT cxMinChild;
1361 UINT cyMinChild;
1362 UINT cx;
1363 HBITMAP hbmBack;
1364 UINT wID;
1365 UINT cyChild;
1366 UINT cyMaxChild;
1367 UINT cyIntegral;
1368 UINT cxIdeal;
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001369 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001370 UINT cxHeader;
1371} REBARBANDINFOA, *LPREBARBANDINFOA;
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001372
Alexandre Julliarda3960291999-02-26 11:11:13 +00001373typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001374
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001375typedef struct tagREBARBANDINFOW
1376{
Alexandre Julliarda3960291999-02-26 11:11:13 +00001377 UINT cbSize;
1378 UINT fMask;
1379 UINT fStyle;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001380 COLORREF clrFore;
1381 COLORREF clrBack;
Eric Kohl8d2933d1998-11-22 18:12:12 +00001382 LPWSTR lpText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001383 UINT cch;
1384 INT iImage;
1385 HWND hwndChild;
1386 UINT cxMinChild;
1387 UINT cyMinChild;
1388 UINT cx;
1389 HBITMAP hbmBack;
1390 UINT wID;
1391 UINT cyChild;
1392 UINT cyMaxChild;
1393 UINT cyIntegral;
1394 UINT cxIdeal;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001395 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001396 UINT cxHeader;
1397} REBARBANDINFOW, *LPREBARBANDINFOW;
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001398
Alexandre Julliarda3960291999-02-26 11:11:13 +00001399typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001400
1401#define REBARBANDINFO WINELIB_NAME_AW(REBARBANDINFO)
1402#define LPREBARBANDINFO WINELIB_NAME_AW(LPREBARBANDINFO)
1403#define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
1404
Alexandre Julliarda3960291999-02-26 11:11:13 +00001405#define REBARBANDINFO_V3_SIZEA CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
1406#define REBARBANDINFO_V3_SIZEW CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001407#define REBARBANDINFO_V3_SIZE WINELIB_NAME_AW(REBARBANDINFO_V3_SIZE)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001408
Eric Kohl9d8e8641998-10-24 10:49:27 +00001409typedef struct tagNMREBARCHILDSIZE
1410{
1411 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001412 UINT uBand;
1413 UINT wID;
1414 RECT rcChild;
1415 RECT rcBand;
Eric Kohl9d8e8641998-10-24 10:49:27 +00001416} NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;
1417
1418typedef struct tagNMREBAR
1419{
1420 NMHDR hdr;
1421 DWORD dwMask;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001422 UINT uBand;
1423 UINT fStyle;
1424 UINT wID;
Eric Kohl9d8e8641998-10-24 10:49:27 +00001425 LPARAM lParam;
1426} NMREBAR, *LPNMREBAR;
1427
1428typedef struct tagNMRBAUTOSIZE
1429{
1430 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001431 BOOL fChanged;
1432 RECT rcTarget;
1433 RECT rcActual;
Eric Kohl9d8e8641998-10-24 10:49:27 +00001434} NMRBAUTOSIZE, *LPNMRBAUTOSIZE;
1435
1436typedef struct _RB_HITTESTINFO
1437{
Alexandre Julliarda3960291999-02-26 11:11:13 +00001438 POINT pt;
1439 UINT flags;
1440 INT iBand;
Eric Kohl9d8e8641998-10-24 10:49:27 +00001441} RBHITTESTINFO, *LPRBHITTESTINFO;
1442
Alexandre Julliard642d3131998-07-12 19:29:36 +00001443
1444/* Trackbar control */
1445
1446#define TRACKBAR_CLASS16 "msctls_trackbar"
Alexandre Julliarda3960291999-02-26 11:11:13 +00001447#define TRACKBAR_CLASSA "msctls_trackbar32"
1448#define TRACKBAR_CLASSW L"msctls_trackbar32"
Alexandre Julliard642d3131998-07-12 19:29:36 +00001449#define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
1450
1451#define TBS_AUTOTICKS 0x0001
1452#define TBS_VERT 0x0002
1453#define TBS_HORZ 0x0000
1454#define TBS_TOP 0x0004
1455#define TBS_BOTTOM 0x0000
1456#define TBS_LEFT 0x0004
1457#define TBS_RIGHT 0x0000
1458#define TBS_BOTH 0x0008
1459#define TBS_NOTICKS 0x0010
1460#define TBS_ENABLESELRANGE 0x0020
1461#define TBS_FIXEDLENGTH 0x0040
1462#define TBS_NOTHUMB 0x0080
1463#define TBS_TOOLTIPS 0x0100
1464
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001465#define TBTS_TOP 0
1466#define TBTS_LEFT 1
1467#define TBTS_BOTTOM 2
1468#define TBTS_RIGHT 3
1469
1470#define TB_LINEUP 0
1471#define TB_LINEDOWN 1
1472#define TB_PAGEUP 2
1473#define TB_PAGEDOWN 3
1474#define TB_THUMBPOSITION 4
1475#define TB_THUMBTRACK 5
1476#define TB_TOP 6
1477#define TB_BOTTOM 7
1478#define TB_ENDTRACK 8
1479
1480#define TBCD_TICS 0x0001
1481#define TBCD_THUMB 0x0002
1482#define TBCD_CHANNEL 0x0003
1483
Alexandre Julliard642d3131998-07-12 19:29:36 +00001484#define TBM_GETPOS (WM_USER)
1485#define TBM_GETRANGEMIN (WM_USER+1)
1486#define TBM_GETRANGEMAX (WM_USER+2)
1487#define TBM_GETTIC (WM_USER+3)
1488#define TBM_SETTIC (WM_USER+4)
1489#define TBM_SETPOS (WM_USER+5)
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001490#define TBM_SETRANGE (WM_USER+6)
1491#define TBM_SETRANGEMIN (WM_USER+7)
1492#define TBM_SETRANGEMAX (WM_USER+8)
1493#define TBM_CLEARTICS (WM_USER+9)
1494#define TBM_SETSEL (WM_USER+10)
1495#define TBM_SETSELSTART (WM_USER+11)
1496#define TBM_SETSELEND (WM_USER+12)
1497#define TBM_GETPTICS (WM_USER+14)
1498#define TBM_GETTICPOS (WM_USER+15)
1499#define TBM_GETNUMTICS (WM_USER+16)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001500#define TBM_GETSELSTART (WM_USER+17)
1501#define TBM_GETSELEND (WM_USER+18)
1502#define TBM_CLEARSEL (WM_USER+19)
1503#define TBM_SETTICFREQ (WM_USER+20)
1504#define TBM_SETPAGESIZE (WM_USER+21)
1505#define TBM_GETPAGESIZE (WM_USER+22)
1506#define TBM_SETLINESIZE (WM_USER+23)
1507#define TBM_GETLINESIZE (WM_USER+24)
1508#define TBM_GETTHUMBRECT (WM_USER+25)
1509#define TBM_GETCHANNELRECT (WM_USER+26)
1510#define TBM_SETTHUMBLENGTH (WM_USER+27)
1511#define TBM_GETTHUMBLENGTH (WM_USER+28)
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001512#define TBM_SETTOOLTIPS (WM_USER+29)
1513#define TBM_GETTOOLTIPS (WM_USER+30)
1514#define TBM_SETTIPSIDE (WM_USER+31)
1515#define TBM_SETBUDDY (WM_USER+32)
1516#define TBM_GETBUDDY (WM_USER+33)
1517#define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1518#define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
Alexandre Julliard642d3131998-07-12 19:29:36 +00001519
1520
1521/* Pager control */
1522
Alexandre Julliarda3960291999-02-26 11:11:13 +00001523#define WC_PAGESCROLLERA "SysPager"
1524#define WC_PAGESCROLLERW L"SysPager"
Alexandre Julliard642d3131998-07-12 19:29:36 +00001525#define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
1526
Alexandre Julliard829fe321998-07-26 14:27:39 +00001527#define PGS_VERT 0x00000000
1528#define PGS_HORZ 0x00000001
1529#define PGS_AUTOSCROLL 0x00000002
1530#define PGS_DRAGNDROP 0x00000004
1531
1532#define PGF_INVISIBLE 0
1533#define PGF_NORMAL 1
1534#define PGF_GRAYED 2
1535#define PGF_DEPRESSED 4
1536#define PGF_HOT 8
1537
1538#define PGB_TOPORLEFT 0
1539#define PGB_BOTTOMORRIGHT 1
1540
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001541/* only used with PGN_SCROLL */
1542#define PGF_SCROLLUP 1
1543#define PGF_SCROLLDOWN 2
1544#define PGF_SCROLLLEFT 4
1545#define PGF_SCROLLRIGHT 8
Alexandre Julliard829fe321998-07-26 14:27:39 +00001546
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001547#define PGK_SHIFT 1
1548#define PGK_CONTROL 2
1549#define PGK_MENU 4
1550
1551/* only used with PGN_CALCSIZE */
1552#define PGF_CALCWIDTH 1
1553#define PGF_CALCHEIGHT 2
1554
1555#define PGM_FIRST 0x1400
Alexandre Julliard829fe321998-07-26 14:27:39 +00001556#define PGM_SETCHILD (PGM_FIRST+1)
1557#define PGM_RECALCSIZE (PGM_FIRST+2)
1558#define PGM_FORWARDMOUSE (PGM_FIRST+3)
1559#define PGM_SETBKCOLOR (PGM_FIRST+4)
1560#define PGM_GETBKCOLOR (PGM_FIRST+5)
1561#define PGM_SETBORDER (PGM_FIRST+6)
1562#define PGM_GETBORDER (PGM_FIRST+7)
1563#define PGM_SETPOS (PGM_FIRST+8)
1564#define PGM_GETPOS (PGM_FIRST+9)
1565#define PGM_SETBUTTONSIZE (PGM_FIRST+10)
1566#define PGM_GETBUTTONSIZE (PGM_FIRST+11)
1567#define PGM_GETBUTTONSTATE (PGM_FIRST+12)
1568#define PGM_GETDROPTARGET CCM_GETDROPTARGET
1569
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001570#define PGN_FIRST (0U-900U)
1571#define PGN_LAST (0U-950U)
1572#define PGN_SCROLL (PGN_FIRST-1)
1573#define PGN_CALCSIZE (PGN_FIRST-2)
1574
1575typedef struct
1576{
1577 NMHDR hdr;
1578 WORD fwKeys;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001579 RECT rcParent;
1580 INT iDir;
1581 INT iXpos;
1582 INT iYpos;
1583 INT iScroll;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001584} NMPGSCROLL, *LPNMPGSCROLL;
1585
1586typedef struct
1587{
1588 NMHDR hdr;
1589 DWORD dwFlag;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001590 INT iWidth;
1591 INT iHeight;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001592} NMPGCALCSIZE, *LPNMPGCALCSIZE;
Alexandre Julliard829fe321998-07-26 14:27:39 +00001593
Alexandre Julliard642d3131998-07-12 19:29:36 +00001594
1595/* Treeview control */
1596
Alexandre Julliarda3960291999-02-26 11:11:13 +00001597#define WC_TREEVIEWA "SysTreeView32"
1598#define WC_TREEVIEWW L"SysTreeView32"
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001599#define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
Alexandre Julliard642d3131998-07-12 19:29:36 +00001600
Alexandre Julliard829fe321998-07-26 14:27:39 +00001601#define TVSIL_NORMAL 0
1602#define TVSIL_STATE 2
1603
1604#define TV_FIRST 0x1100
Alexandre Julliarda3960291999-02-26 11:11:13 +00001605#define TVM_INSERTITEMA (TV_FIRST+0)
1606#define TVM_INSERTITEMW (TV_FIRST+50)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001607#define TVM_INSERTITEM WINELIB_NAME_AW(TVM_INSERTITEM)
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001608#define TVM_DELETEITEM (TV_FIRST+1)
1609#define TVM_EXPAND (TV_FIRST+2)
1610#define TVM_GETITEMRECT (TV_FIRST+4)
1611#define TVM_GETCOUNT (TV_FIRST+5)
1612#define TVM_GETINDENT (TV_FIRST+6)
1613#define TVM_SETINDENT (TV_FIRST+7)
Alexandre Julliard829fe321998-07-26 14:27:39 +00001614#define TVM_GETIMAGELIST (TV_FIRST+8)
1615#define TVM_SETIMAGELIST (TV_FIRST+9)
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001616#define TVM_GETNEXTITEM (TV_FIRST+10)
1617#define TVM_SELECTITEM (TV_FIRST+11)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001618#define TVM_GETITEMA (TV_FIRST+12)
1619#define TVM_GETITEMW (TV_FIRST+62)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001620#define TVM_GETITEM WINELIB_NAME_AW(TVM_GETITEM)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001621#define TVM_SETITEMA (TV_FIRST+13)
1622#define TVM_SETITEMW (TV_FIRST+63)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001623#define TVM_SETITEM WINELIB_NAME_AW(TVM_SETITEM)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001624#define TVM_EDITLABELA (TV_FIRST+14)
1625#define TVM_EDITLABELW (TV_FIRST+65)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001626#define TVM_EDITLABEL WINELIB_NAME_AW(TVM_EDITLABEL)
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001627#define TVM_GETEDITCONTROL (TV_FIRST+15)
1628#define TVM_GETVISIBLECOUNT (TV_FIRST+16)
1629#define TVM_HITTEST (TV_FIRST+17)
1630#define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
1631#define TVM_SORTCHILDREN (TV_FIRST+19)
1632#define TVM_ENSUREVISIBLE (TV_FIRST+20)
1633#define TVM_SORTCHILDRENCB (TV_FIRST+21)
1634#define TVM_ENDEDITLABELNOW (TV_FIRST+22)
Alexandre Julliarda3960291999-02-26 11:11:13 +00001635#define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
1636#define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001637#define TVM_GETISEARCHSTRING WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001638#define TVM_SETTOOLTIPS (TV_FIRST+24)
1639#define TVM_GETTOOLTIPS (TV_FIRST+25)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001640#define TVM_SETINSERTMARK (TV_FIRST+26)
1641#define TVM_SETITEMHEIGHT (TV_FIRST+27)
1642#define TVM_GETITEMHEIGHT (TV_FIRST+28)
1643#define TVM_SETBKCOLOR (TV_FIRST+29)
1644#define TVM_SETTEXTCOLOR (TV_FIRST+30)
1645#define TVM_GETBKCOLOR (TV_FIRST+31)
1646#define TVM_GETTEXTCOLOR (TV_FIRST+32)
1647#define TVM_SETSCROLLTIME (TV_FIRST+33)
1648#define TVM_GETSCROLLTIME (TV_FIRST+34)
Eric Kohlb406c7d1999-01-24 19:12:34 +00001649#define TVM_UNKNOWN35 (TV_FIRST+35)
1650#define TVM_UNKNOWN36 (TV_FIRST+36)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001651#define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
1652#define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
1653#define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1654#define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1655
1656#define TVN_FIRST (0U-400U)
1657#define TVN_LAST (0U-499U)
1658
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001659#define TVN_SELCHANGING (TVN_FIRST-1)
1660#define TVN_SELCHANGED (TVN_FIRST-2)
1661#define TVN_GETDISPINFO (TVN_FIRST-3)
1662#define TVN_SETDISPINFO (TVN_FIRST-4)
1663#define TVN_ITEMEXPANDING (TVN_FIRST-5)
1664#define TVN_ITEMEXPANDED (TVN_FIRST-6)
1665#define TVN_BEGINDRAG (TVN_FIRST-7)
1666#define TVN_BEGINRDRAG (TVN_FIRST-8)
1667#define TVN_DELETEITEM (TVN_FIRST-9)
1668#define TVN_BEGINLABELEDIT (TVN_FIRST-10)
1669#define TVN_ENDLABELEDIT (TVN_FIRST-11)
1670#define TVN_KEYDOWN (TVN_FIRST-12)
1671#define TVN_GETINFOTIPA (TVN_FIRST-13)
1672#define TVN_GETINFOTIPW (TVN_FIRST-14)
1673#define TVN_SINGLEEXPAND (TVN_FIRST-15)
1674
1675
1676#define TVN_SELCHANGINGW (TVN_FIRST-50)
1677#define TVN_SELCHANGEDW (TVN_FIRST-51)
1678#define TVN_GETDISPINFOW (TVN_FIRST-52)
1679#define TVN_SETDISPINFOW (TVN_FIRST-53)
1680#define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
1681#define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
1682#define TVN_BEGINDRAGW (TVN_FIRST-56)
1683#define TVN_BEGINRDRAGW (TVN_FIRST-57)
1684#define TVN_DELETEITEMW (TVN_FIRST-58)
1685#define TVN_BEGINLABELEDITW (TVN_FIRST-59)
1686#define TVN_ENDLABELEDITW (TVN_FIRST-60)
1687
1688
1689
1690#define TVIF_TEXT 0x0001
1691#define TVIF_IMAGE 0x0002
1692#define TVIF_PARAM 0x0004
1693#define TVIF_STATE 0x0008
1694#define TVIF_HANDLE 0x0010
1695#define TVIF_SELECTEDIMAGE 0x0020
1696#define TVIF_CHILDREN 0x0040
1697#define TVIF_INTEGRAL 0x0080
1698#define TVIF_DI_SETITEM 0x1000
1699
Zygo Blaxellf861e271999-02-02 13:59:17 +00001700#define TVI_ROOT ((HTREEITEM)0xffff0000) /* -65536 */
1701#define TVI_FIRST ((HTREEITEM)0xffff0001) /* -65535 */
1702#define TVI_LAST ((HTREEITEM)0xffff0002) /* -65534 */
1703#define TVI_SORT ((HTREEITEM)0xffff0003) /* -65533 */
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001704
1705#define TVIS_FOCUSED 0x0001
1706#define TVIS_SELECTED 0x0002
1707#define TVIS_CUT 0x0004
1708#define TVIS_DROPHILITED 0x0008
1709#define TVIS_BOLD 0x0010
1710#define TVIS_EXPANDED 0x0020
1711#define TVIS_EXPANDEDONCE 0x0040
1712#define TVIS_OVERLAYMASK 0x0f00
1713#define TVIS_STATEIMAGEMASK 0xf000
1714#define TVIS_USERMASK 0xf000
1715
1716#define TVHT_NOWHERE 0x0001
1717#define TVHT_ONITEMICON 0x0002
1718#define TVHT_ONITEMLABEL 0x0004
1719#define TVHT_ONITEMINDENT 0x0008
1720#define TVHT_ONITEMBUTTON 0x0010
1721#define TVHT_ONITEMRIGHT 0x0020
1722#define TVHT_ONITEMSTATEICON 0x0040
1723#define TVHT_ONITEM 0x0046
1724#define TVHT_ABOVE 0x0100
1725#define TVHT_BELOW 0x0200
1726#define TVHT_TORIGHT 0x0400
1727#define TVHT_TOLEFT 0x0800
1728
1729#define TVS_HASBUTTONS 0x0001
1730#define TVS_HASLINES 0x0002
1731#define TVS_LINESATROOT 0x0004
1732#define TVS_EDITLABELS 0x0008
1733#define TVS_DISABLEDRAGDROP 0x0010
1734#define TVS_SHOWSELALWAYS 0x0020
1735#define TVS_RTLREADING 0x0040
1736#define TVS_NOTOOLTIPS 0x0080
1737#define TVS_CHECKBOXES 0x0100
1738#define TVS_TRACKSELECT 0x0200
1739#define TVS_SINGLEEXPAND 0x0400
1740#define TVS_INFOTIP 0x0800
1741#define TVS_FULLROWSELECT 0x1000
1742#define TVS_NOSCROLL 0x2000
1743#define TVS_NONEVENHEIGHT 0x4000
1744
1745#define TVS_SHAREDIMAGELISTS 0x0000
1746#define TVS_PRIVATEIMAGELISTS 0x0400
1747
1748
1749#define TVE_COLLAPSE 0x0001
1750#define TVE_EXPAND 0x0002
1751#define TVE_TOGGLE 0x0003
1752#define TVE_EXPANDPARTIAL 0x4000
1753#define TVE_COLLAPSERESET 0x8000
1754
1755#define TVGN_ROOT 0
1756#define TVGN_NEXT 1
1757#define TVGN_PREVIOUS 2
1758#define TVGN_PARENT 3
1759#define TVGN_CHILD 4
1760#define TVGN_FIRSTVISIBLE 5
1761#define TVGN_NEXTVISIBLE 6
1762#define TVGN_PREVIOUSVISIBLE 7
1763#define TVGN_DROPHILITE 8
1764#define TVGN_CARET 9
1765#define TVGN_LASTVISIBLE 10
1766
1767#define TVC_UNKNOWN 0x00
1768#define TVC_BYMOUSE 0x01
1769#define TVC_BYKEYBOARD 0x02
1770
1771
Zygo Blaxellf861e271999-02-02 13:59:17 +00001772typedef struct _TREEITEM *HTREEITEM;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001773
1774typedef struct {
Alexandre Julliarda3960291999-02-26 11:11:13 +00001775 UINT mask;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001776 HTREEITEM hItem;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001777 UINT state;
1778 UINT stateMask;
Eric Kohlb406c7d1999-01-24 19:12:34 +00001779 LPSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001780 INT cchTextMax;
1781 INT iImage;
1782 INT iSelectedImage;
1783 INT cChildren;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001784 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001785} TVITEMA, *LPTVITEMA;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001786
1787typedef struct {
Alexandre Julliarda3960291999-02-26 11:11:13 +00001788 UINT mask;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001789 HTREEITEM hItem;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001790 UINT state;
1791 UINT stateMask;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001792 LPWSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001793 INT cchTextMax;
1794 INT iImage;
1795 INT iSelectedImage;
1796 INT cChildren;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001797 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001798} TVITEMW, *LPTVITEMW;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001799
Zygo Blaxell50d41fa1999-02-09 14:20:05 +00001800#define TVITEM WINELIB_NAME_AW(TVITEM)
1801#define LPTVITEM WINELIB_NAME_AW(LPTVITEM)
Zygo Blaxell50d41fa1999-02-09 14:20:05 +00001802#define TV_ITEM TVITEM
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001803
1804typedef struct {
Alexandre Julliarda3960291999-02-26 11:11:13 +00001805 UINT mask;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001806 HTREEITEM hItem;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001807 UINT state;
1808 UINT stateMask;
Eric Kohlb406c7d1999-01-24 19:12:34 +00001809 LPSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001810 INT cchTextMax;
1811 INT iImage;
1812 INT iSelectedImage;
1813 INT cChildren;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001814 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001815 INT iIntegral;
1816} TVITEMEXA, *LPTVITEMEXA;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001817
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001818typedef struct {
Alexandre Julliarda3960291999-02-26 11:11:13 +00001819 UINT mask;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001820 HTREEITEM hItem;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001821 UINT state;
1822 UINT stateMask;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001823 LPWSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001824 INT cchTextMax;
1825 INT iImage;
1826 INT iSelectedImage;
1827 INT cChildren;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001828 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001829 INT iIntegral;
1830} TVITEMEXW, *LPTVITEMEXW;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001831
Zygo Blaxell50d41fa1999-02-09 14:20:05 +00001832#define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
1833#define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001834
Alexandre Julliarda3960291999-02-26 11:11:13 +00001835typedef struct tagTVINSERTSTRUCTA {
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001836 HTREEITEM hParent;
1837 HTREEITEM hInsertAfter;
Alex Priemd2d7f961999-01-30 13:02:30 +00001838 union {
Alexandre Julliarda3960291999-02-26 11:11:13 +00001839 TVITEMEXA itemex;
1840 TVITEMA item;
Alex Priemd2d7f961999-01-30 13:02:30 +00001841 } DUMMYUNIONNAME;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001842} TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001843
Alexandre Julliarda3960291999-02-26 11:11:13 +00001844typedef struct tagTVINSERTSTRUCTW {
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001845 HTREEITEM hParent;
1846 HTREEITEM hInsertAfter;
Alex Priemd2d7f961999-01-30 13:02:30 +00001847 union {
Alexandre Julliarda3960291999-02-26 11:11:13 +00001848 TVITEMEXW itemex;
1849 TVITEMW item;
Alex Priemd2d7f961999-01-30 13:02:30 +00001850 } DUMMYUNIONNAME;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001851} TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
Paul Quinn1beaae51998-12-15 15:38:36 +00001852
Zygo Blaxell50d41fa1999-02-09 14:20:05 +00001853#define TV_INSERTSTRUCT WINELIB_NAME_AW(TVINSERTSTRUCT)
1854#define LPTV_INSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001855
Alexandre Julliarda3960291999-02-26 11:11:13 +00001856#define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
1857#define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
Alex Priemd2d7f961999-01-30 13:02:30 +00001858#define TVINSERTSTRUCT_V1_SIZE WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)
1859
1860
1861
Alexandre Julliarda3960291999-02-26 11:11:13 +00001862typedef struct tagNMTREEVIEWA {
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001863 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001864 UINT action;
1865 TVITEMA itemOld;
1866 TVITEMA itemNew;
1867 POINT ptDrag;
1868} NMTREEVIEWA, *LPNMTREEVIEWA;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001869
Alexandre Julliarda3960291999-02-26 11:11:13 +00001870typedef struct tagNMTREEVIEWW {
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001871 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001872 UINT action;
1873 TVITEMW itemOld;
1874 TVITEMW itemNew;
1875 POINT ptDrag;
1876} NMTREEVIEWW, *LPNMTREEVIEWW;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001877
Alex Priemd2d7f961999-01-30 13:02:30 +00001878#define NMTREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
Alexandre Julliarde32be241999-02-10 06:43:59 +00001879#define NM_TREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
Alex Priemd2d7f961999-01-30 13:02:30 +00001880#define LPNMTREEVIEW WINELIB_NAME_AW(LPNMTREEVIEW)
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001881
Alexandre Julliarda3960291999-02-26 11:11:13 +00001882typedef struct tagTVDISPINFOA {
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001883 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001884 TVITEMA item;
1885} NMTVDISPINFOA, *LPNMTVDISPINFOA;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001886
Alexandre Julliarda3960291999-02-26 11:11:13 +00001887typedef struct tagTVDISPINFOW {
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001888 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001889 TVITEMW item;
1890} NMTVDISPINFOW, *LPNMTVDISPINFOW;
Juergen Schmied26ff83d1999-01-26 10:35:53 +00001891
Alex Priemd2d7f961999-01-30 13:02:30 +00001892#define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
1893#define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
1894#define TV_DISPINFO NMTVDISPINFO
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001895
Alexandre Julliarda3960291999-02-26 11:11:13 +00001896typedef INT (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001897
Paul Quinn1beaae51998-12-15 15:38:36 +00001898typedef struct tagTVSORTCB
1899{
1900 HTREEITEM hParent;
1901 PFNTVCOMPARE lpfnCompare;
1902 LPARAM lParam;
1903} TVSORTCB, *LPTVSORTCB;
1904
1905#define TV_SORTCB TVSORTCB
1906#define LPTV_SORTCB LPTVSORTCB
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001907
1908typedef struct tagTVHITTESTINFO {
Alexandre Julliarda3960291999-02-26 11:11:13 +00001909 POINT pt;
1910 UINT flags;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001911 HTREEITEM hItem;
1912} TVHITTESTINFO, *LPTVHITTESTINFO;
1913
Paul Quinn1beaae51998-12-15 15:38:36 +00001914#define TV_HITTESTINFO TVHITTESTINFO
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001915
Alex Priemd2d7f961999-01-30 13:02:30 +00001916
1917/* Custom Draw Treeview */
1918
1919#define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
1920
1921#define TVCDRF_NOIMAGES 0x00010000
1922
1923typedef struct tagNMTVCUSTOMDRAW
1924{
1925 NMCUSTOMDRAW nmcd;
1926 COLORREF clrText;
1927 COLORREF clrTextBk;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001928 INT iLevel; /* IE>0x0400 */
Alex Priemd2d7f961999-01-30 13:02:30 +00001929} NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
1930
1931/* Treeview tooltips */
1932
Alexandre Julliarda3960291999-02-26 11:11:13 +00001933typedef struct tagNMTVGETINFOTIPA
Alex Priemd2d7f961999-01-30 13:02:30 +00001934{
1935 NMHDR hdr;
1936 LPSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001937 INT cchTextMax;
Alex Priemd2d7f961999-01-30 13:02:30 +00001938 HTREEITEM hItem;
1939 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001940} NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
Alex Priemd2d7f961999-01-30 13:02:30 +00001941
Alexandre Julliarda3960291999-02-26 11:11:13 +00001942typedef struct tagNMTVGETINFOTIPW
Alex Priemd2d7f961999-01-30 13:02:30 +00001943{
1944 NMHDR hdr;
1945 LPWSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001946 INT cchTextMax;
Alex Priemd2d7f961999-01-30 13:02:30 +00001947 HTREEITEM hItem;
1948 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001949} NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
Alex Priemd2d7f961999-01-30 13:02:30 +00001950
1951
1952
1953
1954
Alexandre Julliarda3960291999-02-26 11:11:13 +00001955
1956
1957#define TreeView_InsertItemA(hwnd, phdi) \
1958 (INT)SendMessageA((hwnd), TVM_INSERTITEMA, 0, \
1959 (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001960#define TreeView_DeleteItem(hwnd, hItem) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00001961 (BOOL)SendMessageA((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001962#define TreeView_DeleteAllItems(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00001963 (BOOL)SendMessageA((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001964#define TreeView_Expand(hwnd, hitem, code) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00001965 (BOOL)SendMessageA((hwnd), TVM_EXPAND, (WPARAM)code, \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001966 (LPARAM)(HTREEITEM)(hitem))
1967
1968#define TreeView_GetItemRect(hwnd, hitem, prc, code) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00001969 (*(HTREEITEM *)prc = (hitem), (BOOL)SendMessageA((hwnd), \
1970 TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001971
1972#define TreeView_GetCount(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00001973 (UINT)SendMessageA((hwnd), TVM_GETCOUNT, 0, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001974#define TreeView_GetIndent(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00001975 (UINT)SendMessageA((hwnd), TVM_GETINDENT, 0, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001976#define TreeView_SetIndent(hwnd, indent) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00001977 (BOOL)SendMessageA((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001978
1979#define TreeView_GetImageList(hwnd, iImage) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00001980 (HIMAGELIST)SendMessageA((hwnd), TVM_GETIMAGELIST, iImage, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001981
1982#define TreeView_SetImageList(hwnd, himl, iImage) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00001983 (HIMAGELIST)SendMessageA((hwnd), TVM_SETIMAGELIST, iImage, \
1984 (LPARAM)(UINT)(HIMAGELIST)(himl))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001985
1986#define TreeView_GetNextItem(hwnd, hitem, code) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00001987 (HTREEITEM)SendMessageA((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001988(LPARAM)(HTREEITEM) (hitem))
1989
1990#define TreeView_GetChild(hwnd, hitem) \
1991 TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
1992#define TreeView_GetNextSibling(hwnd, hitem) \
1993 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
1994#define TreeView_GetPrevSibling(hwnd, hitem) \
1995 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
1996#define TreeView_GetParent(hwnd, hitem) \
1997 TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
1998#define TreeView_GetFirstVisible(hwnd) \
1999 TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
2000#define TreeView_GetLastVisible(hwnd) \
2001 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2002#define TreeView_GetNextVisible(hwnd, hitem) \
2003 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
2004#define TreeView_GetPrevVisible(hwnd, hitem) \
2005 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
2006#define TreeView_GetSelection(hwnd) \
2007 TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
2008#define TreeView_GetDropHilight(hwnd) \
2009 TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
2010#define TreeView_GetRoot(hwnd) \
2011 TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
2012#define TreeView_GetLastVisible(hwnd) \
2013 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2014
2015
2016#define TreeView_Select(hwnd, hitem, code) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002017 (UINT)SendMessageA((hwnd), TVM_SELECTITEM, (WPARAM)code, \
2018(LPARAM)(UINT)(hitem))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002019
2020
2021#define TreeView_SelectItem(hwnd, hitem) \
2022 TreeView_Select(hwnd, hitem, TVGN_CARET)
2023#define TreeView_SelectDropTarget(hwnd, hitem) \
2024 TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
2025/* FIXME
2026#define TreeView_SelectSetFirstVisible(hwnd, hitem) \
2027 TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
2028*/
2029
Alexandre Julliarda3960291999-02-26 11:11:13 +00002030#define TreeView_GetItemA(hwnd, pitem) \
2031 (BOOL)SendMessageA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002032
Alexandre Julliarda3960291999-02-26 11:11:13 +00002033#define TreeView_SetItemA(hwnd, pitem) \
2034 (BOOL)SendMessageA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002035
2036#define TreeView_EditLabel(hwnd, hitem) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002037 (HWND)SendMessageA((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002038
2039
2040#define TreeView_GetEditControl(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002041 (HWND)SendMessageA((hwnd), TVM_GETEDITCONTROL, 0, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002042
2043#define TreeView_GetVisibleCount(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002044 (UINT)SendMessageA((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002045
2046#define TreeView_HitTest(hwnd, lpht) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002047 (HTREEITEM)SendMessageA((hwnd), TVM_HITTEST, 0,\
Juergen Schmied26ff83d1999-01-26 10:35:53 +00002048(LPARAM)(LPTVHITTESTINFO)(lpht))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002049
2050#define TreeView_CreateDragImage(hwnd, hitem) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002051 (HIMAGELIST)SendMessageA((hwnd), TVM_CREATEDRAGIMAGE, 0,\
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002052(LPARAM)(HTREEITEM)(hitem))
2053
2054#define TreeView_SortChildren(hwnd, hitem, recurse) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002055 (BOOL)SendMessageA((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002056(LPARAM)(HTREEITEM)(hitem))
2057
2058#define TreeView_EnsureVisible(hwnd, hitem) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002059 (BOOL)SendMessageA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002060
2061#define TreeView_SortChildrenCB(hwnd, psort, recurse) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002062 (BOOL)SendMessageA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002063 (LPARAM)(LPTV_SORTCB)(psort))
2064
2065#define TreeView_EndEditLabelNow(hwnd, fCancel) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002066 (BOOL)SendMessageA((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002067
2068#define TreeView_GetISearchString(hwndTV, lpsz) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002069 (BOOL)SendMessageA((hwndTV), TVM_GETISEARCHSTRING, 0, \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002070 (LPARAM)(LPTSTR)lpsz)
2071
2072#define TreeView_SetItemHeight(hwnd, iHeight) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002073 (INT)SendMessageA((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002074#define TreeView_GetItemHeight(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002075 (INT)SendMessageA((hwnd), TVM_GETITEMHEIGHT, 0, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002076
2077#define TreeView_SetBkColor(hwnd, clr) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002078 (COLORREF)SendMessageA((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002079
2080#define TreeView_SetTextColor(hwnd, clr) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002081 (COLORREF)SendMessageA((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002082
2083#define TreeView_GetBkColor(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002084 (COLORREF)SendMessageA((hwnd), TVM_GETBKCOLOR, 0, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002085
2086#define TreeView_GetTextColor(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002087 (COLORREF)SendMessageA((hwnd), TVM_GETTEXTCOLOR, 0, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002088
2089#define TreeView_SetScrollTime(hwnd, uTime) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002090 (UINT)SendMessageA((hwnd), TVM_SETSCROLLTIME, uTime, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002091
2092#define TreeView_GetScrollTime(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002093 (UINT)SendMessageA((hwnd), TVM_GETSCROLLTIME, 0, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002094
2095#define TreeView_SetInsertMarkColor(hwnd, clr) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002096 (COLORREF)SendMessageA((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002097#define TreeView_GetInsertMarkColor(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002098 (COLORREF)SendMessageA((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002099
2100
2101
2102
2103
2104
2105
2106
Alexandre Julliard642d3131998-07-12 19:29:36 +00002107
2108/* Listview control */
2109
Alexandre Julliarda3960291999-02-26 11:11:13 +00002110#define WC_LISTVIEWA "SysListView32"
2111#define WC_LISTVIEWW L"SysListView32"
Alexandre Julliard642d3131998-07-12 19:29:36 +00002112#define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
2113
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002114#define LVS_ICON 0x0000
2115#define LVS_REPORT 0x0001
2116#define LVS_SMALLICON 0x0002
2117#define LVS_LIST 0x0003
2118#define LVS_TYPEMASK 0x0003
2119#define LVS_SINGLESEL 0x0004
2120#define LVS_SHOWSELALWAYS 0x0008
2121#define LVS_SORTASCENDING 0x0010
2122#define LVS_SORTDESCENDING 0x0020
2123#define LVS_SHAREIMAGELISTS 0x0040
2124#define LVS_NOLABELWRAP 0x0080
2125#define LVS_AUTOARRANGE 0x0100
2126#define LVS_EDITLABELS 0x0200
2127#define LVS_OWNERDATA 0x1000
2128#define LVS_NOSCROLL 0x2000
2129#define LVS_TYPESTYLEMASK 0xfc00
2130#define LVS_ALIGNTOP 0x0000
2131#define LVS_ALIGNLEFT 0x0800
2132#define LVS_ALIGNMASK 0x0c00
2133#define LVS_OWNERDRAWFIXED 0x0400
2134#define LVS_NOCOLUMNHEADER 0x4000
2135#define LVS_NOSORTHEADER 0x8000
2136
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002137#define LVCF_FMT 0x0001
2138#define LVCF_WIDTH 0x0002
2139#define LVCF_TEXT 0x0004
2140#define LVCF_SUBITEM 0x0008
2141#define LVCF_IMAGE 0x0010
2142#define LVCF_ORDER 0x0020
2143
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002144#define LVCFMT_LEFT 0x0000
2145#define LVCFMT_RIGHT 0x0001
2146#define LVCFMT_CENTER 0x0002
2147#define LVCFMT_JUSTIFYMASK 0x0003
2148#define LVCFMT_IMAGE 0x0800
2149#define LVCFMT_BITMAP_ON_RIGHT 0x1000
2150#define LVCFMT_COL_HAS_IMAGES 0x8000
2151
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002152#define LVSIL_NORMAL 0
2153#define LVSIL_SMALL 1
2154#define LVSIL_STATE 2
2155
Luc Tourangeauce2b1411999-02-17 12:58:48 +00002156#define LVIS_FOCUSED 0x0001
2157#define LVIS_SELECTED 0x0002
2158#define LVIS_CUT 0x0004
2159#define LVIS_DROPHILITED 0x0008
2160#define LVIS_ACTIVATING 0x0020
2161
2162#define LVFI_PARAM 0X0001
2163#define LVFI_STRING 0X0002
2164#define LVFI_PARTIAL 0X0008
2165#define LVFI_WRAP 0X0020
2166#define LVFI_NEARESTXY 0X0040
2167
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002168#define LVIF_TEXT 0x0001
2169#define LVIF_IMAGE 0x0002
2170#define LVIF_PARAM 0x0004
2171#define LVIF_STATE 0x0008
2172#define LVIF_INDENT 0x0010
2173#define LVIF_NORECOMPUTE 0x0800
Luc Tourangeau4d6df2c1999-03-12 17:31:08 +00002174#define LVIF_DI_SETITEM 0x1000
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002175
Luc Tourangeauce2b1411999-02-17 12:58:48 +00002176#define LVIR_BOUNDS 0x0000
2177#define LVIR_LABEL 0x0002
2178#define LVIR_ICON 0x0001
2179#define LVIR_SELECTBOUNDS 0x0003
2180
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002181#define LVIS_FOCUSED 0x0001
2182#define LVIS_SELECTED 0x0002
2183#define LVIS_CUT 0x0004
2184#define LVIS_DROPHILITED 0x0008
2185#define LVIS_ACTIVATING 0x0020
2186
2187#define LVIS_OVERLAYMASK 0x0F00
2188#define LVIS_STATEIMAGEMASK 0xF000
2189
Eric Kohl9d8e8641998-10-24 10:49:27 +00002190#define LVNI_ALL 0x0000
2191#define LVNI_FOCUSED 0x0001
2192#define LVNI_SELECTED 0x0002
2193#define LVNI_CUT 0x0004
2194#define LVNI_DROPHILITED 0x0008
2195
2196#define LVNI_ABOVE 0x0100
2197#define LVNI_BELOW 0x0200
2198#define LVNI_TOLEFT 0x0400
2199#define LVNI_TORIGHT 0x0800
2200
Eric Kohla8670301998-11-08 11:30:27 +00002201#define LVHT_NOWHERE 0x0001
2202#define LVHT_ONITEMICON 0x0002
2203#define LVHT_ONITEMLABEL 0x0004
2204#define LVHT_ONITEMSTATEICON 0x0008
2205#define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
2206
2207#define LVHT_ABOVE 0x0008
2208#define LVHT_BELOW 0x0010
2209#define LVHT_TORIGHT 0x0020
2210#define LVHT_TOLEFT 0x0040
2211
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002212#define LVM_FIRST 0x1000
2213#define LVM_GETBKCOLOR (LVM_FIRST+0)
2214#define LVM_SETBKCOLOR (LVM_FIRST+1)
2215#define LVM_GETIMAGELIST (LVM_FIRST+2)
2216#define LVM_SETIMAGELIST (LVM_FIRST+3)
2217#define LVM_GETITEMCOUNT (LVM_FIRST+4)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002218#define LVM_GETITEMA (LVM_FIRST+5)
2219#define LVM_GETITEMW (LVM_FIRST+75)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002220#define LVM_GETITEM WINELIB_NAME_AW(LVM_GETITEM)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002221#define LVM_SETITEMA (LVM_FIRST+6)
2222#define LVM_SETITEMW (LVM_FIRST+76)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002223#define LVM_SETITEM WINELIB_NAME_AW(LVM_SETITEM)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002224#define LVM_INSERTITEMA (LVM_FIRST+7)
2225#define LVM_INSERTITEMW (LVM_FIRST+77)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002226#define LVM_INSERTITEM WINELIB_NAME_AW(LVM_INSERTITEM)
2227#define LVM_DELETEITEM (LVM_FIRST+8)
2228#define LVM_DELETEALLITEMS (LVM_FIRST+9)
2229#define LVM_GETCALLBACKMASK (LVM_FIRST+10)
2230#define LVM_SETCALLBACKMASK (LVM_FIRST+11)
2231#define LVM_GETNEXTITEM (LVM_FIRST+12)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002232#define LVM_FINDITEMA (LVM_FIRST+13)
2233#define LVM_FINDITEMW (LVM_FIRST+83)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002234#define LVM_FINDITEM WINELIB_NAME_AW(LVM_FINDITEM)
2235#define LVM_GETITEMRECT (LVM_FIRST+14)
Alexandre Julliard73cc3ba1999-03-13 17:12:07 +00002236#define LVM_SETITEMPOSITION (LVM_FIRST+15)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002237#define LVM_GETITEMPOSITION (LVM_FIRST+16)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002238#define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
2239#define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002240#define LVM_GETSTRINGWIDTH WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
2241#define LVM_HITTEST (LVM_FIRST+18)
2242#define LVM_ENSUREVISIBLE (LVM_FIRST+19)
2243#define LVM_SCROLL (LVM_FIRST+20)
2244#define LVM_REDRAWITEMS (LVM_FIRST+21)
2245#define LVM_ARRANGE (LVM_FIRST+22)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002246#define LVM_EDITLABELA (LVM_FIRST+23)
2247#define LVM_EDITLABELW (LVM_FIRST+118)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002248#define LVM_EDITLABEL WINELIB_NAME_AW(LVM_EDITLABEL)
2249#define LVM_GETEDITCONTROL (LVM_FIRST+24)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002250#define LVM_GETCOLUMNA (LVM_FIRST+25)
2251#define LVM_GETCOLUMNW (LVM_FIRST+95)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002252#define LVM_GETCOLUMN WINELIB_NAME_AW(LVM_GETCOLUMN)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002253#define LVM_SETCOLUMNA (LVM_FIRST+26)
2254#define LVM_SETCOLUMNW (LVM_FIRST+96)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002255#define LVM_SETCOLUMN WINELIB_NAME_AW(LVM_SETCOLUMN)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002256#define LVM_INSERTCOLUMNA (LVM_FIRST+27)
2257#define LVM_INSERTCOLUMNW (LVM_FIRST+97)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002258#define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
2259#define LVM_DELETECOLUMN (LVM_FIRST+28)
2260#define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002261#define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
2262#define LVM_GETHEADER (LVM_FIRST+31)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002263
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002264#define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
2265#define LVM_GETVIEWRECT (LVM_FIRST+34)
2266#define LVM_GETTEXTCOLOR (LVM_FIRST+35)
2267#define LVM_SETTEXTCOLOR (LVM_FIRST+36)
2268#define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
2269#define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
2270#define LVM_GETTOPINDEX (LVM_FIRST+39)
2271#define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
2272#define LVM_GETORIGIN (LVM_FIRST+41)
2273#define LVM_UPDATE (LVM_FIRST+42)
2274#define LVM_SETITEMSTATE (LVM_FIRST+43)
2275#define LVM_GETITEMSTATE (LVM_FIRST+44)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002276#define LVM_GETITEMTEXTA (LVM_FIRST+45)
2277#define LVM_GETITEMTEXTW (LVM_FIRST+115)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002278#define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002279#define LVM_SETITEMTEXTA (LVM_FIRST+46)
2280#define LVM_SETITEMTEXTW (LVM_FIRST+116)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002281#define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
2282#define LVM_SETITEMCOUNT (LVM_FIRST+47)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002283#define LVM_SORTITEMS (LVM_FIRST+48)
Alexandre Julliard73cc3ba1999-03-13 17:12:07 +00002284#define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002285#define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002286#define LVM_GETITEMSPACING (LVM_FIRST+51)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002287#define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
2288#define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002289#define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
2290#define LVM_SETICONSPACING (LVM_FIRST+53)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002291#define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
2292#define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002293#define LVM_GETSUBITEMRECT (LVM_FIRST+56)
2294#define LVM_SUBITEMHITTEST (LVM_FIRST+57)
2295#define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
2296#define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
2297#define LVM_SETHOTITEM (LVM_FIRST+60)
2298#define LVM_GETHOTITEM (LVM_FIRST+61)
2299#define LVM_SETHOTCURSOR (LVM_FIRST+62)
2300#define LVM_GETHOTCURSOR (LVM_FIRST+63)
2301#define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
2302#define LVM_SETWORKAREAS (LVM_FIRST+65)
2303#define LVM_GETSELECTIONMARK (LVM_FIRST+66)
2304#define LVM_SETSELECTIONMARK (LVM_FIRST+67)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002305#define LVM_SETBKIMAGEA (LVM_FIRST+68)
2306#define LVM_SETBKIMAGEW (LVM_FIRST+138)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002307#define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002308#define LVM_GETBKIMAGEA (LVM_FIRST+69)
2309#define LVM_GETBKIMAGEW (LVM_FIRST+139)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002310#define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
2311#define LVM_GETWORKAREAS (LVM_FIRST+70)
2312#define LVM_SETHOVERTIME (LVM_FIRST+71)
2313#define LVM_GETHOVERTIME (LVM_FIRST+72)
2314#define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
2315#define LVM_SETTOOLTIPS (LVM_FIRST+74)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002316
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002317#define LVM_GETTOOLTIPS (LVM_FIRST+78)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002318
2319#define LVN_FIRST (0U-100U)
2320#define LVN_LAST (0U-199U)
2321#define LVN_ITEMCHANGING (LVN_FIRST-0)
2322#define LVN_ITEMCHANGED (LVN_FIRST-1)
2323#define LVN_INSERTITEM (LVN_FIRST-2)
2324#define LVN_DELETEITEM (LVN_FIRST-3)
2325#define LVN_DELETEALLITEMS (LVN_FIRST-4)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002326#define LVN_BEGINLABELEDITA (LVN_FIRST-5)
2327#define LVN_BEGINLABELEDITW (LVN_FIRST-75)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002328#define LVN_BEGINLABELEDIT WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002329#define LVN_ENDLABELEDITA (LVN_FIRST-6)
2330#define LVN_ENDLABELEDITW (LVN_FIRST-76)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002331#define LVN_ENDLABELEDIT WINELIB_NAME_AW(LVN_ENDLABELEDIT)
2332#define LVN_COLUMNCLICK (LVN_FIRST-8)
2333#define LVN_BEGINDRAG (LVN_FIRST-9)
2334#define LVN_BEGINRDRAG (LVN_FIRST-11)
2335#define LVN_ODCACHEHINT (LVN_FIRST-13)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002336#define LVN_ODFINDITEMA (LVN_FIRST-52)
2337#define LVN_ODFINDITEMW (LVN_FIRST-79)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002338#define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
2339#define LVN_ITEMACTIVATE (LVN_FIRST-14)
2340#define LVN_ODSTATECHANGED (LVN_FIRST-15)
2341#define LVN_HOTTRACK (LVN_FIRST-21)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002342#define LVN_GETDISPINFOA (LVN_FIRST-50)
2343#define LVN_GETDISPINFOW (LVN_FIRST-77)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002344#define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002345#define LVN_SETDISPINFOA (LVN_FIRST-51)
2346#define LVN_SETDISPINFOW (LVN_FIRST-78)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002347#define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
2348
Luc Tourangeauce2b1411999-02-17 12:58:48 +00002349#define LVA_ALIGNLEFT 0x0000
2350#define LVA_DEFAULT 0x0001
2351#define LVA_ALIGNTOP 0x0002
2352#define LVA_SNAPTOGRID 0x0005
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002353
2354typedef struct tagLVITEMA
2355{
Alexandre Julliarda3960291999-02-26 11:11:13 +00002356 UINT mask;
2357 INT iItem;
2358 INT iSubItem;
2359 UINT state;
2360 UINT stateMask;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002361 LPSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002362 INT cchTextMax;
2363 INT iImage;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002364 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002365 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2366} LVITEMA, *LPLVITEMA;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002367
2368typedef struct tagLVITEMW
2369{
Alexandre Julliarda3960291999-02-26 11:11:13 +00002370 UINT mask;
2371 INT iItem;
2372 INT iSubItem;
2373 UINT state;
2374 UINT stateMask;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002375 LPWSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002376 INT cchTextMax;
2377 INT iImage;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002378 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002379 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2380} LVITEMW, *LPLVITEMW;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002381
Alexandre Julliard8da12c41999-01-17 16:55:11 +00002382#define LVITEM WINELIB_NAME_AW(LVITEM)
2383#define LPLVITEM WINELIB_NAME_AW(LPLVITEM)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002384
Alexandre Julliarda3960291999-02-26 11:11:13 +00002385#define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
2386#define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002387#define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
2388
2389#define LV_ITEM LVITEM
2390
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002391typedef struct tagLVCOLUMNA
2392{
Alexandre Julliarda3960291999-02-26 11:11:13 +00002393 UINT mask;
2394 INT fmt;
2395 INT cx;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002396 LPSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002397 INT cchTextMax;
2398 INT iSubItem;
2399 INT iImage; /* (_WIN32_IE >= 0x0300) */
2400 INT iOrder; /* (_WIN32_IE >= 0x0300) */
2401} LVCOLUMNA, *LPLVCOLUMNA;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002402
2403typedef struct tagLVCOLUMNW
2404{
Alexandre Julliarda3960291999-02-26 11:11:13 +00002405 UINT mask;
2406 INT fmt;
2407 INT cx;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002408 LPWSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002409 INT cchTextMax;
2410 INT iSubItem;
2411 INT iImage; /* (_WIN32_IE >= 0x0300) */
2412 INT iOrder; /* (_WIN32_IE >= 0x0300) */
2413} LVCOLUMNW, *LPLVCOLUMNW;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002414
2415#define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
2416#define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)
2417
Alexandre Julliarda3960291999-02-26 11:11:13 +00002418#define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
2419#define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002420#define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)
2421
2422#define LV_COLUMN LVCOLUMN
2423
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002424
2425typedef struct tagNMLISTVIEW
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002426{
2427 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002428 INT iItem;
2429 INT iSubItem;
2430 UINT uNewState;
2431 UINT uOldState;
2432 UINT uChanged;
2433 POINT ptAction;
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002434 LPARAM lParam;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002435} NMLISTVIEW, *LPNMLISTVIEW;
2436
2437#define LPNM_LISTVIEW LPNMLISTVIEW
2438#define NM_LISTVIEW NMLISTVIEW
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002439
2440
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002441typedef struct tagLVDISPINFO
2442{
2443 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002444 LVITEMA item;
2445} NMLVDISPINFOA, *LPNMLVDISPINFOA;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002446
2447typedef struct tagLVDISPINFOW
2448{
2449 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002450 LVITEMW item;
2451} NMLVDISPINFOW, *LPNMLVDISPINFOW;
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002452
2453#define NMLVDISPINFO WINELIB_NAME_AW(NMLVDISPINFO)
2454#define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002455
2456#define LV_DISPINFO NMLVDISPINFO
2457
Alexandre Julliarde32be241999-02-10 06:43:59 +00002458#define LVN_KEYDOWN (LVN_FIRST-55)
2459
2460typedef struct tagLVKEYDOWN
2461{
2462 NMHDR hdr;
2463 WORD wVKey;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002464 UINT flags;
Alexandre Julliarde32be241999-02-10 06:43:59 +00002465} NMLVKEYDOWN, *LPNMLVKEYDOWN;
2466
2467#define LV_KEYDOWN NMLVKEYDOWN
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002468
Eric Kohla8670301998-11-08 11:30:27 +00002469typedef struct tagLVHITTESTINFO
2470{
Alexandre Julliarda3960291999-02-26 11:11:13 +00002471 POINT pt;
2472 UINT flags;
2473 INT iItem;
2474 INT iSubItem;
Eric Kohla8670301998-11-08 11:30:27 +00002475} LVHITTESTINFO, *LPLVHITTESTINFO;
2476
2477#define LV_HITTESTINFO LVHITTESTINFO
2478#define _LV_HITTESTINFO tagLVHITTESTINFO
2479#define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
2480
Paul Quinn1beaae51998-12-15 15:38:36 +00002481typedef struct tagLVFINDINFO
2482{
Alexandre Julliarda3960291999-02-26 11:11:13 +00002483 UINT flags;
Paul Quinn1beaae51998-12-15 15:38:36 +00002484 LPCSTR psz;
2485 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002486 POINT pt;
2487 UINT vkDirection;
Paul Quinn1beaae51998-12-15 15:38:36 +00002488} LVFINDINFO, *LPLVFINDINFO;
2489
2490#define LV_FINDINFO LVFINDINFO
2491
2492typedef struct tagTCHITTESTINFO
2493{
Alexandre Julliarda3960291999-02-26 11:11:13 +00002494 POINT pt;
2495 UINT flags;
Paul Quinn1beaae51998-12-15 15:38:36 +00002496} TCHITTESTINFO, *LPTCHITTESTINFO;
2497
2498#define TC_HITTESTINFO TCHITTESTINFO
2499
Alexandre Julliarda3960291999-02-26 11:11:13 +00002500typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00002501
Luc Tourangeau4d6df2c1999-03-12 17:31:08 +00002502#define ListView_Arrange(hwnd,code) \
2503 (INT)SendMessageA((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
2504#define ListView_GetItemPosition(hwnd,i,ppt) \
2505 (INT)SendMessageA((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
2506#define ListView_GetItemRect(hwnd,i,prc) \
2507 (INT)SendMessageA((hwnd),LVM_GETITEMRECT,(WPARAM)(INT)(i),(LPARAM)(LPRECT)(prc))
2508#define ListView_SetItemA(hwnd,pitem) \
2509 (INT)SendMessageA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
2510#define ListView_SetItemState(hwnd,i,pitem) \
2511 (BOOL)SendMessageA((hwnd),LVM_SETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(LPLVITEMA)(pitem))
2512#define ListView_GetItemState(hwnd,i,mask) \
2513 (BOOL)SendMessageA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
2514#define ListView_GetCountPerPage(hwnd) \
2515 (BOOL)SendMessageW((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
2516#define ListView_GetImageList(hwnd,iImageList) \
2517 (HIMAGELIST)SendMessageA((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
2518#define ListView_GetStringWidthA(hwnd,pstr) \
2519 (INT)SendMessageA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
2520#define ListView_GetTopIndex(hwnd) \
2521 (BOOL)SendMessageA((hwnd),LVM_GETTOPINDEX,0,0L)
2522#define ListView_Scroll(hwnd,dx,dy) \
2523 (BOOL)SendMessageA((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
2524#define ListView_EnsureVisible(hwnd,i,fPartialOk) \
2525 (BOOL)SendMessageA((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002526#define ListView_SetBkColor(hwnd,clrBk) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002527 (BOOL)SendMessageA((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002528#define ListView_GetImageList(hwnd,iImageList) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002529 (HIMAGELIST)SendMessageA((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002530#define ListView_SetImageList(hwnd,himl,iImageList) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002531 (HIMAGELIST)(UINT)SendMessageA((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(UINT)(HIMAGELIST)(himl))
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002532#define ListView_GetItemCount(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002533 (INT)SendMessageA((hwnd),LVM_GETITEMCOUNT,0,0L)
2534#define ListView_GetItemA(hwnd,pitem) \
2535 (BOOL)SendMessageA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
2536#define ListView_GetItemW(hwnd,pitem) \
2537 (BOOL)SendMessageW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002538#define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
Eric Kohla8670301998-11-08 11:30:27 +00002539#define ListView_HitTest(hwnd,pinfo) \
Luc Tourangeau4d6df2c1999-03-12 17:31:08 +00002540 (INT)SendMessageA((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
Alexandre Julliarda3960291999-02-26 11:11:13 +00002541#define ListView_InsertItemA(hwnd,pitem) \
2542 (INT)SendMessageA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
2543#define ListView_InsertItemW(hwnd,pitem) \
2544 (INT)SendMessageW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002545#define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
2546#define ListView_DeleteAllItems(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002547 (BOOL)SendMessageA((hwnd),LVM_DELETEALLITEMS,0,0L)
2548#define ListView_InsertColumnA(hwnd,iCol,pcol) \
2549 (INT)SendMessageA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
2550#define ListView_InsertColumnW(hwnd,iCol,pcol) \
2551 (INT)SendMessageW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002552#define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
2553#define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002554 (BOOL)SendMessageA((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002555#define ListView_SetItemPosition(hwndLV, i, x, y) \
Alexandre Julliard73cc3ba1999-03-13 17:12:07 +00002556 (BOOL)SendMessageA((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002557#define ListView_GetSelectedCount(hwndLV) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002558 (UINT)SendMessageA((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002559
2560
Eric Kohl9d8e8641998-10-24 10:49:27 +00002561/* Tab Control */
2562
2563#define WC_TABCONTROL16 "SysTabControl"
Alexandre Julliarda3960291999-02-26 11:11:13 +00002564#define WC_TABCONTROLA "SysTabControl32"
2565#define WC_TABCONTROLW L"SysTabControl32"
Eric Kohl9d8e8641998-10-24 10:49:27 +00002566
2567#define WC_TABCONTROL WINELIB_NAME_AW(WC_TABCONTROL)
2568
Paul Quinn1beaae51998-12-15 15:38:36 +00002569/* tab control styles */
Marcus Meissner73458b01998-12-26 12:54:29 +00002570#define TCS_SCROLLOPPOSITE 0x0001 /* assumes multiline tab */
Paul Quinn1beaae51998-12-15 15:38:36 +00002571#define TCS_BOTTOM 0x0002
2572#define TCS_RIGHT 0x0002
Marcus Meissner73458b01998-12-26 12:54:29 +00002573#define TCS_MULTISELECT 0x0004 /* allow multi-select in button mode */
Alex Priemd2d7f961999-01-30 13:02:30 +00002574#define TCS_FLATBUTTONS 0x0008
Paul Quinn1beaae51998-12-15 15:38:36 +00002575#define TCS_FORCEICONLEFT 0x0010
2576#define TCS_FORCELABELLEFT 0x0020
2577#define TCS_HOTTRACK 0x0040
2578#define TCS_VERTICAL 0x0080
2579#define TCS_TABS 0x0000
2580#define TCS_BUTTONS 0x0100
2581#define TCS_SINGLELINE 0x0000
2582#define TCS_MULTILINE 0x0200
2583#define TCS_RIGHTJUSTIFY 0x0000
2584#define TCS_FIXEDWIDTH 0x0400
2585#define TCS_RAGGEDRIGHT 0x0800
2586#define TCS_FOCUSONBUTTONDOWN 0x1000
2587#define TCS_OWNERDRAWFIXED 0x2000
2588#define TCS_TOOLTIPS 0x4000
2589#define TCS_FOCUSNEVER 0x8000
Alex Priemd2d7f961999-01-30 13:02:30 +00002590#define TCS_EX_FLATSEPARATORS 0x00000001 /* to be used with */
2591#define TCS_EX_REGISTERDROP 0x00000002 /* TCM_SETEXTENDEDSTYLE */
2592
Paul Quinn1beaae51998-12-15 15:38:36 +00002593
Eric Kohl9d8e8641998-10-24 10:49:27 +00002594#define TCM_FIRST 0x1300
2595
Paul Quinn1beaae51998-12-15 15:38:36 +00002596#define TCM_GETIMAGELIST (TCM_FIRST + 2)
2597#define TCM_SETIMAGELIST (TCM_FIRST + 3)
Eric Kohl9d8e8641998-10-24 10:49:27 +00002598#define TCM_GETITEMCOUNT (TCM_FIRST + 4)
Alexandre Julliard638f1691999-01-17 16:32:32 +00002599#define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002600#define TCM_GETITEMA (TCM_FIRST + 5)
2601#define TCM_GETITEMW (TCM_FIRST + 60)
2602#define TCM_SETITEMA (TCM_FIRST + 6)
2603#define TCM_SETITEMW (TCM_FIRST + 61)
Alexandre Julliard638f1691999-01-17 16:32:32 +00002604#define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002605#define TCM_INSERTITEMA (TCM_FIRST + 7)
2606#define TCM_INSERTITEMW (TCM_FIRST + 62)
Alexandre Julliard638f1691999-01-17 16:32:32 +00002607#define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
Paul Quinn1beaae51998-12-15 15:38:36 +00002608#define TCM_DELETEITEM (TCM_FIRST + 8)
2609#define TCM_DELETEALLITEMS (TCM_FIRST + 9)
2610#define TCM_GETITEMRECT (TCM_FIRST + 10)
Eric Kohl9d8e8641998-10-24 10:49:27 +00002611#define TCM_GETCURSEL (TCM_FIRST + 11)
Paul Quinn1beaae51998-12-15 15:38:36 +00002612#define TCM_SETCURSEL (TCM_FIRST + 12)
2613#define TCM_HITTEST (TCM_FIRST + 13)
Eric Kohl9d8e8641998-10-24 10:49:27 +00002614#define TCM_SETITEMEXTRA (TCM_FIRST + 14)
Paul Quinn1beaae51998-12-15 15:38:36 +00002615#define TCM_ADJUSTRECT (TCM_FIRST + 40)
2616#define TCM_SETITEMSIZE (TCM_FIRST + 41)
2617#define TCM_REMOVEIMAGE (TCM_FIRST + 42)
2618#define TCM_SETPADDING (TCM_FIRST + 43)
2619#define TCM_GETROWCOUNT (TCM_FIRST + 44)
2620#define TCM_GETTOOLTIPS (TCM_FIRST + 45)
2621#define TCM_SETTOOLTIPS (TCM_FIRST + 46)
2622#define TCM_GETCURFOCUS (TCM_FIRST + 47)
2623#define TCM_SETCURFOCUS (TCM_FIRST + 48)
2624#define TCM_SETMINTTABWIDTH (TCM_FIRST + 49)
2625#define TCM_DESELECTALL (TCM_FIRST + 50)
Alexandre Julliard638f1691999-01-17 16:32:32 +00002626#define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
2627#define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
2628#define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
2629#define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2630#define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2631
Eric Kohl9d8e8641998-10-24 10:49:27 +00002632
2633#define TCIF_TEXT 0x0001
2634#define TCIF_IMAGE 0x0002
2635#define TCIF_RTLREADING 0x0004
2636#define TCIF_PARAM 0x0008
Alexandre Julliard638f1691999-01-17 16:32:32 +00002637#define TCIF_STATE 0x0010
Eric Kohl9d8e8641998-10-24 10:49:27 +00002638
Alex Priemd2d7f961999-01-30 13:02:30 +00002639#define TCIS_BUTTONPRESSED 0x0001
2640#define TCIS_HIGHLIGHTED 0x0002
2641
Paul Quinn6f57fe71999-04-01 10:03:11 +00002642/* TabCtrl Macros */
2643#define TabCtrl_GetImageList(hwnd) \
2644 (HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, 0L)
2645
2646#define TabCtrl_SetImageList(hwnd, himl) \
2647 (HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
2648
2649#define TabCtrl_GetItemCount(hwnd) \
2650 (int)SNDMSG((hwnd), TCM_GETITEMCOUNT, 0, 0L)
2651
2652#define TabCtrl_GetItem(hwnd, iItem, pitem) \
2653 (BOOL)SNDMSG((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM FAR*)(pitem))
2654
2655#define TabCtrl_SetItem(hwnd, iItem, pitem) \
2656 (BOOL)SNDMSG((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM FAR*)(pitem))
2657
2658#define TabCtrl_InsertItem(hwnd, iItem, pitem) \
2659 (int)SNDMSG((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM FAR*)(pitem))
2660
2661#define TabCtrl_DeleteItem(hwnd, i) \
2662 (BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
2663
2664#define TabCtrl_DeleteAllItems(hwnd) \
2665 (BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, 0L)
2666
2667#define TabCtrl_GetItemRect(hwnd, i, prc) \
2668 (BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT FAR*)(prc))
2669
2670#define TabCtrl_GetCurSel(hwnd) \
2671 (int)::SNDMSG((hwnd), TCM_GETCURSEL, 0, 0)
2672
2673#define TabCtrl_SetCurSel(hwnd, i) \
2674 (int)SNDMSG((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
2675
2676#define TabCtrl_HitTest(hwndTC, pinfo) \
2677 (int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO FAR*)(pinfo))
2678
2679#define TabCtrl_SetItemExtra(hwndTC, cb) \
2680 (BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
2681
2682#define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
2683 (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT FAR *)prc)
2684
2685#define TabCtrl_SetItemSize(hwnd, x, y) \
2686 (DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
2687
2688#define TabCtrl_RemoveImage(hwnd, i) \
2689 (void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, 0L)
2690
2691#define TabCtrl_SetPadding(hwnd, cx, cy) \
2692 (void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
2693
2694#define TabCtrl_GetRowCount(hwnd) \
2695 (int)SNDMSG((hwnd), TCM_GETROWCOUNT, 0, 0L)
2696
2697#define TabCtrl_GetToolTips(hwnd) \
2698 (HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, 0L)
2699
2700#define TabCtrl_SetToolTips(hwnd, hwndTT) \
2701 (void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
2702
2703#define TabCtrl_GetCurFocus(hwnd) \
2704 (int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0)
2705
2706#define TabCtrl_SetCurFocus(hwnd, i) \
2707 SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0)
2708
2709#define TabCtrl_SetMinTabWidth(hwnd, x) \
2710 (int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x)
2711
2712#define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
2713 (void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
2714
Alex Priemd2d7f961999-01-30 13:02:30 +00002715
2716/* constants for TCHITTESTINFO */
2717
2718#define TCHT_NOWHERE 0x01
2719#define TCHT_ONITEMICON 0x02
2720#define TCHT_ONITEMLABEL 0x04
2721#define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
2722
Alexandre Julliard638f1691999-01-17 16:32:32 +00002723
Alexandre Julliarda3960291999-02-26 11:11:13 +00002724typedef struct tagTCITEMA {
2725 UINT mask;
2726 UINT dwState;
2727 UINT dwStateMask;
Eric Kohl9d8e8641998-10-24 10:49:27 +00002728 LPSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002729 INT cchTextMax;
2730 INT iImage;
Eric Kohl9d8e8641998-10-24 10:49:27 +00002731 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002732} TCITEMA, *LPTCITEMA;
Alexandre Julliard638f1691999-01-17 16:32:32 +00002733
Alexandre Julliarda3960291999-02-26 11:11:13 +00002734typedef struct tagTCITEMW
Alexandre Julliard638f1691999-01-17 16:32:32 +00002735{
Alexandre Julliarda3960291999-02-26 11:11:13 +00002736 UINT mask;
Alexandre Julliard638f1691999-01-17 16:32:32 +00002737 DWORD dwState;
2738 DWORD dwStateMask;
2739 LPWSTR pszText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002740 INT cchTextMax;
2741 INT iImage;
Alexandre Julliard638f1691999-01-17 16:32:32 +00002742 LPARAM lParam;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002743} TCITEMW, *LPTCITEMW;
Alexandre Julliard638f1691999-01-17 16:32:32 +00002744
2745#define TCITEM WINELIB_NAME_AW(TCITEM)
2746#define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
Alexandre Julliard8da12c41999-01-17 16:55:11 +00002747#define TC_ITEM TCITEM
Eric Kohl9d8e8641998-10-24 10:49:27 +00002748
2749#define TCN_FIRST (0U-550U)
2750#define TCN_LAST (0U-580U)
2751#define TCN_KEYDOWN (TCN_FIRST - 0)
2752#define TCN_SELCHANGE (TCN_FIRST - 1)
2753#define TCN_SELCHANGING (TCN_FIRST - 2)
Alexandre Julliard638f1691999-01-17 16:32:32 +00002754#define TCN_GETOBJECT (TCN_FIRST - 3)
Eric Kohl9d8e8641998-10-24 10:49:27 +00002755
2756
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002757/* ComboBoxEx control */
2758
Alexandre Julliarda3960291999-02-26 11:11:13 +00002759#define WC_COMBOBOXEXA "ComboBoxEx32"
2760#define WC_COMBOBOXEXW L"ComboBoxEx32"
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002761#define WC_COMBOBOXEX WINELIB_NAME_AW(WC_COMBOBOXEX)
2762
Alexandre Julliarda3960291999-02-26 11:11:13 +00002763#define CBEM_INSERTITEMA (WM_USER+1)
2764#define CBEM_INSERTITEMW (WM_USER+11)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002765#define CBEM_INSERTITEM WINELIB_NAME_AW(CBEM_INSERTITEM)
2766#define CBEM_SETIMAGELIST (WM_USER+2)
2767#define CBEM_GETIMAGELIST (WM_USER+3)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002768#define CBEM_GETITEMA (WM_USER+4)
2769#define CBEM_GETITEMW (WM_USER+13)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002770#define CBEM_GETITEM WINELIB_NAME_AW(CBEM_GETITEM)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002771#define CBEM_SETITEMA (WM_USER+5)
2772#define CBEM_SETITEMW (WM_USER+12)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002773#define CBEM_SETITEM WINELIB_NAME_AW(CBEM_SETITEM)
2774#define CBEM_GETCOMBOCONTROL (WM_USER+6)
2775#define CBEM_GETEDITCONTROL (WM_USER+7)
2776#define CBEM_SETEXSTYLE (WM_USER+8)
2777#define CBEM_GETEXSTYLE (WM_USER+9)
2778#define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
2779#define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
2780#define CBEM_HASEDITCHANGED (WM_USER+10)
2781#define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2782#define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2783
2784#define CBEN_FIRST (0U-800U)
2785#define CBEN_LAST (0U-830U)
2786
2787
2788/* Hotkey control */
2789
2790#define HOTKEY_CLASS16 "msctls_hotkey"
Alexandre Julliarda3960291999-02-26 11:11:13 +00002791#define HOTKEY_CLASSA "msctls_hotkey32"
2792#define HOTKEY_CLASSW L"msctls_hotkey32"
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002793#define HOTKEY_CLASS WINELIB_NAME_AW(HOTKEY_CLASS)
2794
2795#define HOTKEYF_SHIFT 0x01
2796#define HOTKEYF_CONTROL 0x02
2797#define HOTKEYF_ALT 0x04
2798#define HOTKEYF_EXT 0x08
2799
2800#define HKCOMB_NONE 0x0001
2801#define HKCOMB_S 0x0002
2802#define HKCOMB_C 0x0004
2803#define HKCOMB_A 0x0008
2804#define HKCOMB_SC 0x0010
2805#define HKCOMB_SA 0x0020
2806#define HKCOMB_CA 0x0040
2807#define HKCOMB_SCA 0x0080
2808
2809#define HKM_SETHOTKEY (WM_USER+1)
2810#define HKM_GETHOTKEY (WM_USER+2)
2811#define HKM_SETRULES (WM_USER+3)
2812
2813
2814/* animate control */
2815
Alexandre Julliarda3960291999-02-26 11:11:13 +00002816#define ANIMATE_CLASSA "SysAnimate32"
2817#define ANIMATE_CLASSW L"SysAnimate32"
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002818#define ANIMATE_CLASS WINELIB_NAME_AW(ANIMATE_CLASS)
2819
2820#define ACS_CENTER 0x0001
2821#define ACS_TRANSPARENT 0x0002
2822#define ACS_AUTOPLAY 0x0004
2823#define ACS_TIMER 0x0008 /* no threads, just timers */
2824
Alexandre Julliarda3960291999-02-26 11:11:13 +00002825#define ACM_OPENA (WM_USER+100)
2826#define ACM_OPENW (WM_USER+103)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002827#define ACM_OPEN WINELIB_NAME_AW(ACM_OPEN)
2828#define ACM_PLAY (WM_USER+101)
2829#define ACM_STOP (WM_USER+102)
2830
2831#define ACN_START 1
2832#define ACN_STOP 2
2833
Alexandre Julliarda3960291999-02-26 11:11:13 +00002834#define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
2835 CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
2836#define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
2837 CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002838#define Animate_Create WINELIB_NAME_AW(Animate_Create)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002839#define Animate_OpenA(hwnd,szName) \
2840 (BOOL)SendMessageA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
2841#define Animate_OpenW(hwnd,szName) \
2842 (BOOL)SendMessageW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002843#define Animate_Open WINELIB_NAME_AW(Animate_Open)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002844#define Animate_OpenExA(hwnd,hInst,szName) \
2845 (BOOL)SendMessageA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
2846#define Animate_OpenExW(hwnd,hInst,szName) \
2847 (BOOL)SendMessageW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00002848#define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002849#define Animate_Play(hwnd,from,to,rep) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002850 (BOOL)SendMessageA(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002851#define Animate_Stop(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002852 (BOOL)SendMessageA(hwnd,ACM_STOP,0,0)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002853#define Animate_Close(hwnd) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002854 (BOOL)SendMessageA(hwnd,ACM_OPENA,0,0)
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002855#define Animate_Seek(hwnd,frame) \
Alexandre Julliarda3960291999-02-26 11:11:13 +00002856 (BOOL)SendMessageA(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002857
2858
Eric Kohl17216d31998-10-11 13:21:17 +00002859/**************************************************************************
2860 * IP Address control
2861 */
2862
Alexandre Julliarda3960291999-02-26 11:11:13 +00002863#define WC_IPADDRESSA "SysIPAddress32"
2864#define WC_IPADDRESSW L"SysIPAddress32"
Eric Kohl17216d31998-10-11 13:21:17 +00002865#define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
2866
2867#define IPM_CLEARADDRESS (WM_USER+100)
2868#define IPM_SETADDRESS (WM_USER+101)
2869#define IPM_GETADDRESS (WM_USER+102)
2870#define IPM_SETRANGE (WM_USER+103)
2871#define IPM_SETFOCUS (WM_USER+104)
2872#define IPM_ISBLANK (WM_USER+105)
2873
Alex Priemd70de841998-12-26 11:48:35 +00002874#define IPN_FIRST (0U-860U)
2875#define IPN_LAST (0U-879U)
2876#define IPN_FIELDCHANGED (IPN_FIRST-0)
Eric Kohl17216d31998-10-11 13:21:17 +00002877
2878typedef struct tagNMIPADDRESS
2879{
2880 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002881 INT iField;
2882 INT iValue;
Eric Kohl17216d31998-10-11 13:21:17 +00002883} NMIPADDRESS, *LPNMIPADDRESS;
2884
2885#define MAKEIPRANGE(low,high) \
2886 ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
2887#define MAKEIPADDRESS(b1,b2,b3,b4) \
2888 ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
2889
2890#define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
2891#define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
2892#define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
2893#define FOURTH_IPADDRESS(x) ((x)&0xff)
2894
2895
2896/**************************************************************************
2897 * Native Font control
2898 */
2899
Alexandre Julliarda3960291999-02-26 11:11:13 +00002900#define WC_NATIVEFONTCTLA "NativeFontCtl"
2901#define WC_NATIVEFONTCTLW L"NativeFontCtl"
Eric Kohl17216d31998-10-11 13:21:17 +00002902#define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
2903
2904#define NFS_EDIT 0x0001
2905#define NFS_STATIC 0x0002
2906#define NFS_LISTCOMBO 0x0004
2907#define NFS_BUTTON 0x0008
2908#define NFS_ALL 0x0010
2909
Alexandre Julliarda0d77311998-09-13 16:32:00 +00002910
2911/**************************************************************************
Eric Kohla8670301998-11-08 11:30:27 +00002912 * Month calendar control
2913 */
2914
Alexandre Julliarda3960291999-02-26 11:11:13 +00002915#define MONTHCAL_CLASSA "SysMonthCal32"
2916#define MONTHCAL_CLASSW L"SysMonthCal32"
Eric Kohla8670301998-11-08 11:30:27 +00002917#define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
2918
2919
2920/**************************************************************************
2921 * Date and time picker control
2922 */
2923
Alexandre Julliarda3960291999-02-26 11:11:13 +00002924#define DATETIMEPICK_CLASSA "SysDateTimePick32"
2925#define DATETIMEPICK_CLASSW L"SysDateTimePick32"
Eric Kohla8670301998-11-08 11:30:27 +00002926#define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
2927
Alexandre Julliard638f1691999-01-17 16:32:32 +00002928#define DTM_FIRST 0x1000
2929
2930#define DTM_GETSYSTEMTIME (DTM_FIRST+1)
2931#define DTM_SETSYSTEMTIME (DTM_FIRST+2)
2932#define DTM_GETRANGE (DTM_FIRST+3)
2933#define DTM_SETRANGE (DTM_FIRST+4)
Alexandre Julliarda3960291999-02-26 11:11:13 +00002934#define DTM_SETFORMATA (DTM_FIRST+5)
2935#define DTM_SETFORMATW (DTM_FIRST + 50)
Alexandre Julliard638f1691999-01-17 16:32:32 +00002936#define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
2937#define DTM_SETMCCOLOR (DTM_FIRST+6)
2938#define DTM_GETMCCOLOR (DTM_FIRST+7)
2939
2940#define DTM_GETMONTHCAL (DTM_FIRST+8)
2941
2942#define DTM_SETMCFONT (DTM_FIRST+9)
2943#define DTM_GETMCFONT (DTM_FIRST+10)
2944
2945
2946
2947
2948#define GDT_ERROR -1
2949#define GDT_VALID 0
2950#define GDT_NONE 1
2951
2952#define GDTR_MIN 0x0001
2953#define GDTR_MAX 0x0002
2954
2955
2956
Eric Kohlb406c7d1999-01-24 19:12:34 +00002957/**************************************************************************
2958 * UNDOCUMENTED functions
2959 */
2960
2961/* private heap memory functions */
2962
2963LPVOID WINAPI COMCTL32_Alloc (DWORD);
2964LPVOID WINAPI COMCTL32_ReAlloc (LPVOID, DWORD);
Alexandre Julliarda3960291999-02-26 11:11:13 +00002965BOOL WINAPI COMCTL32_Free (LPVOID);
Eric Kohlb406c7d1999-01-24 19:12:34 +00002966DWORD WINAPI COMCTL32_GetSize (LPVOID);
2967
2968
Alexandre Julliarda3960291999-02-26 11:11:13 +00002969INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
2970BOOL WINAPI Str_SetPtrA (LPSTR *, LPCSTR);
2971INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
2972BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
Eric Kohlb406c7d1999-01-24 19:12:34 +00002973#define Str_GetPtr WINELIB_NAME_AW(Str_GetPtr)
2974#define Str_SetPtr WINELIB_NAME_AW(Str_SetPtr)
2975
2976
2977/* Dynamic Storage Array */
2978
2979typedef struct _DSA
2980{
Alexandre Julliarda3960291999-02-26 11:11:13 +00002981 INT nItemCount;
Eric Kohlb406c7d1999-01-24 19:12:34 +00002982 LPVOID pData;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002983 INT nMaxCount;
2984 INT nItemSize;
2985 INT nGrow;
Eric Kohlb406c7d1999-01-24 19:12:34 +00002986} DSA, *HDSA;
2987
Alexandre Julliarda3960291999-02-26 11:11:13 +00002988HDSA WINAPI DSA_Create (INT, INT);
2989BOOL WINAPI DSA_DeleteAllItems (const HDSA);
2990INT WINAPI DSA_DeleteItem (const HDSA, INT);
2991BOOL WINAPI DSA_Destroy (const HDSA);
2992BOOL WINAPI DSA_GetItem (const HDSA, INT, LPVOID);
2993LPVOID WINAPI DSA_GetItemPtr (const HDSA, INT);
2994INT WINAPI DSA_InsertItem (const HDSA, INT, LPVOID);
2995BOOL WINAPI DSA_SetItem (const HDSA, INT, LPVOID);
Eric Kohlb406c7d1999-01-24 19:12:34 +00002996
Alexandre Julliarda3960291999-02-26 11:11:13 +00002997typedef INT (CALLBACK *DSAENUMPROC)(LPVOID, DWORD);
Eric Kohlb406c7d1999-01-24 19:12:34 +00002998VOID WINAPI DSA_EnumCallback (const HDSA, DSAENUMPROC, LPARAM);
Alexandre Julliarda3960291999-02-26 11:11:13 +00002999BOOL WINAPI DSA_DestroyCallback (const HDSA, DSAENUMPROC, LPARAM);
Eric Kohlb406c7d1999-01-24 19:12:34 +00003000
3001
3002/* Dynamic Pointer Array */
3003
3004typedef struct _DPA
3005{
Alexandre Julliarda3960291999-02-26 11:11:13 +00003006 INT nItemCount;
Eric Kohlb406c7d1999-01-24 19:12:34 +00003007 LPVOID *ptrs;
Alexandre Julliarda3960291999-02-26 11:11:13 +00003008 HANDLE hHeap;
3009 INT nGrow;
3010 INT nMaxCount;
Eric Kohlb406c7d1999-01-24 19:12:34 +00003011} DPA, *HDPA;
3012
Alexandre Julliarda3960291999-02-26 11:11:13 +00003013HDPA WINAPI DPA_Create (INT);
3014HDPA WINAPI DPA_CreateEx (INT, HANDLE);
3015BOOL WINAPI DPA_Destroy (const HDPA);
Eric Kohlb406c7d1999-01-24 19:12:34 +00003016HDPA WINAPI DPA_Clone (const HDPA, const HDPA);
Alexandre Julliarda3960291999-02-26 11:11:13 +00003017LPVOID WINAPI DPA_GetPtr (const HDPA, INT);
3018INT WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);
3019BOOL WINAPI DPA_Grow (const HDPA, INT);
3020BOOL WINAPI DPA_SetPtr (const HDPA, INT, LPVOID);
3021INT WINAPI DPA_InsertPtr (const HDPA, INT, LPVOID);
3022LPVOID WINAPI DPA_DeletePtr (const HDPA, INT);
3023BOOL WINAPI DPA_DeleteAllPtrs (const HDPA);
Eric Kohlb406c7d1999-01-24 19:12:34 +00003024
Alexandre Julliarda3960291999-02-26 11:11:13 +00003025typedef INT (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
3026BOOL WINAPI DPA_Sort (const HDPA, PFNDPACOMPARE, LPARAM);
Eric Kohlb406c7d1999-01-24 19:12:34 +00003027
3028#define DPAS_SORTED 0x0001
3029#define DPAS_INSERTBEFORE 0x0002
3030#define DPAS_INSERTAFTER 0x0004
3031
Alexandre Julliarda3960291999-02-26 11:11:13 +00003032INT WINAPI DPA_Search (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
Eric Kohlb406c7d1999-01-24 19:12:34 +00003033
3034#define DPAM_SORT 0x0001
3035
Alexandre Julliarda3960291999-02-26 11:11:13 +00003036BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, LPVOID, LPARAM);
Eric Kohlb406c7d1999-01-24 19:12:34 +00003037
Alexandre Julliarda3960291999-02-26 11:11:13 +00003038typedef INT (CALLBACK *DPAENUMPROC)(LPVOID, DWORD);
Eric Kohlb406c7d1999-01-24 19:12:34 +00003039VOID WINAPI DPA_EnumCallback (const HDPA, DPAENUMPROC, LPARAM);
Alexandre Julliarda3960291999-02-26 11:11:13 +00003040BOOL WINAPI DPA_DestroyCallback (const HDPA, DPAENUMPROC, LPARAM);
Eric Kohlb406c7d1999-01-24 19:12:34 +00003041
3042
Alexandre Julliarda3960291999-02-26 11:11:13 +00003043#define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
3044#define DPA_GetPtrPtr(hdpa) (*((LPVOID**)((BYTE*)(hdpa)+sizeof(INT))))
Eric Kohlb406c7d1999-01-24 19:12:34 +00003045#define DPA_FastGetPtr(hdpa,i) (DPA_GetPtrPtr(hdpa)[i])
3046
3047
3048/* notification helper functions */
3049
Alexandre Julliarda3960291999-02-26 11:11:13 +00003050LRESULT WINAPI COMCTL32_SendNotify (HWND, HWND, UINT, LPNMHDR);
Eric Kohlb406c7d1999-01-24 19:12:34 +00003051
3052/* type and functionality of last parameter is still unknown */
Alexandre Julliarda3960291999-02-26 11:11:13 +00003053LRESULT WINAPI COMCTL32_SendNotifyEx (HWND, HWND, UINT, LPNMHDR, DWORD);
Eric Kohlb406c7d1999-01-24 19:12:34 +00003054
Uwe Bonnes627702d1998-11-08 13:14:55 +00003055#ifdef __cplusplus
3056}
3057#endif
Eric Kohl17216d31998-10-11 13:21:17 +00003058
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +00003059#endif /* __WINE_COMMCTRL_H */
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +00003060
3061