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