commctrl.h 174 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1 2
/*
 * Common controls definitions
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * Copyright (C) the Wine project
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Alexandre Julliard's avatar
Alexandre Julliard committed
19 20 21 22 23
 */

#ifndef __WINE_COMMCTRL_H
#define __WINE_COMMCTRL_H

24
#include <prsht.h>
Alexandre Julliard's avatar
Alexandre Julliard committed
25

26 27 28 29
#ifdef __cplusplus
extern "C" {
#endif

Frank Richter's avatar
Frank Richter committed
30
BOOL WINAPI ShowHideMenuCtl (HWND, UINT_PTR, LPINT);
31
VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, const INT*);
Alexandre Julliard's avatar
Alexandre Julliard committed
32
VOID WINAPI InitCommonControls (VOID);
Alexandre Julliard's avatar
Alexandre Julliard committed
33

Alexandre Julliard's avatar
Alexandre Julliard committed
34 35 36 37 38
typedef struct tagINITCOMMONCONTROLSEX {
    DWORD dwSize;
    DWORD dwICC;
} INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;

39
BOOL WINAPI InitCommonControlsEx (const INITCOMMONCONTROLSEX*);
Alexandre Julliard's avatar
Alexandre Julliard committed
40

41 42 43 44
LANGID WINAPI GetMUILanguage (VOID);
VOID WINAPI InitMUILanguage (LANGID uiLang);


45 46
#define COMCTL32_VERSION                5  /* dll version */

47 48 49 50
#ifndef _WIN32_IE
#define _WIN32_IE 0x0400
#endif

Alexandre Julliard's avatar
Alexandre Julliard committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
#define ICC_LISTVIEW_CLASSES   0x00000001  /* listview, header */
#define ICC_TREEVIEW_CLASSES   0x00000002  /* treeview, tooltips */
#define ICC_BAR_CLASSES        0x00000004  /* toolbar, statusbar, trackbar, tooltips */
#define ICC_TAB_CLASSES        0x00000008  /* tab, tooltips */
#define ICC_UPDOWN_CLASS       0x00000010  /* updown */
#define ICC_PROGRESS_CLASS     0x00000020  /* progress */
#define ICC_HOTKEY_CLASS       0x00000040  /* hotkey */
#define ICC_ANIMATE_CLASS      0x00000080  /* animate */
#define ICC_WIN95_CLASSES      0x000000FF
#define ICC_DATE_CLASSES       0x00000100  /* month picker, date picker, time picker, updown */
#define ICC_USEREX_CLASSES     0x00000200  /* comboex */
#define ICC_COOL_CLASSES       0x00000400  /* rebar (coolbar) */
#define ICC_INTERNET_CLASSES   0x00000800  /* IP address, ... */
#define ICC_PAGESCROLLER_CLASS 0x00001000  /* page scroller */
#define ICC_NATIVEFNTCTL_CLASS 0x00002000  /* native font control ???*/
66 67
#define ICC_STANDARD_CLASSES   0x00004000
#define ICC_LINK_CLASS         0x00008000
Alexandre Julliard's avatar
Alexandre Julliard committed
68 69


Alexandre Julliard's avatar
Alexandre Julliard committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83
/* common control styles */
#define CCS_TOP             0x00000001L
#define CCS_NOMOVEY         0x00000002L
#define CCS_BOTTOM          0x00000003L
#define CCS_NORESIZE        0x00000004L
#define CCS_NOPARENTALIGN   0x00000008L
#define CCS_ADJUSTABLE      0x00000020L
#define CCS_NODIVIDER       0x00000040L
#define CCS_VERT            0x00000080L
#define CCS_LEFT            (CCS_VERT|CCS_TOP)
#define CCS_RIGHT           (CCS_VERT|CCS_BOTTOM)
#define CCS_NOMOVEX         (CCS_VERT|CCS_NOMOVEY)


Alexandre Julliard's avatar
Alexandre Julliard committed
84
/* common control shared messages */
Alexandre Julliard's avatar
Alexandre Julliard committed
85 86
#define CCM_FIRST            0x2000

87 88 89 90 91 92 93 94 95 96 97
#define CCM_SETBKCOLOR       (CCM_FIRST+0x1)     /* lParam = bkColor */
#define CCM_SETCOLORSCHEME   (CCM_FIRST+0x2)     /* lParam = COLORSCHEME struct ptr */
#define CCM_GETCOLORSCHEME   (CCM_FIRST+0x3)     /* lParam = COLORSCHEME struct ptr */
#define CCM_GETDROPTARGET    (CCM_FIRST+0x4)
#define CCM_SETUNICODEFORMAT (CCM_FIRST+0x5)
#define CCM_GETUNICODEFORMAT (CCM_FIRST+0x6)
#define CCM_SETVERSION       (CCM_FIRST+0x7)
#define CCM_GETVERSION       (CCM_FIRST+0x8)
#define CCM_SETNOTIFYWINDOW  (CCM_FIRST+0x9)     /* wParam = hwndParent */
#define CCM_SETWINDOWTHEME   (CCM_FIRST+0xb)
#define CCM_DPISCALE         (CCM_FIRST+0xc)
Alexandre Julliard's avatar
Alexandre Julliard committed
98 99


Alexandre Julliard's avatar
Alexandre Julliard committed
100
/* common notification codes (WM_NOTIFY)*/
Alexandre Julliard's avatar
Alexandre Julliard committed
101
#define NM_FIRST                (0U-  0U)
Alexandre Julliard's avatar
Alexandre Julliard committed
102
#define NM_LAST                 (0U- 99U)
Alexandre Julliard's avatar
Alexandre Julliard committed
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
#define NM_OUTOFMEMORY          (NM_FIRST-1)
#define NM_CLICK                (NM_FIRST-2)
#define NM_DBLCLK               (NM_FIRST-3)
#define NM_RETURN               (NM_FIRST-4)
#define NM_RCLICK               (NM_FIRST-5)
#define NM_RDBLCLK              (NM_FIRST-6)
#define NM_SETFOCUS             (NM_FIRST-7)
#define NM_KILLFOCUS            (NM_FIRST-8)
#define NM_CUSTOMDRAW           (NM_FIRST-12)
#define NM_HOVER                (NM_FIRST-13)
#define NM_NCHITTEST            (NM_FIRST-14)
#define NM_KEYDOWN              (NM_FIRST-15)
#define NM_RELEASEDCAPTURE      (NM_FIRST-16)
#define NM_SETCURSOR            (NM_FIRST-17)
#define NM_CHAR                 (NM_FIRST-18)
#define NM_TOOLTIPSCREATED      (NM_FIRST-19)
119 120 121
#define NM_LDOWN                (NM_FIRST-20)
#define NM_RDOWN                (NM_FIRST-21)
#define NM_THEMECHANGED         (NM_FIRST-22)
122 123 124
#define NM_FONTCHANGED          (NM_FIRST-23)
#define NM_CUSTOMTEXT           (NM_FIRST-24)
#define NM_TVSTATEIMAGECHANGING (NM_FIRST-24)
Alexandre Julliard's avatar
Alexandre Julliard committed
125

126 127 128 129 130 131
#define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) \
    (fn)((hwnd), (int)(wParam), (NMHDR*)(lParam))
#define FORWARD_WM_NOTIFY(hwnd, idFrom, pnmhdr, fn) \
    (LRESULT)(fn)((hwnd), WM_NOTIFY, (WPARAM)(int)(idFrom), (LPARAM)(NMHDR*)(pnmhdr))


Alexandre Julliard's avatar
Alexandre Julliard committed
132
/* callback constants */
133 134
#define LPSTR_TEXTCALLBACKA    ((LPSTR)-1L)
#define LPSTR_TEXTCALLBACKW    ((LPWSTR)-1L)
Alexandre Julliard's avatar
Alexandre Julliard committed
135 136
#define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)

Alexandre Julliard's avatar
Alexandre Julliard committed
137
#define I_IMAGECALLBACK          (-1)
138
#define I_IMAGENONE              (-2)
Alexandre Julliard's avatar
Alexandre Julliard committed
139
#define I_INDENTCALLBACK         (-1)
140
#define I_CHILDRENCALLBACK       (-1)
141 142 143
#define I_GROUPIDCALLBACK        (-1)
#define I_GROUPIDNONE            (-2)
#define I_COLUMNSCALLBACK        ((UINT)-1)
Alexandre Julliard's avatar
Alexandre Julliard committed
144

Alexandre Julliard's avatar
Alexandre Julliard committed
145 146 147 148 149
/* owner drawn types */
#define ODT_HEADER      100
#define ODT_TAB         101
#define ODT_LISTVIEW    102

Alexandre Julliard's avatar
Alexandre Julliard committed
150 151 152 153
/* common notification structures */
typedef struct tagNMTOOLTIPSCREATED
{
    NMHDR  hdr;
154
    HWND hwndToolTips;
Alexandre Julliard's avatar
Alexandre Julliard committed
155 156
} NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;

157 158 159
typedef struct tagNMMOUSE
{
    NMHDR   hdr;
Frank Richter's avatar
Frank Richter committed
160 161
    DWORD_PTR   dwItemSpec;
    DWORD_PTR   dwItemData;
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
    POINT   pt;
    DWORD   dwHitInfo;   /* info where on item or control the mouse is */
} NMMOUSE, *LPNMMOUSE;

typedef struct tagNMOBJECTNOTIFY
{
    NMHDR   hdr;
    int     iItem;
#ifdef __IID_DEFINED__
    const IID *piid;
#else
    const void *piid;
#endif
    void    *pObject;
    HRESULT hResult;
    DWORD   dwFlags;
} NMOBJECTNOTIFY, *LPNMOBJECTNOTIFY;

typedef struct tagNMKEY
{
    NMHDR   hdr;
    UINT    nVKey;
    UINT    uFlags;
} NMKEY, *LPNMKEY;

typedef struct tagNMCHAR
{
    NMHDR   hdr;
    UINT    ch;
    DWORD   dwItemPrev;           /* Item previously selected */
    DWORD   dwItemNext;           /* Item to be selected */
} NMCHAR, *LPNMCHAR;
Alexandre Julliard's avatar
Alexandre Julliard committed
194

Alexandre Julliard's avatar
Alexandre Julliard committed
195 196
#ifndef CCSIZEOF_STRUCT
#define CCSIZEOF_STRUCT(name, member) \
197
    (((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
Alexandre Julliard's avatar
Alexandre Julliard committed
198 199 200
    sizeof(((name*)0)->member))
#endif

Eric Kohl's avatar
Eric Kohl committed
201

202 203 204 205 206 207 208
#ifndef SNDMSG
#ifdef __cplusplus
#define SNDMSG ::SendMessage
#else   /* __cplusplus */
#define SNDMSG SendMessage
#endif  /* __cplusplus */
#endif  /* SNDMSG */
Alexandre Julliard's avatar
Alexandre Julliard committed
209 210


211 212 213 214 215 216 217
#ifdef __cplusplus
#define SNDMSGA ::SendMessageA
#define SNDMSGW ::SendMessageW
#else
#define SNDMSGA SendMessageA
#define SNDMSGW SendMessageW
#endif
218 219 220 221 222 223 224 225 226 227

/* Custom Draw messages */

#define CDRF_DODEFAULT          0x0
#define CDRF_NEWFONT            0x00000002
#define CDRF_SKIPDEFAULT        0x00000004
#define CDRF_NOTIFYPOSTPAINT    0x00000010
#define CDRF_NOTIFYITEMDRAW     0x00000020
#define CDRF_NOTIFYSUBITEMDRAW  0x00000020
#define CDRF_NOTIFYPOSTERASE    0x00000040
228
#define CDRF_NOTIFYITEMERASE    0x00000080      /*  obsolete ??? */
229 230 231 232 233 234 235 236 237


/* drawstage flags */

#define CDDS_PREPAINT           1
#define CDDS_POSTPAINT          2
#define CDDS_PREERASE           3
#define CDDS_POSTERASE          4

Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
238 239 240 241 242
#define CDDS_ITEM		0x00010000
#define CDDS_ITEMPREPAINT	(CDDS_ITEM | CDDS_PREPAINT)
#define CDDS_ITEMPOSTPAINT	(CDDS_ITEM | CDDS_POSTPAINT)
#define CDDS_ITEMPREERASE	(CDDS_ITEM | CDDS_PREERASE)
#define CDDS_ITEMPOSTERASE	(CDDS_ITEM | CDDS_POSTERASE)
243 244 245 246
#define CDDS_SUBITEM            0x00020000

/* itemState flags */

247 248 249 250 251 252 253 254 255 256
#define CDIS_SELECTED           0x0001
#define CDIS_GRAYED             0x0002
#define CDIS_DISABLED           0x0004
#define CDIS_CHECKED            0x0008
#define CDIS_FOCUS              0x0010
#define CDIS_DEFAULT            0x0020
#define CDIS_HOT                0x0040
#define CDIS_MARKED             0x0080
#define CDIS_INDETERMINATE      0x0100
#define CDIS_SHOWKEYBOARDCUES   0x0200
257 258 259
#define CDIS_NEARHOT            0x0400
#define CDIS_OTHERSIDEHOT       0x0800
#define CDIS_DROPHILITED        0x1000
260 261 262 263 264 265


typedef struct tagNMCUSTOMDRAWINFO
{
	NMHDR	hdr;
	DWORD	dwDrawStage;
266 267
	HDC	hdc;
	RECT	rc;
Frank Richter's avatar
Frank Richter committed
268
	DWORD_PTR dwItemSpec;
269
	UINT	uItemState;
270 271 272 273 274
	LPARAM	lItemlParam;
} NMCUSTOMDRAW, *LPNMCUSTOMDRAW;

typedef struct tagNMTTCUSTOMDRAW
{
Eric Kohl's avatar
Eric Kohl committed
275
    NMCUSTOMDRAW nmcd;
276
    UINT       uDrawFlags;
277 278 279 280 281
} NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;




Alexandre Julliard's avatar
Alexandre Julliard committed
282 283
/* StatusWindow */

284
#define STATUSCLASSNAMEA	"msctls_statusbar32"
285 286 287 288 289 290
#if defined(__GNUC__)
# define STATUSCLASSNAMEW (const WCHAR []){ 'm','s','c','t','l','s','_', \
  's','t','a','t','u','s','b','a','r','3','2',0 }
#elif defined(_MSC_VER)
# define STATUSCLASSNAMEW       L"msctls_statusbar32"
#else
291 292
static const WCHAR STATUSCLASSNAMEW[] = { 'm','s','c','t','l','s','_',
  's','t','a','t','u','s','b','a','r','3','2',0 };
293
#endif
294 295 296 297 298 299 300 301 302 303
#define STATUSCLASSNAME		WINELIB_NAME_AW(STATUSCLASSNAME)

#define SBT_NOBORDERS		0x0100
#define SBT_POPOUT		0x0200
#define SBT_RTLREADING		0x0400  /* not supported */
#define SBT_TOOLTIPS		0x0800
#define SBT_OWNERDRAW		0x1000

#define SBARS_SIZEGRIP		0x0100

Michael Kaufmann's avatar
Michael Kaufmann committed
304 305
#define SB_SIMPLEID		0x00ff

306 307
#define SB_SETTEXTA		(WM_USER+1)
#define SB_SETTEXTW		(WM_USER+11)
308
#define SB_SETTEXT		WINELIB_NAME_AW(SB_SETTEXT)
309 310
#define SB_GETTEXTA		(WM_USER+2)
#define SB_GETTEXTW		(WM_USER+13)
311
#define SB_GETTEXT		WINELIB_NAME_AW(SB_GETTEXT)
312 313
#define SB_GETTEXTLENGTHA	(WM_USER+3)
#define SB_GETTEXTLENGTHW	(WM_USER+12)
314 315
#define SB_GETTEXTLENGTH	WINELIB_NAME_AW(SB_GETTEXTLENGTH)
#define SB_SETPARTS		(WM_USER+4)
316
#define SB_SETBORDERS		(WM_USER+5)
317 318 319 320 321 322 323
#define SB_GETPARTS		(WM_USER+6)
#define SB_GETBORDERS		(WM_USER+7)
#define SB_SETMINHEIGHT		(WM_USER+8)
#define SB_SIMPLE		(WM_USER+9)
#define SB_GETRECT		(WM_USER+10)
#define SB_ISSIMPLE		(WM_USER+14)
#define SB_SETICON		(WM_USER+15)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
324 325
#define SB_SETTIPTEXTA		(WM_USER+16)
#define SB_SETTIPTEXTW		(WM_USER+17)
326
#define SB_SETTIPTEXT		WINELIB_NAME_AW(SB_SETTIPTEXT)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
327 328
#define SB_GETTIPTEXTA		(WM_USER+18)
#define SB_GETTIPTEXTW		(WM_USER+19)
329 330 331 332 333 334 335 336 337
#define SB_GETTIPTEXT		WINELIB_NAME_AW(SB_GETTIPTEXT)
#define SB_GETICON		(WM_USER+20)
#define SB_SETBKCOLOR		CCM_SETBKCOLOR   /* lParam = bkColor */
#define SB_GETUNICODEFORMAT	CCM_GETUNICODEFORMAT
#define SB_SETUNICODEFORMAT	CCM_SETUNICODEFORMAT

#define SBN_FIRST		(0U-880U)
#define SBN_LAST		(0U-899U)
#define SBN_SIMPLEMODECHANGE	(SBN_FIRST-0)
Alexandre Julliard's avatar
Alexandre Julliard committed
338

339 340
HWND WINAPI CreateStatusWindowA (LONG, LPCSTR, HWND, UINT);
HWND WINAPI CreateStatusWindowW (LONG, LPCWSTR, HWND, UINT);
341
#define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
342 343
VOID WINAPI DrawStatusTextA (HDC, LPCRECT, LPCSTR, UINT);
VOID WINAPI DrawStatusTextW (HDC, LPCRECT, LPCWSTR, UINT);
344
#define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
345
VOID WINAPI MenuHelp (UINT, WPARAM, LPARAM, HMENU,
346
                      HINSTANCE, HWND, UINT*);
Alexandre Julliard's avatar
Alexandre Julliard committed
347

348
typedef struct tagCOLORSCHEME
349 350 351 352 353 354
{
   DWORD            dwSize;
   COLORREF         clrBtnHighlight;       /* highlight color */
   COLORREF         clrBtnShadow;          /* shadow color */
} COLORSCHEME, *LPCOLORSCHEME;

Eric Kohl's avatar
Eric Kohl committed
355 356 357
/**************************************************************************
 *  Drag List control
 */
358

Eric Kohl's avatar
Eric Kohl committed
359 360
typedef struct tagDRAGLISTINFO
{
361 362 363
    UINT  uNotification;
    HWND  hWnd;
    POINT ptCursor;
364 365 366 367 368 369 370 371 372 373 374 375
} DRAGLISTINFO, *LPDRAGLISTINFO;

#define DL_BEGINDRAG            (WM_USER+133)
#define DL_DRAGGING             (WM_USER+134)
#define DL_DROPPED              (WM_USER+135)
#define DL_CANCELDRAG           (WM_USER+136)

#define DL_CURSORSET            0
#define DL_STOPCURSOR           1
#define DL_COPYCURSOR           2
#define DL_MOVECURSOR           3

376 377 378 379 380 381 382
#define DRAGLISTMSGSTRINGA      "commctrl_DragListMsg"
#if defined(__GNUC__)
# define DRAGLISTMSGSTRINGW (const WCHAR []){ 'c','o','m','m','c','t','r','l', \
  '_','D','r','a','g','L','i','s','t','M','s','g',0 }
#elif defined(_MSC_VER)
# define DRAGLISTMSGSTRINGW     L"commctrl_DragListMsg"
#else
383
static const WCHAR DRAGLISTMSGSTRINGW[] = { 'c','o','m','m','c','t','r','l',
384 385 386
  '_','D','r','a','g','L','i','s','t','M','s','g',0 };
#endif
#define DRAGLISTMSGSTRING       WINELIB_NAME_AW(DRAGLISTMSGSTRING)
387

388 389 390
BOOL WINAPI MakeDragList (HWND);
VOID   WINAPI DrawInsert (HWND, HWND, INT);
INT  WINAPI LBItemFromPt (HWND, POINT, BOOL);
Eric Kohl's avatar
Eric Kohl committed
391

392

Alexandre Julliard's avatar
Alexandre Julliard committed
393
/* UpDown */
Alexandre Julliard's avatar
Alexandre Julliard committed
394

395
#define UPDOWN_CLASSA           "msctls_updown32"
396 397 398 399 400 401
#if defined(__GNUC__)
# define UPDOWN_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
  'u','p','d','o','w','n','3','2',0 }
#elif defined(_MSC_VER)
# define UPDOWN_CLASSW          L"msctls_updown32"
#else
402 403
static const WCHAR UPDOWN_CLASSW[] = { 'm','s','c','t','l','s','_',
  'u','p','d','o','w','n','3','2',0 };
404
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
405
#define UPDOWN_CLASS            WINELIB_NAME_AW(UPDOWN_CLASS)
Alexandre Julliard's avatar
Alexandre Julliard committed
406

407
typedef struct _UDACCEL
Alexandre Julliard's avatar
Alexandre Julliard committed
408
{
409 410
    UINT nSec;
    UINT nInc;
411
} UDACCEL, *LPUDACCEL;
Alexandre Julliard's avatar
Alexandre Julliard committed
412 413 414 415 416 417 418 419 420 421 422 423

#define UD_MAXVAL          0x7fff
#define UD_MINVAL          0x8001

#define UDS_WRAP           0x0001
#define UDS_SETBUDDYINT    0x0002
#define UDS_ALIGNRIGHT     0x0004
#define UDS_ALIGNLEFT      0x0008
#define UDS_AUTOBUDDY      0x0010
#define UDS_ARROWKEYS      0x0020
#define UDS_HORZ           0x0040
#define UDS_NOTHOUSANDS    0x0080
424
#define UDS_HOTTRACK       0x0100
Alexandre Julliard's avatar
Alexandre Julliard committed
425 426

#define UDN_FIRST          (0U-721)
Alexandre Julliard's avatar
Alexandre Julliard committed
427
#define UDN_LAST           (0U-740)
Alexandre Julliard's avatar
Alexandre Julliard committed
428
#define UDN_DELTAPOS       (UDN_FIRST-1)
Alexandre Julliard's avatar
Alexandre Julliard committed
429

430 431
#define UDM_SETRANGE       (WM_USER+101)
#define UDM_GETRANGE       (WM_USER+102)
Alexandre Julliard's avatar
Alexandre Julliard committed
432 433 434 435 436 437 438 439
#define UDM_SETPOS         (WM_USER+103)
#define UDM_GETPOS         (WM_USER+104)
#define UDM_SETBUDDY       (WM_USER+105)
#define UDM_GETBUDDY       (WM_USER+106)
#define UDM_SETACCEL       (WM_USER+107)
#define UDM_GETACCEL       (WM_USER+108)
#define UDM_SETBASE        (WM_USER+109)
#define UDM_GETBASE        (WM_USER+110)
440 441
#define UDM_SETRANGE32     (WM_USER+111)
#define UDM_GETRANGE32     (WM_USER+112)
442 443 444 445 446
#define UDM_SETUNICODEFORMAT    CCM_SETUNICODEFORMAT
#define UDM_GETUNICODEFORMAT    CCM_GETUNICODEFORMAT
#define UDM_SETPOS32       (WM_USER+113)
#define UDM_GETPOS32       (WM_USER+114)

Alexandre Julliard's avatar
Alexandre Julliard committed
447

448 449 450 451 452 453 454 455 456 457
#define NMUPDOWN    NM_UPDOWN
#define LPNMUPDOWN  LPNM_UPDOWN

typedef struct tagNM_UPDOWN
{
  NMHDR hdr;
  int iPos;
  int iDelta;
} NM_UPDOWN, *LPNM_UPDOWN;

458 459 460
HWND WINAPI CreateUpDownControl (DWORD, INT, INT, INT, INT,
                                   HWND, INT, HINSTANCE, HWND,
                                   INT, INT, INT);
Alexandre Julliard's avatar
Alexandre Julliard committed
461

Alexandre Julliard's avatar
Alexandre Julliard committed
462 463
/* Progress Bar */

464
#define PROGRESS_CLASSA   "msctls_progress32"
465 466 467 468 469 470
#if defined(__GNUC__)
# define PROGRESS_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
  'p','r','o','g','r','e','s','s','3','2',0 }
#elif defined(_MSC_VER)
# define PROGRESS_CLASSW  L"msctls_progress32"
#else
471 472
static const WCHAR PROGRESS_CLASSW[] = { 'm','s','c','t','l','s','_',
  'p','r','o','g','r','e','s','s','3','2',0 };
473
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
474 475
#define PROGRESS_CLASS      WINELIB_NAME_AW(PROGRESS_CLASS)

476
#define PBM_SETRANGE        (WM_USER+1)
Alexandre Julliard's avatar
Alexandre Julliard committed
477 478 479 480
#define PBM_SETPOS          (WM_USER+2)
#define PBM_DELTAPOS        (WM_USER+3)
#define PBM_SETSTEP         (WM_USER+4)
#define PBM_STEPIT          (WM_USER+5)
481
#define PBM_SETRANGE32      (WM_USER+6)
Alexandre Julliard's avatar
Alexandre Julliard committed
482 483 484
#define PBM_GETRANGE        (WM_USER+7)
#define PBM_GETPOS          (WM_USER+8)
#define PBM_SETBARCOLOR     (WM_USER+9)
485
#define PBM_SETMARQUEE      (WM_USER+10)
486
#define PBM_GETSTEP         (WM_USER+13)
487
#define PBM_GETBKCOLOR      (WM_USER+14)
488
#define PBM_GETBARCOLOR     (WM_USER+15)
489 490
#define PBM_SETSTATE        (WM_USER+16)
#define PBM_GETSTATE        (WM_USER+17)
Alexandre Julliard's avatar
Alexandre Julliard committed
491 492 493 494
#define PBM_SETBKCOLOR      CCM_SETBKCOLOR

#define PBS_SMOOTH          0x01
#define PBS_VERTICAL        0x04
495
#define PBS_MARQUEE         0x08
496 497 498 499 500
#define PBS_SMOOTHREVERSE   0x10

#define PBST_NORMAL         1
#define PBST_ERROR          2
#define PBST_PAUSED         3
Alexandre Julliard's avatar
Alexandre Julliard committed
501 502 503

typedef struct
{
504 505
    INT iLow;
    INT iHigh;
Alexandre Julliard's avatar
Alexandre Julliard committed
506 507
} PBRANGE, *PPBRANGE;

Alexandre Julliard's avatar
Alexandre Julliard committed
508 509

/* ImageList */
510

Alexandre Julliard's avatar
Alexandre Julliard committed
511 512 513
struct _IMAGELIST;
typedef struct _IMAGELIST *HIMAGELIST;

Alexandre Julliard's avatar
Alexandre Julliard committed
514 515 516
#define CLR_NONE         0xFFFFFFFF
#define CLR_DEFAULT      0xFF000000
#define CLR_HILIGHT      CLR_DEFAULT
Alexandre Julliard's avatar
Alexandre Julliard committed
517

518 519 520 521 522 523 524 525 526 527 528
#define ILC_MASK          0x0001
#define ILC_COLOR         0x0000
#define ILC_COLORDDB      0x00FE
#define ILC_COLOR4        0x0004
#define ILC_COLOR8        0x0008
#define ILC_COLOR16       0x0010
#define ILC_COLOR24       0x0018
#define ILC_COLOR32       0x0020
#define ILC_PALETTE       0x0800  /* no longer supported by M$ */
#define ILC_MIRROR        0x2000
#define ILC_PERITEMMIRROR 0x8000
Alexandre Julliard's avatar
Alexandre Julliard committed
529

530 531 532 533 534 535 536 537 538 539 540
#define ILD_NORMAL        0x0000
#define ILD_TRANSPARENT   0x0001
#define ILD_BLEND25       0x0002
#define ILD_BLEND50       0x0004
#define ILD_MASK          0x0010
#define ILD_IMAGE         0x0020
#define ILD_ROP           0x0040
#define ILD_OVERLAYMASK   0x0F00
#define ILD_PRESERVEALPHA 0x1000
#define ILD_SCALE         0x2000
#define ILD_DPISCALE      0x4000
541
#define ILD_ASYNC         0x8000
Alexandre Julliard's avatar
Alexandre Julliard committed
542 543 544 545 546 547

#define ILD_SELECTED     ILD_BLEND50
#define ILD_FOCUS        ILD_BLEND25
#define ILD_BLEND        ILD_BLEND50

#define INDEXTOOVERLAYMASK(i)  ((i)<<8)
548
#define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
Alexandre Julliard's avatar
Alexandre Julliard committed
549

Alexandre Julliard's avatar
Alexandre Julliard committed
550 551 552
#define ILCF_MOVE        (0x00000000)
#define ILCF_SWAP        (0x00000001)

553 554 555
#define ILGT_NORMAL     0x0000
#define ILGT_ASYNC      0x0001

556 557 558 559 560
#define ILS_NORMAL	0x0000
#define ILS_GLOW	0x0001
#define ILS_SHADOW	0x0002
#define ILS_SATURATE	0x0004
#define ILS_ALPHA	0x0008
Alexandre Julliard's avatar
Alexandre Julliard committed
561

Alexandre Julliard's avatar
Alexandre Julliard committed
562 563
typedef struct _IMAGEINFO
{
564 565 566 567 568
    HBITMAP hbmImage;
    HBITMAP hbmMask;
    INT     Unused1;
    INT     Unused2;
    RECT    rcImage;
569
} IMAGEINFO, *LPIMAGEINFO;
Alexandre Julliard's avatar
Alexandre Julliard committed
570 571


Alexandre Julliard's avatar
Alexandre Julliard committed
572
typedef struct _IMAGELISTDRAWPARAMS
Alexandre Julliard's avatar
Alexandre Julliard committed
573 574 575
{
    DWORD       cbSize;
    HIMAGELIST  himl;
576 577 578 579 580 581 582 583
    INT         i;
    HDC         hdcDst;
    INT         x;
    INT         y;
    INT         cx;
    INT         cy;
    INT         xBitmap;  /* x offest from the upperleft of bitmap */
    INT         yBitmap;  /* y offset from the upperleft of bitmap */
Alexandre Julliard's avatar
Alexandre Julliard committed
584 585
    COLORREF    rgbBk;
    COLORREF    rgbFg;
586
    UINT        fStyle;
Alexandre Julliard's avatar
Alexandre Julliard committed
587
    DWORD       dwRop;
588 589
    DWORD       fState;
    DWORD       Frame;
590
    COLORREF    crEffect;
Alexandre Julliard's avatar
Alexandre Julliard committed
591
} IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
Alexandre Julliard's avatar
Alexandre Julliard committed
592

593
#define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS, dwRop)
594

595
HRESULT  WINAPI HIMAGELIST_QueryInterface(HIMAGELIST,REFIID,void **);
596 597 598
INT      WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
INT      WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
BOOL     WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT);
599
BOOL     WINAPI ImageList_Copy(HIMAGELIST,INT,HIMAGELIST,INT,UINT);
600 601 602
HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
BOOL     WINAPI ImageList_Destroy(HIMAGELIST);
BOOL     WINAPI ImageList_DragEnter(HWND,INT,INT);
603
BOOL     WINAPI ImageList_DragLeave(HWND);
604 605 606 607 608
BOOL     WINAPI ImageList_DragMove(INT,INT);
BOOL     WINAPI ImageList_DragShowNolock (BOOL);
BOOL     WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
BOOL     WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
                                   INT,COLORREF,COLORREF,UINT);
609
BOOL     WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
Alexandre Julliard's avatar
Alexandre Julliard committed
610
HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
611
VOID     WINAPI ImageList_EndDrag(VOID);
Alexandre Julliard's avatar
Alexandre Julliard committed
612
COLORREF   WINAPI ImageList_GetBkColor(HIMAGELIST);
613 614 615 616 617 618 619 620 621 622
HIMAGELIST WINAPI ImageList_GetDragImage(POINT*,POINT*);
HICON    WINAPI ImageList_GetIcon(HIMAGELIST,INT,UINT);
BOOL     WINAPI ImageList_GetIconSize(HIMAGELIST,INT*,INT*);
INT      WINAPI ImageList_GetImageCount(HIMAGELIST);
BOOL     WINAPI ImageList_GetImageInfo(HIMAGELIST,INT,IMAGEINFO*);
BOOL     WINAPI ImageList_GetImageRect(HIMAGELIST,INT,LPRECT);
HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,INT,INT,
                                         COLORREF,UINT,UINT);
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,INT,INT,
                                         COLORREF,UINT,UINT);
Alexandre Julliard's avatar
Alexandre Julliard committed
623
#define    ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
624 625 626 627
HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
BOOL     WINAPI ImageList_Remove(HIMAGELIST,INT);
BOOL     WINAPI ImageList_Replace(HIMAGELIST,INT,HBITMAP,HBITMAP);
INT      WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT,HICON);
Alexandre Julliard's avatar
Alexandre Julliard committed
628
COLORREF   WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
629
BOOL     WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT,INT,INT);
Alexandre Julliard's avatar
Alexandre Julliard committed
630

631
BOOL     WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
632
BOOL     WINAPI ImageList_SetImageCount(HIMAGELIST,UINT);
633
BOOL     WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
634 635 636

#ifdef __IStream_INTERFACE_DEFINED__
HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
637
BOOL     WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
Alexandre Julliard's avatar
Alexandre Julliard committed
638
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
639 640

#define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
Alexandre Julliard's avatar
Alexandre Julliard committed
641
#define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
Alexandre Julliard's avatar
Alexandre Julliard committed
642 643
#define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
  ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
Alexandre Julliard's avatar
Alexandre Julliard committed
644 645
#define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)

Alexandre Julliard's avatar
Alexandre Julliard committed
646

647 648 649 650 651 652 653 654 655
#ifndef WM_MOUSEHOVER
#define WM_MOUSEHOVER                   0x02A1
#define WM_MOUSELEAVE                   0x02A3
#endif

#ifndef TME_HOVER

#define TME_HOVER       0x00000001
#define TME_LEAVE       0x00000002
656
#define TME_NONCLIENT   0x00000010
657 658 659 660 661 662 663 664 665 666 667 668 669
#define TME_QUERY       0x40000000
#define TME_CANCEL      0x80000000


#define HOVER_DEFAULT   0xFFFFFFFF

typedef struct tagTRACKMOUSEEVENT {
    DWORD cbSize;
    DWORD dwFlags;
    HWND  hwndTrack;
    DWORD dwHoverTime;
} TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;

670
#endif
671

Dimi Paun's avatar
Dimi Paun committed
672
BOOL WINAPI _TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack);
673

674 675
/* Flat Scrollbar control */

676
#define FLATSB_CLASSA         "flatsb_class32"
677 678 679 680 681 682
#if defined(__GNUC__)
# define FLATSB_CLASSW (const WCHAR []){ 'f','l','a','t','s','b','_', \
  'c','l','a','s','s','3','2',0 }
#elif defined(_MSC_VER)
# define FLATSB_CLASSW        L"flatsb_class32"
#else
683 684
static const WCHAR FLATSB_CLASSW[] = { 'f','l','a','t','s','b','_',
  'c','l','a','s','s','3','2',0 };
685
#endif
686 687
#define FLATSB_CLASS          WINELIB_NAME_AW(FLATSB_CLASS)

688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706
#define WSB_PROP_CYVSCROLL     0x00000001L
#define WSB_PROP_CXHSCROLL     0x00000002L
#define WSB_PROP_CYHSCROLL     0x00000004L
#define WSB_PROP_CXVSCROLL     0x00000008L
#define WSB_PROP_CXHTHUMB      0x00000010L
#define WSB_PROP_CYVTHUMB      0x00000020L
#define WSB_PROP_VBKGCOLOR     0x00000040L
#define WSB_PROP_HBKGCOLOR     0x00000080L
#define WSB_PROP_VSTYLE        0x00000100L
#define WSB_PROP_HSTYLE        0x00000200L
#define WSB_PROP_WINSTYLE      0x00000400L
#define WSB_PROP_PALETTE       0x00000800L
#define WSB_PROP_MASK          0x00000FFFL

#define FSB_REGULAR_MODE       0
#define FSB_ENCARTA_MODE       1
#define FSB_FLAT_MODE          2


707 708 709 710 711 712 713 714 715 716 717 718
BOOL  WINAPI FlatSB_EnableScrollBar(HWND, INT, UINT);
BOOL  WINAPI FlatSB_ShowScrollBar(HWND, INT, BOOL);
BOOL  WINAPI FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
BOOL  WINAPI FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
INT   WINAPI FlatSB_GetScrollPos(HWND, INT);
BOOL  WINAPI FlatSB_GetScrollProp(HWND, INT, LPINT);
INT   WINAPI FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
INT   WINAPI FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
INT   WINAPI FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
BOOL  WINAPI FlatSB_SetScrollProp(HWND, UINT, INT, BOOL);
BOOL  WINAPI InitializeFlatSB(HWND);
HRESULT WINAPI UninitializeFlatSB(HWND);
719

720 721 722 723 724 725
/* Subclassing stuff */
typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR);
BOOL WINAPI SetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
BOOL WINAPI GetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR*);
BOOL WINAPI RemoveWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR);
LRESULT WINAPI DefSubclassProc(HWND, UINT, WPARAM, LPARAM);
726

727
int WINAPI DrawShadowText(HDC, LPCWSTR, UINT, RECT*, DWORD, COLORREF, COLORREF, int, int);
728

Alexandre Julliard's avatar
Alexandre Julliard committed
729 730
/* Header control */

731
#define WC_HEADERA		"SysHeader32"
732 733 734 735 736
#if defined(__GNUC__)
# define WC_HEADERW (const WCHAR []){ 'S','y','s','H','e','a','d','e','r','3','2',0 }
#elif defined(_MSC_VER)
# define WC_HEADERW             L"SysHeader32"
#else
737
static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',0 };
738
#endif
739
#define WC_HEADER		WINELIB_NAME_AW(WC_HEADER)
740 741 742 743 744 745 746

#define HDS_HORZ                0x0000
#define HDS_BUTTONS             0x0002
#define HDS_HOTTRACK            0x0004
#define HDS_HIDDEN              0x0008
#define HDS_DRAGDROP            0x0040
#define HDS_FULLDRAG            0x0080
747 748
#define HDS_FILTERBAR           0x0100
#define HDS_FLAT                0x0200
749
#define HDS_CHECKBOXES          0x0400
750 751
#define HDS_NOSIZING            0x0800
#define HDS_OVERFLOW            0x1000
Alexandre Julliard's avatar
Alexandre Julliard committed
752 753 754 755 756 757 758 759 760 761

#define HDI_WIDTH               0x0001
#define HDI_HEIGHT              HDI_WIDTH
#define HDI_TEXT                0x0002
#define HDI_FORMAT              0x0004
#define HDI_LPARAM              0x0008
#define HDI_BITMAP              0x0010
#define HDI_IMAGE               0x0020
#define HDI_DI_SETITEM          0x0040
#define HDI_ORDER               0x0080
762
#define HDI_FILTER              0x0100
763 764 765
#define HDI_STATE               0x0200

#define HDIS_FOCUSED        0x00000001
Alexandre Julliard's avatar
Alexandre Julliard committed
766 767 768 769 770

#define HDF_LEFT                0x0000
#define HDF_RIGHT               0x0001
#define HDF_CENTER              0x0002
#define HDF_JUSTIFYMASK         0x0003
771
#define HDF_RTLREADING          0x0004
772 773 774
#define HDF_CHECKBOX            0x0040
#define HDF_CHECKED             0x0080
#define HDF_FIXEDWIDTH          0x0100
775 776
#define HDF_SORTDOWN            0x0200
#define HDF_SORTUP              0x0400
Alexandre Julliard's avatar
Alexandre Julliard committed
777 778 779 780 781
#define HDF_IMAGE               0x0800
#define HDF_BITMAP_ON_RIGHT     0x1000
#define HDF_BITMAP              0x2000
#define HDF_STRING              0x4000
#define HDF_OWNERDRAW           0x8000
782
#define HDF_SPLITBUTTON      0x1000000
Alexandre Julliard's avatar
Alexandre Julliard committed
783 784 785 786 787

#define HHT_NOWHERE             0x0001
#define HHT_ONHEADER            0x0002
#define HHT_ONDIVIDER           0x0004
#define HHT_ONDIVOPEN           0x0008
788 789
#define HHT_ONFILTER            0x0010
#define HHT_ONFILTERBUTTON      0x0020
Alexandre Julliard's avatar
Alexandre Julliard committed
790 791 792 793
#define HHT_ABOVE               0x0100
#define HHT_BELOW               0x0200
#define HHT_TORIGHT             0x0400
#define HHT_TOLEFT              0x0800
794
#define HHT_ONITEMSTATEICON     0x1000
795 796
#define HHT_ONDROPDOWN          0x2000
#define HHT_ONOVERFLOW          0x4000
Alexandre Julliard's avatar
Alexandre Julliard committed
797 798 799

#define HDM_FIRST               0x1200
#define HDM_GETITEMCOUNT        (HDM_FIRST+0)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
800 801
#define HDM_INSERTITEMA         (HDM_FIRST+1)
#define HDM_INSERTITEMW         (HDM_FIRST+10)
Alexandre Julliard's avatar
Alexandre Julliard committed
802
#define HDM_INSERTITEM		WINELIB_NAME_AW(HDM_INSERTITEM)
Alexandre Julliard's avatar
Alexandre Julliard committed
803
#define HDM_DELETEITEM          (HDM_FIRST+2)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
804 805
#define HDM_GETITEMA            (HDM_FIRST+3)
#define HDM_GETITEMW            (HDM_FIRST+11)
Alexandre Julliard's avatar
Alexandre Julliard committed
806
#define HDM_GETITEM		WINELIB_NAME_AW(HDM_GETITEM)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
807 808
#define HDM_SETITEMA            (HDM_FIRST+4)
#define HDM_SETITEMW            (HDM_FIRST+12)
Alexandre Julliard's avatar
Alexandre Julliard committed
809
#define HDM_SETITEM		WINELIB_NAME_AW(HDM_SETITEM)
Alexandre Julliard's avatar
Alexandre Julliard committed
810 811 812 813 814 815 816 817 818 819 820
#define HDM_LAYOUT              (HDM_FIRST+5)
#define HDM_HITTEST             (HDM_FIRST+6)
#define HDM_GETITEMRECT         (HDM_FIRST+7)
#define HDM_SETIMAGELIST        (HDM_FIRST+8)
#define HDM_GETIMAGELIST        (HDM_FIRST+9)

#define HDM_ORDERTOINDEX        (HDM_FIRST+15)
#define HDM_CREATEDRAGIMAGE     (HDM_FIRST+16)
#define HDM_GETORDERARRAY       (HDM_FIRST+17)
#define HDM_SETORDERARRAY       (HDM_FIRST+18)
#define HDM_SETHOTDIVIDER       (HDM_FIRST+19)
821 822 823 824 825
#define HDM_SETBITMAPMARGIN     (HDM_FIRST+20)
#define HDM_GETBITMAPMARGIN     (HDM_FIRST+21)
#define HDM_SETFILTERCHANGETIMEOUT (HDM_FIRST+22)
#define HDM_EDITFILTER          (HDM_FIRST+23)
#define HDM_CLEARFILTER         (HDM_FIRST+24)
Alexandre Julliard's avatar
Alexandre Julliard committed
826 827
#define HDM_GETUNICODEFORMAT    CCM_GETUNICODEFORMAT
#define HDM_SETUNICODEFORMAT    CCM_SETUNICODEFORMAT
Alexandre Julliard's avatar
Alexandre Julliard committed
828 829 830

#define HDN_FIRST               (0U-300U)
#define HDN_LAST                (0U-399U)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859
#define HDN_ITEMCHANGINGA       (HDN_FIRST-0)
#define HDN_ITEMCHANGINGW       (HDN_FIRST-20)
#define HDN_ITEMCHANGING        WINELIB_NAME_AW(HDN_ITEMCHANGING)
#define HDN_ITEMCHANGEDA        (HDN_FIRST-1)
#define HDN_ITEMCHANGEDW        (HDN_FIRST-21)
#define HDN_ITEMCHANGED         WINELIB_NAME_AW(HDN_ITEMCHANGED)
#define HDN_ITEMCLICKA          (HDN_FIRST-2)
#define HDN_ITEMCLICKW          (HDN_FIRST-22)
#define HDN_ITEMCLICK           WINELIB_NAME_AW(HDN_ITEMCLICK)
#define HDN_ITEMDBLCLICKA       (HDN_FIRST-3)
#define HDN_ITEMDBLCLICKW       (HDN_FIRST-23)
#define HDN_ITEMDBLCLICK        WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
#define HDN_DIVIDERDBLCLICKA    (HDN_FIRST-5)
#define HDN_DIVIDERDBLCLICKW    (HDN_FIRST-25)
#define HDN_DIVIDERDBLCLICK     WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
#define HDN_BEGINTRACKA         (HDN_FIRST-6)
#define HDN_BEGINTRACKW         (HDN_FIRST-26)
#define HDN_BEGINTRACK          WINELIB_NAME_AW(HDN_BEGINTRACK)
#define HDN_ENDTRACKA           (HDN_FIRST-7)
#define HDN_ENDTRACKW           (HDN_FIRST-27)
#define HDN_ENDTRACK            WINELIB_NAME_AW(HDN_ENDTRACK)
#define HDN_TRACKA              (HDN_FIRST-8)
#define HDN_TRACKW              (HDN_FIRST-28)
#define HDN_TRACK               WINELIB_NAME_AW(HDN_TRACK)
#define HDN_GETDISPINFOA        (HDN_FIRST-9)
#define HDN_GETDISPINFOW        (HDN_FIRST-29)
#define HDN_GETDISPINFO         WINELIB_NAME_AW(HDN_GETDISPINFO)
#define HDN_BEGINDRAG           (HDN_FIRST-10)
#define HDN_ENDDRAG             (HDN_FIRST-11)
860 861
#define HDN_FILTERCHANGE        (HDN_FIRST-12)
#define HDN_FILTERBTNCLICK      (HDN_FIRST-13)
862 863 864 865
#define HDN_BEGINFILTEREDIT     (HDN_FIRST-14)
#define HDN_ENDFILTEREDIT       (HDN_FIRST-15)
#define HDN_ITEMSTATEICONCLICK  (HDN_FIRST-16)
#define HDN_ITEMKEYDOWN         (HDN_FIRST-17)
Alexandre Julliard's avatar
Alexandre Julliard committed
866 867 868

typedef struct _HD_LAYOUT
{
869 870
    RECT      *prc;
    WINDOWPOS *pwpos;
Alexandre Julliard's avatar
Alexandre Julliard committed
871 872 873 874
} HDLAYOUT, *LPHDLAYOUT;

#define HD_LAYOUT   HDLAYOUT

875
typedef struct _HD_ITEMA
Alexandre Julliard's avatar
Alexandre Julliard committed
876
{
877 878
    UINT    mask;
    INT     cxy;
Alexandre Julliard's avatar
Alexandre Julliard committed
879
    LPSTR     pszText;
880 881 882
    HBITMAP hbm;
    INT     cchTextMax;
    INT     fmt;
Alexandre Julliard's avatar
Alexandre Julliard committed
883
    LPARAM    lParam;
884
    /* (_WIN32_IE >= 0x0300) */
885 886
    INT     iImage;
    INT     iOrder;
887
    /* (_WIN32_IE >= 0x0500) */
888 889
    UINT    type;
    LPVOID  pvFilter;
890 891
    /* (_WIN32_WINNT >= 0x0600) */
    UINT    state;
892
} HDITEMA, *LPHDITEMA;
Alexandre Julliard's avatar
Alexandre Julliard committed
893

894
typedef struct _HD_ITEMW
Alexandre Julliard's avatar
Alexandre Julliard committed
895
{
896 897
    UINT    mask;
    INT     cxy;
Alexandre Julliard's avatar
Alexandre Julliard committed
898
    LPWSTR    pszText;
899 900 901
    HBITMAP hbm;
    INT     cchTextMax;
    INT     fmt;
Alexandre Julliard's avatar
Alexandre Julliard committed
902
    LPARAM    lParam;
903
    /* (_WIN32_IE >= 0x0300) */
904 905
    INT     iImage;
    INT     iOrder;
906
    /* (_WIN32_IE >= 0x0500) */
907 908
    UINT    type;
    LPVOID  pvFilter;
909 910
    /* (_WIN32_WINNT >= 0x0600) */
    UINT    state;
911
} HDITEMW, *LPHDITEMW;
Alexandre Julliard's avatar
Alexandre Julliard committed
912 913 914

#define HDITEM   WINELIB_NAME_AW(HDITEM)
#define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
915
#define HD_ITEM  HDITEM
Alexandre Julliard's avatar
Alexandre Julliard committed
916

917 918
#define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
#define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
Alexandre Julliard's avatar
Alexandre Julliard committed
919
#define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
Alexandre Julliard's avatar
Alexandre Julliard committed
920

921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941
#define HDFT_ISSTRING      0x0000
#define HDFT_ISNUMBER      0x0001
#define HDFT_HASNOVALUE    0x8000

typedef struct _HD_TEXTFILTERA
{
    LPSTR pszText;
    INT cchTextMax;
} HD_TEXTFILTERA, *LPHD_TEXTFILTERA;

typedef struct _HD_TEXTFILTERW
{
    LPWSTR pszText;
    INT cchTextMax;
} HD_TEXTFILTERW, *LPHD_TEXTFILTERW;

#define HD_TEXTFILTER WINELIB_NAME_AW(HD_TEXTFILTER)
#define HDTEXTFILTER WINELIB_NAME_AW(HD_TEXTFILTER)
#define LPHD_TEXTFILTER WINELIB_NAME_AW(LPHD_TEXTFILTER)
#define LPHDTEXTFILTER WINELIB_NAME_AW(LPHD_TEXTFILTER)

Alexandre Julliard's avatar
Alexandre Julliard committed
942 943
typedef struct _HD_HITTESTINFO
{
944 945 946
    POINT pt;
    UINT  flags;
    INT   iItem;
Alexandre Julliard's avatar
Alexandre Julliard committed
947 948 949 950
} HDHITTESTINFO, *LPHDHITTESTINFO;

#define HD_HITTESTINFO   HDHITTESTINFO

951
typedef struct tagNMHEADERA
Alexandre Julliard's avatar
Alexandre Julliard committed
952
{
Alexandre Julliard's avatar
Alexandre Julliard committed
953
    NMHDR     hdr;
954 955 956 957
    INT     iItem;
    INT     iButton;
    HDITEMA *pitem;
} NMHEADERA, *LPNMHEADERA;
Alexandre Julliard's avatar
Alexandre Julliard committed
958

959
typedef struct tagNMHEADERW
Alexandre Julliard's avatar
Alexandre Julliard committed
960 961
{
    NMHDR     hdr;
962 963 964 965
    INT     iItem;
    INT     iButton;
    HDITEMW *pitem;
} NMHEADERW, *LPNMHEADERW;
Alexandre Julliard's avatar
Alexandre Julliard committed
966 967 968

#define NMHEADER		WINELIB_NAME_AW(NMHEADER)
#define LPNMHEADER		WINELIB_NAME_AW(LPNMHEADER)
969
#define HD_NOTIFY               NMHEADER
Alexandre Julliard's avatar
Alexandre Julliard committed
970

971
typedef struct tagNMHDDISPINFOA
Alexandre Julliard's avatar
Alexandre Julliard committed
972 973
{
    NMHDR     hdr;
974 975
    INT     iItem;
    UINT    mask;
Alexandre Julliard's avatar
Alexandre Julliard committed
976
    LPSTR     pszText;
977 978
    INT     cchTextMax;
    INT     iImage;
Alexandre Julliard's avatar
Alexandre Julliard committed
979
    LPARAM    lParam;
980
} NMHDDISPINFOA, *LPNMHDDISPINFOA;
Alexandre Julliard's avatar
Alexandre Julliard committed
981

982
typedef struct tagNMHDDISPINFOW
Alexandre Julliard's avatar
Alexandre Julliard committed
983 984
{
    NMHDR     hdr;
985 986
    INT     iItem;
    UINT    mask;
Alexandre Julliard's avatar
Alexandre Julliard committed
987
    LPWSTR    pszText;
988 989
    INT     cchTextMax;
    INT     iImage;
Alexandre Julliard's avatar
Alexandre Julliard committed
990
    LPARAM    lParam;
991
} NMHDDISPINFOW, *LPNMHDDISPINFOW;
Alexandre Julliard's avatar
Alexandre Julliard committed
992 993 994

#define NMHDDISPINFO		WINELIB_NAME_AW(NMHDDISPINFO)
#define LPNMHDDISPINFO		WINELIB_NAME_AW(LPNMHDDISPINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
995

996 997 998 999 1000 1001 1002
typedef struct tagNMHDFILTERBTNCLICK
{
    NMHDR hdr;
    INT iItem;
    RECT rc;
} NMHDFILTERBTNCLICK, *LPNMHDFILTERBTNCLICK;

Alexandre Julliard's avatar
Alexandre Julliard committed
1003
#define Header_GetItemCount(hwndHD) \
1004
  (INT)SNDMSG((hwndHD),HDM_GETITEMCOUNT,0,0L)
1005
#define Header_InsertItemA(hwndHD,i,phdi) \
1006
  (INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
1007
#define Header_InsertItemW(hwndHD,i,phdi) \
1008
  (INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
Alexandre Julliard's avatar
Alexandre Julliard committed
1009
#define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
Alexandre Julliard's avatar
Alexandre Julliard committed
1010
#define Header_DeleteItem(hwndHD,i) \
1011
  (BOOL)SNDMSG((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
1012
#define Header_GetItemA(hwndHD,i,phdi) \
1013
  (BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
1014
#define Header_GetItemW(hwndHD,i,phdi) \
1015
  (BOOL)SNDMSGW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
Alexandre Julliard's avatar
Alexandre Julliard committed
1016
#define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
1017
#define Header_SetItemA(hwndHD,i,phdi) \
1018
  (BOOL)SNDMSGA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
1019
#define Header_SetItemW(hwndHD,i,phdi) \
1020
  (BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
Alexandre Julliard's avatar
Alexandre Julliard committed
1021
#define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
Alexandre Julliard's avatar
Alexandre Julliard committed
1022
#define Header_Layout(hwndHD,playout) \
1023
  (BOOL)SNDMSG((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
Alexandre Julliard's avatar
Alexandre Julliard committed
1024
#define Header_GetItemRect(hwnd,iItem,lprc) \
1025
  (BOOL)SNDMSG((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
Alexandre Julliard's avatar
Alexandre Julliard committed
1026
#define Header_SetImageList(hwnd,himl) \
1027
  (HIMAGELIST)SNDMSG((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
Alexandre Julliard's avatar
Alexandre Julliard committed
1028
#define Header_GetImageList(hwnd) \
1029
  (HIMAGELIST)SNDMSG((hwnd),HDM_GETIMAGELIST,0,0)
Alexandre Julliard's avatar
Alexandre Julliard committed
1030
#define Header_OrderToIndex(hwnd,i) \
1031
  (INT)SNDMSG((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
Alexandre Julliard's avatar
Alexandre Julliard committed
1032
#define Header_CreateDragImage(hwnd,i) \
1033
  (HIMAGELIST)SNDMSG((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
Alexandre Julliard's avatar
Alexandre Julliard committed
1034
#define Header_GetOrderArray(hwnd,iCount,lpi) \
1035
  (BOOL)SNDMSG((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
Alexandre Julliard's avatar
Alexandre Julliard committed
1036
#define Header_SetOrderArray(hwnd,iCount,lpi) \
1037
  (BOOL)SNDMSG((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
Alexandre Julliard's avatar
Alexandre Julliard committed
1038
#define Header_SetHotDivider(hwnd,fPos,dw) \
1039
  (INT)SNDMSG((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
Alexandre Julliard's avatar
Alexandre Julliard committed
1040
#define Header_SetUnicodeFormat(hwnd,fUnicode) \
1041
  (BOOL)SNDMSG((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
Alexandre Julliard's avatar
Alexandre Julliard committed
1042
#define Header_GetUnicodeFormat(hwnd) \
1043
  (BOOL)SNDMSG((hwnd),HDM_GETUNICODEFORMAT,0,0)
Alexandre Julliard's avatar
Alexandre Julliard committed
1044

1045
/* Win32 5.1 Button Theme */
1046 1047 1048 1049 1050 1051 1052 1053 1054 1055
#define WC_BUTTONA       "Button"
#if defined(__GNUC__)
# define WC_BUTTONW (const WCHAR []){ 'B','u','t','t','o','n',0 }
#elif defined(_MSC_VER)
# define WC_BUTTONW      L"Button"
#else
static const WCHAR WC_BUTTONW[] = { 'B','u','t','t','o','n',0 };
#endif
#define WC_BUTTON WINELIB_NAME_AW(WC_BUTTON)

1056 1057 1058 1059 1060
#define BCN_FIRST               (0U-1250U)
#define BCN_LAST                (0U-1350U)

#define BCN_HOTITEMCHANGE       (BCN_FIRST + 0x0001)

1061 1062 1063 1064 1065
typedef struct tagNMBCHOTITEM
{
  NMHDR hdr;
  DWORD dwFlags;
} NMBCHOTITEM, *LPNMBCHOTITEM;
Alexandre Julliard's avatar
Alexandre Julliard committed
1066

1067 1068
#define BST_HOT                 0x0200

1069 1070 1071 1072 1073 1074
/* Button control styles for _WIN32_WINNT >= 0x600 */
#define BS_SPLITBUTTON          0x0000000C
#define BS_DEFSPLITBUTTON       0x0000000D
#define BS_COMMANDLINK          0x0000000E
#define BS_DEFCOMMANDLINK       0x0000000F

Alexandre Julliard's avatar
Alexandre Julliard committed
1075 1076
/* Toolbar */

1077
#define TOOLBARCLASSNAMEA       "ToolbarWindow32"
1078 1079 1080 1081 1082 1083
#if defined(__GNUC__)
# define TOOLBARCLASSNAMEW (const WCHAR []){ 'T','o','o','l','b','a','r', \
  'W','i','n','d','o','w','3','2',0 }
#elif defined(_MSC_VER)
# define TOOLBARCLASSNAMEW      L"ToolbarWindow32"
#else
1084 1085
static const WCHAR TOOLBARCLASSNAMEW[] = { 'T','o','o','l','b','a','r',
  'W','i','n','d','o','w','3','2',0 };
1086
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
1087 1088
#define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)

1089 1090 1091 1092 1093 1094 1095 1096
#define CMB_MASKED              0x02

#define TBSTATE_CHECKED         0x01
#define TBSTATE_PRESSED         0x02
#define TBSTATE_ENABLED         0x04
#define TBSTATE_HIDDEN          0x08
#define TBSTATE_INDETERMINATE   0x10
#define TBSTATE_WRAP            0x20
Alexandre Julliard's avatar
Alexandre Julliard committed
1097
#define TBSTATE_ELLIPSES        0x40
1098 1099
#define TBSTATE_MARKED          0x80

1100

1101
/* as of _WIN32_IE >= 0x0500 the following symbols are obsolete,
1102 1103
 * "everyone" should use the BTNS_... stuff below
 */
1104 1105 1106 1107 1108 1109
#define TBSTYLE_BUTTON          0x00
#define TBSTYLE_SEP             0x01
#define TBSTYLE_CHECK           0x02
#define TBSTYLE_GROUP           0x04
#define TBSTYLE_CHECKGROUP      (TBSTYLE_GROUP | TBSTYLE_CHECK)
#define TBSTYLE_DROPDOWN        0x08
1110 1111
#define TBSTYLE_AUTOSIZE        0x10
#define TBSTYLE_NOPREFIX        0x20
1112 1113 1114 1115 1116 1117 1118 1119 1120 1121
#define BTNS_BUTTON             TBSTYLE_BUTTON
#define BTNS_SEP                TBSTYLE_SEP
#define BTNS_CHECK              TBSTYLE_CHECK
#define BTNS_GROUP              TBSTYLE_GROUP
#define BTNS_CHECKGROUP         TBSTYLE_CHECKGROUP
#define BTNS_DROPDOWN           TBSTYLE_DROPDOWN
#define BTNS_AUTOSIZE           TBSTYLE_AUTOSIZE
#define BTNS_NOPREFIX           TBSTYLE_NOPREFIX
#define BTNS_SHOWTEXT           0x40  /* ignored unless TBSTYLE_EX_MIXEDB set */
#define BTNS_WHOLEDROPDOWN      0x80  /* draw dropdown arrow, but without split arrow section */
1122 1123 1124 1125 1126 1127

#define TBSTYLE_TOOLTIPS        0x0100
#define TBSTYLE_WRAPABLE        0x0200
#define TBSTYLE_ALTDRAG         0x0400
#define TBSTYLE_FLAT            0x0800
#define TBSTYLE_LIST            0x1000
1128
#define TBSTYLE_CUSTOMERASE     0x2000
1129 1130
#define TBSTYLE_REGISTERDROP    0x4000
#define TBSTYLE_TRANSPARENT     0x8000
1131 1132 1133 1134
#define TBSTYLE_EX_DRAWDDARROWS         0x00000001
#define TBSTYLE_EX_UNDOC1               0x00000004 /* similar to TBSTYLE_WRAPABLE */
#define TBSTYLE_EX_MIXEDBUTTONS         0x00000008
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS   0x00000010 /* don't show partially obscured buttons */
1135
#define TBSTYLE_EX_DOUBLEBUFFER         0x00000080 /* Double Buffer the toolbar */
Alexandre Julliard's avatar
Alexandre Julliard committed
1136 1137 1138 1139 1140 1141 1142 1143

#define TBIF_IMAGE              0x00000001
#define TBIF_TEXT               0x00000002
#define TBIF_STATE              0x00000004
#define TBIF_STYLE              0x00000008
#define TBIF_LPARAM             0x00000010
#define TBIF_COMMAND            0x00000020
#define TBIF_SIZE               0x00000040
Martin Fuchs's avatar
Martin Fuchs committed
1144
#define TBIF_BYINDEX            0x80000000
Alexandre Julliard's avatar
Alexandre Julliard committed
1145

1146
#define TBBF_LARGE		0x0001
Alexandre Julliard's avatar
Alexandre Julliard committed
1147

Alexandre Julliard's avatar
Alexandre Julliard committed
1148 1149 1150 1151 1152
#define TB_ENABLEBUTTON          (WM_USER+1)
#define TB_CHECKBUTTON           (WM_USER+2)
#define TB_PRESSBUTTON           (WM_USER+3)
#define TB_HIDEBUTTON            (WM_USER+4)
#define TB_INDETERMINATE         (WM_USER+5)
1153
#define TB_MARKBUTTON		 (WM_USER+6)
1154 1155 1156
#define TB_ISBUTTONENABLED       (WM_USER+9)
#define TB_ISBUTTONCHECKED       (WM_USER+10)
#define TB_ISBUTTONPRESSED       (WM_USER+11)
1157
#define TB_ISBUTTONHIDDEN        (WM_USER+12)
Alexandre Julliard's avatar
Alexandre Julliard committed
1158 1159 1160 1161 1162
#define TB_ISBUTTONINDETERMINATE (WM_USER+13)
#define TB_ISBUTTONHIGHLIGHTED   (WM_USER+14)
#define TB_SETSTATE              (WM_USER+17)
#define TB_GETSTATE              (WM_USER+18)
#define TB_ADDBITMAP             (WM_USER+19)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1163 1164 1165
#define TB_ADDBUTTONSA           (WM_USER+20)
#define TB_ADDBUTTONSW           (WM_USER+68)
#define TB_ADDBUTTONS            WINELIB_NAME_AW(TB_ADDBUTTONS)
Alexandre Julliard's avatar
Alexandre Julliard committed
1166
#define TB_HITTEST               (WM_USER+69)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1167 1168 1169
#define TB_INSERTBUTTONA         (WM_USER+21)
#define TB_INSERTBUTTONW         (WM_USER+67)
#define TB_INSERTBUTTON          WINELIB_NAME_AW(TB_INSERTBUTTON)
Alexandre Julliard's avatar
Alexandre Julliard committed
1170 1171 1172 1173
#define TB_DELETEBUTTON          (WM_USER+22)
#define TB_GETBUTTON             (WM_USER+23)
#define TB_BUTTONCOUNT           (WM_USER+24)
#define TB_COMMANDTOINDEX        (WM_USER+25)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1174 1175 1176
#define TB_SAVERESTOREA          (WM_USER+26)
#define TB_SAVERESTOREW          (WM_USER+76)
#define TB_SAVERESTORE           WINELIB_NAME_AW(TB_SAVERESTORE)
Alexandre Julliard's avatar
Alexandre Julliard committed
1177
#define TB_CUSTOMIZE             (WM_USER+27)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1178 1179 1180
#define TB_ADDSTRINGA            (WM_USER+28)
#define TB_ADDSTRINGW            (WM_USER+77)
#define TB_ADDSTRING             WINELIB_NAME_AW(TB_ADDSTRING)
Alexandre Julliard's avatar
Alexandre Julliard committed
1181 1182 1183 1184 1185 1186 1187 1188 1189 1190
#define TB_GETITEMRECT           (WM_USER+29)
#define TB_BUTTONSTRUCTSIZE      (WM_USER+30)
#define TB_SETBUTTONSIZE         (WM_USER+31)
#define TB_SETBITMAPSIZE         (WM_USER+32)
#define TB_AUTOSIZE              (WM_USER+33)
#define TB_GETTOOLTIPS           (WM_USER+35)
#define TB_SETTOOLTIPS           (WM_USER+36)
#define TB_SETPARENT             (WM_USER+37)
#define TB_SETROWS               (WM_USER+39)
#define TB_GETROWS               (WM_USER+40)
Alexandre Julliard's avatar
Alexandre Julliard committed
1191
#define TB_GETBITMAPFLAGS        (WM_USER+41)
Alexandre Julliard's avatar
Alexandre Julliard committed
1192 1193 1194
#define TB_SETCMDID              (WM_USER+42)
#define TB_CHANGEBITMAP          (WM_USER+43)
#define TB_GETBITMAP             (WM_USER+44)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1195 1196 1197
#define TB_GETBUTTONTEXTA        (WM_USER+45)
#define TB_GETBUTTONTEXTW        (WM_USER+75)
#define TB_GETBUTTONTEXT         WINELIB_NAME_AW(TB_GETBUTTONTEXT)
Alexandre Julliard's avatar
Alexandre Julliard committed
1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213
#define TB_REPLACEBITMAP         (WM_USER+46)
#define TB_SETINDENT             (WM_USER+47)
#define TB_SETIMAGELIST          (WM_USER+48)
#define TB_GETIMAGELIST          (WM_USER+49)
#define TB_LOADIMAGES            (WM_USER+50)
#define TB_GETRECT               (WM_USER+51) /* wParam is the Cmd instead of index */
#define TB_SETHOTIMAGELIST       (WM_USER+52)
#define TB_GETHOTIMAGELIST       (WM_USER+53)
#define TB_SETDISABLEDIMAGELIST  (WM_USER+54)
#define TB_GETDISABLEDIMAGELIST  (WM_USER+55)
#define TB_SETSTYLE              (WM_USER+56)
#define TB_GETSTYLE              (WM_USER+57)
#define TB_GETBUTTONSIZE         (WM_USER+58)
#define TB_SETBUTTONWIDTH        (WM_USER+59)
#define TB_SETMAXTEXTROWS        (WM_USER+60)
#define TB_GETTEXTROWS           (WM_USER+61)
Alexandre Julliard's avatar
Alexandre Julliard committed
1214
#define TB_GETOBJECT             (WM_USER+62)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1215 1216 1217 1218 1219 1220
#define TB_GETBUTTONINFOW        (WM_USER+63)
#define TB_GETBUTTONINFOA        (WM_USER+65)
#define TB_GETBUTTONINFO         WINELIB_NAME_AW(TB_GETBUTTONINFO)
#define TB_SETBUTTONINFOW        (WM_USER+64)
#define TB_SETBUTTONINFOA        (WM_USER+66)
#define TB_SETBUTTONINFO         WINELIB_NAME_AW(TB_SETBUTTONINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
1221 1222 1223 1224 1225
#define TB_SETDRAWTEXTFLAGS      (WM_USER+70)
#define TB_GETHOTITEM            (WM_USER+71)
#define TB_SETHOTITEM            (WM_USER+72)
#define TB_SETANCHORHIGHLIGHT    (WM_USER+73)
#define TB_GETANCHORHIGHLIGHT    (WM_USER+74)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1226 1227 1228
#define TB_MAPACCELERATORA       (WM_USER+78)
#define TB_MAPACCELERATORW       (WM_USER+90)
#define TB_MAPACCELERATOR        WINELIB_NAME_AW(TB_MAPACCELERATOR)
Alexandre Julliard's avatar
Alexandre Julliard committed
1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243
#define TB_GETINSERTMARK         (WM_USER+79)
#define TB_SETINSERTMARK         (WM_USER+80)
#define TB_INSERTMARKHITTEST     (WM_USER+81)
#define TB_MOVEBUTTON            (WM_USER+82)
#define TB_GETMAXSIZE            (WM_USER+83)
#define TB_SETEXTENDEDSTYLE      (WM_USER+84)
#define TB_GETEXTENDEDSTYLE      (WM_USER+85)
#define TB_GETPADDING            (WM_USER+86)
#define TB_SETPADDING            (WM_USER+87)
#define TB_SETINSERTMARKCOLOR    (WM_USER+88)
#define TB_GETINSERTMARKCOLOR    (WM_USER+89)
#define TB_SETCOLORSCHEME        CCM_SETCOLORSCHEME
#define TB_GETCOLORSCHEME        CCM_GETCOLORSCHEME
#define TB_SETUNICODEFORMAT      CCM_SETUNICODEFORMAT
#define TB_GETUNICODEFORMAT      CCM_GETUNICODEFORMAT
1244 1245
#define TB_GETSTRINGW            (WM_USER+91)
#define TB_GETSTRINGA            (WM_USER+92)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1246
#define TB_GETSTRING             WINELIB_NAME_AW(TB_GETSTRING)
1247 1248

/* undocumented messages in Toolbar */
1249
#ifdef __WINESRC__
1250
#define TB_UNKWN45D              (WM_USER+93)
1251 1252 1253 1254
#define TB_SETHOTITEM2           (WM_USER+94)
#define TB_SETLISTGAP            (WM_USER+96)
#define TB_GETIMAGELISTCOUNT     (WM_USER+98)
#define TB_GETIDEALSIZE          (WM_USER+99)
1255
#define TB_UNKWN464              (WM_USER+100)
1256
#endif
1257

1258 1259 1260
#define TB_GETMETRICS            (WM_USER+101)
#define TB_SETMETRICS            (WM_USER+102)
#define TB_SETWINDOWTHEME        CCM_SETWINDOWTHEME
Alexandre Julliard's avatar
Alexandre Julliard committed
1261

Alexandre Julliard's avatar
Alexandre Julliard committed
1262 1263
#define TBN_FIRST               (0U-700U)
#define TBN_LAST                (0U-720U)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1264 1265 1266
#define TBN_GETBUTTONINFOA      (TBN_FIRST-0)
#define TBN_GETBUTTONINFOW      (TBN_FIRST-20)
#define TBN_GETBUTTONINFO       WINELIB_NAME_AW(TBN_GETBUTTONINFO)
1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283
#define TBN_BEGINDRAG		(TBN_FIRST-1)
#define TBN_ENDDRAG		(TBN_FIRST-2)
#define TBN_BEGINADJUST		(TBN_FIRST-3)
#define TBN_ENDADJUST		(TBN_FIRST-4)
#define TBN_RESET		(TBN_FIRST-5)
#define TBN_QUERYINSERT		(TBN_FIRST-6)
#define TBN_QUERYDELETE		(TBN_FIRST-7)
#define TBN_TOOLBARCHANGE	(TBN_FIRST-8)
#define TBN_CUSTHELP		(TBN_FIRST-9)
#define TBN_DROPDOWN		(TBN_FIRST-10)
#define TBN_GETOBJECT		(TBN_FIRST-12)
#define TBN_HOTITEMCHANGE	(TBN_FIRST-13)
#define TBN_DRAGOUT		(TBN_FIRST-14)
#define TBN_DELETINGBUTTON	(TBN_FIRST-15)
#define TBN_GETDISPINFOA	(TBN_FIRST-16)
#define TBN_GETDISPINFOW	(TBN_FIRST-17)
#define TBN_GETDISPINFO		WINELIB_NAME_AW(TBN_GETDISPINFO)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1284 1285 1286
#define TBN_GETINFOTIPA         (TBN_FIRST-18)
#define TBN_GETINFOTIPW         (TBN_FIRST-19)
#define TBN_GETINFOTIP          WINELIB_NAME_AW(TBN_GETINFOTIP)
1287 1288
#define TBN_RESTORE	        (TBN_FIRST-21)
#define TBN_SAVE	        (TBN_FIRST-22)
1289
#define TBN_INITCUSTOMIZE	(TBN_FIRST-23)
1290
#define TBN_WRAPHOTITEM         (TBN_FIRST-24) /* this is undocumented and the name is a guess */
1291
#define TBNRF_HIDEHELP		0x00000001
Alexandre Julliard's avatar
Alexandre Julliard committed
1292

Alexandre Julliard's avatar
Alexandre Julliard committed
1293

1294 1295 1296 1297 1298
/* Return values from TBN_DROPDOWN */
#define TBDDRET_DEFAULT  0
#define TBDDRET_NODEFAULT  1
#define TBDDRET_TREATPRESSED  2

1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313
typedef struct _NMTBCUSTOMDRAW
{
    NMCUSTOMDRAW nmcd;
    HBRUSH hbrMonoDither;
    HBRUSH hbrLines;
    HPEN hpenLines;
    COLORREF clrText;
    COLORREF clrMark;
    COLORREF clrTextHighlight;
    COLORREF clrBtnFace;
    COLORREF clrBtnHighlight;
    COLORREF clrHighlightHotTrack;
    RECT rcText;
    int nStringBkMode;
    int nHLStringBkMode;
1314
    int iListGap;
1315 1316
} NMTBCUSTOMDRAW, *LPNMTBCUSTOMDRAW;

1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327
/* return flags for Toolbar NM_CUSTOMDRAW notifications */
#define TBCDRF_NOEDGES        0x00010000  /* Don't draw button edges       */
#define TBCDRF_HILITEHOTTRACK 0x00020000  /* Use color of the button bkgnd */
                                          /* when hottracked               */
#define TBCDRF_NOOFFSET       0x00040000  /* No offset button if pressed   */
#define TBCDRF_NOMARK         0x00080000  /* Don't draw default highlight  */
                                          /* for TBSTATE_MARKED            */
#define TBCDRF_NOETCHEDEFFECT 0x00100000  /* No etched effect for          */
                                          /* disabled items                */
#define TBCDRF_BLENDICON      0x00200000  /* ILD_BLEND50 on the icon image */
#define TBCDRF_NOBACKGROUND   0x00400000  /* ILD_BLEND50 on the icon image */
1328
#define TBCDRF_USECDCOLORS    0x00800000
1329 1330


Alexandre Julliard's avatar
Alexandre Julliard committed
1331 1332 1333
/* This is just for old CreateToolbar. */
/* Don't use it in new programs. */
typedef struct _OLDTBBUTTON {
1334 1335
    INT iBitmap;
    INT idCommand;
Alexandre Julliard's avatar
Alexandre Julliard committed
1336 1337 1338 1339 1340 1341 1342 1343 1344
    BYTE  fsState;
    BYTE  fsStyle;
    BYTE  bReserved[2];
    DWORD dwData;
} OLDTBBUTTON, *POLDTBBUTTON, *LPOLDTBBUTTON;
typedef const OLDTBBUTTON *LPCOLDTBBUTTON;


typedef struct _TBBUTTON {
1345 1346
    INT iBitmap;
    INT idCommand;
Alexandre Julliard's avatar
Alexandre Julliard committed
1347 1348
    BYTE  fsState;
    BYTE  fsStyle;
1349 1350 1351
#ifdef _WIN64
    BYTE  bReserved[6];
#else
Alexandre Julliard's avatar
Alexandre Julliard committed
1352
    BYTE  bReserved[2];
1353
#endif
Frank Richter's avatar
Frank Richter committed
1354 1355
    DWORD_PTR dwData;
    INT_PTR iString;
Alexandre Julliard's avatar
Alexandre Julliard committed
1356 1357 1358 1359 1360 1361 1362 1363 1364
} TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
typedef const TBBUTTON *LPCTBBUTTON;


typedef struct _COLORMAP {
    COLORREF from;
    COLORREF to;
} COLORMAP, *LPCOLORMAP;

1365

Alexandre Julliard's avatar
Alexandre Julliard committed
1366
typedef struct tagTBADDBITMAP {
1367
    HINSTANCE hInst;
Frank Richter's avatar
Frank Richter committed
1368
    UINT_PTR  nID;
Alexandre Julliard's avatar
Alexandre Julliard committed
1369 1370
} TBADDBITMAP, *LPTBADDBITMAP;

1371
#define HINST_COMMCTRL         ((HINSTANCE)-1)
1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406
#define IDB_STD_SMALL_COLOR     0
#define IDB_STD_LARGE_COLOR     1
#define IDB_VIEW_SMALL_COLOR    4
#define IDB_VIEW_LARGE_COLOR    5
#define IDB_HIST_SMALL_COLOR    8
#define IDB_HIST_LARGE_COLOR    9

#define STD_CUT                 0
#define STD_COPY                1
#define STD_PASTE               2
#define STD_UNDO                3
#define STD_REDOW               4
#define STD_DELETE              5
#define STD_FILENEW             6
#define STD_FILEOPEN            7
#define STD_FILESAVE            8
#define STD_PRINTPRE            9
#define STD_PROPERTIES          10
#define STD_HELP                11
#define STD_FIND                12
#define STD_REPLACE             13
#define STD_PRINT               14

#define VIEW_LARGEICONS         0
#define VIEW_SMALLICONS         1
#define VIEW_LIST               2
#define VIEW_DETAILS            3
#define VIEW_SORTNAME           4
#define VIEW_SORTSIZE           5
#define VIEW_SORTDATE           6
#define VIEW_SORTTYPE           7
#define VIEW_PARENTFOLDER       8
#define VIEW_NETCONNECT         9
#define VIEW_NETDISCONNECT      10
#define VIEW_NEWFOLDER          11
1407 1408 1409 1410 1411 1412 1413
#define VIEW_VIEWMENU           12

#define HIST_BACK               0
#define HIST_FORWARD            1
#define HIST_FAVORITES          2
#define HIST_ADDTOFAVORITES     3
#define HIST_VIEWTREE           4
Alexandre Julliard's avatar
Alexandre Julliard committed
1414

Alexandre Julliard's avatar
Alexandre Julliard committed
1415 1416 1417 1418
typedef struct tagTBSAVEPARAMSA {
    HKEY   hkr;
    LPCSTR pszSubKey;
    LPCSTR pszValueName;
1419
} TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
Alexandre Julliard's avatar
Alexandre Julliard committed
1420 1421 1422 1423 1424

typedef struct tagTBSAVEPARAMSW {
    HKEY   hkr;
    LPCWSTR pszSubKey;
    LPCWSTR pszValueName;
1425
} TBSAVEPARAMSW, *LPTBSAVEPARAMSW;
Alexandre Julliard's avatar
Alexandre Julliard committed
1426

1427 1428
#define TBSAVEPARAMS   WINELIB_NAME_AW(TBSAVEPARAMS)
#define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
Alexandre Julliard's avatar
Alexandre Julliard committed
1429

Alexandre Julliard's avatar
Alexandre Julliard committed
1430 1431
typedef struct
{
1432
    UINT cbSize;
Alexandre Julliard's avatar
Alexandre Julliard committed
1433
    DWORD  dwMask;
1434 1435
    INT  idCommand;
    INT  iImage;
Alexandre Julliard's avatar
Alexandre Julliard committed
1436 1437 1438
    BYTE   fsState;
    BYTE   fsStyle;
    WORD   cx;
Frank Richter's avatar
Frank Richter committed
1439
    DWORD_PTR lParam;
Alexandre Julliard's avatar
Alexandre Julliard committed
1440
    LPSTR  pszText;
1441 1442
    INT  cchText;
} TBBUTTONINFOA, *LPTBBUTTONINFOA;
Alexandre Julliard's avatar
Alexandre Julliard committed
1443 1444 1445

typedef struct
{
1446
    UINT cbSize;
Alexandre Julliard's avatar
Alexandre Julliard committed
1447
    DWORD  dwMask;
1448 1449
    INT  idCommand;
    INT  iImage;
Alexandre Julliard's avatar
Alexandre Julliard committed
1450 1451 1452
    BYTE   fsState;
    BYTE   fsStyle;
    WORD   cx;
Frank Richter's avatar
Frank Richter committed
1453
    DWORD_PTR lParam;
Alexandre Julliard's avatar
Alexandre Julliard committed
1454
    LPWSTR pszText;
1455 1456
    INT  cchText;
} TBBUTTONINFOW, *LPTBBUTTONINFOW;
Alexandre Julliard's avatar
Alexandre Julliard committed
1457

1458 1459
#define TBBUTTONINFO   WINELIB_NAME_AW(TBBUTTONINFO)
#define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
1460

1461 1462 1463 1464 1465 1466 1467 1468
typedef struct tagNMTBHOTITEM
{
    NMHDR hdr;
    int idOld;
    int idNew;
    DWORD dwFlags;
} NMTBHOTITEM, *LPNMTBHOTITEM;

Alexandre Julliard's avatar
Alexandre Julliard committed
1469 1470 1471 1472
typedef struct tagNMTBGETINFOTIPA
{
    NMHDR  hdr;
    LPSTR  pszText;
1473 1474
    INT  cchTextMax;
    INT  iItem;
Alexandre Julliard's avatar
Alexandre Julliard committed
1475
    LPARAM lParam;
1476
} NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
Alexandre Julliard's avatar
Alexandre Julliard committed
1477 1478 1479 1480 1481

typedef struct tagNMTBGETINFOTIPW
{
    NMHDR  hdr;
    LPWSTR pszText;
1482 1483
    INT  cchTextMax;
    INT  iItem;
Alexandre Julliard's avatar
Alexandre Julliard committed
1484
    LPARAM lParam;
1485
} NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
Alexandre Julliard's avatar
Alexandre Julliard committed
1486

Mike McCormack's avatar
Mike McCormack committed
1487
#define NMTBGETINFOTIP   WINELIB_NAME_AW(NMTBGETINFOTIP)
1488
#define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
Alexandre Julliard's avatar
Alexandre Julliard committed
1489

1490 1491 1492 1493 1494
typedef struct
{
    NMHDR hdr;
    DWORD dwMask;
    int idCommand;
Frank Richter's avatar
Frank Richter committed
1495
    DWORD_PTR lParam;
1496 1497 1498 1499 1500 1501 1502 1503 1504 1505
    int iImage;
    LPSTR pszText;
    int cchText;
} NMTBDISPINFOA, *LPNMTBDISPINFOA;

typedef struct
{
    NMHDR hdr;
    DWORD dwMask;
    int idCommand;
Frank Richter's avatar
Frank Richter committed
1506
    DWORD_PTR lParam;
1507 1508 1509 1510 1511 1512 1513 1514
    int iImage;
    LPWSTR pszText;
    int cchText;
} NMTBDISPINFOW, *LPNMTBDISPINFOW;

#define NMTBDISPINFO WINELIB_NAME_AW(NMTBDISPINFO)
#define LPNMTBDISPINFO WINELIB_NAME_AW(LPNMTBDISPINFO)

1515 1516 1517 1518 1519 1520
/* contents of dwMask in the NMTBDISPINFO structure */
#define TBNF_IMAGE     0x00000001
#define TBNF_TEXT      0x00000002
#define TBNF_DI_SETITEM  0x10000000


1521 1522 1523 1524 1525 1526 1527 1528
typedef struct tagNMTOOLBARA
{
    NMHDR    hdr;
    INT      iItem;
    TBBUTTON tbButton;
    INT      cchText;
    LPSTR    pszText;
    RECT     rcButton; /* Version 5.80 */
1529
} NMTOOLBARA, *LPNMTOOLBARA, TBNOTIFYA, *LPTBNOTIFYA;
1530 1531 1532 1533 1534 1535 1536 1537 1538

typedef struct tagNMTOOLBARW
{
    NMHDR    hdr;
    INT      iItem;
    TBBUTTON tbButton;
    INT      cchText;
    LPWSTR   pszText;
    RECT     rcButton; /* Version 5.80 */
1539
} NMTOOLBARW, *LPNMTOOLBARW, TBNOTIFYW, *LPTBNOTIFYW;
1540 1541 1542

#define NMTOOLBAR   WINELIB_NAME_AW(NMTOOLBAR)
#define LPNMTOOLBAR WINELIB_NAME_AW(LPNMTOOLBAR)
1543 1544
#define TBNOTIFY    WINELIB_NAME_AW(TBNOTIFY)
#define LPTBNOTIFY  WINELIB_NAME_AW(LPTBNOTIFY)
1545

1546 1547
typedef struct
{
1548
	HINSTANCE hInstOld;
Frank Richter's avatar
Frank Richter committed
1549
	UINT_PTR  nIDOld;
1550
	HINSTANCE hInstNew;
Frank Richter's avatar
Frank Richter committed
1551
	UINT_PTR  nIDNew;
1552
	INT       nButtons;
1553
} TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
Alexandre Julliard's avatar
Alexandre Julliard committed
1554

1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565
#define HICF_OTHER          0x00000000
#define HICF_MOUSE          0x00000001   /* Triggered by mouse             */
#define HICF_ARROWKEYS      0x00000002   /* Triggered by arrow keys        */
#define HICF_ACCELERATOR    0x00000004   /* Triggered by accelerator       */
#define HICF_DUPACCEL       0x00000008   /* This accelerator is not unique */
#define HICF_ENTERING       0x00000010   /* idOld is invalid               */
#define HICF_LEAVING        0x00000020   /* idNew is invalid               */
#define HICF_RESELECT       0x00000040   /* hot item reselected            */
#define HICF_LMOUSE         0x00000080   /* left mouse button selected     */
#define HICF_TOGGLEDROPDOWN 0x00000100   /* Toggle button's dropdown state */

1566
typedef struct
1567 1568 1569 1570 1571 1572 1573
{
    int   iButton;
    DWORD dwFlags;
} TBINSERTMARK, *LPTBINSERTMARK;
#define TBIMHT_AFTER      0x00000001 /* TRUE = insert After iButton, otherwise before */
#define TBIMHT_BACKGROUND 0x00000002 /* TRUE if and only if missed buttons completely */

1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612
typedef struct tagNMTBSAVE
{
    NMHDR hdr;
    DWORD* pData;
    DWORD* pCurrent;
    UINT cbData;
    int iItem;
    int cButtons;
    TBBUTTON tbButton;
} NMTBSAVE, *LPNMTBSAVE;

typedef struct tagNMTBRESTORE
{
    NMHDR hdr;
    DWORD* pData;
    DWORD* pCurrent;
    UINT cbData;
    int iItem;
    int cButtons;
    int cbBytesPerRecord;
    TBBUTTON tbButton;
} NMTBRESTORE, *LPNMTBRESTORE;

#define TBMF_PAD           0x00000001
#define TBMF_BARPAD        0x00000002
#define TBMF_BUTTONSPACING 0x00000004

typedef struct
{
    UINT cbSize;
    DWORD dwMask;
    INT cxPad;
    INT cyPad;
    INT cxBarPad;
    INT cyBarPad;
    INT cxButtonSpacing;
    INT cyButtonSpacing;
} TBMETRICS, *LPTBMETRICS;

1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628
/* these are undocumented and the names are guesses */
typedef struct
{
    NMHDR hdr;
    HWND hwndDialog;
} NMTBINITCUSTOMIZE;

typedef struct
{
    NMHDR hdr;
    INT idNew;
    INT iDirection; /* left is -1, right is 1 */
    DWORD dwReason; /* HICF_* */
} NMTBWRAPHOTITEM;


1629 1630
HWND WINAPI
CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
1631
              UINT, LPCTBBUTTON, INT);
1632

1633 1634
HWND WINAPI
CreateToolbarEx(HWND, DWORD, UINT, INT,
1635
                HINSTANCE, UINT_PTR, LPCTBBUTTON,
1636
                INT, INT, INT, INT, INT, UINT);
Alexandre Julliard's avatar
Alexandre Julliard committed
1637

1638
HBITMAP WINAPI
Frank Richter's avatar
Frank Richter committed
1639
CreateMappedBitmap (HINSTANCE, INT_PTR, UINT, LPCOLORMAP, INT);
Alexandre Julliard's avatar
Alexandre Julliard committed
1640

Alexandre Julliard's avatar
Alexandre Julliard committed
1641

Alexandre Julliard's avatar
Alexandre Julliard committed
1642 1643
/* Tool tips */

1644
#define TOOLTIPS_CLASSA         "tooltips_class32"
1645 1646 1647 1648 1649 1650
#if defined(__GNUC__)
# define TOOLTIPS_CLASSW (const WCHAR []){ 't','o','o','l','t','i','p','s','_', \
  'c','l','a','s','s','3','2',0 }
#elif defined(_MSC_VER)
# define TOOLTIPS_CLASSW        L"tooltips_class32"
#else
1651 1652
static const WCHAR TOOLTIPS_CLASSW[] = { 't','o','o','l','t','i','p','s','_',
  'c','l','a','s','s','3','2',0 };
1653
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
1654
#define TOOLTIPS_CLASS          WINELIB_NAME_AW(TOOLTIPS_CLASS)
Alexandre Julliard's avatar
Alexandre Julliard committed
1655 1656

#define INFOTIPSIZE             1024
1657

Alexandre Julliard's avatar
Alexandre Julliard committed
1658 1659
#define TTS_ALWAYSTIP           0x01
#define TTS_NOPREFIX            0x02
1660 1661 1662 1663
#define TTS_NOANIMATE           0x10
#define TTS_NOFADE              0x20
#define TTS_BALLOON             0x40
#define TTS_CLOSE               0x80
1664
#define TTS_USEVISUALSTYLE      0x100
Alexandre Julliard's avatar
Alexandre Julliard committed
1665

Alexandre Julliard's avatar
Alexandre Julliard committed
1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681
#define TTF_IDISHWND            0x0001
#define TTF_CENTERTIP           0x0002
#define TTF_RTLREADING          0x0004
#define TTF_SUBCLASS            0x0010
#define TTF_TRACK               0x0020
#define TTF_ABSOLUTE            0x0080
#define TTF_TRANSPARENT         0x0100
#define TTF_DI_SETITEM          0x8000  /* valid only on the TTN_NEEDTEXT callback */


#define TTDT_AUTOMATIC          0
#define TTDT_RESHOW             1
#define TTDT_AUTOPOP            2
#define TTDT_INITIAL            3


1682 1683 1684 1685 1686 1687
#define TTI_NONE                0
#define TTI_INFO                1
#define TTI_WARNING             2
#define TTI_ERROR               3


Alexandre Julliard's avatar
Alexandre Julliard committed
1688 1689
#define TTM_ACTIVATE            (WM_USER+1)
#define TTM_SETDELAYTIME        (WM_USER+3)
1690 1691
#define TTM_ADDTOOLA            (WM_USER+4)
#define TTM_ADDTOOLW            (WM_USER+50)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1692
#define TTM_ADDTOOL             WINELIB_NAME_AW(TTM_ADDTOOL)
1693 1694
#define TTM_DELTOOLA            (WM_USER+5)
#define TTM_DELTOOLW            (WM_USER+51)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1695
#define TTM_DELTOOL             WINELIB_NAME_AW(TTM_DELTOOL)
1696 1697
#define TTM_NEWTOOLRECTA        (WM_USER+6)
#define TTM_NEWTOOLRECTW        (WM_USER+52)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1698
#define TTM_NEWTOOLRECT         WINELIB_NAME_AW(TTM_NEWTOOLRECT)
Alexandre Julliard's avatar
Alexandre Julliard committed
1699
#define TTM_RELAYEVENT          (WM_USER+7)
1700 1701
#define TTM_GETTOOLINFOA        (WM_USER+8)
#define TTM_GETTOOLINFOW        (WM_USER+53)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1702
#define TTM_GETTOOLINFO         WINELIB_NAME_AW(TTM_GETTOOLINFO)
1703 1704
#define TTM_SETTOOLINFOA        (WM_USER+9)
#define TTM_SETTOOLINFOW        (WM_USER+54)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1705
#define TTM_SETTOOLINFO         WINELIB_NAME_AW(TTM_SETTOOLINFO)
1706 1707
#define TTM_HITTESTA            (WM_USER+10)
#define TTM_HITTESTW            (WM_USER+55)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1708
#define TTM_HITTEST             WINELIB_NAME_AW(TTM_HITTEST)
1709 1710
#define TTM_GETTEXTA            (WM_USER+11)
#define TTM_GETTEXTW            (WM_USER+56)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1711
#define TTM_GETTEXT             WINELIB_NAME_AW(TTM_GETTEXT)
1712 1713
#define TTM_UPDATETIPTEXTA      (WM_USER+12)
#define TTM_UPDATETIPTEXTW      (WM_USER+57)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1714
#define TTM_UPDATETIPTEXT       WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
Alexandre Julliard's avatar
Alexandre Julliard committed
1715
#define TTM_GETTOOLCOUNT        (WM_USER+13)
1716 1717
#define TTM_ENUMTOOLSA          (WM_USER+14)
#define TTM_ENUMTOOLSW          (WM_USER+58)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1718
#define TTM_ENUMTOOLS           WINELIB_NAME_AW(TTM_ENUMTOOLS)
1719 1720
#define TTM_GETCURRENTTOOLA     (WM_USER+15)
#define TTM_GETCURRENTTOOLW     (WM_USER+59)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1721
#define TTM_GETCURRENTTOOL      WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
Alexandre Julliard's avatar
Alexandre Julliard committed
1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735
#define TTM_WINDOWFROMPOINT     (WM_USER+16)
#define TTM_TRACKACTIVATE       (WM_USER+17)
#define TTM_TRACKPOSITION       (WM_USER+18)
#define TTM_SETTIPBKCOLOR       (WM_USER+19)
#define TTM_SETTIPTEXTCOLOR     (WM_USER+20)
#define TTM_GETDELAYTIME        (WM_USER+21)
#define TTM_GETTIPBKCOLOR       (WM_USER+22)
#define TTM_GETTIPTEXTCOLOR     (WM_USER+23)
#define TTM_SETMAXTIPWIDTH      (WM_USER+24)
#define TTM_GETMAXTIPWIDTH      (WM_USER+25)
#define TTM_SETMARGIN           (WM_USER+26)
#define TTM_GETMARGIN           (WM_USER+27)
#define TTM_POP                 (WM_USER+28)
#define TTM_UPDATE              (WM_USER+29)
1736
#define TTM_GETBUBBLESIZE       (WM_USER+30)
1737 1738 1739 1740 1741 1742 1743
#define TTM_ADJUSTRECT          (WM_USER+31)
#define TTM_SETTITLEA           (WM_USER+32)
#define TTM_SETTITLEW           (WM_USER+33)
#define TTM_SETTITLE            WINELIB_NAME_AW(TTM_SETTITLE)
#define TTM_POPUP               (WM_USER+34)
#define TTM_GETTITLE            (WM_USER+35)
#define TTM_SETWINDOWTHEME      CCM_SETWINDOWTHEME
Alexandre Julliard's avatar
Alexandre Julliard committed
1744

Alexandre Julliard's avatar
Alexandre Julliard committed
1745 1746 1747

#define TTN_FIRST               (0U-520U)
#define TTN_LAST                (0U-549U)
1748 1749
#define TTN_GETDISPINFOA        (TTN_FIRST-0)
#define TTN_GETDISPINFOW        (TTN_FIRST-10)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1750
#define TTN_GETDISPINFO         WINELIB_NAME_AW(TTN_GETDISPINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
1751 1752 1753
#define TTN_SHOW                (TTN_FIRST-1)
#define TTN_POP                 (TTN_FIRST-2)

Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1754 1755 1756
#define TTN_NEEDTEXT		TTN_GETDISPINFO
#define TTN_NEEDTEXTA 		TTN_GETDISPINFOA
#define TTN_NEEDTEXTW 		TTN_GETDISPINFOW
1757

Alexandre Julliard's avatar
Alexandre Julliard committed
1758
typedef struct tagTOOLINFOA {
1759 1760 1761
    UINT cbSize;
    UINT uFlags;
    HWND hwnd;
Frank Richter's avatar
Frank Richter committed
1762
    UINT_PTR uId;
1763 1764
    RECT rect;
    HINSTANCE hinst;
Alexandre Julliard's avatar
Alexandre Julliard committed
1765 1766
    LPSTR lpszText;
    LPARAM lParam;
1767
    void *lpReserved;
1768
} TTTOOLINFOA, *LPTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
Alexandre Julliard's avatar
Alexandre Julliard committed
1769 1770

typedef struct tagTOOLINFOW {
1771 1772 1773
    UINT cbSize;
    UINT uFlags;
    HWND hwnd;
Frank Richter's avatar
Frank Richter committed
1774
    UINT_PTR uId;
1775 1776
    RECT rect;
    HINSTANCE hinst;
Alexandre Julliard's avatar
Alexandre Julliard committed
1777 1778
    LPWSTR lpszText;
    LPARAM lParam;
1779
    void *lpReserved;
1780
} TTTOOLINFOW, *LPTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW;
Alexandre Julliard's avatar
Alexandre Julliard committed
1781 1782

#define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1783
#define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
1784 1785
#define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
#define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
1786
#define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
1787

1788 1789 1790
#define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
#define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
#define TTTOOLINFO_V1_SIZE  CCSIZEOF_STRUCT(WINELIB_NAME_AW(TTTOOLINFO), lpszText)
1791 1792 1793 1794
#define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lParam)
#define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lParam)
#define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpReserved)
#define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpReserved)
Alexandre Julliard's avatar
Alexandre Julliard committed
1795

Alexandre Julliard's avatar
Alexandre Julliard committed
1796 1797
typedef struct _TT_HITTESTINFOA
{
1798 1799 1800 1801
    HWND        hwnd;
    POINT       pt;
    TTTOOLINFOA ti;
} TTHITTESTINFOA, *LPTTHITTESTINFOA;
1802
#define LPHITTESTINFOA LPTTHITTESTINFOA
Alexandre Julliard's avatar
Alexandre Julliard committed
1803

Alexandre Julliard's avatar
Alexandre Julliard committed
1804 1805
typedef struct _TT_HITTESTINFOW
{
1806 1807 1808 1809
    HWND        hwnd;
    POINT       pt;
    TTTOOLINFOW ti;
} TTHITTESTINFOW, *LPTTHITTESTINFOW;
1810
#define LPHITTESTINFOW LPTTHITTESTINFOW
Alexandre Julliard's avatar
Alexandre Julliard committed
1811 1812 1813

#define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
#define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
1814
#define LPHITTESTINFO WINELIB_NAME_AW(LPHITTESTINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
1815 1816 1817 1818 1819 1820

typedef struct tagNMTTDISPINFOA
{
    NMHDR hdr;
    LPSTR lpszText;
    CHAR  szText[80];
1821 1822
    HINSTANCE hinst;
    UINT      uFlags;
Alexandre Julliard's avatar
Alexandre Julliard committed
1823
    LPARAM      lParam;
1824
} NMTTDISPINFOA, *LPNMTTDISPINFOA;
Alexandre Julliard's avatar
Alexandre Julliard committed
1825 1826 1827 1828 1829 1830

typedef struct tagNMTTDISPINFOW
{
    NMHDR       hdr;
    LPWSTR      lpszText;
    WCHAR       szText[80];
1831 1832
    HINSTANCE hinst;
    UINT      uFlags;
Alexandre Julliard's avatar
Alexandre Julliard committed
1833
    LPARAM      lParam;
1834
} NMTTDISPINFOW, *LPNMTTDISPINFOW;
Alexandre Julliard's avatar
Alexandre Julliard committed
1835

Alexandre Julliard's avatar
Alexandre Julliard committed
1836 1837
#define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
#define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
1838

1839 1840
#define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
#define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
Alexandre Julliard's avatar
Alexandre Julliard committed
1841 1842
#define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)

1843 1844 1845 1846 1847 1848 1849 1850
typedef struct _TTGETTITLE
{
    DWORD dwSize;
    UINT uTitleBitmap;
    UINT cch;
    WCHAR* pszTitle;
} TTGETTITLE, *PTTGETTITLE;

1851 1852
#define TOOLTIPTEXTW    NMTTDISPINFOW
#define TOOLTIPTEXTA    NMTTDISPINFOA
1853 1854 1855 1856
#define TOOLTIPTEXT     NMTTDISPINFO
#define LPTOOLTIPTEXTW  LPNMTTDISPINFOW
#define LPTOOLTIPTEXTA  LPNMTTDISPINFOA
#define LPTOOLTIPTEXT   LPNMTTDISPINFO
Alexandre Julliard's avatar
Alexandre Julliard committed
1857

Eric Kohl's avatar
Eric Kohl committed
1858

Alexandre Julliard's avatar
Alexandre Julliard committed
1859 1860
/* Rebar control */

1861
#define REBARCLASSNAMEA         "ReBarWindow32"
1862 1863 1864 1865 1866 1867
#if defined(__GNUC__)
# define REBARCLASSNAMEW (const WCHAR []){ 'R','e','B','a','r', \
  'W','i','n','d','o','w','3','2',0 }
#elif defined(_MSC_VER)
# define REBARCLASSNAMEW        L"ReBarWindow32"
#else
1868 1869
static const WCHAR REBARCLASSNAMEW[] = { 'R','e','B','a','r',
  'W','i','n','d','o','w','3','2',0 };
1870
#endif
1871 1872 1873 1874 1875 1876 1877 1878 1879 1880
#define REBARCLASSNAME          WINELIB_NAME_AW(REBARCLASSNAME)

#define RBS_TOOLTIPS            0x0100
#define RBS_VARHEIGHT           0x0200
#define RBS_BANDBORDERS         0x0400
#define RBS_FIXEDORDER          0x0800
#define RBS_REGISTERDROP        0x1000
#define RBS_AUTOSIZE            0x2000
#define RBS_VERTICALGRIPPER     0x4000
#define RBS_DBLCLKTOGGLE        0x8000
Alexandre Julliard's avatar
Alexandre Julliard committed
1881

Alexandre Julliard's avatar
Alexandre Julliard committed
1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896
#define RBIM_IMAGELIST          0x00000001

#define RBBIM_STYLE             0x00000001
#define RBBIM_COLORS            0x00000002
#define RBBIM_TEXT              0x00000004
#define RBBIM_IMAGE             0x00000008
#define RBBIM_CHILD             0x00000010
#define RBBIM_CHILDSIZE         0x00000020
#define RBBIM_SIZE              0x00000040
#define RBBIM_BACKGROUND        0x00000080
#define RBBIM_ID                0x00000100
#define RBBIM_IDEALSIZE         0x00000200
#define RBBIM_LPARAM            0x00000400
#define RBBIM_HEADERSIZE        0x00000800

1897 1898 1899 1900 1901 1902 1903 1904 1905
#define RBBS_BREAK              0x00000001
#define RBBS_FIXEDSIZE          0x00000002
#define RBBS_CHILDEDGE          0x00000004
#define RBBS_HIDDEN             0x00000008
#define RBBS_NOVERT             0x00000010
#define RBBS_FIXEDBMP           0x00000020
#define RBBS_VARIABLEHEIGHT     0x00000040
#define RBBS_GRIPPERALWAYS      0x00000080
#define RBBS_NOGRIPPER          0x00000100
Robert Shearman's avatar
Robert Shearman committed
1906 1907 1908
#define RBBS_USECHEVRON         0x00000200
#define RBBS_HIDETITLE          0x00000400
#define RBBS_TOPALIGN           0x00000800
1909 1910 1911 1912 1913 1914 1915 1916 1917

#define RBNM_ID                 0x00000001
#define RBNM_STYLE              0x00000002
#define RBNM_LPARAM             0x00000004

#define RBHT_NOWHERE            0x0001
#define RBHT_CAPTION            0x0002
#define RBHT_CLIENT             0x0003
#define RBHT_GRABBER            0x0004
Robert Shearman's avatar
Robert Shearman committed
1918
#define RBHT_CHEVRON            0x0008
Alexandre Julliard's avatar
Alexandre Julliard committed
1919

Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1920 1921
#define RB_INSERTBANDA          (WM_USER+1)
#define RB_INSERTBANDW          (WM_USER+10)
1922
#define RB_INSERTBAND           WINELIB_NAME_AW(RB_INSERTBAND)
Alexandre Julliard's avatar
Alexandre Julliard committed
1923 1924 1925
#define RB_DELETEBAND           (WM_USER+2)
#define RB_GETBARINFO           (WM_USER+3)
#define RB_SETBARINFO           (WM_USER+4)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1926 1927
#define RB_SETBANDINFOA         (WM_USER+6)
#define RB_SETBANDINFOW         (WM_USER+11)
1928
#define RB_SETBANDINFO          WINELIB_NAME_AW(RB_SETBANDINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946
#define RB_SETPARENT            (WM_USER+7)
#define RB_HITTEST              (WM_USER+8)
#define RB_GETRECT              (WM_USER+9)
#define RB_GETBANDCOUNT         (WM_USER+12)
#define RB_GETROWCOUNT          (WM_USER+13)
#define RB_GETROWHEIGHT         (WM_USER+14)
#define RB_IDTOINDEX            (WM_USER+16)
#define RB_GETTOOLTIPS          (WM_USER+17)
#define RB_SETTOOLTIPS          (WM_USER+18)
#define RB_SETBKCOLOR           (WM_USER+19)
#define RB_GETBKCOLOR           (WM_USER+20)
#define RB_SETTEXTCOLOR         (WM_USER+21)
#define RB_GETTEXTCOLOR         (WM_USER+22)
#define RB_SIZETORECT           (WM_USER+23)
#define RB_BEGINDRAG            (WM_USER+24)
#define RB_ENDDRAG              (WM_USER+25)
#define RB_DRAGMOVE             (WM_USER+26)
#define RB_GETBARHEIGHT         (WM_USER+27)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
1947 1948
#define RB_GETBANDINFOW         (WM_USER+28)
#define RB_GETBANDINFOA         (WM_USER+29)
1949
#define RB_GETBANDINFO          WINELIB_NAME_AW(RB_GETBANDINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
1950 1951
#define RB_MINIMIZEBAND         (WM_USER+30)
#define RB_MAXIMIZEBAND         (WM_USER+31)
Eric Kohl's avatar
Eric Kohl committed
1952
#define RB_GETBANDBORDERS       (WM_USER+34)
Alexandre Julliard's avatar
Alexandre Julliard committed
1953 1954 1955 1956
#define RB_SHOWBAND             (WM_USER+35)
#define RB_SETPALETTE           (WM_USER+37)
#define RB_GETPALETTE           (WM_USER+38)
#define RB_MOVEBAND             (WM_USER+39)
Robert Shearman's avatar
Robert Shearman committed
1957 1958
#define RB_GETBANDMARGINS       (WM_USER+40)
#define RB_PUSHCHEVRON          (WM_USER+43)
1959 1960 1961 1962 1963
#define RB_GETDROPTARGET        CCM_GETDROPTARGET
#define RB_SETCOLORSCHEME       CCM_SETCOLORSCHEME
#define RB_GETCOLORSCHEME       CCM_GETCOLORSCHEME
#define RB_SETUNICODEFORMAT     CCM_SETUNICODEFORMAT
#define RB_GETUNICODEFORMAT     CCM_GETUNICODEFORMAT
1964
#define RB_SETWINDOWTHEME       CCM_SETWINDOWTHEME
Alexandre Julliard's avatar
Alexandre Julliard committed
1965

Alexandre Julliard's avatar
Alexandre Julliard committed
1966 1967
#define RBN_FIRST               (0U-831U)
#define RBN_LAST                (0U-859U)
1968 1969 1970 1971 1972 1973 1974 1975 1976
#define RBN_HEIGHTCHANGE        (RBN_FIRST-0)
#define RBN_GETOBJECT           (RBN_FIRST-1)
#define RBN_LAYOUTCHANGED       (RBN_FIRST-2)
#define RBN_AUTOSIZE            (RBN_FIRST-3)
#define RBN_BEGINDRAG           (RBN_FIRST-4)
#define RBN_ENDDRAG             (RBN_FIRST-5)
#define RBN_DELETINGBAND        (RBN_FIRST-6)
#define RBN_DELETEDBAND         (RBN_FIRST-7)
#define RBN_CHILDSIZE           (RBN_FIRST-8)
Robert Shearman's avatar
Robert Shearman committed
1977 1978 1979
#define RBN_CHEVRONPUSHED       (RBN_FIRST-10)
#define RBN_MINMAX              (RBN_FIRST-21)
#define RBN_AUTOBREAK           (RBN_FIRST-22)
Alexandre Julliard's avatar
Alexandre Julliard committed
1980 1981 1982

typedef struct tagREBARINFO
{
1983 1984
    UINT     cbSize;
    UINT     fMask;
Alexandre Julliard's avatar
Alexandre Julliard committed
1985 1986 1987 1988 1989
    HIMAGELIST himl;
} REBARINFO, *LPREBARINFO;

typedef struct tagREBARBANDINFOA
{
1990 1991 1992
    UINT    cbSize;
    UINT    fMask;
    UINT    fStyle;
Alexandre Julliard's avatar
Alexandre Julliard committed
1993 1994 1995
    COLORREF  clrFore;
    COLORREF  clrBack;
    LPSTR     lpText;
1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007
    UINT    cch;
    INT     iImage;
    HWND    hwndChild;
    UINT    cxMinChild;
    UINT    cyMinChild;
    UINT    cx;
    HBITMAP hbmBack;
    UINT    wID;
    UINT    cyChild;
    UINT    cyMaxChild;
    UINT    cyIntegral;
    UINT    cxIdeal;
Alexandre Julliard's avatar
Alexandre Julliard committed
2008
    LPARAM    lParam;
2009
    UINT    cxHeader;
2010 2011 2012
    /* _WIN32_WINNT >= 0x0600 */
    RECT    rcChevronLocation;
    UINT    uChevronState;
2013
} REBARBANDINFOA, *LPREBARBANDINFOA;
Alexandre Julliard's avatar
Alexandre Julliard committed
2014

2015
typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
Alexandre Julliard's avatar
Alexandre Julliard committed
2016 2017 2018

typedef struct tagREBARBANDINFOW
{
2019 2020 2021
    UINT    cbSize;
    UINT    fMask;
    UINT    fStyle;
Alexandre Julliard's avatar
Alexandre Julliard committed
2022 2023
    COLORREF  clrFore;
    COLORREF  clrBack;
2024
    LPWSTR    lpText;
2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036
    UINT    cch;
    INT     iImage;
    HWND    hwndChild;
    UINT    cxMinChild;
    UINT    cyMinChild;
    UINT    cx;
    HBITMAP hbmBack;
    UINT    wID;
    UINT    cyChild;
    UINT    cyMaxChild;
    UINT    cyIntegral;
    UINT    cxIdeal;
Alexandre Julliard's avatar
Alexandre Julliard committed
2037
    LPARAM    lParam;
2038
    UINT    cxHeader;
2039 2040 2041
    /* _WIN32_WINNT >= 0x0600 */
    RECT    rcChevronLocation;
    UINT    uChevronState;
2042
} REBARBANDINFOW, *LPREBARBANDINFOW;
Alexandre Julliard's avatar
Alexandre Julliard committed
2043

2044
typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
Alexandre Julliard's avatar
Alexandre Julliard committed
2045

Alexandre Julliard's avatar
Alexandre Julliard committed
2046 2047 2048
#define REBARBANDINFO    WINELIB_NAME_AW(REBARBANDINFO)
#define LPREBARBANDINFO  WINELIB_NAME_AW(LPREBARBANDINFO)
#define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
2049

2050 2051 2052
#define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
#define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
#define REBARBANDINFO_V3_SIZE  CCSIZEOF_STRUCT(WINELIB_NAME_AW(REBARBANDINFO), wID)
2053 2054 2055
#define REBARBANDINFOA_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, cxHeader)
#define REBARBANDINFOW_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, cxHeader)
#define REBARBANDINFO_V6_SIZE  CCSIZEOF_STRUCT(WINELIB_NAME_AW(REBARBANDINFO), cxHeader)
Alexandre Julliard's avatar
Alexandre Julliard committed
2056

2057 2058 2059
typedef struct tagNMREBARCHILDSIZE
{
    NMHDR  hdr;
2060 2061 2062 2063
    UINT uBand;
    UINT wID;
    RECT rcChild;
    RECT rcBand;
2064 2065 2066 2067 2068 2069
} NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;

typedef struct tagNMREBAR
{
    NMHDR  hdr;
    DWORD  dwMask;
2070 2071 2072
    UINT uBand;
    UINT fStyle;
    UINT wID;
2073 2074 2075 2076 2077 2078
    LPARAM lParam;
} NMREBAR, *LPNMREBAR;

typedef struct tagNMRBAUTOSIZE
{
    NMHDR hdr;
2079 2080 2081
    BOOL fChanged;
    RECT rcTarget;
    RECT rcActual;
2082 2083
} NMRBAUTOSIZE, *LPNMRBAUTOSIZE;

Robert Shearman's avatar
Robert Shearman committed
2084 2085 2086 2087 2088 2089 2090 2091 2092 2093
typedef struct tagNMREBARCHEVRON
{
    NMHDR hdr;
    UINT uBand;
    UINT wID;
    LPARAM lParam;
    RECT rc;
    LPARAM lParamNM;
} NMREBARCHEVRON, *LPNMREBARCHEVRON;

2094 2095
typedef struct _RB_HITTESTINFO
{
2096 2097 2098
    POINT pt;
    UINT  flags;
    INT   iBand;
2099 2100
} RBHITTESTINFO, *LPRBHITTESTINFO;

2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114
#define RBAB_AUTOSIZE   0x0001
#define RBAB_ADDBAND    0x0002

typedef struct tagNMREBARAUTOBREAK
{
    NMHDR hdr;
    UINT uBand;
    UINT wID;
    LPARAM lParam;
    UINT uMsg;
    UINT fStyleCurrent;
    BOOL fAutoBreak;
} NMREBARAUTOBREAK, *LPNMREBARAUTOBREAK;

Alexandre Julliard's avatar
Alexandre Julliard committed
2115 2116 2117

/* Trackbar control */

2118
#define TRACKBAR_CLASSA         "msctls_trackbar32"
2119 2120 2121 2122 2123 2124
#if defined(__GNUC__)
# define TRACKBAR_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
  't','r','a','c','k','b','a','r','3','2',0 }
#elif defined(_MSC_VER)
# define TRACKBAR_CLASSW        L"msctls_trackbar32"
#else
2125 2126
static const WCHAR TRACKBAR_CLASSW[] = { 'm','s','c','t','l','s','_',
  't','r','a','c','k','b','a','r','3','2',0 };
2127
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142
#define TRACKBAR_CLASS  WINELIB_NAME_AW(TRACKBAR_CLASS)

#define TBS_AUTOTICKS           0x0001
#define TBS_VERT                0x0002
#define TBS_HORZ                0x0000
#define TBS_TOP                 0x0004
#define TBS_BOTTOM              0x0000
#define TBS_LEFT                0x0004
#define TBS_RIGHT               0x0000
#define TBS_BOTH                0x0008
#define TBS_NOTICKS             0x0010
#define TBS_ENABLESELRANGE      0x0020
#define TBS_FIXEDLENGTH         0x0040
#define TBS_NOTHUMB             0x0080
#define TBS_TOOLTIPS            0x0100
2143 2144
#define TBS_REVERSED		0x0200
#define TBS_DOWNISLEFT		0x0400
Alexandre Julliard's avatar
Alexandre Julliard committed
2145

Alexandre Julliard's avatar
Alexandre Julliard committed
2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164
#define TBTS_TOP                0
#define TBTS_LEFT               1
#define TBTS_BOTTOM             2
#define TBTS_RIGHT              3

#define TB_LINEUP               0
#define TB_LINEDOWN             1
#define TB_PAGEUP               2
#define TB_PAGEDOWN             3
#define TB_THUMBPOSITION        4
#define TB_THUMBTRACK           5
#define TB_TOP                  6
#define TB_BOTTOM               7
#define TB_ENDTRACK             8

#define TBCD_TICS               0x0001
#define TBCD_THUMB              0x0002
#define TBCD_CHANNEL            0x0003

Alexandre Julliard's avatar
Alexandre Julliard committed
2165 2166 2167 2168 2169 2170
#define TBM_GETPOS              (WM_USER)
#define TBM_GETRANGEMIN         (WM_USER+1)
#define TBM_GETRANGEMAX         (WM_USER+2)
#define TBM_GETTIC              (WM_USER+3)
#define TBM_SETTIC              (WM_USER+4)
#define TBM_SETPOS              (WM_USER+5)
Alexandre Julliard's avatar
Alexandre Julliard committed
2171 2172 2173 2174 2175 2176 2177 2178 2179 2180
#define TBM_SETRANGE            (WM_USER+6)
#define TBM_SETRANGEMIN         (WM_USER+7)
#define TBM_SETRANGEMAX         (WM_USER+8)
#define TBM_CLEARTICS           (WM_USER+9)
#define TBM_SETSEL              (WM_USER+10)
#define TBM_SETSELSTART         (WM_USER+11)
#define TBM_SETSELEND           (WM_USER+12)
#define TBM_GETPTICS            (WM_USER+14)
#define TBM_GETTICPOS           (WM_USER+15)
#define TBM_GETNUMTICS          (WM_USER+16)
Alexandre Julliard's avatar
Alexandre Julliard committed
2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192
#define TBM_GETSELSTART         (WM_USER+17)
#define TBM_GETSELEND           (WM_USER+18)
#define TBM_CLEARSEL            (WM_USER+19)
#define TBM_SETTICFREQ          (WM_USER+20)
#define TBM_SETPAGESIZE         (WM_USER+21)
#define TBM_GETPAGESIZE         (WM_USER+22)
#define TBM_SETLINESIZE         (WM_USER+23)
#define TBM_GETLINESIZE         (WM_USER+24)
#define TBM_GETTHUMBRECT        (WM_USER+25)
#define TBM_GETCHANNELRECT      (WM_USER+26)
#define TBM_SETTHUMBLENGTH      (WM_USER+27)
#define TBM_GETTHUMBLENGTH      (WM_USER+28)
Alexandre Julliard's avatar
Alexandre Julliard committed
2193 2194 2195 2196 2197 2198 2199
#define TBM_SETTOOLTIPS         (WM_USER+29)
#define TBM_GETTOOLTIPS         (WM_USER+30)
#define TBM_SETTIPSIDE          (WM_USER+31)
#define TBM_SETBUDDY            (WM_USER+32)
#define TBM_GETBUDDY            (WM_USER+33)
#define TBM_SETUNICODEFORMAT    CCM_SETUNICODEFORMAT
#define TBM_GETUNICODEFORMAT    CCM_GETUNICODEFORMAT
Alexandre Julliard's avatar
Alexandre Julliard committed
2200 2201 2202 2203


/* Pager control */

2204
#define WC_PAGESCROLLERA      "SysPager"
2205 2206 2207 2208 2209
#if defined(__GNUC__)
# define WC_PAGESCROLLERW (const WCHAR []){ 'S','y','s','P','a','g','e','r',0 }
#elif defined(_MSC_VER)
# define WC_PAGESCROLLERW     L"SysPager"
#else
2210
static const WCHAR WC_PAGESCROLLERW[] = { 'S','y','s','P','a','g','e','r',0 };
2211
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
2212 2213
#define WC_PAGESCROLLER  WINELIB_NAME_AW(WC_PAGESCROLLER)

Alexandre Julliard's avatar
Alexandre Julliard committed
2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227
#define PGS_VERT                0x00000000
#define PGS_HORZ                0x00000001
#define PGS_AUTOSCROLL          0x00000002
#define PGS_DRAGNDROP           0x00000004

#define PGF_INVISIBLE           0
#define PGF_NORMAL              1
#define PGF_GRAYED              2
#define PGF_DEPRESSED           4
#define PGF_HOT                 8

#define PGB_TOPORLEFT           0
#define PGB_BOTTOMORRIGHT       1

Alexandre Julliard's avatar
Alexandre Julliard committed
2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
/* only used with PGN_SCROLL */
#define PGF_SCROLLUP            1
#define PGF_SCROLLDOWN          2
#define PGF_SCROLLLEFT          4
#define PGF_SCROLLRIGHT         8

#define PGK_SHIFT               1
#define PGK_CONTROL             2
#define PGK_MENU                4

/* only used with PGN_CALCSIZE */
#define PGF_CALCWIDTH           1
#define PGF_CALCHEIGHT          2
Alexandre Julliard's avatar
Alexandre Julliard committed
2241

Alexandre Julliard's avatar
Alexandre Julliard committed
2242
#define PGM_FIRST               0x1400
Alexandre Julliard's avatar
Alexandre Julliard committed
2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256
#define PGM_SETCHILD            (PGM_FIRST+1)
#define PGM_RECALCSIZE          (PGM_FIRST+2)
#define PGM_FORWARDMOUSE        (PGM_FIRST+3)
#define PGM_SETBKCOLOR          (PGM_FIRST+4)
#define PGM_GETBKCOLOR          (PGM_FIRST+5)
#define PGM_SETBORDER           (PGM_FIRST+6)
#define PGM_GETBORDER           (PGM_FIRST+7)
#define PGM_SETPOS              (PGM_FIRST+8)
#define PGM_GETPOS              (PGM_FIRST+9)
#define PGM_SETBUTTONSIZE       (PGM_FIRST+10)
#define PGM_GETBUTTONSIZE       (PGM_FIRST+11)
#define PGM_GETBUTTONSTATE      (PGM_FIRST+12)
#define PGM_GETDROPTARGET       CCM_GETDROPTARGET

Alexandre Julliard's avatar
Alexandre Julliard committed
2257 2258 2259 2260 2261
#define PGN_FIRST               (0U-900U)
#define PGN_LAST                (0U-950U)
#define PGN_SCROLL              (PGN_FIRST-1)
#define PGN_CALCSIZE            (PGN_FIRST-2)

2262
#include <pshpack1.h>
2263

Alexandre Julliard's avatar
Alexandre Julliard committed
2264 2265 2266 2267
typedef struct
{
    NMHDR hdr;
    WORD  fwKeys;
2268 2269 2270 2271 2272
    RECT rcParent;
    INT  iDir;
    INT  iXpos;
    INT  iYpos;
    INT  iScroll;
Alexandre Julliard's avatar
Alexandre Julliard committed
2273 2274
} NMPGSCROLL, *LPNMPGSCROLL;

2275
#include <poppack.h>
2276

Alexandre Julliard's avatar
Alexandre Julliard committed
2277 2278 2279 2280
typedef struct
{
    NMHDR hdr;
    DWORD dwFlag;
2281 2282
    INT iWidth;
    INT iHeight;
Alexandre Julliard's avatar
Alexandre Julliard committed
2283
} NMPGCALCSIZE, *LPNMPGCALCSIZE;
Alexandre Julliard's avatar
Alexandre Julliard committed
2284

Alexandre Julliard's avatar
Alexandre Julliard committed
2285 2286 2287

/* Treeview control */

2288
#define WC_TREEVIEWA          "SysTreeView32"
2289 2290 2291 2292 2293 2294
#if defined(__GNUC__)
# define WC_TREEVIEWW (const WCHAR []){ 'S','y','s', \
  'T','r','e','e','V','i','e','w','3','2',0 }
#elif defined(_MSC_VER)
# define WC_TREEVIEWW         L"SysTreeView32"
#else
2295 2296
static const WCHAR WC_TREEVIEWW[] = { 'S','y','s',
  'T','r','e','e','V','i','e','w','3','2',0 };
2297
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
2298
#define WC_TREEVIEW             WINELIB_NAME_AW(WC_TREEVIEW)
Alexandre Julliard's avatar
Alexandre Julliard committed
2299

Alexandre Julliard's avatar
Alexandre Julliard committed
2300 2301 2302 2303
#define TVSIL_NORMAL            0
#define TVSIL_STATE             2

#define TV_FIRST                0x1100
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
2304 2305
#define TVM_INSERTITEMA         (TV_FIRST+0)
#define TVM_INSERTITEMW         (TV_FIRST+50)
Alexandre Julliard's avatar
Alexandre Julliard committed
2306
#define TVM_INSERTITEM          WINELIB_NAME_AW(TVM_INSERTITEM)
Alexandre Julliard's avatar
Alexandre Julliard committed
2307 2308 2309 2310 2311 2312
#define TVM_DELETEITEM          (TV_FIRST+1)
#define TVM_EXPAND              (TV_FIRST+2)
#define TVM_GETITEMRECT         (TV_FIRST+4)
#define TVM_GETCOUNT            (TV_FIRST+5)
#define TVM_GETINDENT           (TV_FIRST+6)
#define TVM_SETINDENT           (TV_FIRST+7)
Alexandre Julliard's avatar
Alexandre Julliard committed
2313 2314
#define TVM_GETIMAGELIST        (TV_FIRST+8)
#define TVM_SETIMAGELIST        (TV_FIRST+9)
Alexandre Julliard's avatar
Alexandre Julliard committed
2315 2316
#define TVM_GETNEXTITEM         (TV_FIRST+10)
#define TVM_SELECTITEM          (TV_FIRST+11)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
2317 2318
#define TVM_GETITEMA            (TV_FIRST+12)
#define TVM_GETITEMW            (TV_FIRST+62)
Alexandre Julliard's avatar
Alexandre Julliard committed
2319
#define TVM_GETITEM             WINELIB_NAME_AW(TVM_GETITEM)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
2320 2321
#define TVM_SETITEMA            (TV_FIRST+13)
#define TVM_SETITEMW            (TV_FIRST+63)
Alexandre Julliard's avatar
Alexandre Julliard committed
2322
#define TVM_SETITEM             WINELIB_NAME_AW(TVM_SETITEM)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
2323 2324
#define TVM_EDITLABELA          (TV_FIRST+14)
#define TVM_EDITLABELW          (TV_FIRST+65)
Alexandre Julliard's avatar
Alexandre Julliard committed
2325
#define TVM_EDITLABEL           WINELIB_NAME_AW(TVM_EDITLABEL)
Alexandre Julliard's avatar
Alexandre Julliard committed
2326 2327 2328 2329 2330 2331 2332 2333
#define TVM_GETEDITCONTROL      (TV_FIRST+15)
#define TVM_GETVISIBLECOUNT     (TV_FIRST+16)
#define TVM_HITTEST             (TV_FIRST+17)
#define TVM_CREATEDRAGIMAGE     (TV_FIRST+18)
#define TVM_SORTCHILDREN        (TV_FIRST+19)
#define TVM_ENSUREVISIBLE       (TV_FIRST+20)
#define TVM_SORTCHILDRENCB      (TV_FIRST+21)
#define TVM_ENDEDITLABELNOW     (TV_FIRST+22)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
2334 2335
#define TVM_GETISEARCHSTRINGA   (TV_FIRST+23)
#define TVM_GETISEARCHSTRINGW   (TV_FIRST+64)
Alexandre Julliard's avatar
Alexandre Julliard committed
2336
#define TVM_GETISEARCHSTRING    WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
Alexandre Julliard's avatar
Alexandre Julliard committed
2337 2338
#define TVM_SETTOOLTIPS         (TV_FIRST+24)
#define TVM_GETTOOLTIPS         (TV_FIRST+25)
Alexandre Julliard's avatar
Alexandre Julliard committed
2339 2340 2341 2342 2343 2344 2345 2346 2347
#define TVM_SETINSERTMARK       (TV_FIRST+26)
#define TVM_SETITEMHEIGHT       (TV_FIRST+27)
#define TVM_GETITEMHEIGHT       (TV_FIRST+28)
#define TVM_SETBKCOLOR          (TV_FIRST+29)
#define TVM_SETTEXTCOLOR        (TV_FIRST+30)
#define TVM_GETBKCOLOR          (TV_FIRST+31)
#define TVM_GETTEXTCOLOR        (TV_FIRST+32)
#define TVM_SETSCROLLTIME       (TV_FIRST+33)
#define TVM_GETSCROLLTIME       (TV_FIRST+34)
Eric Kohl's avatar
Eric Kohl committed
2348 2349
#define TVM_UNKNOWN35           (TV_FIRST+35)
#define TVM_UNKNOWN36           (TV_FIRST+36)
Alexandre Julliard's avatar
Alexandre Julliard committed
2350 2351
#define TVM_SETINSERTMARKCOLOR  (TV_FIRST+37)
#define TVM_GETINSERTMARKCOLOR  (TV_FIRST+38)
2352 2353 2354
#define TVM_GETITEMSTATE        (TV_FIRST+39)
#define TVM_SETLINECOLOR        (TV_FIRST+40)
#define TVM_GETLINECOLOR        (TV_FIRST+41)
Alexandre Julliard's avatar
Alexandre Julliard committed
2355 2356
#define TVM_SETUNICODEFORMAT    CCM_SETUNICODEFORMAT
#define TVM_GETUNICODEFORMAT    CCM_GETUNICODEFORMAT
2357 2358
#define TVM_MAPACCIDTOHTREEITEM (TV_FIRST + 42)
#define TVM_MAPHTREEITEMTOACCID (TV_FIRST + 43)
2359 2360 2361 2362 2363 2364
#define TVM_SETEXTENDEDSTYLE    (TV_FIRST + 44)
#define TVM_GETEXTENDEDSTYLE    (TV_FIRST + 45)
#define TVM_SETAUTOSCROLLINFO   (TV_FIRST + 59)
#define TVM_GETSELECTEDCOUNT    (TV_FIRST + 70)
#define TVM_SHOWINFOTIP         (TV_FIRST + 71)
#define TVM_GETITEMPARTRECT     (TV_FIRST + 72)
2365 2366


Alexandre Julliard's avatar
Alexandre Julliard committed
2367 2368 2369
#define TVN_FIRST               (0U-400U)
#define TVN_LAST                (0U-499U)

2370
#define TVN_SELCHANGINGA        (TVN_FIRST-1)
Alexandre Julliard's avatar
Alexandre Julliard committed
2371
#define TVN_SELCHANGINGW        (TVN_FIRST-50)
2372 2373 2374
#define TVN_SELCHANGING         WINELIB_NAME_AW(TVN_SELCHANGING)

#define TVN_SELCHANGEDA         (TVN_FIRST-2)
Alexandre Julliard's avatar
Alexandre Julliard committed
2375
#define TVN_SELCHANGEDW         (TVN_FIRST-51)
2376 2377 2378
#define TVN_SELCHANGED          WINELIB_NAME_AW(TVN_SELCHANGED)

#define TVN_GETDISPINFOA        (TVN_FIRST-3)
Alexandre Julliard's avatar
Alexandre Julliard committed
2379
#define TVN_GETDISPINFOW        (TVN_FIRST-52)
2380 2381 2382
#define TVN_GETDISPINFO         WINELIB_NAME_AW(TVN_GETDISPINFO)

#define TVN_SETDISPINFOA        (TVN_FIRST-4)
Alexandre Julliard's avatar
Alexandre Julliard committed
2383
#define TVN_SETDISPINFOW        (TVN_FIRST-53)
2384 2385 2386
#define TVN_SETDISPINFO         WINELIB_NAME_AW(TVN_SETDISPINFO)

#define TVN_ITEMEXPANDINGA      (TVN_FIRST-5)
Alexandre Julliard's avatar
Alexandre Julliard committed
2387
#define TVN_ITEMEXPANDINGW      (TVN_FIRST-54)
2388 2389 2390
#define TVN_ITEMEXPANDING       WINELIB_NAME_AW(TVN_ITEMEXPANDING)

#define TVN_ITEMEXPANDEDA       (TVN_FIRST-6)
Alexandre Julliard's avatar
Alexandre Julliard committed
2391
#define TVN_ITEMEXPANDEDW       (TVN_FIRST-55)
2392 2393 2394
#define TVN_ITEMEXPANDED        WINELIB_NAME_AW(TVN_ITEMEXPANDED)

#define TVN_BEGINDRAGA          (TVN_FIRST-7)
Alexandre Julliard's avatar
Alexandre Julliard committed
2395
#define TVN_BEGINDRAGW          (TVN_FIRST-56)
2396 2397 2398
#define TVN_BEGINDRAG           WINELIB_NAME_AW(TVN_BEGINDRAG)

#define TVN_BEGINRDRAGA         (TVN_FIRST-8)
Alexandre Julliard's avatar
Alexandre Julliard committed
2399
#define TVN_BEGINRDRAGW         (TVN_FIRST-57)
2400 2401 2402
#define TVN_BEGINRDRAG          WINELIB_NAME_AW(TVN_BEGINRDRAG)

#define TVN_DELETEITEMA         (TVN_FIRST-9)
Alexandre Julliard's avatar
Alexandre Julliard committed
2403
#define TVN_DELETEITEMW         (TVN_FIRST-58)
2404 2405 2406
#define TVN_DELETEITEM          WINELIB_NAME_AW(TVN_DELETEITEM)

#define TVN_BEGINLABELEDITA     (TVN_FIRST-10)
Alexandre Julliard's avatar
Alexandre Julliard committed
2407
#define TVN_BEGINLABELEDITW     (TVN_FIRST-59)
2408 2409 2410
#define TVN_BEGINLABELEDIT      WINELIB_NAME_AW(TVN_BEGINLABELEDIT)

#define TVN_ENDLABELEDITA       (TVN_FIRST-11)
Alexandre Julliard's avatar
Alexandre Julliard committed
2411
#define TVN_ENDLABELEDITW       (TVN_FIRST-60)
2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422
#define TVN_ENDLABELEDIT        WINELIB_NAME_AW(TVN_ENDLABELEDIT)

#define TVN_KEYDOWN             (TVN_FIRST-12)

#define TVN_GETINFOTIPA         (TVN_FIRST-13)
#define TVN_GETINFOTIPW         (TVN_FIRST-14)
#define TVN_GETINFOTIP          WINELIB_NAME_AW(TVN_GETINFOTIP)

#define TVN_SINGLEEXPAND        (TVN_FIRST-15)


Alexandre Julliard's avatar
Alexandre Julliard committed
2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433



#define TVIF_TEXT             0x0001
#define TVIF_IMAGE            0x0002
#define TVIF_PARAM            0x0004
#define TVIF_STATE            0x0008
#define TVIF_HANDLE           0x0010
#define TVIF_SELECTEDIMAGE    0x0020
#define TVIF_CHILDREN         0x0040
#define TVIF_INTEGRAL         0x0080
2434 2435
#define TVIF_STATEEX          0x0100
#define TVIF_EXPANDEDIMAGE    0x0200
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
2436
#define TVIF_DI_SETITEM	      0x1000
Alexandre Julliard's avatar
Alexandre Julliard committed
2437

2438 2439 2440 2441
#define TVI_ROOT              ((HTREEITEM)-65536)
#define TVI_FIRST             ((HTREEITEM)-65535)
#define TVI_LAST              ((HTREEITEM)-65534)
#define TVI_SORT              ((HTREEITEM)-65533)
Alexandre Julliard's avatar
Alexandre Julliard committed
2442 2443 2444 2445 2446 2447 2448 2449

#define TVIS_FOCUSED          0x0001
#define TVIS_SELECTED         0x0002
#define TVIS_CUT              0x0004
#define TVIS_DROPHILITED      0x0008
#define TVIS_BOLD             0x0010
#define TVIS_EXPANDED         0x0020
#define TVIS_EXPANDEDONCE     0x0040
2450
#define TVIS_EXPANDPARTIAL    0x0080
Alexandre Julliard's avatar
Alexandre Julliard committed
2451 2452 2453 2454
#define TVIS_OVERLAYMASK      0x0f00
#define TVIS_STATEIMAGEMASK   0xf000
#define TVIS_USERMASK         0xf000

2455 2456 2457 2458 2459
#define TVIS_EX_FLAT          0x0001
#define TVIS_EX_DISABLED      0x0002
/* TVIS_EX_HWND is listed on MSDN but apparently not in any header. */
#define TVIS_EX_ALL           0x0002

Alexandre Julliard's avatar
Alexandre Julliard committed
2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482
#define TVHT_NOWHERE          0x0001
#define TVHT_ONITEMICON       0x0002
#define TVHT_ONITEMLABEL      0x0004
#define TVHT_ONITEMINDENT     0x0008
#define TVHT_ONITEMBUTTON     0x0010
#define TVHT_ONITEMRIGHT      0x0020
#define TVHT_ONITEMSTATEICON  0x0040
#define TVHT_ONITEM           0x0046
#define TVHT_ABOVE            0x0100
#define TVHT_BELOW            0x0200
#define TVHT_TORIGHT          0x0400
#define TVHT_TOLEFT           0x0800

#define TVS_HASBUTTONS        0x0001
#define TVS_HASLINES          0x0002
#define TVS_LINESATROOT       0x0004
#define TVS_EDITLABELS        0x0008
#define TVS_DISABLEDRAGDROP   0x0010
#define TVS_SHOWSELALWAYS     0x0020
#define TVS_RTLREADING        0x0040
#define TVS_NOTOOLTIPS        0x0080
#define TVS_CHECKBOXES        0x0100
#define TVS_TRACKSELECT       0x0200
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
2483 2484 2485 2486 2487
#define TVS_SINGLEEXPAND      0x0400
#define TVS_INFOTIP           0x0800
#define TVS_FULLROWSELECT     0x1000
#define TVS_NOSCROLL          0x2000
#define TVS_NONEVENHEIGHT     0x4000
2488
#define TVS_NOHSCROLL         0x8000
Alexandre Julliard's avatar
Alexandre Julliard committed
2489 2490 2491 2492

#define TVS_SHAREDIMAGELISTS  0x0000
#define TVS_PRIVATEIMAGELISTS 0x0400

2493 2494 2495 2496 2497 2498 2499 2500 2501 2502
#define TVS_EX_MULTISELECT         0x0002
#define TVS_EX_DOUBLEBUFFER        0x0004
#define TVS_EX_NOINDENTSTATE       0x0008
#define TVS_EX_RICHTOOLTIP         0x0010
#define TVS_EX_AUTOHSCROLL         0x0020
#define TVS_EX_FADEINOUTEXPANDOS   0x0040
#define TVS_EX_PARTIALCHECKBOXES   0x0080
#define TVS_EX_EXCLUSIONCHECKBOXES 0x0100
#define TVS_EX_DIMMEDCHECKBOXES    0x0200
#define TVS_EX_DRAWIMAGEASYNC      0x0400
Alexandre Julliard's avatar
Alexandre Julliard committed
2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520

#define TVE_COLLAPSE          0x0001
#define TVE_EXPAND            0x0002
#define TVE_TOGGLE            0x0003
#define TVE_EXPANDPARTIAL     0x4000
#define TVE_COLLAPSERESET     0x8000

#define TVGN_ROOT             0
#define TVGN_NEXT             1
#define TVGN_PREVIOUS         2
#define TVGN_PARENT           3
#define TVGN_CHILD            4
#define TVGN_FIRSTVISIBLE     5
#define TVGN_NEXTVISIBLE      6
#define TVGN_PREVIOUSVISIBLE  7
#define TVGN_DROPHILITE       8
#define TVGN_CARET            9
#define TVGN_LASTVISIBLE      10
2521
#define TVSI_NOSINGLEEXPAND   0x8000
Alexandre Julliard's avatar
Alexandre Julliard committed
2522 2523 2524 2525 2526 2527

#define TVC_UNKNOWN           0x00
#define TVC_BYMOUSE           0x01
#define TVC_BYKEYBOARD        0x02


2528
typedef struct _TREEITEM *HTREEITEM;
Alexandre Julliard's avatar
Alexandre Julliard committed
2529 2530

typedef struct {
2531
      UINT mask;
Alexandre Julliard's avatar
Alexandre Julliard committed
2532
      HTREEITEM hItem;
2533 2534
      UINT state;
      UINT stateMask;
Eric Kohl's avatar
Eric Kohl committed
2535
      LPSTR  pszText;
2536 2537 2538 2539
      INT  cchTextMax;
      INT  iImage;
      INT  iSelectedImage;
      INT  cChildren;
Alexandre Julliard's avatar
Alexandre Julliard committed
2540
      LPARAM lParam;
2541
} TVITEMA, *LPTVITEMA;
2542 2543

typedef struct {
2544
      UINT mask;
2545
      HTREEITEM hItem;
2546 2547
      UINT state;
      UINT stateMask;
2548
      LPWSTR pszText;
2549 2550 2551 2552
      INT cchTextMax;
      INT iImage;
      INT iSelectedImage;
      INT cChildren;
2553
      LPARAM lParam;
2554
} TVITEMW, *LPTVITEMW;
2555

2556 2557 2558 2559 2560 2561 2562 2563 2564
#define TV_ITEMA    TVITEMA
#define TV_ITEMW    TVITEMW
#define LPTV_ITEMA  LPTVITEMA
#define LPTV_ITEMW  LPTVITEMW

#define TVITEM      WINELIB_NAME_AW(TVITEM)
#define LPTVITEM    WINELIB_NAME_AW(LPTVITEM)
#define TV_ITEM     WINELIB_NAME_AW(TV_ITEM)
#define LPTV_ITEM   WINELIB_NAME_AW(LPTV_ITEM)
Alexandre Julliard's avatar
Alexandre Julliard committed
2565 2566

typedef struct {
2567
      UINT mask;
Alexandre Julliard's avatar
Alexandre Julliard committed
2568
      HTREEITEM hItem;
2569 2570
      UINT state;
      UINT stateMask;
Eric Kohl's avatar
Eric Kohl committed
2571
      LPSTR  pszText;
2572 2573 2574 2575
      INT  cchTextMax;
      INT  iImage;
      INT  iSelectedImage;
      INT  cChildren;
Alexandre Julliard's avatar
Alexandre Julliard committed
2576
      LPARAM lParam;
2577
      INT iIntegral;
2578 2579 2580
      UINT uStateEx;        /* _WIN32_IE >= 0x600 */
      HWND hwnd;            /* _WIN32_IE >= 0x600 */
      INT iExpandedImage;   /* _WIN32_IE >= 0x600 */
2581
} TVITEMEXA, *LPTVITEMEXA;
Alexandre Julliard's avatar
Alexandre Julliard committed
2582

2583
typedef struct {
2584
      UINT mask;
2585
      HTREEITEM hItem;
2586 2587
      UINT state;
      UINT stateMask;
2588
      LPWSTR pszText;
2589 2590 2591 2592
      INT cchTextMax;
      INT iImage;
      INT iSelectedImage;
      INT cChildren;
2593
      LPARAM lParam;
2594
      INT iIntegral;
2595 2596 2597
      UINT uStateEx;        /* _WIN32_IE >= 0x600 */
      HWND hwnd;            /* _WIN32_IE >= 0x600 */
      INT iExpandedImage;   /* _WIN32_IE >= 0x600 */
2598
} TVITEMEXW, *LPTVITEMEXW;
Alex Priem's avatar
Alex Priem committed
2599

2600 2601
#define TVITEMEX   WINELIB_NAME_AW(TVITEMEX)
#define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
Alexandre Julliard's avatar
Alexandre Julliard committed
2602

2603
typedef struct tagTVINSERTSTRUCTA {
2604 2605
        HTREEITEM hParent;
        HTREEITEM hInsertAfter;
Alex Priem's avatar
Alex Priem committed
2606
        union {
2607 2608
           TVITEMEXA itemex;
           TVITEMA   item;
Alex Priem's avatar
Alex Priem committed
2609
        } DUMMYUNIONNAME;
2610
} TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
Alexandre Julliard's avatar
Alexandre Julliard committed
2611

2612
typedef struct tagTVINSERTSTRUCTW {
Alexandre Julliard's avatar
Alexandre Julliard committed
2613 2614
        HTREEITEM hParent;
        HTREEITEM hInsertAfter;
Alex Priem's avatar
Alex Priem committed
2615
        union {
2616 2617
           TVITEMEXW itemex;
           TVITEMW   item;
Alex Priem's avatar
Alex Priem committed
2618
        } DUMMYUNIONNAME;
2619
} TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
Alex Priem's avatar
Alex Priem committed
2620

2621 2622
#define TVINSERTSTRUCT    WINELIB_NAME_AW(TVINSERTSTRUCT)
#define LPTVINSERTSTRUCT  WINELIB_NAME_AW(LPTVINSERTSTRUCT)
Alex Priem's avatar
Alex Priem committed
2623

2624 2625
#define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
#define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
Alex Priem's avatar
Alex Priem committed
2626 2627
#define TVINSERTSTRUCT_V1_SIZE    WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)

2628 2629 2630 2631 2632 2633 2634
#define TV_INSERTSTRUCT    TVINSERTSTRUCT
#define TV_INSERTSTRUCTA   TVINSERTSTRUCTA
#define TV_INSERTSTRUCTW   TVINSERTSTRUCTW
#define LPTV_INSERTSTRUCT  LPTVINSERTSTRUCT
#define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
#define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW

Alexandre Julliard's avatar
Alexandre Julliard committed
2635

2636

2637
typedef struct tagNMTREEVIEWA {
2638
	NMHDR	hdr;
2639 2640 2641 2642 2643
	UINT	action;
	TVITEMA	itemOld;
	TVITEMA	itemNew;
	POINT	ptDrag;
} NMTREEVIEWA, *LPNMTREEVIEWA;
2644

2645
typedef struct tagNMTREEVIEWW {
Alexandre Julliard's avatar
Alexandre Julliard committed
2646
	NMHDR	hdr;
2647 2648 2649 2650 2651
	UINT	action;
	TVITEMW	itemOld;
	TVITEMW	itemNew;
	POINT	ptDrag;
} NMTREEVIEWW, *LPNMTREEVIEWW;
2652

Alex Priem's avatar
Alex Priem committed
2653
#define NMTREEVIEW     WINELIB_NAME_AW(NMTREEVIEW)
2654
#define NM_TREEVIEW    WINELIB_NAME_AW(NMTREEVIEW)
2655 2656
#define NM_TREEVIEWA   NMTREEVIEWA
#define NM_TREEVIEWW   NMTREEVIEWW
Alex Priem's avatar
Alex Priem committed
2657
#define LPNMTREEVIEW   WINELIB_NAME_AW(LPNMTREEVIEW)
2658

2659 2660 2661
#define LPNM_TREEVIEW  LPNMTREEVIEW
#define LPNM_TREEVIEWA LPNMTREEVIEWA
#define LPNM_TREEVIEWW LPNMTREEVIEWW
2662

2663
typedef struct tagTVDISPINFOA {
2664
	NMHDR	hdr;
2665 2666
	TVITEMA	item;
} NMTVDISPINFOA, *LPNMTVDISPINFOA;
Alexandre Julliard's avatar
Alexandre Julliard committed
2667

2668
typedef struct tagTVDISPINFOW {
Alexandre Julliard's avatar
Alexandre Julliard committed
2669
	NMHDR	hdr;
2670 2671
	TVITEMW	item;
} NMTVDISPINFOW, *LPNMTVDISPINFOW;
2672

2673 2674 2675 2676 2677 2678 2679 2680 2681 2682
typedef struct tagTVDISPINFOEXA {
	NMHDR	hdr;
	TVITEMEXA	item;
} NMTVDISPINFOEXA, *LPNMTVDISPINFOEXA;

typedef struct tagTVDISPINFOEXW {
	NMHDR	hdr;
	TVITEMEXW	item;
} NMTVDISPINFOEXW, *LPNMTVDISPINFOEXW;

Alex Priem's avatar
Alex Priem committed
2683 2684
#define NMTVDISPINFO            WINELIB_NAME_AW(NMTVDISPINFO)
#define LPNMTVDISPINFO          WINELIB_NAME_AW(LPNMTVDISPINFO)
2685 2686
#define NMTVDISPINFOEX          WINELIB_NAME_AW(NMTVDISPINFOEX)
#define LPNMTVDISPINFOEX        WINELIB_NAME_AW(LPNMTVDISPINFOEX)
2687 2688
#define TV_DISPINFOA            NMTVDISPINFOA
#define TV_DISPINFOW            NMTVDISPINFOW
Alex Priem's avatar
Alex Priem committed
2689
#define TV_DISPINFO             NMTVDISPINFO
Alexandre Julliard's avatar
Alexandre Julliard committed
2690

2691
typedef INT (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
2692 2693 2694 2695 2696 2697 2698

typedef struct tagTVSORTCB
{
	HTREEITEM hParent;
	PFNTVCOMPARE lpfnCompare;
	LPARAM lParam;
} TVSORTCB, *LPTVSORTCB;
Alexandre Julliard's avatar
Alexandre Julliard committed
2699

2700 2701
#define TV_SORTCB TVSORTCB
#define LPTV_SORTCB LPTVSORTCB
Alexandre Julliard's avatar
Alexandre Julliard committed
2702 2703

typedef struct tagTVHITTESTINFO {
2704 2705
        POINT pt;
        UINT flags;
Alexandre Julliard's avatar
Alexandre Julliard committed
2706 2707 2708
        HTREEITEM hItem;
} TVHITTESTINFO, *LPTVHITTESTINFO;

2709
#define TV_HITTESTINFO TVHITTESTINFO
Alexandre Julliard's avatar
Alexandre Julliard committed
2710

Alex Priem's avatar
Alex Priem committed
2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722

/* Custom Draw Treeview */

#define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)

#define TVCDRF_NOIMAGES     0x00010000

typedef struct tagNMTVCUSTOMDRAW
{
    NMCUSTOMDRAW nmcd;
    COLORREF     clrText;
    COLORREF     clrTextBk;
2723
    INT iLevel;                 /* IE>0x0400 */
Alex Priem's avatar
Alex Priem committed
2724 2725 2726 2727
} NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;

/* Treeview tooltips */

2728
typedef struct tagNMTVGETINFOTIPA
Alex Priem's avatar
Alex Priem committed
2729 2730 2731
{
    NMHDR hdr;
    LPSTR pszText;
2732
    INT cchTextMax;
Alex Priem's avatar
Alex Priem committed
2733 2734
    HTREEITEM hItem;
    LPARAM lParam;
2735
} NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
Alex Priem's avatar
Alex Priem committed
2736

2737
typedef struct tagNMTVGETINFOTIPW
Alex Priem's avatar
Alex Priem committed
2738 2739 2740
{
    NMHDR hdr;
    LPWSTR pszText;
2741
    INT cchTextMax;
Alex Priem's avatar
Alex Priem committed
2742 2743
    HTREEITEM hItem;
    LPARAM lParam;
2744
} NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
Alex Priem's avatar
Alex Priem committed
2745

2746 2747
#define NMTVGETINFOTIP WINELIB_NAME_AW(NMTVGETINFOTIP)
#define LPNMTVGETINFOTIP WINELIB_NAME_AW(LPNMTVGETINFOTIP)
Alex Priem's avatar
Alex Priem committed
2748

2749
#include <pshpack1.h>
2750 2751 2752 2753 2754 2755
typedef struct tagTVKEYDOWN
{
    NMHDR hdr;
    WORD wVKey;
    UINT flags;
} NMTVKEYDOWN, *LPNMTVKEYDOWN;
2756
#include <poppack.h>
2757 2758

#define TV_KEYDOWN      NMTVKEYDOWN
Alex Priem's avatar
Alex Priem committed
2759

2760
#define TreeView_InsertItemA(hwnd, phdi) \
2761
  (HTREEITEM)SNDMSGA((hwnd), TVM_INSERTITEMA, 0, \
2762
                            (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
2763
#define TreeView_InsertItemW(hwnd,phdi) \
2764
  (HTREEITEM)SNDMSGW((hwnd), TVM_INSERTITEMW, 0, \
2765
                            (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
2766
#define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem)
2767

Alexandre Julliard's avatar
Alexandre Julliard committed
2768
#define TreeView_DeleteItem(hwnd, hItem) \
2769
  (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
Alexandre Julliard's avatar
Alexandre Julliard committed
2770
#define TreeView_DeleteAllItems(hwnd) \
2771
  (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
Alexandre Julliard's avatar
Alexandre Julliard committed
2772
#define TreeView_Expand(hwnd, hitem, code) \
2773
 (BOOL)SNDMSG((hwnd), TVM_EXPAND, (WPARAM)code, \
Alexandre Julliard's avatar
Alexandre Julliard committed
2774 2775 2776
	(LPARAM)(HTREEITEM)(hitem))

#define TreeView_GetItemRect(hwnd, hitem, prc, code) \
2777
 (*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSG((hwnd), \
2778
			TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
Alexandre Julliard's avatar
Alexandre Julliard committed
2779 2780

#define TreeView_GetCount(hwnd) \
2781
    (UINT)SNDMSG((hwnd), TVM_GETCOUNT, 0, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2782
#define TreeView_GetIndent(hwnd) \
2783
    (UINT)SNDMSG((hwnd), TVM_GETINDENT, 0, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2784
#define TreeView_SetIndent(hwnd, indent) \
2785
    (BOOL)SNDMSG((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2786 2787

#define TreeView_GetImageList(hwnd, iImage) \
2788
    (HIMAGELIST)SNDMSG((hwnd), TVM_GETIMAGELIST, iImage, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2789 2790

#define TreeView_SetImageList(hwnd, himl, iImage) \
2791
    (HIMAGELIST)SNDMSG((hwnd), TVM_SETIMAGELIST, iImage, \
Kevin Koltzau's avatar
Kevin Koltzau committed
2792
 (LPARAM)(HIMAGELIST)(himl))
Alexandre Julliard's avatar
Alexandre Julliard committed
2793 2794

#define TreeView_GetNextItem(hwnd, hitem, code) \
2795
    (HTREEITEM)SNDMSG((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
Alexandre Julliard's avatar
Alexandre Julliard committed
2796 2797 2798
(LPARAM)(HTREEITEM) (hitem))

#define TreeView_GetChild(hwnd, hitem) \
2799
	 	TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
Alexandre Julliard's avatar
Alexandre Julliard committed
2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824
#define TreeView_GetNextSibling(hwnd, hitem) \
		TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
#define TreeView_GetPrevSibling(hwnd, hitem) \
		TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
#define TreeView_GetParent(hwnd, hitem) \
		TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
#define TreeView_GetFirstVisible(hwnd)  \
		TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
#define TreeView_GetLastVisible(hwnd)   \
		TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
#define TreeView_GetNextVisible(hwnd, hitem) \
		TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
#define TreeView_GetPrevVisible(hwnd, hitem) \
		TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
#define TreeView_GetSelection(hwnd) \
		TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
#define TreeView_GetDropHilight(hwnd) \
		TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
#define TreeView_GetRoot(hwnd) \
		TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
#define TreeView_GetLastVisible(hwnd) \
		TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)


#define TreeView_Select(hwnd, hitem, code) \
2825
 (BOOL)SNDMSG((hwnd), TVM_SELECTITEM, (WPARAM)(code), \
Kevin Koltzau's avatar
Kevin Koltzau committed
2826
(LPARAM)(HTREEITEM)(hitem))
Alexandre Julliard's avatar
Alexandre Julliard committed
2827 2828 2829 2830 2831


#define TreeView_SelectItem(hwnd, hitem) \
		TreeView_Select(hwnd, hitem, TVGN_CARET)
#define TreeView_SelectDropTarget(hwnd, hitem) \
2832 2833 2834 2835
       	TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
#define TreeView_SelectSetFirstVisible(hwnd, hitem) \
       	TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)

Alexandre Julliard's avatar
Alexandre Julliard committed
2836

2837
#define TreeView_GetItemA(hwnd, pitem) \
2838
 (BOOL)SNDMSGA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2839
#define TreeView_GetItemW(hwnd, pitem) \
Jon Griffiths's avatar
Jon Griffiths committed
2840
 (BOOL)SNDMSGW((hwnd), TVM_GETITEMW, 0, (LPARAM) (TVITEMW *)(pitem))
2841
#define TreeView_GetItem WINELIB_NAME_AW(TreeView_GetItem)
Alexandre Julliard's avatar
Alexandre Julliard committed
2842

2843
#define TreeView_SetItemA(hwnd, pitem) \
2844
 (BOOL)SNDMSGA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2845
#define TreeView_SetItemW(hwnd, pitem) \
Jon Griffiths's avatar
Jon Griffiths committed
2846
 (BOOL)SNDMSGW((hwnd), TVM_SETITEMW, 0, (LPARAM)(const TVITEMW *)(pitem))
2847
#define TreeView_SetItem WINELIB_NAME_AW(TreeView_SetItem)
Alexandre Julliard's avatar
Alexandre Julliard committed
2848 2849

#define TreeView_EditLabel(hwnd, hitem) \
2850
    (HWND)SNDMSG((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
Alexandre Julliard's avatar
Alexandre Julliard committed
2851 2852

#define TreeView_GetEditControl(hwnd) \
2853
    (HWND)SNDMSG((hwnd), TVM_GETEDITCONTROL, 0, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2854 2855

#define TreeView_GetVisibleCount(hwnd) \
2856
    (UINT)SNDMSG((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2857 2858

#define TreeView_HitTest(hwnd, lpht) \
2859
    (HTREEITEM)SNDMSG((hwnd), TVM_HITTEST, 0,\
2860
(LPARAM)(LPTVHITTESTINFO)(lpht))
Alexandre Julliard's avatar
Alexandre Julliard committed
2861 2862

#define TreeView_CreateDragImage(hwnd, hitem) \
2863
    (HIMAGELIST)SNDMSG((hwnd), TVM_CREATEDRAGIMAGE, 0,\
Alexandre Julliard's avatar
Alexandre Julliard committed
2864 2865 2866
(LPARAM)(HTREEITEM)(hitem))

#define TreeView_SortChildren(hwnd, hitem, recurse) \
2867
    (BOOL)SNDMSG((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
Alexandre Julliard's avatar
Alexandre Julliard committed
2868 2869 2870
(LPARAM)(HTREEITEM)(hitem))

#define TreeView_EnsureVisible(hwnd, hitem) \
2871
    (BOOL)SNDMSG((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
Alexandre Julliard's avatar
Alexandre Julliard committed
2872 2873

#define TreeView_SortChildrenCB(hwnd, psort, recurse) \
2874
    (BOOL)SNDMSG((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
Alexandre Julliard's avatar
Alexandre Julliard committed
2875 2876 2877
    (LPARAM)(LPTV_SORTCB)(psort))

#define TreeView_EndEditLabelNow(hwnd, fCancel) \
2878
    (BOOL)SNDMSG((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2879

2880
#define TreeView_GetISearchString(hwnd, lpsz) \
2881
    (BOOL)SNDMSG((hwnd), TVM_GETISEARCHSTRING, 0, \
Alexandre Julliard's avatar
Alexandre Julliard committed
2882 2883
							(LPARAM)(LPTSTR)lpsz)

2884
#define TreeView_SetToolTips(hwnd,  hwndTT) \
2885
    (HWND)SNDMSG((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
2886 2887

#define TreeView_GetToolTips(hwnd) \
2888
    (HWND)SNDMSG((hwnd), TVM_GETTOOLTIPS, 0, 0)
2889

Alexandre Julliard's avatar
Alexandre Julliard committed
2890
#define TreeView_SetItemHeight(hwnd,  iHeight) \
2891
    (INT)SNDMSG((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
2892

Alexandre Julliard's avatar
Alexandre Julliard committed
2893
#define TreeView_GetItemHeight(hwnd) \
2894
    (INT)SNDMSG((hwnd), TVM_GETITEMHEIGHT, 0, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2895 2896

#define TreeView_SetBkColor(hwnd, clr) \
2897
    (COLORREF)SNDMSG((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
Alexandre Julliard's avatar
Alexandre Julliard committed
2898 2899

#define TreeView_SetTextColor(hwnd, clr) \
2900
    (COLORREF)SNDMSG((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
Alexandre Julliard's avatar
Alexandre Julliard committed
2901 2902

#define TreeView_GetBkColor(hwnd) \
2903
    (COLORREF)SNDMSG((hwnd), TVM_GETBKCOLOR, 0, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2904 2905

#define TreeView_GetTextColor(hwnd) \
2906
    (COLORREF)SNDMSG((hwnd), TVM_GETTEXTCOLOR, 0, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2907 2908

#define TreeView_SetScrollTime(hwnd, uTime) \
2909
    (UINT)SNDMSG((hwnd), TVM_SETSCROLLTIME, uTime, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2910 2911

#define TreeView_GetScrollTime(hwnd) \
2912
    (UINT)SNDMSG((hwnd), TVM_GETSCROLLTIME, 0, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2913

2914
#define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
2915
    (BOOL)SNDMSG((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
2916 2917
                       (LPARAM) (hItem))

Alexandre Julliard's avatar
Alexandre Julliard committed
2918
#define TreeView_SetInsertMarkColor(hwnd, clr) \
2919
    (COLORREF)SNDMSG((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
2920

Alexandre Julliard's avatar
Alexandre Julliard committed
2921
#define TreeView_GetInsertMarkColor(hwnd) \
2922
    (COLORREF)SNDMSG((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2923

2924 2925 2926 2927 2928 2929
#define TreeView_SetItemState(hwndTV, hti, data, _mask) \
{ TVITEM _TVi; \
  _TVi.mask = TVIF_STATE; \
  _TVi.hItem = hti; \
  _TVi.stateMask = _mask; \
  _TVi.state = data; \
2930
  SNDMSG((hwndTV), TVM_SETITEM, 0, (LPARAM)&_TVi); \
2931 2932
}

2933
#define TreeView_GetItemState(hwndTV, hti, mask) \
2934
   (UINT)SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
2935
#define TreeView_GetCheckState(hwndTV, hti) \
2936
   ((((UINT)(SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti),  \
2937 2938 2939
                     TVIS_STATEIMAGEMASK))) >> 12) -1)

#define TreeView_SetLineColor(hwnd, clr) \
2940
    (COLORREF)SNDMSG((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
2941 2942

#define TreeView_GetLineColor(hwnd) \
2943
    (COLORREF)SNDMSG((hwnd), TVM_GETLINECOLOR, 0, 0)
2944

2945 2946 2947 2948 2949
#define TreeView_MapAccIDToHTREEITEM(hwnd, id) \
    (HTREEITEM)SNDMSG((hwnd), TVM_MAPACCIDTOHTREEITEM, id, 0)

#define TreeView_MapHTREEITEMToAccID(hwnd, htreeitem) \
    (UINT)SNDMSG((hwnd), TVM_MAPHTREEITEMTOACCID, (WPARAM)htreeitem, 0)
2950

2951 2952 2953 2954
#define TreeView_SetUnicodeFormat(hwnd, fUnicode) \
    (BOOL)SNDMSG((hwnd), TVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
#define TreeView_GetUnicodeFormat(hwnd) \
    (BOOL)SNDMSG((hwnd), TVM_GETUNICODEFORMAT, 0, 0)
Alexandre Julliard's avatar
Alexandre Julliard committed
2955 2956 2957

/* Listview control */

2958
#define WC_LISTVIEWA          "SysListView32"
2959 2960 2961 2962 2963 2964
#if defined(__GNUC__)
# define WC_LISTVIEWW (const WCHAR []){ 'S','y','s', \
  'L','i','s','t','V','i','e','w','3','2',0 }
#elif defined(_MSC_VER)
# define WC_LISTVIEWW         L"SysListView32"
#else
2965 2966
static const WCHAR WC_LISTVIEWW[] = { 'S','y','s',
  'L','i','s','t','V','i','e','w','3','2',0 };
2967
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
2968 2969
#define WC_LISTVIEW  WINELIB_NAME_AW(WC_LISTVIEW)

2970 2971 2972
#define LVSCW_AUTOSIZE -1
#define LVSCW_AUTOSIZE_USEHEADER -2

Alexandre Julliard's avatar
Alexandre Julliard committed
2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995
#define LVS_ICON                0x0000
#define LVS_REPORT              0x0001
#define LVS_SMALLICON           0x0002
#define LVS_LIST                0x0003
#define LVS_TYPEMASK            0x0003
#define LVS_SINGLESEL           0x0004
#define LVS_SHOWSELALWAYS       0x0008
#define LVS_SORTASCENDING       0x0010
#define LVS_SORTDESCENDING      0x0020
#define LVS_SHAREIMAGELISTS     0x0040
#define LVS_NOLABELWRAP         0x0080
#define LVS_AUTOARRANGE         0x0100
#define LVS_EDITLABELS          0x0200
#define LVS_OWNERDATA           0x1000
#define LVS_NOSCROLL            0x2000
#define LVS_TYPESTYLEMASK       0xfc00
#define LVS_ALIGNTOP            0x0000
#define LVS_ALIGNLEFT           0x0800
#define LVS_ALIGNMASK           0x0c00
#define LVS_OWNERDRAWFIXED      0x0400
#define LVS_NOCOLUMNHEADER      0x4000
#define LVS_NOSORTHEADER        0x8000

2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009
#define LVS_EX_GRIDLINES        0x0001
#define LVS_EX_SUBITEMIMAGES    0x0002
#define LVS_EX_CHECKBOXES       0x0004
#define LVS_EX_TRACKSELECT      0x0008
#define LVS_EX_HEADERDRAGDROP   0x0010
#define LVS_EX_FULLROWSELECT    0x0020
#define LVS_EX_ONECLICKACTIVATE 0x0040
#define LVS_EX_TWOCLICKACTIVATE 0x0080
#define LVS_EX_FLATSB           0x0100
#define LVS_EX_REGIONAL         0x0200
#define LVS_EX_INFOTIP          0x0400
#define LVS_EX_UNDERLINEHOT     0x0800
#define LVS_EX_UNDERLINECOLD    0x1000
#define LVS_EX_MULTIWORKAREAS   0x2000
3010 3011 3012 3013 3014 3015 3016
#define LVS_EX_LABELTIP         0x4000
#define LVS_EX_BORDERSELECT     0x8000
#define LVS_EX_DOUBLEBUFFER     0x00010000
#define LVS_EX_HIDELABELS       0x00020000
#define LVS_EX_SINGLEROW        0x00040000
#define LVS_EX_SNAPTOGRID       0x00080000
#define LVS_EX_SIMPLESELECT     0x00100000
3017 3018 3019 3020 3021 3022 3023 3024 3025
#define LVS_EX_JUSTIFYCOLUMNS   0x00200000
#define LVS_EX_TRANSPARENTBKGND 0x00400000
#define LVS_EX_TRANSPARENTSHADOWTEXT 0x00800000
#define LVS_EX_AUTOAUTOARRANGE  0x01000000
#define LVS_EX_HEADERINALLVIEWS 0x02000000
#define LVS_EX_AUTOCHECKSELECT  0x08000000
#define LVS_EX_AUTOSIZECOLUMNS  0x10000000
#define LVS_EX_COLUMNSNAPPOINTS 0x40000000
#define LVS_EX_COLUMNOVERFLOW   0x80000000
3026

Alexandre Julliard's avatar
Alexandre Julliard committed
3027 3028 3029 3030 3031 3032
#define LVCF_FMT                0x0001
#define LVCF_WIDTH              0x0002
#define LVCF_TEXT               0x0004
#define LVCF_SUBITEM            0x0008
#define LVCF_IMAGE              0x0010
#define LVCF_ORDER              0x0020
3033
#define LVCF_MINWIDTH           0x0040
Alexandre Julliard's avatar
Alexandre Julliard committed
3034 3035 3036 3037 3038

#define LVCFMT_LEFT             0x0000
#define LVCFMT_RIGHT            0x0001
#define LVCFMT_CENTER           0x0002
#define LVCFMT_JUSTIFYMASK      0x0003
3039
#define LVCFMT_FIXED_WIDTH      0x0100
Alexandre Julliard's avatar
Alexandre Julliard committed
3040 3041 3042
#define LVCFMT_IMAGE            0x0800
#define LVCFMT_BITMAP_ON_RIGHT  0x1000
#define LVCFMT_COL_HAS_IMAGES   0x8000
3043 3044 3045 3046 3047 3048 3049 3050
#define LVCFMT_NO_DPI_SCALE     0x00040000
#define LVCFMT_FIXED_RATIO      0x00080000
#define LVCFMT_LINE_BREAK       0x00100000
#define LVCFMT_FILL             0x00200000
#define LVCFMT_WRAP             0x00400000
#define LVCFMT_NO_TITLE         0x00800000
#define LVCFMT_SPLIT_BUTTON     0x01000000
#define LVCFMT_TILE_PLACEMENTMASK (LVCFMT_LINE_BREAK | LVCFMT_FILL)
Alexandre Julliard's avatar
Alexandre Julliard committed
3051 3052 3053 3054

#define LVSIL_NORMAL            0
#define LVSIL_SMALL             1
#define LVSIL_STATE             2
3055
#define LVSIL_GROUPHEADER       3
Alexandre Julliard's avatar
Alexandre Julliard committed
3056

3057 3058 3059 3060 3061 3062
/* following 2 flags only for LVS_OWNERDATA listviews */
/* and only in report or list mode */
#define LVSICF_NOINVALIDATEALL  0x0001
#define LVSICF_NOSCROLL         0x0002


3063 3064 3065 3066 3067 3068
#define LVFI_PARAM              0x0001
#define LVFI_STRING             0x0002
#define LVFI_SUBSTRING          0x0004
#define LVFI_PARTIAL            0x0008
#define LVFI_WRAP               0x0020
#define LVFI_NEARESTXY          0x0040
3069

Alexandre Julliard's avatar
Alexandre Julliard committed
3070 3071 3072 3073 3074
#define LVIF_TEXT               0x0001
#define LVIF_IMAGE              0x0002
#define LVIF_PARAM              0x0004
#define LVIF_STATE              0x0008
#define LVIF_INDENT             0x0010
3075 3076
#define LVIF_GROUPID            0x0100
#define LVIF_COLUMNS            0x0200
Alexandre Julliard's avatar
Alexandre Julliard committed
3077
#define LVIF_NORECOMPUTE        0x0800
3078
#define LVIF_DI_SETITEM         0x1000
3079
#define LVIF_COLFMT             0x00010000
Alexandre Julliard's avatar
Alexandre Julliard committed
3080

3081 3082
#define LVIR_BOUNDS             0x0000
#define LVIR_ICON               0x0001
3083
#define LVIR_LABEL              0x0002
3084
#define LVIR_SELECTBOUNDS       0x0003
3085

Alexandre Julliard's avatar
Alexandre Julliard committed
3086 3087 3088 3089 3090 3091 3092 3093 3094
#define LVIS_FOCUSED            0x0001
#define LVIS_SELECTED           0x0002
#define LVIS_CUT                0x0004
#define LVIS_DROPHILITED        0x0008
#define LVIS_ACTIVATING         0x0020

#define LVIS_OVERLAYMASK        0x0F00
#define LVIS_STATEIMAGEMASK     0xF000

3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105
#define LVNI_ALL		0x0000
#define LVNI_FOCUSED		0x0001
#define LVNI_SELECTED		0x0002
#define LVNI_CUT		0x0004
#define LVNI_DROPHILITED	0x0008

#define LVNI_ABOVE		0x0100
#define LVNI_BELOW		0x0200
#define LVNI_TOLEFT		0x0400
#define LVNI_TORIGHT		0x0800

3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116
#define LVHT_NOWHERE		0x0001
#define LVHT_ONITEMICON		0x0002
#define LVHT_ONITEMLABEL	0x0004
#define LVHT_ONITEMSTATEICON	0x0008
#define LVHT_ONITEM		(LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)

#define LVHT_ABOVE		0x0008
#define LVHT_BELOW		0x0010
#define LVHT_TORIGHT		0x0020
#define LVHT_TOLEFT		0x0040

3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129
#define LV_VIEW_ICON            0x0000
#define LV_VIEW_DETAILS         0x0001
#define LV_VIEW_SMALLICON       0x0002
#define LV_VIEW_LIST            0x0003
#define LV_VIEW_TILE            0x0004
#define LV_VIEW_MAX             0x0004

#define LVGF_NONE               0x00000000
#define LVGF_HEADER             0x00000001
#define LVGF_FOOTER             0x00000002
#define LVGF_STATE              0x00000004
#define LVGF_ALIGN              0x00000008
#define LVGF_GROUPID            0x00000010
3130 3131 3132 3133 3134 3135 3136 3137 3138
#define LVGF_SUBTITLE           0x00000100
#define LVGF_TASK               0x00000200
#define LVGF_DESCRIPTIONTOP     0x00000400
#define LVGF_DESCRIPTIONBOTTOM  0x00000800
#define LVGF_TITLEIMAGE         0x00001000
#define LVGF_EXTENDEDIMAGE      0x00002000
#define LVGF_ITEMS              0x00004000
#define LVGF_SUBSET             0x00008000
#define LVGF_SUBSETITEMS        0x00010000
3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159

#define LVGS_NORMAL             0x00000000
#define LVGS_COLLAPSED          0x00000001
#define LVGS_HIDDEN             0x00000002

#define LVGA_HEADER_LEFT        0x00000001
#define LVGA_HEADER_CENTER      0x00000002
#define LVGA_HEADER_RIGHT       0x00000004
#define LVGA_FOOTER_LEFT        0x00000008
#define LVGA_FOOTER_CENTER      0x00000010
#define LVGA_FOOTER_RIGHT       0x00000020

#define LVGMF_NONE              0x00000000
#define LVGMF_BORDERSIZE        0x00000001
#define LVGMF_BORDERCOLOR       0x00000002
#define LVGMF_TEXTCOLOR         0x00000004

#define LVTVIF_AUTOSIZE         0x00000000
#define LVTVIF_FIXEDWIDTH       0x00000001
#define LVTVIF_FIXEDHEIGHT      0x00000002
#define LVTVIF_FIXEDSIZE        0x00000003
3160
#define LVTVIF_EXTENDED         0x00000004
3161 3162 3163 3164 3165 3166 3167

#define LVTVIM_TILESIZE         0x00000001
#define LVTVIM_COLUMNS          0x00000002
#define LVTVIM_LABELMARGIN      0x00000004

#define LVIM_AFTER              0x00000001

Alexandre Julliard's avatar
Alexandre Julliard committed
3168 3169 3170 3171 3172 3173
#define LVM_FIRST               0x1000
#define LVM_GETBKCOLOR          (LVM_FIRST+0)
#define LVM_SETBKCOLOR          (LVM_FIRST+1)
#define LVM_GETIMAGELIST        (LVM_FIRST+2)
#define LVM_SETIMAGELIST        (LVM_FIRST+3)
#define LVM_GETITEMCOUNT        (LVM_FIRST+4)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3174 3175
#define LVM_GETITEMA            (LVM_FIRST+5)
#define LVM_GETITEMW            (LVM_FIRST+75)
Alexandre Julliard's avatar
Alexandre Julliard committed
3176
#define LVM_GETITEM             WINELIB_NAME_AW(LVM_GETITEM)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3177 3178
#define LVM_SETITEMA            (LVM_FIRST+6)
#define LVM_SETITEMW            (LVM_FIRST+76)
Alexandre Julliard's avatar
Alexandre Julliard committed
3179
#define LVM_SETITEM             WINELIB_NAME_AW(LVM_SETITEM)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3180 3181
#define LVM_INSERTITEMA         (LVM_FIRST+7)
#define LVM_INSERTITEMW         (LVM_FIRST+77)
Alexandre Julliard's avatar
Alexandre Julliard committed
3182 3183 3184 3185 3186 3187
#define LVM_INSERTITEM          WINELIB_NAME_AW(LVM_INSERTITEM)
#define LVM_DELETEITEM          (LVM_FIRST+8)
#define LVM_DELETEALLITEMS      (LVM_FIRST+9)
#define LVM_GETCALLBACKMASK     (LVM_FIRST+10)
#define LVM_SETCALLBACKMASK     (LVM_FIRST+11)
#define LVM_GETNEXTITEM         (LVM_FIRST+12)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3188 3189
#define LVM_FINDITEMA           (LVM_FIRST+13)
#define LVM_FINDITEMW           (LVM_FIRST+83)
Alexandre Julliard's avatar
Alexandre Julliard committed
3190 3191
#define LVM_FINDITEM            WINELIB_NAME_AW(LVM_FINDITEM)
#define LVM_GETITEMRECT         (LVM_FIRST+14)
3192
#define LVM_SETITEMPOSITION     (LVM_FIRST+15)
Alexandre Julliard's avatar
Alexandre Julliard committed
3193
#define LVM_GETITEMPOSITION     (LVM_FIRST+16)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3194 3195
#define LVM_GETSTRINGWIDTHA     (LVM_FIRST+17)
#define LVM_GETSTRINGWIDTHW     (LVM_FIRST+87)
Alexandre Julliard's avatar
Alexandre Julliard committed
3196 3197 3198 3199 3200 3201
#define LVM_GETSTRINGWIDTH      WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
#define LVM_HITTEST             (LVM_FIRST+18)
#define LVM_ENSUREVISIBLE       (LVM_FIRST+19)
#define LVM_SCROLL              (LVM_FIRST+20)
#define LVM_REDRAWITEMS         (LVM_FIRST+21)
#define LVM_ARRANGE             (LVM_FIRST+22)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3202 3203
#define LVM_EDITLABELA          (LVM_FIRST+23)
#define LVM_EDITLABELW          (LVM_FIRST+118)
Alexandre Julliard's avatar
Alexandre Julliard committed
3204 3205
#define LVM_EDITLABEL           WINELIB_NAME_AW(LVM_EDITLABEL)
#define LVM_GETEDITCONTROL      (LVM_FIRST+24)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3206 3207
#define LVM_GETCOLUMNA          (LVM_FIRST+25)
#define LVM_GETCOLUMNW          (LVM_FIRST+95)
Alexandre Julliard's avatar
Alexandre Julliard committed
3208
#define LVM_GETCOLUMN           WINELIB_NAME_AW(LVM_GETCOLUMN)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3209 3210
#define LVM_SETCOLUMNA          (LVM_FIRST+26)
#define LVM_SETCOLUMNW          (LVM_FIRST+96)
Alexandre Julliard's avatar
Alexandre Julliard committed
3211
#define LVM_SETCOLUMN           WINELIB_NAME_AW(LVM_SETCOLUMN)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3212 3213
#define LVM_INSERTCOLUMNA       (LVM_FIRST+27)
#define LVM_INSERTCOLUMNW       (LVM_FIRST+97)
Alexandre Julliard's avatar
Alexandre Julliard committed
3214 3215 3216
#define LVM_INSERTCOLUMN        WINELIB_NAME_AW(LVM_INSERTCOLUMN)
#define LVM_DELETECOLUMN        (LVM_FIRST+28)
#define LVM_GETCOLUMNWIDTH      (LVM_FIRST+29)
Alexandre Julliard's avatar
Alexandre Julliard committed
3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231
#define LVM_SETCOLUMNWIDTH      (LVM_FIRST+30)
#define LVM_GETHEADER           (LVM_FIRST+31)

#define LVM_CREATEDRAGIMAGE     (LVM_FIRST+33)
#define LVM_GETVIEWRECT         (LVM_FIRST+34)
#define LVM_GETTEXTCOLOR        (LVM_FIRST+35)
#define LVM_SETTEXTCOLOR        (LVM_FIRST+36)
#define LVM_GETTEXTBKCOLOR      (LVM_FIRST+37)
#define LVM_SETTEXTBKCOLOR      (LVM_FIRST+38)
#define LVM_GETTOPINDEX         (LVM_FIRST+39)
#define LVM_GETCOUNTPERPAGE     (LVM_FIRST+40)
#define LVM_GETORIGIN           (LVM_FIRST+41)
#define LVM_UPDATE              (LVM_FIRST+42)
#define LVM_SETITEMSTATE        (LVM_FIRST+43)
#define LVM_GETITEMSTATE        (LVM_FIRST+44)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3232 3233
#define LVM_GETITEMTEXTA        (LVM_FIRST+45)
#define LVM_GETITEMTEXTW        (LVM_FIRST+115)
Alexandre Julliard's avatar
Alexandre Julliard committed
3234
#define LVM_GETITEMTEXT         WINELIB_NAME_AW(LVM_GETITEMTEXT)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3235 3236
#define LVM_SETITEMTEXTA        (LVM_FIRST+46)
#define LVM_SETITEMTEXTW        (LVM_FIRST+116)
Alexandre Julliard's avatar
Alexandre Julliard committed
3237 3238
#define LVM_SETITEMTEXT         WINELIB_NAME_AW(LVM_SETITEMTEXT)
#define LVM_SETITEMCOUNT        (LVM_FIRST+47)
Alexandre Julliard's avatar
Alexandre Julliard committed
3239
#define LVM_SORTITEMS           (LVM_FIRST+48)
3240
#define LVM_SORTITEMSEX         (LVM_FIRST+81)
3241
#define LVM_SETITEMPOSITION32   (LVM_FIRST+49)
Alexandre Julliard's avatar
Alexandre Julliard committed
3242
#define LVM_GETSELECTEDCOUNT    (LVM_FIRST+50)
Alexandre Julliard's avatar
Alexandre Julliard committed
3243
#define LVM_GETITEMSPACING      (LVM_FIRST+51)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3244 3245
#define LVM_GETISEARCHSTRINGA   (LVM_FIRST+52)
#define LVM_GETISEARCHSTRINGW   (LVM_FIRST+117)
Alexandre Julliard's avatar
Alexandre Julliard committed
3246 3247
#define LVM_GETISEARCHSTRING    WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
#define LVM_SETICONSPACING      (LVM_FIRST+53)
Alexandre Julliard's avatar
Alexandre Julliard committed
3248 3249
#define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
#define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
Alexandre Julliard's avatar
Alexandre Julliard committed
3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261
#define LVM_GETSUBITEMRECT      (LVM_FIRST+56)
#define LVM_SUBITEMHITTEST      (LVM_FIRST+57)
#define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
#define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
#define LVM_SETHOTITEM          (LVM_FIRST+60)
#define LVM_GETHOTITEM          (LVM_FIRST+61)
#define LVM_SETHOTCURSOR        (LVM_FIRST+62)
#define LVM_GETHOTCURSOR        (LVM_FIRST+63)
#define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
#define LVM_SETWORKAREAS        (LVM_FIRST+65)
#define LVM_GETSELECTIONMARK    (LVM_FIRST+66)
#define LVM_SETSELECTIONMARK    (LVM_FIRST+67)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3262 3263
#define LVM_SETBKIMAGEA         (LVM_FIRST+68)
#define LVM_SETBKIMAGEW         (LVM_FIRST+138)
Alexandre Julliard's avatar
Alexandre Julliard committed
3264
#define LVM_SETBKIMAGE          WINELIB_NAME_AW(LVM_SETBKIMAGE)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3265 3266
#define LVM_GETBKIMAGEA         (LVM_FIRST+69)
#define LVM_GETBKIMAGEW         (LVM_FIRST+139)
Alexandre Julliard's avatar
Alexandre Julliard committed
3267 3268 3269 3270 3271 3272 3273
#define LVM_GETBKIMAGE          WINELIB_NAME_AW(LVM_GETBKIMAGE)
#define LVM_GETWORKAREAS        (LVM_FIRST+70)
#define LVM_SETHOVERTIME        (LVM_FIRST+71)
#define LVM_GETHOVERTIME        (LVM_FIRST+72)
#define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
#define LVM_SETTOOLTIPS         (LVM_FIRST+74)
#define LVM_GETTOOLTIPS         (LVM_FIRST+78)
3274 3275
#define LVM_GETUNICODEFORMAT    (CCM_GETUNICODEFORMAT)
#define LVM_SETUNICODEFORMAT    (CCM_SETUNICODEFORMAT)
3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310
#define LVM_SETSELECTEDCOLUMN   (LVM_FIRST + 140)
#define LVM_SETTILEWIDTH        (LVM_FIRST + 141)
#define LVM_SETVIEW             (LVM_FIRST + 142)
#define LVM_GETVIEW             (LVM_FIRST + 143)
#define LVM_INSERTGROUP         (LVM_FIRST + 145)
#define LVM_SETGROUPINFO        (LVM_FIRST + 147)
#define LVM_GETGROUPINFO        (LVM_FIRST + 149)
#define LVM_REMOVEGROUP         (LVM_FIRST + 150)
#define LVM_MOVEGROUP           (LVM_FIRST + 151)
#define LVM_MOVEITEMTOGROUP     (LVM_FIRST + 154)
#define LVM_SETGROUPMETRICS     (LVM_FIRST + 155)
#define LVM_GETGROUPMETRICS     (LVM_FIRST + 156)
#define LVM_ENABLEGROUPVIEW     (LVM_FIRST + 157)
#define LVM_SORTGROUPS          (LVM_FIRST + 158)
#define LVM_INSERTGROUPSORTED   (LVM_FIRST + 159)
#define LVM_REMOVEALLGROUPS     (LVM_FIRST + 160)
#define LVM_HASGROUP            (LVM_FIRST + 161)
#define LVM_SETTILEVIEWINFO     (LVM_FIRST + 162)
#define LVM_GETTILEVIEWINFO     (LVM_FIRST + 163)
#define LVM_SETTILEINFO         (LVM_FIRST + 164)
#define LVM_GETTILEINFO         (LVM_FIRST + 165)
#define LVM_SETINSERTMARK       (LVM_FIRST + 166)
#define LVM_GETINSERTMARK       (LVM_FIRST + 167)
#define LVM_INSERTMARKHITTEST   (LVM_FIRST + 168)
#define LVM_GETINSERTMARKRECT   (LVM_FIRST + 169)
#define LVM_SETINSERTMARKCOLOR  (LVM_FIRST + 170)
#define LVM_GETINSERTMARKCOLOR  (LVM_FIRST + 171)
#define LVM_SETINFOTIP          (LVM_FIRST + 173)
#define LVM_GETSELECTEDCOLUMN   (LVM_FIRST + 174)
#define LVM_ISGROUPVIEWENABLED  (LVM_FIRST + 175)
#define LVM_GETOUTLINECOLOR     (LVM_FIRST + 176)
#define LVM_SETOUTLINECOLOR     (LVM_FIRST + 177)
#define LVM_CANCELEDITLABEL     (LVM_FIRST + 179)
#define LVM_MAPINDEXTOID        (LVM_FIRST + 180)
#define LVM_MAPIDTOINDEX        (LVM_FIRST + 181)
3311
#define LVM_ISITEMVISIBLE       (LVM_FIRST + 182)
Alexandre Julliard's avatar
Alexandre Julliard committed
3312 3313 3314 3315 3316 3317 3318 3319

#define LVN_FIRST               (0U-100U)
#define LVN_LAST                (0U-199U)
#define LVN_ITEMCHANGING        (LVN_FIRST-0)
#define LVN_ITEMCHANGED         (LVN_FIRST-1)
#define LVN_INSERTITEM          (LVN_FIRST-2)
#define LVN_DELETEITEM          (LVN_FIRST-3)
#define LVN_DELETEALLITEMS      (LVN_FIRST-4)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3320 3321 3322 3323 3324 3325
#define LVN_BEGINLABELEDITA     (LVN_FIRST-5)
#define LVN_BEGINLABELEDITW     (LVN_FIRST-75)
#define LVN_BEGINLABELEDIT      WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
#define LVN_ENDLABELEDITA       (LVN_FIRST-6)
#define LVN_ENDLABELEDITW       (LVN_FIRST-76)
#define LVN_ENDLABELEDIT        WINELIB_NAME_AW(LVN_ENDLABELEDIT)
Alexandre Julliard's avatar
Alexandre Julliard committed
3326 3327 3328 3329 3330 3331 3332
#define LVN_COLUMNCLICK         (LVN_FIRST-8)
#define LVN_BEGINDRAG           (LVN_FIRST-9)
#define LVN_BEGINRDRAG          (LVN_FIRST-11)
#define LVN_ODCACHEHINT         (LVN_FIRST-13)
#define LVN_ITEMACTIVATE        (LVN_FIRST-14)
#define LVN_ODSTATECHANGED      (LVN_FIRST-15)
#define LVN_HOTTRACK            (LVN_FIRST-21)
3333 3334
#define LVN_ODFINDITEMA         (LVN_FIRST-52)
#define LVN_ODFINDITEMW         (LVN_FIRST-79)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3335 3336 3337 3338 3339 3340 3341
#define LVN_ODFINDITEM          WINELIB_NAME_AW(LVN_ODFINDITEM)
#define LVN_GETDISPINFOA        (LVN_FIRST-50)
#define LVN_GETDISPINFOW        (LVN_FIRST-77)
#define LVN_GETDISPINFO         WINELIB_NAME_AW(LVN_GETDISPINFO)
#define LVN_SETDISPINFOA        (LVN_FIRST-51)
#define LVN_SETDISPINFOW        (LVN_FIRST-78)
#define LVN_SETDISPINFO         WINELIB_NAME_AW(LVN_SETDISPINFO)
3342
#define LVN_KEYDOWN             (LVN_FIRST-55)
3343 3344 3345
#define LVN_MARQUEEBEGIN        (LVN_FIRST-56)
#define LVN_GETINFOTIPA         (LVN_FIRST-57)
#define LVN_GETINFOTIPW         (LVN_FIRST-58)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
3346
#define LVN_GETINFOTIP          WINELIB_NAME_AW(LVN_GETINFOTIP)
3347 3348 3349
#define LVN_INCREMENTALSEARCHA  (LVN_FIRST-62)
#define LVN_INCREMENTALSEARCHW  (LVN_FIRST-63)
#define LVN_INCREMENTALSEARCH   WINELIB_NAME_AW(LVN_INCREMENTALSEARCH)
3350 3351 3352 3353 3354
#define LVN_BEGINSCROLL         (LVN_FIRST-80)
#define LVN_ENDSCROLL           (LVN_FIRST-81)
#define LVN_LINKCLICK           (LVN_FIRST-84)
#define LVN_ASYNCDRAWN          (LVN_FIRST-86)
#define LVN_GETEMPTYMARKUP      (LVN_FIRST-87)
Alexandre Julliard's avatar
Alexandre Julliard committed
3355

3356 3357 3358 3359 3360
/* LVN_INCREMENTALSEARCH return codes */
#define LVNSCH_DEFAULT          -1
#define LVNSCH_ERROR            -2
#define LVNSCH_IGNORE           -3

3361 3362
#define LVA_DEFAULT             0x0000
#define LVA_ALIGNLEFT           0x0001
3363 3364
#define LVA_ALIGNTOP            0x0002
#define LVA_SNAPTOGRID          0x0005
Alexandre Julliard's avatar
Alexandre Julliard committed
3365 3366 3367

typedef struct tagLVITEMA
{
3368 3369 3370 3371 3372
    UINT mask;
    INT  iItem;
    INT  iSubItem;
    UINT state;
    UINT stateMask;
Alexandre Julliard's avatar
Alexandre Julliard committed
3373
    LPSTR  pszText;
3374 3375
    INT  cchTextMax;
    INT  iImage;
Alexandre Julliard's avatar
Alexandre Julliard committed
3376
    LPARAM lParam;
3377 3378 3379 3380 3381 3382 3383 3384 3385
    /* (_WIN32_IE >= 0x0300) */
    INT  iIndent;
    /* (_WIN32_IE >= 0x0560) */
    INT iGroupId;
    UINT cColumns;
    PUINT puColumns;
    /* (_WIN32_WINNT >= 0x0600) */
    PINT piColFmt;
    INT iGroup;
3386
} LVITEMA, *LPLVITEMA;
Alexandre Julliard's avatar
Alexandre Julliard committed
3387 3388 3389

typedef struct tagLVITEMW
{
3390 3391 3392 3393 3394
    UINT mask;
    INT  iItem;
    INT  iSubItem;
    UINT state;
    UINT stateMask;
Alexandre Julliard's avatar
Alexandre Julliard committed
3395
    LPWSTR pszText;
3396 3397
    INT  cchTextMax;
    INT  iImage;
Alexandre Julliard's avatar
Alexandre Julliard committed
3398
    LPARAM lParam;
3399 3400 3401 3402 3403 3404 3405 3406 3407
    /* (_WIN32_IE >= 0x0300) */
    INT  iIndent;
    /* (_WIN32_IE >= 0x0560) */
    INT iGroupId;
    UINT cColumns;
    PUINT puColumns;
    /* (_WIN32_WINNT >= 0x0600) */
    PINT piColFmt;
    INT iGroup;
3408
} LVITEMW, *LPLVITEMW;
Alexandre Julliard's avatar
Alexandre Julliard committed
3409

3410 3411 3412 3413 3414 3415 3416
#define LVITEM   WINELIB_NAME_AW(LVITEM)
#define LPLVITEM WINELIB_NAME_AW(LPLVITEM)

#define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
#define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
#define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)

3417 3418 3419 3420
#define LVITEMA_V5_SIZE CCSIZEOF_STRUCT(LVITEMA, puColumns)
#define LVITEMW_V5_SIZE CCSIZEOF_STRUCT(LVITEMW, puColumns)
#define LVITEM_V5_SIZE WINELIB_NAME_AW(LVITEM_V5_SIZE)

3421 3422 3423
#define LV_ITEM  LVITEM
#define LV_ITEMA LVITEMA
#define LV_ITEMW LVITEMW
3424

3425
typedef struct LVSETINFOTIP
3426 3427 3428 3429 3430 3431
{
    UINT cbSize;
    DWORD dwFlags;
    LPWSTR pszText;
    int iItem;
    int iSubItem;
3432
} LVSETINFOTIP, *PLVSETINFOTIP;
3433

3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457
/* ListView background image structs and constants
   For _WIN32_IE version 0x400 and later. */

typedef struct tagLVBKIMAGEA
{
    ULONG ulFlags;
    HBITMAP hbm;
    LPSTR pszImage;
    UINT cchImageMax;
    int xOffsetPercent;
    int yOffsetPercent;
} LVBKIMAGEA, *LPLVBKIMAGEA;

typedef struct tagLVBKIMAGEW
{
    ULONG ulFlags;
    HBITMAP hbm;
    LPWSTR pszImage;
    UINT cchImageMax;
    int xOffsetPercent;
    int yOffsetPercent;
} LVBKIMAGEW, *LPLVBKIMAGEW;

#define LVBKIMAGE WINELIB_NAME_AW(LVBKIMAGE)
3458
#define LPLVBKIMAGE WINELIB_NAME_AW(LPLVBKIMAGE)
3459 3460 3461 3462 3463 3464 3465 3466

#define LVBKIF_SOURCE_NONE      0x00000000
#define LVBKIF_SOURCE_HBITMAP   0x00000001
#define LVBKIF_SOURCE_URL       0x00000002
#define LVBKIF_SOURCE_MASK      0x00000003
#define LVBKIF_STYLE_NORMAL     0x00000000
#define LVBKIF_STYLE_TILE       0x00000010
#define LVBKIF_STYLE_MASK       0x00000010
3467 3468
#define LVBKIF_FLAG_TILEOFFSET  0x00000100
#define LVBKIF_TYPE_WATERMARK   0x10000000
3469 3470 3471 3472 3473 3474 3475

#define ListView_SetBkImage(hwnd, plvbki) \
    (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)plvbki)

#define ListView_GetBkImage(hwnd, plvbki) \
    (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)plvbki)

Alexandre Julliard's avatar
Alexandre Julliard committed
3476 3477
typedef struct tagLVCOLUMNA
{
3478 3479 3480
    UINT mask;
    INT  fmt;
    INT  cx;
Alexandre Julliard's avatar
Alexandre Julliard committed
3481
    LPSTR  pszText;
3482 3483
    INT  cchTextMax;
    INT  iSubItem;
3484 3485 3486 3487 3488 3489 3490
    /* (_WIN32_IE >= 0x0300) */
    INT  iImage;
    INT  iOrder;
    /* (_WIN32_WINNT >= 0x0600) */
    INT  cxMin;
    INT  cxDefault;
    INT  cxIdeal;
3491
} LVCOLUMNA, *LPLVCOLUMNA;
Alexandre Julliard's avatar
Alexandre Julliard committed
3492 3493 3494

typedef struct tagLVCOLUMNW
{
3495 3496 3497
    UINT mask;
    INT  fmt;
    INT  cx;
Alexandre Julliard's avatar
Alexandre Julliard committed
3498
    LPWSTR pszText;
3499 3500
    INT  cchTextMax;
    INT  iSubItem;
3501 3502 3503 3504 3505 3506 3507
    /* (_WIN32_IE >= 0x0300) */
    INT  iImage;
    INT  iOrder;
    /* (_WIN32_WINNT >= 0x0600) */
    INT  cxMin;
    INT  cxDefault;
    INT  cxIdeal;
3508
} LVCOLUMNW, *LPLVCOLUMNW;
Alexandre Julliard's avatar
Alexandre Julliard committed
3509 3510 3511 3512

#define LVCOLUMN   WINELIB_NAME_AW(LVCOLUMN)
#define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)

3513 3514
#define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
#define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
Alexandre Julliard's avatar
Alexandre Julliard committed
3515 3516 3517 3518
#define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)

#define LV_COLUMN       LVCOLUMN

Alexandre Julliard's avatar
Alexandre Julliard committed
3519 3520

typedef struct tagNMLISTVIEW
Alexandre Julliard's avatar
Alexandre Julliard committed
3521
{
3522 3523 3524 3525 3526 3527
    NMHDR hdr;
    INT iItem;
    INT iSubItem;
    UINT uNewState;
    UINT uOldState;
    UINT uChanged;
3528
    POINT ptAction;
Alexandre Julliard's avatar
Alexandre Julliard committed
3529
    LPARAM  lParam;
Alexandre Julliard's avatar
Alexandre Julliard committed
3530
} NMLISTVIEW, *LPNMLISTVIEW;
Alexandre Julliard's avatar
Alexandre Julliard committed
3531

Alexandre Julliard's avatar
Alexandre Julliard committed
3532
#define NM_LISTVIEW     NMLISTVIEW
3533
#define LPNM_LISTVIEW   LPNMLISTVIEW
Alexandre Julliard's avatar
Alexandre Julliard committed
3534

3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546
typedef struct tagNMITEMACTIVATE
{
    NMHDR hdr;
    int iItem;
    int iSubItem;
    UINT uNewState;
    UINT uOldState;
    UINT uChanged;
    POINT ptAction;
    LPARAM lParam;
    UINT uKeyFlags;
} NMITEMACTIVATE, *LPNMITEMACTIVATE;
Alexandre Julliard's avatar
Alexandre Julliard committed
3547

Maxime Bellengé's avatar
Maxime Bellengé committed
3548 3549 3550 3551
#define LVKF_ALT     0x0001
#define LVKF_CONTROL 0x0002
#define LVKF_SHIFT   0x0004

3552
typedef struct tagLVDISPINFO
Alexandre Julliard's avatar
Alexandre Julliard committed
3553
{
3554
    NMHDR hdr;
3555 3556
    LVITEMA item;
} NMLVDISPINFOA, *LPNMLVDISPINFOA;
Alexandre Julliard's avatar
Alexandre Julliard committed
3557 3558 3559

typedef struct tagLVDISPINFOW
{
3560
    NMHDR hdr;
3561 3562
    LVITEMW item;
} NMLVDISPINFOW, *LPNMLVDISPINFOW;
Alexandre Julliard's avatar
Alexandre Julliard committed
3563 3564 3565

#define NMLVDISPINFO   WINELIB_NAME_AW(NMLVDISPINFO)
#define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
Alexandre Julliard's avatar
Alexandre Julliard committed
3566

3567 3568 3569
#define LV_DISPINFO	NMLVDISPINFO
#define LV_DISPINFOA	NMLVDISPINFOA
#define LV_DISPINFOW	NMLVDISPINFOW
Alexandre Julliard's avatar
Alexandre Julliard committed
3570

3571
#include <pshpack1.h>
3572 3573 3574 3575
typedef struct tagLVKEYDOWN
{
  NMHDR hdr;
  WORD  wVKey;
3576
  UINT flags;
3577
} NMLVKEYDOWN, *LPNMLVKEYDOWN;
3578
#include <poppack.h>
3579 3580

#define LV_KEYDOWN     NMLVKEYDOWN
Alexandre Julliard's avatar
Alexandre Julliard committed
3581

3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606
typedef struct tagNMLVGETINFOTIPA
{
    NMHDR hdr;
    DWORD dwFlags;
    LPSTR pszText;
    int cchTextMax;
    int iItem;
    int iSubItem;
    LPARAM lParam;
} NMLVGETINFOTIPA, *LPNMLVGETINFOTIPA;

typedef struct tagNMLVGETINFOTIPW
{
    NMHDR hdr;
    DWORD dwFlags;
    LPWSTR pszText;
    int cchTextMax;
    int iItem;
    int iSubItem;
    LPARAM lParam;
} NMLVGETINFOTIPW, *LPNMLVGETINFOTIPW;

#define NMLVGETINFOTIP WINELIB_NAME_AW(NMLVGETINFOTIP)
#define LPNMLVGETINFOTIP WINELIB_NAME_AW(LPNMLVGETINFOTIP)

3607 3608
typedef struct tagLVHITTESTINFO
{
3609 3610 3611 3612
    POINT pt;
    UINT  flags;
    INT   iItem;
    INT   iSubItem;
3613 3614
    /* (_WIN32_WINNT >= 0x0600) */
    INT   iGroup;
3615 3616 3617 3618 3619 3620
} LVHITTESTINFO, *LPLVHITTESTINFO;

#define LV_HITTESTINFO LVHITTESTINFO
#define _LV_HITTESTINFO tagLVHITTESTINFO
#define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)

3621
typedef struct tagLVFINDINFOA
3622
{
3623
	UINT flags;
3624 3625
	LPCSTR psz;
	LPARAM lParam;
3626 3627
	POINT pt;
	UINT vkDirection;
3628
} LVFINDINFOA, *LPLVFINDINFOA;
3629

3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640
typedef struct tagLVFINDINFOW
{
	UINT flags;
	LPCWSTR psz;
	LPARAM lParam;
	POINT pt;
	UINT vkDirection;
} LVFINDINFOW, *LPLVFINDINFOW;

#define LVFINDINFO WINELIB_NAME_AW(LVFINDINFO)
#define LPLVFINDINFO WINELIB_NAME_AW(LPLVFINDINFO)
3641

3642 3643 3644 3645
#define LV_FINDINFO	LVFINDINFO
#define LV_FINDINFOA	LVFINDINFOA
#define LV_FINDINFOW	LVFINDINFOW

3646 3647
/* Groups relates structures */

3648
typedef struct LVGROUP
3649 3650 3651 3652
{
	UINT cbSize;
	UINT mask;
	LPWSTR pszHeader;
3653
	INT cchHeader;
3654
	LPWSTR pszFooter;
3655 3656
	INT cchFooter;
	INT iGroupId;
3657 3658 3659
	UINT stateMask;
	UINT state;
	UINT uAlign;
3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674
        /* (_WIN32_WINNT >= 0x0600) */
	LPWSTR  pszSubtitle;
	UINT    cchSubtitle;
	LPWSTR  pszTask;
	UINT    cchTask;
	LPWSTR  pszDescriptionTop;
	UINT    cchDescriptionTop;
	LPWSTR  pszDescriptionBottom;
	UINT    cchDescriptionBottom;
	INT     iTitleImage;
	INT     iExtendedImage;
	INT     iFirstItem;
	UINT    cItems;
	LPWSTR  pszSubsetTitle;
	UINT    cchSubsetTitle;
3675
} LVGROUP, *PLVGROUP;
3676

3677 3678
#define LVGROUP_V5_SIZE CCSIZEOF_STRUCT(LVGROUP, uAlign)

3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696
typedef struct LVGROUPMETRICS
{
	UINT cbSize;
	UINT mask;
	UINT Left;
	UINT Top;
	UINT Right;
	UINT Bottom;
	COLORREF crLeft;
	COLORREF crTop;
	COLORREF crRight;
	COLORREF crBottom;
	COLORREF crRightHeader;
	COLORREF crFooter;
} LVGROUPMETRICS, *PLVGROUPMETRICS;

typedef INT (*PFNLVGROUPCOMPARE)(INT, INT, VOID*);

3697
typedef struct LVINSERTGROUPSORTED
3698 3699 3700
{
	PFNLVGROUPCOMPARE pfnGroupCompare;
	LPVOID *pvData;
3701 3702
	LVGROUP lvGroup;
} LVINSERTGROUPSORTED, *PLVINSERTGROUPSORTED;
3703 3704 3705

/* Tile related structures */

3706
typedef struct LVTILEINFO
3707 3708 3709 3710 3711
{
	UINT cbSize;
	int iItem;
	UINT cColumns;
	PUINT puColumns;
3712 3713
        /* (_WIN32_WINNT >= 0x0600) */
	int* piColFmt;
3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733
} LVTILEINFO, *PLVTILEINFO;

typedef struct LVTILEVIEWINFO
{
	UINT cbSize;
	DWORD dwMask;
	DWORD dwFlags;
	SIZE sizeTile;
	int cLines;
	RECT rcLabelMargin;
} LVTILEVIEWINFO, *PLVTILEVIEWINFO;

typedef struct LVINSERTMARK
{
	UINT cbSize;
	DWORD dwFlags;
	int iItem;
	DWORD dwReserved;
} LVINSERTMARK, *PLVINSERTMARK;

3734 3735
typedef struct tagTCHITTESTINFO
{
3736 3737
	POINT pt;
	UINT flags;
3738 3739 3740 3741
} TCHITTESTINFO, *LPTCHITTESTINFO;

#define TC_HITTESTINFO TCHITTESTINFO

3742
typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
Alexandre Julliard's avatar
Alexandre Julliard committed
3743

3744 3745 3746 3747 3748 3749 3750
#define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLCUSTOMDRW, clrTextBk)

typedef struct tagNMLVCUSTOMDRAW
{
    NMCUSTOMDRAW nmcd;
    COLORREF clrText;
    COLORREF clrTextBk;
3751 3752 3753 3754 3755 3756 3757 3758 3759
    int iSubItem;	/* (_WIN32_IE >= 0x0400) */
    DWORD dwItemType;	/* (_WIN32_IE >= 0x560) */
    COLORREF clrFace;   /* (_WIN32_IE >= 0x560) */
    int iIconEffect;	/* (_WIN32_IE >= 0x560) */
    int iIconPhase;	/* (_WIN32_IE >= 0x560) */
    int iPartId;	/* (_WIN32_IE >= 0x560) */
    int iStateId;	/* (_WIN32_IE >= 0x560) */
    RECT rcText;	/* (_WIN32_IE >= 0x560) */
    UINT uAlign;	/* (_WIN32_IE >= 0x560) */
3760 3761
} NMLVCUSTOMDRAW, *LPNMLVCUSTOMDRAW;

3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772
typedef struct tagNMLVCACHEHINT
{
	NMHDR	hdr;
	INT	iFrom;
	INT	iTo;
} NMLVCACHEHINT, *LPNMLVCACHEHINT;

#define LPNM_CACHEHINT LPNMLVCACHEHINT
#define PNM_CACHEHINT  LPNMLVCACHEHINT
#define NM_CACHEHINT   NMLVCACHEHINT

3773 3774 3775 3776 3777 3778 3779 3780
typedef struct tagNMLVFINDITEMA
{
    NMHDR hdr;
    int iStart;
    LVFINDINFOA lvfi;
} NMLVFINDITEMA, *LPNMLVFINDITEMA;

typedef struct tagNMLVFINDITEMW
3781 3782 3783
{
    NMHDR hdr;
    int iStart;
3784 3785
    LVFINDINFOW lvfi;
} NMLVFINDITEMW, *LPNMLVFINDITEMW;
3786

Francois Gouget's avatar
Francois Gouget committed
3787 3788 3789 3790 3791
#define NMLVFINDITEM   WINELIB_NAME_AW(NMLVFINDITEM)
#define LPNMLVFINDITEM WINELIB_NAME_AW(LPNMLVFINDITEM)
#define NM_FINDITEM    NMLVFINDITEM
#define LPNM_FINDITEM  LPNMLVFINDITEM
#define PNM_FINDITEM   LPNMLVFINDITEM
3792 3793

typedef struct tagNMLVODSTATECHANGE
3794
{
3795 3796 3797 3798 3799 3800 3801 3802 3803 3804
    NMHDR hdr;
    int iFrom;
    int iTo;
    UINT uNewState;
    UINT uOldState;
} NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;

#define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
#define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
#define NM_ODSTATECHANGE NMLVODSTATECHANGE
3805

3806 3807 3808 3809 3810 3811 3812
typedef struct NMLVSCROLL
{
    NMHDR hdr;
    int dx;
    int dy;
} NMLVSCROLL, *LPNMLVSCROLL;

3813
#define ListView_SetItemCount(hwnd,count) \
3814
    (BOOL)SNDMSG((hwnd),LVM_SETITEMCOUNT,(WPARAM)(INT)(count),0)
3815
#define ListView_SetTextBkColor(hwnd,clrBk) \
3816
    (BOOL)SNDMSG((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3817
#define ListView_SetTextColor(hwnd,clrBk) \
3818
    (BOOL)SNDMSG((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3819
#define ListView_DeleteColumn(hwnd,col)\
3820
    (LRESULT)SNDMSG((hwnd),LVM_DELETECOLUMN,0,(LPARAM)(INT)(col))
3821
#define ListView_GetColumnA(hwnd,x,col)\
3822
    (LRESULT)SNDMSGA((hwnd),LVM_GETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3823
#define ListView_GetColumnW(hwnd,x,col)\
3824
    (LRESULT)SNDMSGW((hwnd),LVM_GETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3825
#define ListView_GetColumn WINELIB_NAME_AW(ListView_GetColumn)
3826
#define ListView_SetColumnA(hwnd,x,col)\
3827
    (LRESULT)SNDMSGA((hwnd),LVM_SETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3828
#define ListView_SetColumnW(hwnd,x,col)\
3829
    (LRESULT)SNDMSGW((hwnd),LVM_SETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3830
#define ListView_SetColumn WINELIB_NAME_AW(ListView_SetColumn)
3831
#define ListView_GetColumnWidth(hwnd,x)\
3832
    (INT)SNDMSG((hwnd),LVM_GETCOLUMNWIDTH,(WPARAM)(INT)(x),0L)
3833
#define ListView_SetColumnWidth(hwnd,x,width)\
3834
    (BOOL)SNDMSG((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(INT)(x),(LPARAM)(MAKELPARAM(width,0)))
3835 3836


3837
#define ListView_GetNextItem(hwnd,nItem,flags) \
3838
    (INT)SNDMSG((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
3839
#define ListView_FindItemA(hwnd,nItem,plvfi) \
3840
    (INT)SNDMSGA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOA*)(plvfi))
3841
#define ListView_FindItemW(hwnd,nItem,plvfi) \
3842
    (INT)SNDMSGW((hwnd),LVM_FINDITEMW,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOW*)(plvfi))
3843 3844
#define ListView_FindItem WINELIB_NAME_AW(ListView_FindItem)

3845
#define ListView_Arrange(hwnd,code) \
3846
    (INT)SNDMSG((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
3847
#define ListView_GetItemPosition(hwnd,i,ppt) \
3848
    (INT)SNDMSG((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
3849
#define ListView_GetItemRect(hwnd,i,prc,code) \
3850
	(BOOL)SNDMSG((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
3851 3852
	((prc) ? (((RECT*)(prc))->left = (code),(LPARAM)(RECT \
	*)(prc)) : (LPARAM)(RECT*)NULL))
3853
#define ListView_SetItemA(hwnd,pitem) \
3854
    (INT)SNDMSGA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3855
#define ListView_SetItemW(hwnd,pitem) \
3856
    (INT)SNDMSGW((hwnd),LVM_SETITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3857
#define ListView_SetItem WINELIB_NAME_AW(ListView_SetItem)
3858
#define ListView_SetItemState(hwnd,i,data,dataMask) \
3859 3860
{ LVITEM _LVi; _LVi.state = data; _LVi.stateMask = dataMask;\
  SNDMSG(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEM)&_LVi);}
3861
#define ListView_GetItemState(hwnd,i,mask) \
3862
    (UINT)SNDMSG((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
3863 3864 3865 3866 3867
#define ListView_SetCheckState(hwndLV, i, bCheck) \
    { LVITEM _LVi; _LVi.state = INDEXTOSTATEIMAGEMASK((bCheck)?2:1); _LVi.stateMask = LVIS_STATEIMAGEMASK; \
    SNDMSG(hwndLV, LVM_SETITEMSTATE, (WPARAM)(UINT)(i), (LPARAM)(LPLVITEM)&_LVi);}
#define ListView_GetCheckState(hwndLV, i) \
    (((UINT)SNDMSG((hwndLV), LVM_GETITEMSTATE, (i), LVIS_STATEIMAGEMASK) >> 12) - 1)
3868
#define ListView_GetCountPerPage(hwnd) \
3869
    (BOOL)SNDMSG((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
3870
#define ListView_GetImageList(hwnd,iImageList) \
3871
    (HIMAGELIST)SNDMSG((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
3872
#define ListView_GetStringWidthA(hwnd,pstr) \
3873
    (INT)SNDMSGA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
3874
#define ListView_GetStringWidthW(hwnd,pstr) \
3875
    (INT)SNDMSGW((hwnd),LVM_GETSTRINGWIDTHW,0,(LPARAM)(LPCWSTR)(pstr))
3876
#define ListView_GetStringWidth WINELIB_NAME_AW(ListView_GetStringWidth)
3877
#define ListView_GetTopIndex(hwnd) \
3878
    (BOOL)SNDMSG((hwnd),LVM_GETTOPINDEX,0,0L)
3879
#define ListView_Scroll(hwnd,dx,dy) \
3880
    (BOOL)SNDMSG((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
3881
#define ListView_EnsureVisible(hwnd,i,fPartialOk) \
3882
    (BOOL)SNDMSG((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
Alexandre Julliard's avatar
Alexandre Julliard committed
3883
#define ListView_SetBkColor(hwnd,clrBk) \
3884
    (BOOL)SNDMSG((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
Alexandre Julliard's avatar
Alexandre Julliard committed
3885
#define ListView_SetImageList(hwnd,himl,iImageList) \
3886
    (HIMAGELIST)SNDMSG((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(HIMAGELIST)(himl))
Alexandre Julliard's avatar
Alexandre Julliard committed
3887
#define ListView_GetItemCount(hwnd) \
3888
    (INT)SNDMSG((hwnd),LVM_GETITEMCOUNT,0,0L)
3889
#define ListView_RedrawItems(hwnd,first,last) \
3890
    (BOOL)SNDMSG((hwnd),LVM_REDRAWITEMS,(WPARAM)(INT)(first),(LPARAM)(INT)(last))
3891
#define ListView_GetEditControl(hwnd) \
3892
    (HWND)SNDMSG((hwnd), LVM_GETEDITCONTROL, 0, 0)
3893
#define ListView_GetTextColor(hwnd)  \
3894
    (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0)
3895
#define ListView_GetTextBkColor(hwnd) \
3896
    (COLORREF)SNDMSG((hwnd), LVM_GETTEXTBKCOLOR, 0, 0)
3897
#define ListView_GetBkColor(hwnd)  \
3898
    (COLORREF)SNDMSG((hwnd), LVM_GETBKCOLOR, 0, 0)
3899
#define ListView_GetItemA(hwnd,pitem) \
3900
    (BOOL)SNDMSGA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
3901
#define ListView_GetItemW(hwnd,pitem) \
3902
    (BOOL)SNDMSGW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
Alexandre Julliard's avatar
Alexandre Julliard committed
3903
#define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
3904
#define ListView_GetOrigin(hwnd,ppt) \
3905
    (BOOL)SNDMSG((hwnd),LVM_GETORIGIN,0,(LPARAM)(POINT *)(ppt))
3906

3907
#define ListView_HitTest(hwnd,pinfo) \
3908
    (INT)SNDMSG((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
3909

3910
#define ListView_InsertItemA(hwnd,pitem) \
3911
    (INT)SNDMSGA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3912
#define ListView_InsertItemW(hwnd,pitem) \
3913
    (INT)SNDMSGW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
Alexandre Julliard's avatar
Alexandre Julliard committed
3914
#define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
3915

Alexandre Julliard's avatar
Alexandre Julliard committed
3916
#define ListView_DeleteAllItems(hwnd) \
3917
    (BOOL)SNDMSG((hwnd),LVM_DELETEALLITEMS,0,0L)
3918

3919
#define ListView_InsertColumnA(hwnd,iCol,pcol) \
3920
    (INT)SNDMSGA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
3921
#define ListView_InsertColumnW(hwnd,iCol,pcol) \
3922
    (INT)SNDMSGW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
Alexandre Julliard's avatar
Alexandre Julliard committed
3923
#define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
3924

Alexandre Julliard's avatar
Alexandre Julliard committed
3925
#define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
3926
    (BOOL)SNDMSG((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
3927
#define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm) \
3928
  (BOOL)SNDMSG((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
3929

Alexandre Julliard's avatar
Alexandre Julliard committed
3930
#define ListView_SetItemPosition(hwndLV, i, x, y) \
3931
    (BOOL)SNDMSG((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
Alexandre Julliard's avatar
Alexandre Julliard committed
3932
#define ListView_GetSelectedCount(hwndLV) \
3933
    (UINT)SNDMSG((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
3934

3935
#define ListView_EditLabelA(hwndLV, i) \
3936
    (HWND)SNDMSG((hwndLV),LVM_EDITLABELA,(WPARAM)(int)(i), 0L)
3937
#define ListView_EditLabelW(hwndLV, i) \
3938
    (HWND)SNDMSG((hwndLV),LVM_EDITLABELW,(WPARAM)(int)(i), 0L)
3939 3940
#define ListView_EditLabel WINELIB_NAME_AW(ListView_EditLabel)

3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957
#define ListView_GetItemTextA(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
{ \
    LVITEMA _LVi;\
    _LVi.iSubItem = _iSubItem;\
    _LVi.cchTextMax = _cchTextMax;\
    _LVi.pszText = _pszText;\
    SNDMSGA(hwndLV, LVM_GETITEMTEXTA, (WPARAM)(i), (LPARAM)&_LVi);\
}
#define ListView_GetItemTextW(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
{ \
    LVITEMW _LVi;\
    _LVi.iSubItem = _iSubItem;\
    _LVi.cchTextMax = _cchTextMax;\
    _LVi.pszText = _pszText;\
    SNDMSGW(hwndLV, LVM_GETITEMTEXTW, (WPARAM)(i), (LPARAM)&_LVi);\
}
#define ListView_GetItemText WINELIB_NAME_AW(ListView_GetItemText)
3958
#define ListView_SetItemPosition32(hwnd,n,x1,y1) \
3959
{ POINT ptNewPos; ptNewPos.x = (x1); ptNewPos.y = (y1); SNDMSG((hwnd), LVM_SETITEMPOSITION32, (WPARAM)(int)(n), (LPARAM)&ptNewPos); }
3960 3961
#define ListView_SetItemTextA(hwndLV, i, _iSubItem, _pszText) \
{ LVITEMA _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3962
  SNDMSGA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}
3963 3964
#define ListView_SetItemTextW(hwndLV, i, _iSubItem, _pszText) \
{ LVITEMW _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3965
  SNDMSGW(hwndLV, LVM_SETITEMTEXTW, (WPARAM)i, (LPARAM) (LVITEMW*)& _LVi);}
3966 3967 3968
#define ListView_SetItemText WINELIB_NAME_AW(ListView_SetItemText)

#define ListView_DeleteItem(hwndLV, i) \
3969
    (BOOL)SNDMSG(hwndLV, LVM_DELETEITEM, (WPARAM)(int)(i), 0L)
3970
#define ListView_Update(hwndLV, i) \
3971
    (BOOL)SNDMSG((hwndLV), LVM_UPDATE, (WPARAM)(i), 0L)
3972
#define ListView_GetColumnOrderArray(hwndLV, iCount, pi) \
3973
    (BOOL)SNDMSG((hwndLV), LVM_GETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3974
#define ListView_GetExtendedListViewStyle(hwndLV) \
3975
    (DWORD)SNDMSG((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0L)
3976
#define ListView_GetHotCursor(hwndLV) \
3977
    (HCURSOR)SNDMSG((hwndLV), LVM_GETHOTCURSOR, 0, 0L)
3978
#define ListView_GetHotItem(hwndLV) \
3979
    (int)SNDMSG((hwndLV), LVM_GETHOTITEM, 0, 0L)
3980
#define ListView_GetItemSpacing(hwndLV, fSmall) \
3981
    (DWORD)SNDMSG((hwndLV), LVM_GETITEMSPACING, (WPARAM)fSmall, 0L)
3982
#define ListView_GetSubItemRect(hwndLV, iItem, iSubItem, code, prc) \
3983
    (BOOL)SNDMSG((hwndLV), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
3984
                       ((prc) ? ((((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code), (LPARAM)(prc)) : 0))
3985
#define ListView_GetToolTips(hwndLV) \
3986
    (HWND)SNDMSG((hwndLV), LVM_GETTOOLTIPS, 0, 0L)
3987
#define ListView_SetColumnOrderArray(hwndLV, iCount, pi) \
3988
    (BOOL)SNDMSG((hwndLV), LVM_SETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3989
#define ListView_SetExtendedListViewStyle(hwndLV, dw) \
3990
    (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dw)
3991
#define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw) \
3992
    (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)dwMask, (LPARAM)dw)
3993
#define ListView_SetHotCursor(hwndLV, hcur) \
3994
    (HCURSOR)SNDMSG((hwndLV), LVM_SETHOTCURSOR, 0, (LPARAM)hcur)
3995
#define ListView_SetHotItem(hwndLV, i) \
3996
    (int)SNDMSG((hwndLV), LVM_SETHOTITEM, (WPARAM)i, 0L)
3997
#define ListView_SetIconSpacing(hwndLV, cx, cy) \
3998
    (DWORD)SNDMSG((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
3999
#define ListView_SetToolTips(hwndLV, hwndNewHwnd) \
4000
    (HWND)SNDMSG((hwndLV), LVM_SETTOOLTIPS, (WPARAM)hwndNewHwnd, 0L)
4001
#define ListView_SubItemHitTest(hwndLV, plvhti) \
4002
    (int)SNDMSG((hwndLV), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
4003 4004 4005 4006
#define ListView_GetSelectionMark(hwndLV) \
    (int)SNDMSG((hwndLV), LVM_GETSELECTIONMARK, 0, 0)
#define ListView_SetSelectionMark(hwndLV, iItem) \
    (int)SNDMSG((hwndLV), LVM_SETSELECTIONMARK, 0, (LPARAM)(iItem))
4007 4008
#define ListView_GetViewRect(hwndLV, prc) \
    (BOOL)SNDMSG((hwndLV),LVM_GETVIEWRECT,0,(LPARAM)(LPRECT)(prc))
4009 4010
#define ListView_GetHeader(hwndLV) \
    (HWND)SNDMSG((hwndLV),LVM_GETHEADER,0,0L)
4011 4012 4013 4014 4015 4016 4017 4018 4019 4020
#define ListView_SetSelectedColumn(hwnd, iCol) \
    SNDMSG((hwnd), LVM_SETSELECTEDCOLUMN, (WPARAM)iCol, 0)
#define ListView_SetTileWidth(hwnd, cpWidth) \
    SNDMSG((hwnd), LVM_SETTILEWIDTH, (WPARAM)cpWidth, 0)
#define ListView_SetView(hwnd, iView) \
    (DWORD)SNDMSG((hwnd), LVM_SETVIEW, (WPARAM)(DWORD)iView, 0)
#define ListView_GetView(hwnd) \
    (DWORD)SNDMSG((hwnd), LVM_GETVIEW, 0, 0)
#define ListView_InsertGroup(hwnd, index, pgrp) \
    SNDMSG((hwnd), LVM_INSERTGROUP, (WPARAM)index, (LPARAM)pgrp)
4021 4022 4023 4024
#define ListView_SetGroupHeaderImageList(hwnd, himl) \
    SNDMSG((hwnd), LVM_SETIMAGELIST, (WPARAM)LVSIL_GROUPHEADER, (LPARAM)himl)
#define ListView_GetGroupHeaderImageList(hwnd) \
    SNDMSG((hwnd), LVM_GETIMAGELIST, (WPARAM)LVSIL_GROUPHEADER, 0)
4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084
#define ListView_SetGroupInfo(hwnd, iGroupId, pgrp) \
    SNDMSG((hwnd), LVM_SETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
#define ListView_GetGroupInfo(hwnd, iGroupId, pgrp) \
    SNDMSG((hwnd), LVM_GETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
#define ListView_RemoveGroup(hwnd, iGroupId) \
    SNDMSG((hwnd), LVM_REMOVEGROUP, (WPARAM)iGroupId, 0)
#define ListView_MoveGroup(hwnd, iGroupId, toIndex) \
    SNDMSG((hwnd), LVM_MOVEGROUP, (WPARAM)iGroupId, (LPARAM)toIndex)
#define ListView_MoveItemToGroup(hwnd, idItemFrom, idGroupTo) \
    SNDMSG((hwnd), LVM_MOVEITEMTOGROUP, (WPARAM)idItemFrom, (LPARAM)idGroupTo)
#define ListView_SetGroupMetrics(hwnd, pGroupMetrics) \
    SNDMSG((hwnd), LVM_SETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
#define ListView_GetGroupMetrics(hwnd, pGroupMetrics) \
    SNDMSG((hwnd), LVM_GETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
#define ListView_EnableGroupView(hwnd, fEnable) \
    SNDMSG((hwnd), LVM_ENABLEGROUPVIEW, (WPARAM)fEnable, 0)
#define ListView_SortGroups(hwnd, _pfnGroupCompate, _plv) \
    SNDMSG((hwnd), LVM_SORTGROUPS, (WPARAM)_pfnGroupCompate, (LPARAM)_plv)
#define ListView_InsertGroupSorted(hwnd, structInsert) \
    SNDMSG((hwnd), LVM_INSERTGROUPSORTED, (WPARAM)structInsert, 0)
#define ListView_RemoveAllGroups(hwnd) \
    SNDMSG((hwnd), LVM_REMOVEALLGROUPS, 0, 0)
#define ListView_HasGroup(hwnd, dwGroupId) \
    SNDMSG((hwnd), LVM_HASGROUP, dwGroupId, 0)
#define ListView_SetTileViewInfo(hwnd, ptvi) \
    SNDMSG((hwnd), LVM_SETTILEVIEWINFO, 0, (LPARAM)ptvi)
#define ListView_GetTileViewInfo(hwnd, ptvi) \
    SNDMSG((hwnd), LVM_GETTILEVIEWINFO, 0, (LPARAM)ptvi)
#define ListView_SetTileInfo(hwnd, pti) \
    SNDMSG((hwnd), LVM_SETTILEINFO, 0, (LPARAM)pti)
#define ListView_GetTileInfo(hwnd, pti) \
    SNDMSG((hwnd), LVM_GETTILEINFO, 0, (LPARAM)pti)
#define ListView_SetInsertMark(hwnd, lvim) \
    (BOOL)SNDMSG((hwnd), LVM_SETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
#define ListView_GetInsertMark(hwnd, lvim) \
    (BOOL)SNDMSG((hwnd), LVM_GETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
#define ListView_InsertMarkHitTest(hwnd, point, lvim) \
    (int)SNDMSG((hwnd), LVM_INSERTMARKHITTEST, (WPARAM)(LPPOINT)(point), (LPARAM)(LPLVINSERTMARK)(lvim))
#define ListView_GetInsertMarkRect(hwnd, rc) \
    (int)SNDMSG((hwnd), LVM_GETINSERTMARKRECT, (WPARAM)0, (LPARAM)(LPRECT)(rc))
#define ListView_SetInsertMarkColor(hwnd, color) \
    (COLORREF)SNDMSG((hwnd), LVM_SETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
#define ListView_GetInsertMarkColor(hwnd) \
    (COLORREF)SNDMSG((hwnd), LVM_GETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)0)
#define ListView_SetInfoTip(hwndLV, plvInfoTip)\
    (BOOL)SNDMSG((hwndLV), LVM_SETINFOTIP, (WPARAM)0, (LPARAM)plvInfoTip)
#define ListView_GetSelectedColumn(hwnd) \
    (UINT)SNDMSG((hwnd), LVM_GETSELECTEDCOLUMN, 0, 0)
#define ListView_IsGroupViewEnabled(hwnd) \
    (BOOL)SNDMSG((hwnd), LVM_ISGROUPVIEWENABLED, 0, 0)
#define ListView_GetOutlineColor(hwnd) \
    (COLORREF)SNDMSG((hwnd), LVM_GETOUTLINECOLOR, 0, 0)
#define ListView_SetOutlineColor(hwnd, color) \
    (COLORREF)SNDMSG((hwnd), LVM_SETOUTLINECOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
#define ListView_CancelEditLabel(hwnd) \
    (VOID)SNDMSG((hwnd), LVM_CANCELEDITLABEL, (WPARAM)0, (LPARAM)0)
#define ListView_MapIndexToID(hwnd, index) \
    (UINT)SNDMSG((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, (LPARAM)0)
#define ListView_MapIDToIndex(hwnd, id) \
    (UINT)SNDMSG((hwnd), LVM_MAPIDTOINDEX, (WPARAM)id, (LPARAM)0)
4085 4086 4087 4088
#define ListView_SetUnicodeFormat(hwnd, fUnicode) \
    (BOOL)SNDMSG((hwnd), LVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
#define ListView_GetUnicodeFormat(hwnd) \
    (BOOL)SNDMSG((hwnd), LVM_GETUNICODEFORMAT, 0, 0)
4089

4090 4091
/* Tab Control */

4092
#define WC_TABCONTROLA		"SysTabControl32"
4093 4094 4095 4096 4097 4098
#if defined(__GNUC__)
# define WC_TABCONTROLW (const WCHAR []){ 'S','y','s', \
  'T','a','b','C','o','n','t','r','o','l','3','2',0 }
#elif defined(_MSC_VER)
# define WC_TABCONTROLW         L"SysTabControl32"
#else
4099 4100
static const WCHAR WC_TABCONTROLW[] = { 'S','y','s',
  'T','a','b','C','o','n','t','r','o','l','3','2',0 };
4101
#endif
4102 4103
#define WC_TABCONTROL		WINELIB_NAME_AW(WC_TABCONTROL)

4104
/* tab control styles */
4105
#define TCS_SCROLLOPPOSITE      0x0001   /* assumes multiline tab */
4106 4107
#define TCS_BOTTOM              0x0002
#define TCS_RIGHT               0x0002
4108
#define TCS_MULTISELECT         0x0004  /* allow multi-select in button mode */
Alex Priem's avatar
Alex Priem committed
4109
#define TCS_FLATBUTTONS         0x0008
4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124
#define TCS_FORCEICONLEFT       0x0010
#define TCS_FORCELABELLEFT      0x0020
#define TCS_HOTTRACK            0x0040
#define TCS_VERTICAL            0x0080
#define TCS_TABS                0x0000
#define TCS_BUTTONS             0x0100
#define TCS_SINGLELINE          0x0000
#define TCS_MULTILINE           0x0200
#define TCS_RIGHTJUSTIFY        0x0000
#define TCS_FIXEDWIDTH          0x0400
#define TCS_RAGGEDRIGHT         0x0800
#define TCS_FOCUSONBUTTONDOWN   0x1000
#define TCS_OWNERDRAWFIXED      0x2000
#define TCS_TOOLTIPS            0x4000
#define TCS_FOCUSNEVER          0x8000
Alex Priem's avatar
Alex Priem committed
4125 4126 4127
#define TCS_EX_FLATSEPARATORS   0x00000001  /* to be used with */
#define TCS_EX_REGISTERDROP     0x00000002  /* TCM_SETEXTENDEDSTYLE */

4128

4129 4130
#define TCM_FIRST		0x1300

4131 4132
#define TCM_GETIMAGELIST        (TCM_FIRST + 2)
#define TCM_SETIMAGELIST        (TCM_FIRST + 3)
4133
#define TCM_GETITEMCOUNT	(TCM_FIRST + 4)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4134 4135 4136 4137 4138 4139
#define TCM_GETITEM		WINELIB_NAME_AW(TCM_GETITEM)
#define TCM_GETITEMA		(TCM_FIRST + 5)
#define TCM_GETITEMW		(TCM_FIRST + 60)
#define TCM_SETITEMA		(TCM_FIRST + 6)
#define TCM_SETITEMW		(TCM_FIRST + 61)
#define TCM_SETITEM		WINELIB_NAME_AW(TCM_SETITEM)
4140 4141
#define TCM_INSERTITEMA		(TCM_FIRST + 7)
#define TCM_INSERTITEMW		(TCM_FIRST + 62)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4142
#define TCM_INSERTITEM		WINELIB_NAME_AW(TCM_INSERTITEM)
4143 4144 4145
#define TCM_DELETEITEM          (TCM_FIRST + 8)
#define TCM_DELETEALLITEMS      (TCM_FIRST + 9)
#define TCM_GETITEMRECT         (TCM_FIRST + 10)
4146
#define TCM_GETCURSEL		(TCM_FIRST + 11)
4147 4148
#define TCM_SETCURSEL           (TCM_FIRST + 12)
#define TCM_HITTEST             (TCM_FIRST + 13)
4149
#define TCM_SETITEMEXTRA	(TCM_FIRST + 14)
4150 4151 4152 4153 4154 4155 4156 4157 4158
#define TCM_ADJUSTRECT          (TCM_FIRST + 40)
#define TCM_SETITEMSIZE         (TCM_FIRST + 41)
#define TCM_REMOVEIMAGE         (TCM_FIRST + 42)
#define TCM_SETPADDING          (TCM_FIRST + 43)
#define TCM_GETROWCOUNT         (TCM_FIRST + 44)
#define TCM_GETTOOLTIPS         (TCM_FIRST + 45)
#define TCM_SETTOOLTIPS         (TCM_FIRST + 46)
#define TCM_GETCURFOCUS         (TCM_FIRST + 47)
#define TCM_SETCURFOCUS         (TCM_FIRST + 48)
4159
#define TCM_SETMINTABWIDTH     (TCM_FIRST + 49)
4160
#define TCM_DESELECTALL         (TCM_FIRST + 50)
4161 4162 4163 4164 4165 4166
#define TCM_HIGHLIGHTITEM		(TCM_FIRST + 51)
#define TCM_SETEXTENDEDSTYLE	(TCM_FIRST + 52)
#define TCM_GETEXTENDEDSTYLE	(TCM_FIRST + 53)
#define TCM_SETUNICODEFORMAT	CCM_SETUNICODEFORMAT
#define TCM_GETUNICODEFORMAT	CCM_GETUNICODEFORMAT

4167 4168 4169 4170 4171

#define TCIF_TEXT		0x0001
#define TCIF_IMAGE		0x0002
#define TCIF_RTLREADING		0x0004
#define TCIF_PARAM		0x0008
4172 4173
#define TCIF_STATE		0x0010

Alex Priem's avatar
Alex Priem committed
4174
#define TCIS_BUTTONPRESSED      0x0001
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4175
#define TCIS_HIGHLIGHTED        0x0002
Alex Priem's avatar
Alex Priem committed
4176

4177 4178
/* TabCtrl Macros */
#define TabCtrl_GetImageList(hwnd) \
4179
    (HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, 0L)
4180
#define TabCtrl_SetImageList(hwnd, himl) \
4181
    (HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
4182
#define TabCtrl_GetItemCount(hwnd) \
4183
    (int)SNDMSG((hwnd), TCM_GETITEMCOUNT, 0, 0L)
4184
#define TabCtrl_GetItemA(hwnd, iItem, pitem) \
Jon Griffiths's avatar
Jon Griffiths committed
4185
    (BOOL)SNDMSGA((hwnd), TCM_GETITEMA, (WPARAM)(int)iItem, (LPARAM)(TCITEMA *)(pitem))
4186
#define TabCtrl_GetItemW(hwnd, iItem, pitem) \
Jon Griffiths's avatar
Jon Griffiths committed
4187
    (BOOL)SNDMSGW((hwnd), TCM_GETITEMW, (WPARAM)(int)iItem, (LPARAM)(TCITEMW *)(pitem))
4188 4189
#define TabCtrl_GetItem WINELIB_NAME_AW(TabCtrl_GetItem)
#define TabCtrl_SetItemA(hwnd, iItem, pitem) \
Jon Griffiths's avatar
Jon Griffiths committed
4190
    (BOOL)SNDMSGA((hwnd), TCM_SETITEMA, (WPARAM)(int)iItem, (LPARAM)(TCITEMA *)(pitem))
4191
#define TabCtrl_SetItemW(hwnd, iItem, pitem) \
Jon Griffiths's avatar
Jon Griffiths committed
4192
    (BOOL)SNDMSGW((hwnd), TCM_SETITEMW, (WPARAM)(int)iItem, (LPARAM)(TCITEMW *)(pitem))
4193
#define TabCtrl_SetItem WINELIB_NAME_AW(TabCtrl_SetItem)
4194
#define TabCtrl_InsertItemA(hwnd, iItem, pitem)   \
Jon Griffiths's avatar
Jon Griffiths committed
4195
    (int)SNDMSGA((hwnd), TCM_INSERTITEMA, (WPARAM)(int)iItem, (LPARAM)(const TCITEMA *)(pitem))
4196
#define TabCtrl_InsertItemW(hwnd, iItem, pitem)   \
Jon Griffiths's avatar
Jon Griffiths committed
4197
    (int)SNDMSGW((hwnd), TCM_INSERTITEMW, (WPARAM)(int)iItem, (LPARAM)(const TCITEMW *)(pitem))
4198
#define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
4199
#define TabCtrl_DeleteItem(hwnd, i) \
4200
    (BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
4201
#define TabCtrl_DeleteAllItems(hwnd) \
4202
    (BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, 0L)
4203
#define TabCtrl_GetItemRect(hwnd, i, prc) \
4204
    (BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
4205
#define TabCtrl_GetCurSel(hwnd) \
4206
    (int)SNDMSG((hwnd), TCM_GETCURSEL, 0, 0)
4207
#define TabCtrl_SetCurSel(hwnd, i) \
4208
    (int)SNDMSG((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
4209
#define TabCtrl_HitTest(hwndTC, pinfo) \
4210
    (int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
4211
#define TabCtrl_SetItemExtra(hwndTC, cb) \
4212
    (BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
4213
#define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
4214
    (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
4215
#define TabCtrl_SetItemSize(hwnd, x, y) \
4216
    (DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
4217
#define TabCtrl_RemoveImage(hwnd, i) \
4218
    (void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, 0L)
4219
#define TabCtrl_SetPadding(hwnd,  cx, cy) \
4220
    (void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
4221
#define TabCtrl_GetRowCount(hwnd) \
4222
    (int)SNDMSG((hwnd), TCM_GETROWCOUNT, 0, 0L)
4223
#define TabCtrl_GetToolTips(hwnd) \
4224
    (HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, 0L)
4225
#define TabCtrl_SetToolTips(hwnd, hwndTT) \
4226
    (void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
4227
#define TabCtrl_GetCurFocus(hwnd) \
4228
    (int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0)
4229
#define TabCtrl_SetCurFocus(hwnd, i) \
4230
    SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0)
4231
#define TabCtrl_SetMinTabWidth(hwnd, x) \
4232
    (int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x)
4233
#define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
4234
    (void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
4235
#define TabCtrl_GetUnicodeFormat(hwnd) \
4236
    (BOOL)SNDMSG((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
4237
#define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) \
4238
    (BOOL)SNDMSG((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)fUnicode, 0)
4239
#define TabCtrl_GetExtendedStyle(hwnd) \
4240
    (BOOL)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
4241
#define TabCtrl_SetExtendedStyle(hwnd, dwExStyle) \
4242
    (BOOL)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, (LPARAM)dwExStyle)
4243 4244
#define TabCtrl_HighlightItem(hwnd, i, fHighlight) \
    (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)i, (LPARAM)MAKELONG(fHighlight, 0))
Alex Priem's avatar
Alex Priem committed
4245 4246 4247 4248 4249 4250 4251 4252

/* constants for TCHITTESTINFO */

#define TCHT_NOWHERE      0x01
#define TCHT_ONITEMICON   0x02
#define TCHT_ONITEMLABEL  0x04
#define TCHT_ONITEM       (TCHT_ONITEMICON | TCHT_ONITEMLABEL)

4253 4254 4255 4256 4257 4258 4259 4260 4261
typedef struct tagTCITEMHEADERA
{
    UINT  mask;
    UINT  lpReserved1;
    UINT  lpReserved2;
    LPSTR pszText;
    int   cchTextMax;
    int   iImage;
} TCITEMHEADERA, *LPTCITEMHEADERA;
4262

4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279
typedef struct tagTCITEMHEADERW
{
    UINT   mask;
    UINT   lpReserved1;
    UINT   lpReserved2;
    LPWSTR pszText;
    int    cchTextMax;
    int    iImage;
} TCITEMHEADERW, *LPTCITEMHEADERW;

#define TCITEMHEADER    WINELIB_NAME_AW(TCITEMHEADER)
#define LPTCITEMHEADER  WINELIB_NAME_AW(LPTCITEMHEADER)
#define TC_ITEMHEADER   WINELIB_NAME_AW(TCITEMHEADER)
#define LPTC_ITEMHEADER WINELIB_NAME_AW(LPTCITEMHEADER)

typedef struct tagTCITEMA
{
4280 4281 4282
    UINT mask;
    UINT dwState;
    UINT dwStateMask;
4283
    LPSTR  pszText;
4284 4285
    INT  cchTextMax;
    INT  iImage;
4286
    LPARAM lParam;
4287
} TCITEMA, *LPTCITEMA;
4288

4289
typedef struct tagTCITEMW
4290
{
4291
    UINT mask;
4292 4293 4294
    DWORD  dwState;
    DWORD  dwStateMask;
    LPWSTR pszText;
4295 4296
    INT  cchTextMax;
    INT  iImage;
4297
    LPARAM lParam;
4298
} TCITEMW, *LPTCITEMW;
4299

4300 4301 4302 4303
#define TCITEM    WINELIB_NAME_AW(TCITEM)
#define LPTCITEM  WINELIB_NAME_AW(LPTCITEM)
#define TC_ITEM   WINELIB_NAME_AW(TCITEM)
#define LPTC_ITEM WINELIB_NAME_AW(LPTCITEM)
4304 4305 4306 4307

#define TCN_FIRST               (0U-550U)
#define TCN_LAST                (0U-580U)
#define TCN_KEYDOWN             (TCN_FIRST - 0)
4308
#define TCN_SELCHANGE           (TCN_FIRST - 1)
4309
#define TCN_SELCHANGING         (TCN_FIRST - 2)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4310
#define TCN_GETOBJECT           (TCN_FIRST - 3)
4311
#define TCN_FOCUSCHANGE         (TCN_FIRST - 4)
4312

4313
#include <pshpack1.h>
4314 4315 4316 4317 4318 4319
typedef struct tagTCKEYDOWN
{
    NMHDR hdr;
    WORD wVKey;
    UINT flags;
} NMTCKEYDOWN;
4320
#include <poppack.h>
4321 4322

#define TC_KEYDOWN              NMTCKEYDOWN
4323

Alexandre Julliard's avatar
Alexandre Julliard committed
4324 4325
/* ComboBoxEx control */

4326
#define WC_COMBOBOXEXA        "ComboBoxEx32"
4327 4328 4329 4330 4331 4332
#if defined(__GNUC__)
# define WC_COMBOBOXEXW (const WCHAR []){ 'C','o','m','b','o', \
  'B','o','x','E','x','3','2',0 }
#elif defined(_MSC_VER)
# define WC_COMBOBOXEXW       L"ComboBoxEx32"
#else
4333 4334
static const WCHAR WC_COMBOBOXEXW[] = { 'C','o','m','b','o',
  'B','o','x','E','x','3','2',0 };
4335
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
4336 4337
#define WC_COMBOBOXEX           WINELIB_NAME_AW(WC_COMBOBOXEX)

4338 4339 4340 4341 4342 4343 4344 4345
#define CBEIF_TEXT              0x00000001
#define CBEIF_IMAGE             0x00000002
#define CBEIF_SELECTEDIMAGE     0x00000004
#define CBEIF_OVERLAY           0x00000008
#define CBEIF_INDENT            0x00000010
#define CBEIF_LPARAM            0x00000020
#define CBEIF_DI_SETITEM        0x10000000

Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4346 4347
#define CBEM_INSERTITEMA        (WM_USER+1)
#define CBEM_INSERTITEMW        (WM_USER+11)
Alexandre Julliard's avatar
Alexandre Julliard committed
4348 4349 4350
#define CBEM_INSERTITEM         WINELIB_NAME_AW(CBEM_INSERTITEM)
#define CBEM_SETIMAGELIST       (WM_USER+2)
#define CBEM_GETIMAGELIST       (WM_USER+3)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4351 4352
#define CBEM_GETITEMA           (WM_USER+4)
#define CBEM_GETITEMW           (WM_USER+13)
Alexandre Julliard's avatar
Alexandre Julliard committed
4353
#define CBEM_GETITEM            WINELIB_NAME_AW(CBEM_GETITEM)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4354 4355
#define CBEM_SETITEMA           (WM_USER+5)
#define CBEM_SETITEMW           (WM_USER+12)
Alexandre Julliard's avatar
Alexandre Julliard committed
4356
#define CBEM_SETITEM            WINELIB_NAME_AW(CBEM_SETITEM)
4357
#define CBEM_DELETEITEM         CB_DELETESTRING
Alexandre Julliard's avatar
Alexandre Julliard committed
4358 4359 4360 4361 4362 4363
#define CBEM_GETCOMBOCONTROL    (WM_USER+6)
#define CBEM_GETEDITCONTROL     (WM_USER+7)
#define CBEM_SETEXSTYLE         (WM_USER+8)
#define CBEM_GETEXSTYLE         (WM_USER+9)
#define CBEM_GETEXTENDEDSTYLE   (WM_USER+9)
#define CBEM_SETEXTENDEDSTYLE   (WM_USER+14)
4364 4365
#define CBEM_SETUNICODEFORMAT   CCM_SETUNICODEFORMAT
#define CBEM_GETUNICODEFORMAT   CCM_GETUNICODEFORMAT
Alexandre Julliard's avatar
Alexandre Julliard committed
4366
#define CBEM_HASEDITCHANGED     (WM_USER+10)
4367
#define CBEM_SETWINDOWTHEME     CCM_SETWINDOWTHEME
Alexandre Julliard's avatar
Alexandre Julliard committed
4368

4369 4370 4371 4372 4373 4374 4375 4376
#define CBEIF_TEXT              0x00000001
#define CBEIF_IMAGE             0x00000002
#define CBEIF_SELECTEDIMAGE     0x00000004
#define CBEIF_OVERLAY           0x00000008
#define CBEIF_INDENT            0x00000010
#define CBEIF_LPARAM            0x00000020
#define CBEIF_DI_SETITEM        0x10000000

Alexandre Julliard's avatar
Alexandre Julliard committed
4377 4378 4379
#define CBEN_FIRST              (0U-800U)
#define CBEN_LAST               (0U-830U)

4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392
#define CBEN_GETDISPINFOA       (CBEN_FIRST - 0)
#define CBEN_GETDISPINFOW       (CBEN_FIRST - 7)
#define CBEN_GETDISPINFO WINELIB_NAME_AW(CBEN_GETDISPINFO)
#define CBEN_INSERTITEM         (CBEN_FIRST - 1)
#define CBEN_DELETEITEM         (CBEN_FIRST - 2)
#define CBEN_BEGINEDIT          (CBEN_FIRST - 4)
#define CBEN_ENDEDITA           (CBEN_FIRST - 5)
#define CBEN_ENDEDITW           (CBEN_FIRST - 6)
#define CBEN_ENDEDIT WINELIB_NAME_AW(CBEN_ENDEDIT)
#define CBEN_DRAGBEGINA         (CBEN_FIRST - 8)
#define CBEN_DRAGBEGINW         (CBEN_FIRST - 9)
#define CBEN_DRAGBEGIN WINELIB_NAME_AW(CBEN_DRAGBEGIN)

4393 4394 4395 4396 4397 4398 4399
#define CBES_EX_NOEDITIMAGE          0x00000001
#define CBES_EX_NOEDITIMAGEINDENT    0x00000002
#define CBES_EX_PATHWORDBREAKPROC    0x00000004
#define CBES_EX_NOSIZELIMIT          0x00000008
#define CBES_EX_CASESENSITIVE        0x00000010


4400 4401 4402
typedef struct tagCOMBOBOXEXITEMA
{
    UINT mask;
4403
    INT_PTR iItem;
4404 4405 4406 4407 4408 4409 4410 4411
    LPSTR pszText;
    int cchTextMax;
    int iImage;
    int iSelectedImage;
    int iOverlay;
    int iIndent;
    LPARAM lParam;
} COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
4412
typedef COMBOBOXEXITEMA const *PCCOMBOEXITEMA; /* Yes, there's a BOX missing */
4413 4414 4415 4416

typedef struct tagCOMBOBOXEXITEMW
{
    UINT mask;
4417
    INT_PTR iItem;
4418 4419 4420 4421 4422 4423 4424 4425
    LPWSTR pszText;
    int cchTextMax;
    int iImage;
    int iSelectedImage;
    int iOverlay;
    int iIndent;
    LPARAM lParam;
} COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
4426
typedef COMBOBOXEXITEMW const *PCCOMBOEXITEMW; /* Yes, there's a BOX missing */
4427 4428

#define COMBOBOXEXITEM WINELIB_NAME_AW(COMBOBOXEXITEM)
4429 4430
#define PCOMBOBOXEXITEM WINELIB_NAME_AW(PCOMBOBOXEXITEM)
#define PCCOMBOBOXEXITEM WINELIB_NAME_AW(PCCOMBOEXITEM) /* Yes, there's a BOX missing */
4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441

#define CBENF_KILLFOCUS               1
#define CBENF_RETURN                  2
#define CBENF_ESCAPE                  3
#define CBENF_DROPDOWN                4

#define CBEMAXSTRLEN 260

typedef struct tagNMCBEENDEDITW
{
    NMHDR hdr;
4442
    BOOL fChanged;
4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460
    int iNewSelection;
    WCHAR szText[CBEMAXSTRLEN];
    int iWhy;
} NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;

typedef struct tagNMCBEENDEDITA
{
    NMHDR hdr;
    BOOL fChanged;
    int iNewSelection;
    char szText[CBEMAXSTRLEN];
    int iWhy;
} NMCBEENDEDITA, *LPNMCBEENDEDITA, *PNMCBEENDEDITA;

#define NMCBEENDEDIT WINELIB_NAME_AW(NMCBEENDEDIT)
#define LPNMCBEENDEDIT WINELIB_NAME_AW(LPNMCBEENDEDIT)
#define PNMCBEENDEDIT WINELIB_NAME_AW(PNMCBEENDEDIT)

4461
typedef struct
4462
{
4463 4464
    NMHDR hdr;
    COMBOBOXEXITEMA ceItem;
4465 4466
} NMCOMBOBOXEXA, *PNMCOMBOBOXEXA;

4467
typedef struct
4468
{
4469 4470
    NMHDR hdr;
    COMBOBOXEXITEMW ceItem;
4471 4472 4473 4474 4475
} NMCOMBOBOXEXW, *PNMCOMBOBOXEXW;

#define NMCOMBOBOXEX WINELIB_NAME_AW(NMCOMBOBOXEX)
#define PNMCOMBOBOXEX WINELIB_NAME_AW(PNMCOMBOBOXEX)

4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493
typedef struct
{
    NMHDR hdr;
    int iItemid;
    char szText[CBEMAXSTRLEN];
} NMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA;

typedef struct
{
    NMHDR hdr;
    int iItemid;
    WCHAR szText[CBEMAXSTRLEN];
} NMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW;

#define NMCBEDRAGBEGIN WINELIB_NAME_AW(NMCBEDRAGBEGIN)
#define PNMCBEDRAGBEGIN WINELIB_NAME_AW(PNMCBEDRAGBEGIN)
#define LPNMCBEDRAGBEGIN WINELIB_NAME_AW(LPNMCBEDRAGBEGIN)

4494

Alexandre Julliard's avatar
Alexandre Julliard committed
4495 4496
/* Hotkey control */

4497
#define HOTKEY_CLASSA           "msctls_hotkey32"
4498 4499 4500 4501 4502 4503
#if defined(__GNUC__)
# define HOTKEY_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
  'h','o','t','k','e','y','3','2',0 }
#elif defined(_MSC_VER)
# define HOTKEY_CLASSW          L"msctls_hotkey32"
#else
4504 4505
static const WCHAR HOTKEY_CLASSW[] = { 'm','s','c','t','l','s','_',
  'h','o','t','k','e','y','3','2',0 };
4506
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529
#define HOTKEY_CLASS            WINELIB_NAME_AW(HOTKEY_CLASS)

#define HOTKEYF_SHIFT           0x01
#define HOTKEYF_CONTROL         0x02
#define HOTKEYF_ALT             0x04
#define HOTKEYF_EXT             0x08

#define HKCOMB_NONE             0x0001
#define HKCOMB_S                0x0002
#define HKCOMB_C                0x0004
#define HKCOMB_A                0x0008
#define HKCOMB_SC               0x0010
#define HKCOMB_SA               0x0020
#define HKCOMB_CA               0x0040
#define HKCOMB_SCA              0x0080

#define HKM_SETHOTKEY           (WM_USER+1)
#define HKM_GETHOTKEY           (WM_USER+2)
#define HKM_SETRULES            (WM_USER+3)


/* animate control */

4530
#define ANIMATE_CLASSA        "SysAnimate32"
4531 4532 4533 4534 4535 4536
#if defined(__GNUC__)
# define ANIMATE_CLASSW (const WCHAR []){ 'S','y','s', \
  'A','n','i','m','a','t','e','3','2',0 }
#elif defined(_MSC_VER)
# define ANIMATE_CLASSW       L"SysAnimate32"
#else
4537 4538
static const WCHAR ANIMATE_CLASSW[] = { 'S','y','s',
  'A','n','i','m','a','t','e','3','2',0 };
4539
#endif
Alexandre Julliard's avatar
Alexandre Julliard committed
4540 4541 4542 4543 4544 4545 4546
#define ANIMATE_CLASS           WINELIB_NAME_AW(ANIMATE_CLASS)

#define ACS_CENTER              0x0001
#define ACS_TRANSPARENT         0x0002
#define ACS_AUTOPLAY            0x0004
#define ACS_TIMER               0x0008  /* no threads, just timers */

Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4547 4548
#define ACM_OPENA               (WM_USER+100)
#define ACM_OPENW               (WM_USER+103)
Alexandre Julliard's avatar
Alexandre Julliard committed
4549 4550 4551 4552 4553 4554 4555
#define ACM_OPEN                WINELIB_NAME_AW(ACM_OPEN)
#define ACM_PLAY                (WM_USER+101)
#define ACM_STOP                (WM_USER+102)

#define ACN_START               1
#define ACN_STOP                2

4556 4557 4558 4559
#define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
    CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
#define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
    CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
Alexandre Julliard's avatar
Alexandre Julliard committed
4560
#define Animate_Create WINELIB_NAME_AW(Animate_Create)
4561
#define Animate_OpenA(hwnd,szName) \
4562
    (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
4563
#define Animate_OpenW(hwnd,szName) \
4564
    (BOOL)SNDMSGW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
Alexandre Julliard's avatar
Alexandre Julliard committed
4565
#define Animate_Open WINELIB_NAME_AW(Animate_Open)
4566
#define Animate_OpenExA(hwnd,hInst,szName) \
4567
    (BOOL)SNDMSGA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
4568
#define Animate_OpenExW(hwnd,hInst,szName) \
4569
    (BOOL)SNDMSGW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
Alexandre Julliard's avatar
Alexandre Julliard committed
4570
#define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
Alexandre Julliard's avatar
Alexandre Julliard committed
4571
#define Animate_Play(hwnd,from,to,rep) \
4572
    (BOOL)SNDMSG(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
Alexandre Julliard's avatar
Alexandre Julliard committed
4573
#define Animate_Stop(hwnd) \
4574
    (BOOL)SNDMSG(hwnd,ACM_STOP,0,0)
Alexandre Julliard's avatar
Alexandre Julliard committed
4575
#define Animate_Close(hwnd) \
4576
    (BOOL)SNDMSG(hwnd,ACM_OPENA,0,0)
Alexandre Julliard's avatar
Alexandre Julliard committed
4577
#define Animate_Seek(hwnd,frame) \
4578
    (BOOL)SNDMSG(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
Alexandre Julliard's avatar
Alexandre Julliard committed
4579 4580


4581 4582 4583 4584
/**************************************************************************
 * IP Address control
 */

4585
#define WC_IPADDRESSA		"SysIPAddress32"
4586 4587 4588 4589 4590 4591
#if defined(__GNUC__)
# define WC_IPADDRESSW (const WCHAR []){ 'S','y','s', \
  'I','P','A','d','d','r','e','s','s','3','2',0 }
#elif defined(_MSC_VER)
# define WC_IPADDRESSW          L"SysIPAddress32"
#else
4592 4593
static const WCHAR WC_IPADDRESSW[] = { 'S','y','s',
  'I','P','A','d','d','r','e','s','s','3','2',0 };
4594
#endif
4595 4596 4597 4598 4599 4600 4601 4602 4603
#define WC_IPADDRESS		WINELIB_NAME_AW(WC_IPADDRESS)

#define IPM_CLEARADDRESS	(WM_USER+100)
#define IPM_SETADDRESS		(WM_USER+101)
#define IPM_GETADDRESS		(WM_USER+102)
#define IPM_SETRANGE		(WM_USER+103)
#define IPM_SETFOCUS		(WM_USER+104)
#define IPM_ISBLANK		(WM_USER+105)

4604 4605
#define IPN_FIRST               (0U-860U)
#define IPN_LAST                (0U-879U)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4606
#define IPN_FIELDCHANGED        (IPN_FIRST-0)
4607 4608 4609 4610

typedef struct tagNMIPADDRESS
{
    NMHDR hdr;
4611 4612
    INT iField;
    INT iValue;
4613 4614 4615 4616 4617
} NMIPADDRESS, *LPNMIPADDRESS;

#define MAKEIPRANGE(low,high) \
    ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
#define MAKEIPADDRESS(b1,b2,b3,b4) \
4618
    ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629

#define FIRST_IPADDRESS(x)	(((x)>>24)&0xff)
#define SECOND_IPADDRESS(x)	(((x)>>16)&0xff)
#define THIRD_IPADDRESS(x)	(((x)>>8)&0xff)
#define FOURTH_IPADDRESS(x)	((x)&0xff)


/**************************************************************************
 * Native Font control
 */

4630
#define WC_NATIVEFONTCTLA	"NativeFontCtl"
4631 4632 4633 4634 4635 4636
#if defined(__GNUC__)
# define WC_NATIVEFONTCTLW (const WCHAR []){ 'N','a','t','i','v','e', \
  'F','o','n','t','C','t','l',0 }
#elif defined(_MSC_VER)
# define WC_NATIVEFONTCTLW      L"NativeFontCtl"
#else
4637 4638
static const WCHAR WC_NATIVEFONTCTLW[] = { 'N','a','t','i','v','e',
  'F','o','n','t','C','t','l',0 };
4639
#endif
4640 4641 4642 4643 4644 4645 4646 4647
#define WC_NATIVEFONTCTL	WINELIB_NAME_AW(WC_NATIVEFONTCTL)

#define NFS_EDIT		0x0001
#define NFS_STATIC		0x0002
#define NFS_LISTCOMBO		0x0004
#define NFS_BUTTON		0x0008
#define NFS_ALL			0x0010

Alexandre Julliard's avatar
Alexandre Julliard committed
4648

4649 4650
/**************************************************************************
 * Month calendar control
4651
 *
4652 4653
 */

4654
#define MONTHCAL_CLASSA	"SysMonthCal32"
4655 4656 4657 4658 4659 4660
#if defined(__GNUC__)
# define MONTHCAL_CLASSW (const WCHAR []){ 'S','y','s', \
  'M','o','n','t','h','C','a','l','3','2',0 }
#elif defined(_MSC_VER)
# define MONTHCAL_CLASSW L"SysMonthCal32"
#else
4661 4662
static const WCHAR MONTHCAL_CLASSW[] = { 'S','y','s',
  'M','o','n','t','h','C','a','l','3','2',0 };
4663
#endif
4664 4665
#define MONTHCAL_CLASS		WINELIB_NAME_AW(MONTHCAL_CLASS)

4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691
#define MCM_FIRST             0x1000
#define MCN_FIRST             (0U-750U)
#define MCN_LAST              (0U-759U)


#define MCM_GETCURSEL         (MCM_FIRST + 1)
#define MCM_SETCURSEL         (MCM_FIRST + 2)
#define MCM_GETMAXSELCOUNT    (MCM_FIRST + 3)
#define MCM_SETMAXSELCOUNT    (MCM_FIRST + 4)
#define MCM_GETSELRANGE       (MCM_FIRST + 5)
#define MCM_SETSELRANGE       (MCM_FIRST + 6)
#define MCM_GETMONTHRANGE     (MCM_FIRST + 7)
#define MCM_SETDAYSTATE       (MCM_FIRST + 8)
#define MCM_GETMINREQRECT     (MCM_FIRST + 9)
#define MCM_SETCOLOR          (MCM_FIRST + 10)
#define MCM_GETCOLOR          (MCM_FIRST + 11)
#define MCM_SETTODAY          (MCM_FIRST + 12)
#define MCM_GETTODAY          (MCM_FIRST + 13)
#define MCM_HITTEST           (MCM_FIRST + 14)
#define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
#define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
#define MCM_GETRANGE          (MCM_FIRST + 17)
#define MCM_SETRANGE          (MCM_FIRST + 18)
#define MCM_GETMONTHDELTA     (MCM_FIRST + 19)
#define MCM_SETMONTHDELTA     (MCM_FIRST + 20)
#define MCM_GETMAXTODAYWIDTH  (MCM_FIRST + 21)
4692
#define MCM_SIZERECTTOMIN     (MCM_FIRST + 29)
4693 4694
#define MCM_SETCALENDARBORDER (MCM_FIRST + 30)
#define MCM_GETCALENDARBORDER (MCM_FIRST + 31)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4695 4696
#define MCM_GETUNICODEFORMAT  CCM_GETUNICODEFORMAT
#define MCM_SETUNICODEFORMAT  CCM_SETUNICODEFORMAT
4697 4698 4699 4700 4701 4702 4703 4704


/* Notifications */

#define MCN_SELCHANGE         (MCN_FIRST + 1)
#define MCN_GETDAYSTATE       (MCN_FIRST + 3)
#define MCN_SELECT            (MCN_FIRST + 4)

4705 4706 4707
#define MCSC_BACKGROUND   0
#define MCSC_TEXT         1
#define MCSC_TITLEBK      2
4708
#define MCSC_TITLETEXT    3
4709 4710
#define MCSC_MONTHBK      4
#define MCSC_TRAILINGTEXT 5
4711 4712 4713 4714 4715 4716

#define MCS_DAYSTATE           0x0001
#define MCS_MULTISELECT        0x0002
#define MCS_WEEKNUMBERS        0x0004
#define MCS_NOTODAY            0x0010
#define MCS_NOTODAYCIRCLE      0x0008
4717
#define MCS_NOTRAILINGDATES    0x0040
4718 4719 4720 4721 4722

#define MCHT_TITLE             0x00010000
#define MCHT_CALENDAR          0x00020000
#define MCHT_TODAYLINK         0x00030000

4723 4724
#define MCHT_NEXT              0x01000000
#define MCHT_PREV              0x02000000
4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740
#define MCHT_NOWHERE           0x00000000
#define MCHT_TITLEBK           (MCHT_TITLE)
#define MCHT_TITLEMONTH        (MCHT_TITLE | 0x0001)
#define MCHT_TITLEYEAR         (MCHT_TITLE | 0x0002)
#define MCHT_TITLEBTNNEXT      (MCHT_TITLE | MCHT_NEXT | 0x0003)
#define MCHT_TITLEBTNPREV      (MCHT_TITLE | MCHT_PREV | 0x0003)

#define MCHT_CALENDARBK        (MCHT_CALENDAR)
#define MCHT_CALENDARDATE      (MCHT_CALENDAR | 0x0001)
#define MCHT_CALENDARDATENEXT  (MCHT_CALENDARDATE | MCHT_NEXT)
#define MCHT_CALENDARDATEPREV  (MCHT_CALENDARDATE | MCHT_PREV)
#define MCHT_CALENDARDAY       (MCHT_CALENDAR | 0x0002)
#define MCHT_CALENDARWEEKNUM   (MCHT_CALENDAR | 0x0003)



4741 4742
#define GMR_VISIBLE     0
#define GMR_DAYSTATE    1
4743 4744 4745 4746 4747 4748 4749 4750


/*  Month calendar's structures */


typedef struct {
        UINT cbSize;
        POINT pt;
4751
        UINT uHit;
4752
        SYSTEMTIME st;
4753 4754 4755 4756 4757
        /* Vista */
        RECT rc;
        INT iOffset;
        INT iRow;
        INT iCol;
4758 4759
} MCHITTESTINFO, *PMCHITTESTINFO;

4760 4761
#define MCHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(MCHITTESTINFO, st)

4762 4763
typedef struct tagNMSELCHANGE
{
4764
    NMHDR           nmhdr;
4765 4766 4767 4768 4769 4770 4771 4772 4773
    SYSTEMTIME      stSelStart;
    SYSTEMTIME      stSelEnd;
} NMSELCHANGE, *LPNMSELCHANGE;

typedef NMSELCHANGE NMSELECT, *LPNMSELECT;
typedef DWORD MONTHDAYSTATE, *LPMONTHDAYSTATE;

typedef struct tagNMDAYSTATE
{
4774
    NMHDR           nmhdr;
4775 4776 4777 4778 4779 4780 4781 4782 4783
    SYSTEMTIME      stStart;
    int             cDayState;
    LPMONTHDAYSTATE prgDayState;
} NMDAYSTATE, *LPNMDAYSTATE;


/* macros */

#define MonthCal_GetCurSel(hmc, pst) \
4784
		(BOOL)SNDMSG(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
4785
#define MonthCal_SetCurSel(hmc, pst)  \
4786
		(BOOL)SNDMSG(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
4787
#define MonthCal_GetMaxSelCount(hmc) \
4788
		(DWORD)SNDMSG(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
4789
#define MonthCal_SetMaxSelCount(hmc, n) \
4790
		(BOOL)SNDMSG(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
4791
#define MonthCal_GetSelRange(hmc, rgst) \
4792
		SNDMSG(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst))
4793
#define MonthCal_SetSelRange(hmc, rgst) \
4794
		SNDMSG(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst))
4795
#define MonthCal_GetMonthRange(hmc, gmr, rgst) \
4796
		(DWORD)SNDMSG(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
4797
#define MonthCal_SetDayState(hmc, cbds, rgds) \
4798
		SNDMSG(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
4799
#define MonthCal_GetMinReqRect(hmc, prc) \
4800
		SNDMSG(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
4801
#define MonthCal_SetColor(hmc, iColor, clr)\
4802
        SNDMSG(hmc, MCM_SETCOLOR, iColor, clr)
4803
#define MonthCal_GetColor(hmc, iColor) \
4804
		SNDMSG(hmc, MCM_SETCOLOR, iColor, 0)
4805
#define MonthCal_GetToday(hmc, pst)\
4806
		(BOOL)SNDMSG(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
4807
#define MonthCal_SetToday(hmc, pst)\
4808
		SNDMSG(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
4809
#define MonthCal_HitTest(hmc, pinfo) \
4810
        SNDMSG(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
4811
#define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
4812
        SNDMSG(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
4813
#define MonthCal_GetFirstDayOfWeek(hmc) \
4814
        (DWORD)SNDMSG(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
4815
#define MonthCal_GetRange(hmc, rgst) \
4816
        (DWORD)SNDMSG(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
4817
#define MonthCal_SetRange(hmc, gd, rgst) \
4818
        (BOOL)SNDMSG(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4819
#define MonthCal_GetMonthDelta(hmc) \
4820
        (int)SNDMSG(hmc, MCM_GETMONTHDELTA, 0, 0)
4821
#define MonthCal_SetMonthDelta(hmc, n) \
4822
        (int)SNDMSG(hmc, MCM_SETMONTHDELTA, n, 0)
4823
#define MonthCal_GetMaxTodayWidth(hmc) \
4824
        (DWORD)SNDMSG(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
4825
#define MonthCal_SetUnicodeFormat(hwnd, fUnicode)  \
4826
        (BOOL)SNDMSG((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
4827
#define MonthCal_GetUnicodeFormat(hwnd)  \
4828
        (BOOL)SNDMSG((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
4829

4830 4831 4832 4833 4834

/**************************************************************************
 * Date and time picker control
 */

4835
#define DATETIMEPICK_CLASSA	"SysDateTimePick32"
4836 4837 4838 4839 4840 4841
#if defined(__GNUC__)
# define DATETIMEPICK_CLASSW (const WCHAR []){ 'S','y','s', \
  'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 }
#elif defined(_MSC_VER)
# define DATETIMEPICK_CLASSW    L"SysDateTimePick32"
#else
4842 4843
static const WCHAR DATETIMEPICK_CLASSW[] = { 'S','y','s',
  'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 };
4844
#endif
4845 4846
#define DATETIMEPICK_CLASS	WINELIB_NAME_AW(DATETIMEPICK_CLASS)

4847
#define DTM_FIRST        0x1000
4848
#define DTN_FIRST       (0U-760U)
4849 4850
#define DTN_LAST        (0U-799U)

4851 4852 4853 4854 4855

#define DTM_GETSYSTEMTIME	(DTM_FIRST+1)
#define DTM_SETSYSTEMTIME	(DTM_FIRST+2)
#define DTM_GETRANGE		(DTM_FIRST+3)
#define DTM_SETRANGE		(DTM_FIRST+4)
Dimitrie O. Paun's avatar
Dimitrie O. Paun committed
4856 4857
#define DTM_SETFORMATA	        (DTM_FIRST+5)
#define DTM_SETFORMATW	        (DTM_FIRST + 50)
4858 4859 4860 4861 4862 4863 4864 4865
#define DTM_SETFORMAT		WINELIB_NAME_AW(DTM_SETFORMAT)
#define DTM_SETMCCOLOR		(DTM_FIRST+6)
#define DTM_GETMCCOLOR		(DTM_FIRST+7)
#define DTM_GETMONTHCAL		(DTM_FIRST+8)
#define DTM_SETMCFONT		(DTM_FIRST+9)
#define DTM_GETMCFONT		(DTM_FIRST+10)


4866 4867
/* Datetime Notifications */

4868 4869 4870 4871 4872
#define DTN_DATETIMECHANGE  (DTN_FIRST + 1)
#define DTN_USERSTRINGA     (DTN_FIRST + 2)
#define DTN_WMKEYDOWNA      (DTN_FIRST + 3)
#define DTN_FORMATA         (DTN_FIRST + 4)
#define DTN_FORMATQUERYA    (DTN_FIRST + 5)
4873
#define DTN_DROPDOWN        (DTN_FIRST + 6)
4874
#define DTN_CLOSEUP         (DTN_FIRST + 7)
4875 4876 4877 4878 4879
#define DTN_USERSTRINGW     (DTN_FIRST + 15)
#define DTN_WMKEYDOWNW      (DTN_FIRST + 16)
#define DTN_FORMATW         (DTN_FIRST + 17)
#define DTN_FORMATQUERYW    (DTN_FIRST + 18)

4880 4881 4882 4883
#define DTN_USERSTRING      WINELIB_NAME_AW(DTN_USERSTRING)
#define DTN_WMKEYDOWN       WINELIB_NAME_AW(DTN_WMKEYDOWN)
#define DTN_FORMAT          WINELIB_NAME_AW(DTN_FORMAT)
#define DTN_FORMATQUERY     WINELIB_NAME_AW(DTN_FORMATQUERY)
4884

4885 4886 4887 4888 4889 4890 4891
#define DTS_SHORTDATEFORMAT 0x0000
#define DTS_UPDOWN          0x0001
#define DTS_SHOWNONE        0x0002
#define DTS_LONGDATEFORMAT  0x0004
#define DTS_TIMEFORMAT      0x0009
#define DTS_APPCANPARSE     0x0010
#define DTS_RIGHTALIGN      0x0020
4892 4893 4894 4895

typedef struct tagNMDATETIMECHANGE
{
    NMHDR       nmhdr;
4896 4897
    DWORD       dwFlags;
    SYSTEMTIME  st;
4898 4899 4900 4901 4902
} NMDATETIMECHANGE, *LPNMDATETIMECHANGE;

typedef struct tagNMDATETIMESTRINGA
{
    NMHDR      nmhdr;
4903 4904 4905
    LPCSTR     pszUserString;
    SYSTEMTIME st;
    DWORD      dwFlags;
4906 4907 4908 4909 4910 4911
} NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;

typedef struct tagNMDATETIMESTRINGW
{
    NMHDR      nmhdr;
    LPCWSTR    pszUserString;
4912 4913
    SYSTEMTIME st;
    DWORD      dwFlags;
4914 4915
} NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;

4916 4917
DECL_WINELIB_TYPE_AW(NMDATETIMESTRING)
DECL_WINELIB_TYPE_AW(LPNMDATETIMESTRING)
4918 4919 4920 4921

typedef struct tagNMDATETIMEWMKEYDOWNA
{
    NMHDR      nmhdr;
4922 4923 4924
    int        nVirtKey;
    LPCSTR     pszFormat;
    SYSTEMTIME st;
4925 4926 4927 4928 4929
} NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;

typedef struct tagNMDATETIMEWMKEYDOWNW
{
    NMHDR      nmhdr;
4930 4931 4932
    int        nVirtKey;
    LPCWSTR    pszFormat;
    SYSTEMTIME st;
4933 4934
} NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;

4935 4936
DECL_WINELIB_TYPE_AW(NMDATETIMEWMKEYDOWN)
DECL_WINELIB_TYPE_AW(LPNMDATETIMEWMKEYDOWN)
4937 4938 4939 4940

typedef struct tagNMDATETIMEFORMATA
{
    NMHDR nmhdr;
4941 4942 4943 4944
    LPCSTR  pszFormat;
    SYSTEMTIME st;
    LPCSTR pszDisplay;
    CHAR szDisplay[64];
4945 4946 4947 4948 4949 4950
} NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;


typedef struct tagNMDATETIMEFORMATW
{
    NMHDR nmhdr;
4951 4952
    LPCWSTR pszFormat;
    SYSTEMTIME st;
4953 4954 4955 4956
    LPCWSTR pszDisplay;
    WCHAR szDisplay[64];
} NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;

4957 4958
DECL_WINELIB_TYPE_AW(NMDATETIMEFORMAT)
DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMAT)
4959 4960 4961 4962

typedef struct tagNMDATETIMEFORMATQUERYA
{
    NMHDR nmhdr;
4963 4964
    LPCSTR pszFormat;
    SIZE szMax;
4965 4966 4967 4968 4969
} NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;

typedef struct tagNMDATETIMEFORMATQUERYW
{
    NMHDR nmhdr;
4970 4971
    LPCWSTR pszFormat;
    SIZE szMax;
4972 4973
} NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;

4974 4975
DECL_WINELIB_TYPE_AW(NMDATETIMEFORMATQUERY)
DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMATQUERY)
4976

4977 4978 4979 4980 4981 4982 4983 4984 4985 4986


#define GDT_ERROR    -1
#define GDT_VALID    0
#define GDT_NONE     1

#define GDTR_MIN     0x0001
#define GDTR_MAX     0x0002


4987
#define DateTime_GetSystemtime(hdp, pst)   \
4988
  (DWORD)SNDMSG (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
4989
#define DateTime_SetSystemtime(hdp, gd, pst)   \
4990
  (BOOL)SNDMSG (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
4991
#define DateTime_GetRange(hdp, rgst)  \
4992
  (DWORD)SNDMSG (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
4993
#define DateTime_SetRange(hdp, gd, rgst) \
4994
   (BOOL)SNDMSG (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4995
#define DateTime_SetFormatA(hdp, sz)  \
Jon Griffiths's avatar
Jon Griffiths committed
4996
  (BOOL)SNDMSGA (hdp, DTM_SETFORMATA, 0, (LPARAM)(sz))
4997
#define DateTime_SetFormatW(hdp, sz)  \
Jon Griffiths's avatar
Jon Griffiths committed
4998 4999
  (BOOL)SNDMSGW (hdp, DTM_SETFORMATW, 0, (LPARAM)(sz))
#define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
5000
#define DateTime_GetMonthCalColor(hdp, iColor) \
5001
  SNDMSG (hdp, DTM_GETMCCOLOR, iColor, 0)
5002
#define DateTime_SetMonthCalColor(hdp, iColor, clr) \
5003
  SNDMSG (hdp, DTM_SETMCCOLOR, iColor, clr)
5004
#define DateTime_GetMonthCal(hdp)  \
5005
  (HWND) SNDMSG (hdp, DTM_GETMONTHCAL, 0, 0)
5006
#define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \
5007
  SNDMSG (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
5008
#define DateTime_GetMonthCalFont(hdp) \
5009
  SNDMSG (hdp, DTM_GETMCFONT, 0, 0)
5010

5011 5012 5013 5014 5015 5016
#define DA_LAST         (0x7fffffff)
#define DPA_APPEND      (0x7fffffff)
#define DPA_ERR         (-1)

#define DSA_APPEND      (0x7fffffff)
#define DSA_ERR         (-1)
5017

5018 5019
struct _DSA;
typedef struct _DSA *HDSA;
5020

5021
typedef INT (CALLBACK *PFNDSAENUMCALLBACK)(LPVOID, LPVOID);
5022

5023 5024 5025 5026 5027
HDSA   WINAPI DSA_Create(INT, INT);
BOOL   WINAPI DSA_Destroy(HDSA);
void   WINAPI DSA_DestroyCallback(HDSA, PFNDSAENUMCALLBACK, LPVOID);
LPVOID WINAPI DSA_GetItemPtr(HDSA, INT);
INT    WINAPI DSA_InsertItem(HDSA, INT, LPVOID);
Eric Kohl's avatar
Eric Kohl committed
5028 5029 5030 5031

#define DPAS_SORTED             0x0001
#define DPAS_INSERTBEFORE       0x0002
#define DPAS_INSERTAFTER        0x0004
5032

Eric Kohl's avatar
Eric Kohl committed
5033

5034 5035
struct _DPA;
typedef struct _DPA *HDPA;
Eric Kohl's avatar
Eric Kohl committed
5036

5037 5038
#define DPA_GetPtrCount(hdpa)  (*(INT*)(hdpa))

5039 5040
typedef INT (CALLBACK *PFNDPAENUMCALLBACK)(LPVOID, LPVOID);
typedef INT (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052
typedef PVOID (CALLBACK *PFNDPAMERGE)(UINT,PVOID,PVOID,LPARAM);

/* merge callback codes */
#define DPAMM_MERGE     1
#define DPAMM_DELETE    2
#define DPAMM_INSERT    3

/* merge options */
#define DPAM_SORTED     0x00000001
#define DPAM_NORMAL     0x00000002
#define DPAM_UNION      0x00000004
#define DPAM_INTERSECT  0x00000008
Eric Kohl's avatar
Eric Kohl committed
5053

5054 5055 5056 5057 5058 5059
HDPA   WINAPI DPA_Create(INT);
BOOL   WINAPI DPA_Destroy(HDPA);
LPVOID WINAPI DPA_DeletePtr(HDPA, INT);
BOOL   WINAPI DPA_DeleteAllPtrs(HDPA);
BOOL   WINAPI DPA_SetPtr(HDPA, INT, LPVOID);
LPVOID WINAPI DPA_GetPtr(HDPA, INT);
5060
INT    WINAPI DPA_GetPtrIndex(HDPA, LPCVOID);
5061
ULONGLONG WINAPI DPA_GetSize(HDPA);
5062
BOOL   WINAPI DPA_Grow(HDPA, INT);
5063 5064 5065 5066 5067
INT    WINAPI DPA_InsertPtr(HDPA, INT, LPVOID);
BOOL   WINAPI DPA_Sort(HDPA, PFNDPACOMPARE, LPARAM);
void   WINAPI DPA_EnumCallback(HDPA, PFNDPAENUMCALLBACK, LPVOID);
void   WINAPI DPA_DestroyCallback(HDPA, PFNDPAENUMCALLBACK, LPVOID);
INT    WINAPI DPA_Search(HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
5068
BOOL   WINAPI DPA_Merge(HDPA, HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
Eric Kohl's avatar
Eric Kohl committed
5069

5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082
/* save/load from stream */
typedef struct _DPASTREAMINFO
{
    INT    iPos;   /* item index */
    LPVOID pvItem;
} DPASTREAMINFO;

struct IStream;
typedef HRESULT (CALLBACK *PFNDPASTREAM)(DPASTREAMINFO*, struct IStream*, LPVOID);

HRESULT WINAPI DPA_LoadStream(HDPA*, PFNDPASTREAM, struct IStream*, LPVOID);
HRESULT WINAPI DPA_SaveStream(HDPA, PFNDPASTREAM, struct IStream*, LPVOID);

5083
BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
Eric Kohl's avatar
Eric Kohl committed
5084

5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096
/**************************************************************************
 * SysLink control
 */

#if defined(__GNUC__)
# define WC_LINK (const WCHAR []){ 'S','y','s','L','i','n','k',0 }
#elif defined(_MSC_VER)
# define WC_LINK             L"SysLink"
#else
static const WCHAR WC_LINK[] = { 'S','y','s','L','i','n','k',0 };
#endif

5097 5098
/* SysLink styles */
#define LWS_TRANSPARENT      0x0001
5099
#define LWS_IGNORERETURN     0x0002
5100

5101 5102 5103
/* SysLink messages */
#define LM_HITTEST           (WM_USER + 768)
#define LM_GETIDEALHEIGHT    (WM_USER + 769)
5104
#define LM_GETIDEALSIZE      (LM_GETIDEALHEIGHT)
5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147
#define LM_SETITEM           (WM_USER + 770)
#define LM_GETITEM           (WM_USER + 771)

/* SysLink links flags */

#define LIF_ITEMINDEX   1
#define LIF_STATE       2
#define LIF_ITEMID      4
#define LIF_URL         8

/* SysLink links states */

#define LIS_FOCUSED     1
#define LIS_ENABLED     2
#define LIS_VISITED     4

/* SysLink misc. */

#define INVALID_LINK_INDEX  (-1)
#define MAX_LINKID_TEXT     48
#define L_MAX_URL_LENGTH    2084

/* SysLink structures */

typedef struct tagLITEM
{
  UINT mask;
  int iLink;
  UINT state;
  UINT stateMask;
  WCHAR szID[MAX_LINKID_TEXT];
  WCHAR szUrl[L_MAX_URL_LENGTH];
} LITEM, *PLITEM;

typedef struct tagLHITTESTINFO
{
  POINT pt;
  LITEM item;
} LHITTESTINFO, *PLHITTESTINFO;

typedef struct tagNMLINK
{
  NMHDR hdr;
Dimi Paun's avatar
Dimi Paun committed
5148
  LITEM item;
5149 5150
} NMLINK, *PNMLINK;

5151 5152 5153 5154 5155 5156 5157 5158
typedef struct tagNMLVLINK
{
    NMHDR hdr;
    LITEM link;
    int iItem;
    int iSubItem;
} NMLVLINK, *PNMLVLINK;

Frank Richter's avatar
Frank Richter committed
5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172
/**************************************************************************
 * Static control
 */

#define WC_STATICA		"Static"
#if defined(__GNUC__)
# define WC_STATICW 		(const WCHAR []){ 'S','t','a','t','i','c',0 }
#elif defined(_MSC_VER)
# define WC_STATICW 		L"Static"
#else
static const WCHAR WC_STATICW[] = { 'S','t','a','t','i','c',0 };
#endif
#define WC_STATIC		WINELIB_NAME_AW(WC_STATIC)

Frank Richter's avatar
Frank Richter committed
5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186
/**************************************************************************
 * Combobox control
 */

#define WC_COMBOBOXA              "ComboBox"
#if defined(__GNUC__)
# define WC_COMBOBOXW             (const WCHAR []){ 'C','o','m','b','o','B','o','x',0 }
#elif defined(_MSC_VER)
# define WC_COMBOBOXW             L"ComboBox"
#else
static const WCHAR WC_COMBOBOXW[] = { 'C','o','m','b','o','B','o','x',0 };
#endif
#define WC_COMBOBOX               WINELIB_NAME_AW(WC_COMBOBOX)

5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201
/**************************************************************************
 * Edit control
 */

#define WC_EDITA                  "Edit"
#if defined(__GNUC__)
# define WC_EDITW                 (const WCHAR []){ 'E','d','i','t',0 }
#elif defined(_MSC_VER)
# define WC_EDITW                 L"Edit"
#else
static const WCHAR WC_EDITW[] = { 'E','d','i','t',0 };
#endif
#define WC_EDIT                   WINELIB_NAME_AW(WC_EDIT)

/**************************************************************************
5202
 * Listbox control
5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214
 */

#define WC_LISTBOXA               "ListBox"
#if defined(__GNUC__)
# define WC_LISTBOXW              (const WCHAR []){ 'L','i','s','t','B','o','x',0 }
#elif defined(_MSC_VER)
# define WC_LISTBOXW              L"ListBox"
#else
static const WCHAR WC_LISTBOXW[] = { 'L','i','s','t','B','o','x',0 };
#endif
#define WC_LISTBOX                WINELIB_NAME_AW(WC_LISTBOX)

Frank Richter's avatar
Frank Richter committed
5215
/**************************************************************************
5216
 * Scrollbar control
Frank Richter's avatar
Frank Richter committed
5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228
 */

#define WC_SCROLLBARA             "ScrollBar"
#if defined(__GNUC__)
# define WC_SCROLLBARW            (const WCHAR []){ 'S','c','r','o','l','l','B','a','r',0 }
#elif defined(_MSC_VER)
# define WC_SCROLLBARW            L"ScrollBar"
#else
static const WCHAR WC_SCROLLBARW[] = { 'S','c','r','o','l','l','B','a','r',0 };
#endif
#define WC_SCROLLBAR              WINELIB_NAME_AW(WC_SCROLLBAR)

5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318
/**************************************************************************
 * Task dialog
 */

#ifndef NOTASKDIALOG

#include <pshpack1.h>

enum _TASKDIALOG_FLAGS
{
    TDF_ENABLE_HYPERLINKS           = 0x0001,
    TDF_USE_HICON_MAIN              = 0x0002,
    TDF_USE_HICON_FOOTER            = 0x0004,
    TDF_ALLOW_DIALOG_CANCELLATION   = 0x0008,
    TDF_USE_COMMAND_LINKS           = 0x0010,
    TDF_USE_COMMAND_LINKS_NO_ICON   = 0x0020,
    TDF_EXPAND_FOOTER_AREA          = 0x0040,
    TDF_EXPANDED_BY_DEFAULT         = 0x0080,
    TDF_VERIFICATION_FLAG_CHECKED   = 0x0100,
    TDF_SHOW_PROGRESS_BAR           = 0x0200,
    TDF_SHOW_MARQUEE_PROGRESS_BAR   = 0x0400,
    TDF_CALLBACK_TIMER              = 0x0800,
    TDF_POSITION_RELATIVE_TO_WINDOW = 0x1000,
    TDF_RTL_LAYOUT                  = 0x2000,
    TDF_NO_DEFAULT_RADIO_BUTTON     = 0x4000,
    TDF_CAN_BE_MINIMIZED            = 0x8000
};
typedef int TASKDIALOG_FLAGS;

enum _TASKDIALOG_COMMON_BUTTON_FLAGS
{
    TDCBF_OK_BUTTON     = 0x0001,
    TDCBF_YES_BUTTON    = 0x0002,
    TDCBF_NO_BUTTON     = 0x0004,
    TDCBF_CANCEL_BUTTON = 0x0008,
    TDCBF_RETRY_BUTTON  = 0x0010,
    TDCBF_CLOSE_BUTTON  = 0x0020
};
typedef int TASKDIALOG_COMMON_BUTTON_FLAGS;

typedef struct _TASKDIALOG_BUTTON
{
    int     nButtonID;
    PCWSTR  pszButtonText;
} TASKDIALOG_BUTTON;

typedef HRESULT (CALLBACK *PFTASKDIALOGCALLBACK)(HWND, UINT, WPARAM, LPARAM, LONG_PTR);

typedef struct _TASKDIALOGCONFIG
{
    UINT        cbSize;
    HWND        hwndParent;
    HINSTANCE   hInstance;
    TASKDIALOG_FLAGS    dwFlags;
    TASKDIALOG_COMMON_BUTTON_FLAGS  dwCommonButtons;
    PCWSTR      pszWindowTitle;
    union
    {
        HICON   hMainIcon;
        PCWSTR  pszMainIcon;
    } DUMMYUNIONNAME;
    PCWSTR      pszMainInstruction;
    PCWSTR      pszContent;
    UINT        cButtons;
    const TASKDIALOG_BUTTON *pButtons;
    int         nDefaultButton;
    UINT        cRadioButtons;
    const TASKDIALOG_BUTTON *pRadioButtons;
    int         nDefaultRadioButton;
    PCWSTR      pszVerificationText;
    PCWSTR      pszExpandedInformation;
    PCWSTR      pszExpandedControlText;
    PCWSTR      pszCollapsedControlText;
    union
    {
        HICON   hFooterIcon;
        PCWSTR  pszFooterIcon;
    } DUMMYUNIONNAME2;
    PCWSTR      pszFooter;
    PFTASKDIALOGCALLBACK pfCallback;
    LONG_PTR    lpCallbackData;
    UINT        cxWidth;
} TASKDIALOGCONFIG;

HRESULT WINAPI TaskDialogIndirect(const TASKDIALOGCONFIG *, int *, int *, BOOL *);

#include <poppack.h>

#endif /* NOTASKDIALOG */

5319 5320 5321
#ifdef __cplusplus
}
#endif
5322

Alexandre Julliard's avatar
Alexandre Julliard committed
5323
#endif  /* __WINE_COMMCTRL_H */