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
30 BOOL WINAPI
ShowHideMenuCtl (HWND
, UINT
, LPINT
);
31 VOID WINAPI
GetEffectiveClientRect (HWND
, LPRECT
, LPINT
);
32 VOID WINAPI
InitCommonControls (VOID
);
34 typedef struct tagINITCOMMONCONTROLSEX
{
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 */
48 #define _WIN32_IE 0x0400
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
146 #define ODT_LISTVIEW 102
148 /* common notification structures */
149 typedef struct tagNMTOOLTIPSCREATED
153 } NMTOOLTIPSCREATED
, *LPNMTOOLTIPSCREATED
;
155 typedef struct tagNMMOUSE
161 DWORD dwHitInfo
; /* info where on item or control the mouse is */
162 } NMMOUSE
, *LPNMMOUSE
;
164 typedef struct tagNMOBJECTNOTIFY
168 #ifdef __IID_DEFINED__
176 } NMOBJECTNOTIFY
, *LPNMOBJECTNOTIFY
;
178 typedef struct tagNMKEY
185 typedef struct tagNMCHAR
189 DWORD dwItemPrev
; /* Item previously selected */
190 DWORD dwItemNext
; /* Item to be selected */
193 #ifndef CCSIZEOF_STRUCT
194 #define CCSIZEOF_STRUCT(name, member) \
195 (((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
196 sizeof(((name*)0)->member))
200 /* This is only for Winelib applications. DON't use it wine itself!!! */
203 #define SNDMSG ::SendMessage
204 #else /* __cplusplus */
205 #define SNDMSG SendMessage
206 #endif /* __cplusplus */
211 #define SNDMSGA ::SendMessageA
212 #define SNDMSGW ::SendMessageW
214 #define SNDMSGA SendMessageA
215 #define SNDMSGW SendMessageW
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
267 } NMCUSTOMDRAW
, *LPNMCUSTOMDRAW
;
269 typedef struct tagNMTTCUSTOMDRAW
273 } NMTTCUSTOMDRAW
, *LPNMTTCUSTOMDRAW
;
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"
287 static const WCHAR STATUSCLASSNAMEW
[] = { 'm','s','c','t','l','s','_',
288 's','t','a','t','u','s','b','a','r','3','2',0 };
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
345 COLORREF clrBtnHighlight
; /* highlight color */
346 COLORREF clrBtnShadow
; /* shadow color */
347 } COLORSCHEME
, *LPCOLORSCHEME
;
349 /**************************************************************************
353 typedef struct tagDRAGLISTINFO
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 DRAGLISTMSGSTRINGA "commctrl_DragListMsg"
371 #if defined(__GNUC__)
372 # define DRAGLISTMSGSTRINGW (const WCHAR []){ 'c','o','m','m','c','t','r','l', \
373 '_','D','r','a','g','L','i','s','t','M','s','g',0 }
374 #elif defined(_MSC_VER)
375 # define DRAGLISTMSGSTRINGW L"commctrl_DragListMsg"
377 static const WCHAR DRAGLISTMSGSTRINGW
[] = { 'c','o','m','m','c','t','r','l', \
378 '_','D','r','a','g','L','i','s','t','M','s','g',0 };
380 #define DRAGLISTMSGSTRING WINELIB_NAME_AW(DRAGLISTMSGSTRING)
382 BOOL WINAPI
MakeDragList (HWND
);
383 VOID WINAPI
DrawInsert (HWND
, HWND
, INT
);
384 INT WINAPI
LBItemFromPt (HWND
, POINT
, BOOL
);
389 #define UPDOWN_CLASSA "msctls_updown32"
390 #if defined(__GNUC__)
391 # define UPDOWN_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
392 'u','p','d','o','w','n','3','2',0 }
393 #elif defined(_MSC_VER)
394 # define UPDOWN_CLASSW L"msctls_updown32"
396 static const WCHAR UPDOWN_CLASSW
[] = { 'm','s','c','t','l','s','_',
397 'u','p','d','o','w','n','3','2',0 };
399 #define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
401 typedef struct _UDACCEL
405 } UDACCEL
, *LPUDACCEL
;
407 #define UD_MAXVAL 0x7fff
408 #define UD_MINVAL 0x8001
410 #define UDS_WRAP 0x0001
411 #define UDS_SETBUDDYINT 0x0002
412 #define UDS_ALIGNRIGHT 0x0004
413 #define UDS_ALIGNLEFT 0x0008
414 #define UDS_AUTOBUDDY 0x0010
415 #define UDS_ARROWKEYS 0x0020
416 #define UDS_HORZ 0x0040
417 #define UDS_NOTHOUSANDS 0x0080
418 #define UDS_HOTTRACK 0x0100
420 #define UDN_FIRST (0U-721)
421 #define UDN_LAST (0U-740)
422 #define UDN_DELTAPOS (UDN_FIRST-1)
424 #define UDM_SETRANGE (WM_USER+101)
425 #define UDM_GETRANGE (WM_USER+102)
426 #define UDM_SETPOS (WM_USER+103)
427 #define UDM_GETPOS (WM_USER+104)
428 #define UDM_SETBUDDY (WM_USER+105)
429 #define UDM_GETBUDDY (WM_USER+106)
430 #define UDM_SETACCEL (WM_USER+107)
431 #define UDM_GETACCEL (WM_USER+108)
432 #define UDM_SETBASE (WM_USER+109)
433 #define UDM_GETBASE (WM_USER+110)
434 #define UDM_SETRANGE32 (WM_USER+111)
435 #define UDM_GETRANGE32 (WM_USER+112)
436 #define UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
437 #define UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
438 #define UDM_SETPOS32 (WM_USER+113)
439 #define UDM_GETPOS32 (WM_USER+114)
442 #define NMUPDOWN NM_UPDOWN
443 #define LPNMUPDOWN LPNM_UPDOWN
445 typedef struct tagNM_UPDOWN
450 } NM_UPDOWN
, *LPNM_UPDOWN
;
452 HWND WINAPI
CreateUpDownControl (DWORD
, INT
, INT
, INT
, INT
,
453 HWND
, INT
, HINSTANCE
, HWND
,
458 #define PROGRESS_CLASSA "msctls_progress32"
459 #if defined(__GNUC__)
460 # define PROGRESS_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
461 'p','r','o','g','r','e','s','s','3','2',0 }
462 #elif defined(_MSC_VER)
463 # define PROGRESS_CLASSW L"msctls_progress32"
465 static const WCHAR PROGRESS_CLASSW
[] = { 'm','s','c','t','l','s','_',
466 'p','r','o','g','r','e','s','s','3','2',0 };
468 #define PROGRESS_CLASS WINELIB_NAME_AW(PROGRESS_CLASS)
470 #define PBM_SETRANGE (WM_USER+1)
471 #define PBM_SETPOS (WM_USER+2)
472 #define PBM_DELTAPOS (WM_USER+3)
473 #define PBM_SETSTEP (WM_USER+4)
474 #define PBM_STEPIT (WM_USER+5)
475 #define PBM_SETRANGE32 (WM_USER+6)
476 #define PBM_GETRANGE (WM_USER+7)
477 #define PBM_GETPOS (WM_USER+8)
478 #define PBM_SETBARCOLOR (WM_USER+9)
479 #define PBM_SETMARQUEE (WM_USER+10)
480 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
482 #define PBS_SMOOTH 0x01
483 #define PBS_VERTICAL 0x04
484 #define PBS_MARQUEE 0x08
490 } PBRANGE
, *PPBRANGE
;
496 typedef struct _IMAGELIST
*HIMAGELIST
;
498 #define CLR_NONE 0xFFFFFFFF
499 #define CLR_DEFAULT 0xFF000000
500 #define CLR_HILIGHT CLR_DEFAULT
502 #define ILC_MASK 0x0001
503 #define ILC_COLOR 0x0000
504 #define ILC_COLORDDB 0x00FE
505 #define ILC_COLOR4 0x0004
506 #define ILC_COLOR8 0x0008
507 #define ILC_COLOR16 0x0010
508 #define ILC_COLOR24 0x0018
509 #define ILC_COLOR32 0x0020
510 #define ILC_PALETTE 0x0800 /* no longer supported by M$ */
511 #define ILC_MIRROR 0x2000
512 #define ILC_PERITEMMIRROR 0x8000
514 #define ILD_NORMAL 0x0000
515 #define ILD_TRANSPARENT 0x0001
516 #define ILD_BLEND25 0x0002
517 #define ILD_BLEND50 0x0004
518 #define ILD_MASK 0x0010
519 #define ILD_IMAGE 0x0020
520 #define ILD_ROP 0x0040
521 #define ILD_OVERLAYMASK 0x0F00
522 #define ILD_PRESERVEALPHA 0x1000
523 #define ILD_SCALE 0x2000
524 #define ILD_DPISCALE 0x4000
526 #define ILD_SELECTED ILD_BLEND50
527 #define ILD_FOCUS ILD_BLEND25
528 #define ILD_BLEND ILD_BLEND50
530 #define INDEXTOOVERLAYMASK(i) ((i)<<8)
531 #define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
533 #define ILCF_MOVE (0x00000000)
534 #define ILCF_SWAP (0x00000001)
536 #define ILS_NORMAL 0x0000
537 #define ILS_GLOW 0x0001
538 #define ILS_SHADOW 0x0002
539 #define ILS_SATURATE 0x0004
540 #define ILS_ALPHA 0x0008
542 typedef struct _IMAGEINFO
549 } IMAGEINFO
, *LPIMAGEINFO
;
552 typedef struct _IMAGELISTDRAWPARAMS
562 INT xBitmap
; /* x offest from the upperleft of bitmap */
563 INT yBitmap
; /* y offset from the upperleft of bitmap */
571 } IMAGELISTDRAWPARAMS
, *LPIMAGELISTDRAWPARAMS
;
574 INT WINAPI
ImageList_Add(HIMAGELIST
,HBITMAP
,HBITMAP
);
575 INT WINAPI
ImageList_AddMasked(HIMAGELIST
,HBITMAP
,COLORREF
);
576 BOOL WINAPI
ImageList_BeginDrag(HIMAGELIST
,INT
,INT
,INT
);
577 BOOL WINAPI
ImageList_Copy(HIMAGELIST
,INT
,HIMAGELIST
,INT
,UINT
);
578 HIMAGELIST WINAPI
ImageList_Create(INT
,INT
,UINT
,INT
,INT
);
579 BOOL WINAPI
ImageList_Destroy(HIMAGELIST
);
580 BOOL WINAPI
ImageList_DragEnter(HWND
,INT
,INT
);
581 BOOL WINAPI
ImageList_DragLeave(HWND
);
582 BOOL WINAPI
ImageList_DragMove(INT
,INT
);
583 BOOL WINAPI
ImageList_DragShowNolock (BOOL
);
584 BOOL WINAPI
ImageList_Draw(HIMAGELIST
,INT
,HDC
,INT
,INT
,UINT
);
585 BOOL WINAPI
ImageList_DrawEx(HIMAGELIST
,INT
,HDC
,INT
,INT
,INT
,
586 INT
,COLORREF
,COLORREF
,UINT
);
587 BOOL WINAPI
ImageList_DrawIndirect(IMAGELISTDRAWPARAMS
*);
588 HIMAGELIST WINAPI
ImageList_Duplicate(HIMAGELIST
);
589 VOID WINAPI
ImageList_EndDrag(VOID
);
590 COLORREF WINAPI
ImageList_GetBkColor(HIMAGELIST
);
591 HIMAGELIST WINAPI
ImageList_GetDragImage(POINT
*,POINT
*);
592 HICON WINAPI
ImageList_GetIcon(HIMAGELIST
,INT
,UINT
);
593 BOOL WINAPI
ImageList_GetIconSize(HIMAGELIST
,INT
*,INT
*);
594 INT WINAPI
ImageList_GetImageCount(HIMAGELIST
);
595 BOOL WINAPI
ImageList_GetImageInfo(HIMAGELIST
,INT
,IMAGEINFO
*);
596 BOOL WINAPI
ImageList_GetImageRect(HIMAGELIST
,INT
,LPRECT
);
597 HIMAGELIST WINAPI
ImageList_LoadImageA(HINSTANCE
,LPCSTR
,INT
,INT
,
599 HIMAGELIST WINAPI
ImageList_LoadImageW(HINSTANCE
,LPCWSTR
,INT
,INT
,
601 #define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
602 HIMAGELIST WINAPI
ImageList_Merge(HIMAGELIST
,INT
,HIMAGELIST
,INT
,INT
,INT
);
603 BOOL WINAPI
ImageList_Remove(HIMAGELIST
,INT
);
604 BOOL WINAPI
ImageList_Replace(HIMAGELIST
,INT
,HBITMAP
,HBITMAP
);
605 INT WINAPI
ImageList_ReplaceIcon(HIMAGELIST
,INT
,HICON
);
606 COLORREF WINAPI
ImageList_SetBkColor(HIMAGELIST
,COLORREF
);
607 BOOL WINAPI
ImageList_SetDragCursorImage(HIMAGELIST
,INT
,INT
,INT
);
609 BOOL WINAPI
ImageList_SetIconSize(HIMAGELIST
,INT
,INT
);
610 BOOL WINAPI
ImageList_SetImageCount(HIMAGELIST
,UINT
);
611 BOOL WINAPI
ImageList_SetOverlayImage(HIMAGELIST
,INT
,INT
);
613 #ifdef __IStream_INTERFACE_DEFINED__
614 HIMAGELIST WINAPI
ImageList_Read(LPSTREAM
);
615 BOOL WINAPI
ImageList_Write(HIMAGELIST
, LPSTREAM
);
618 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
619 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
620 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
621 ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
622 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
625 #ifndef WM_MOUSEHOVER
626 #define WM_MOUSEHOVER 0x02A1
627 #define WM_MOUSELEAVE 0x02A3
632 #define TME_HOVER 0x00000001
633 #define TME_LEAVE 0x00000002
634 #define TME_NONCLIENT 0x00000010
635 #define TME_QUERY 0x40000000
636 #define TME_CANCEL 0x80000000
639 #define HOVER_DEFAULT 0xFFFFFFFF
641 typedef struct tagTRACKMOUSEEVENT
{
646 } TRACKMOUSEEVENT
, *LPTRACKMOUSEEVENT
;
653 LPTRACKMOUSEEVENT lpEventTrack
);
655 /* Flat Scrollbar control */
657 #define FLATSB_CLASSA "flatsb_class32"
658 #if defined(__GNUC__)
659 # define FLATSB_CLASSW (const WCHAR []){ 'f','l','a','t','s','b','_', \
660 'c','l','a','s','s','3','2',0 }
661 #elif defined(_MSC_VER)
662 # define FLATSB_CLASSW L"flatsb_class32"
664 static const WCHAR FLATSB_CLASSW
[] = { 'f','l','a','t','s','b','_',
665 'c','l','a','s','s','3','2',0 };
667 #define FLATSB_CLASS WINELIB_NAME_AW(FLATSB_CLASS)
669 #define WSB_PROP_CYVSCROLL 0x00000001L
670 #define WSB_PROP_CXHSCROLL 0x00000002L
671 #define WSB_PROP_CYHSCROLL 0x00000004L
672 #define WSB_PROP_CXVSCROLL 0x00000008L
673 #define WSB_PROP_CXHTHUMB 0x00000010L
674 #define WSB_PROP_CYVTHUMB 0x00000020L
675 #define WSB_PROP_VBKGCOLOR 0x00000040L
676 #define WSB_PROP_HBKGCOLOR 0x00000080L
677 #define WSB_PROP_VSTYLE 0x00000100L
678 #define WSB_PROP_HSTYLE 0x00000200L
679 #define WSB_PROP_WINSTYLE 0x00000400L
680 #define WSB_PROP_PALETTE 0x00000800L
681 #define WSB_PROP_MASK 0x00000FFFL
683 #define FSB_REGULAR_MODE 0
684 #define FSB_ENCARTA_MODE 1
685 #define FSB_FLAT_MODE 2
688 BOOL WINAPI
FlatSB_EnableScrollBar(HWND
, INT
, UINT
);
689 BOOL WINAPI
FlatSB_ShowScrollBar(HWND
, INT
, BOOL
);
690 BOOL WINAPI
FlatSB_GetScrollRange(HWND
, INT
, LPINT
, LPINT
);
691 BOOL WINAPI
FlatSB_GetScrollInfo(HWND
, INT
, LPSCROLLINFO
);
692 INT WINAPI
FlatSB_GetScrollPos(HWND
, INT
);
693 BOOL WINAPI
FlatSB_GetScrollProp(HWND
, INT
, LPINT
);
694 INT WINAPI
FlatSB_SetScrollPos(HWND
, INT
, INT
, BOOL
);
695 INT WINAPI
FlatSB_SetScrollInfo(HWND
, INT
, LPSCROLLINFO
, BOOL
);
696 INT WINAPI
FlatSB_SetScrollRange(HWND
, INT
, INT
, INT
, BOOL
);
697 BOOL WINAPI
FlatSB_SetScrollProp(HWND
, UINT
, INT
, BOOL
);
698 BOOL WINAPI
InitializeFlatSB(HWND
);
699 HRESULT WINAPI
UninitializeFlatSB(HWND
);
701 /* Subclassing stuff */
702 typedef LRESULT (CALLBACK
*SUBCLASSPROC
)(HWND
, UINT
, WPARAM
, LPARAM
, UINT_PTR
, DWORD_PTR
);
703 BOOL WINAPI
SetWindowSubclass(HWND
, SUBCLASSPROC
, UINT_PTR
, DWORD_PTR
);
704 BOOL WINAPI
GetWindowSubclass(HWND
, SUBCLASSPROC
, UINT_PTR
, DWORD_PTR
*);
705 BOOL WINAPI
RemoveWindowSubclass(HWND
, SUBCLASSPROC
, UINT_PTR
);
706 LRESULT WINAPI
DefSubclassProc(HWND
, UINT
, WPARAM
, LPARAM
);
708 int WINAPI
DrawShadowText(HDC
, LPCWSTR
, UINT
, RECT
*, DWORD
, COLORREF
, COLORREF
, int, int);
712 #define WC_HEADERA "SysHeader32"
713 #if defined(__GNUC__)
714 # define WC_HEADERW (const WCHAR []){ 'S','y','s','H','e','a','d','e','r','3','2',0 }
715 #elif defined(_MSC_VER)
716 # define WC_HEADERW L"SysHeader32"
718 static const WCHAR WC_HEADERW
[] = { 'S','y','s','H','e','a','d','e','r','3','2',0 };
720 #define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
722 #define HDS_HORZ 0x0000
723 #define HDS_BUTTONS 0x0002
724 #define HDS_HOTTRACK 0x0004
725 #define HDS_HIDDEN 0x0008
726 #define HDS_DRAGDROP 0x0040
727 #define HDS_FULLDRAG 0x0080
728 #define HDS_FILTERBAR 0x0100
729 #define HDS_FLAT 0x0200
731 #define HDI_WIDTH 0x0001
732 #define HDI_HEIGHT HDI_WIDTH
733 #define HDI_TEXT 0x0002
734 #define HDI_FORMAT 0x0004
735 #define HDI_LPARAM 0x0008
736 #define HDI_BITMAP 0x0010
737 #define HDI_IMAGE 0x0020
738 #define HDI_DI_SETITEM 0x0040
739 #define HDI_ORDER 0x0080
740 #define HDI_FILTER 0x0100
742 #define HDF_LEFT 0x0000
743 #define HDF_RIGHT 0x0001
744 #define HDF_CENTER 0x0002
745 #define HDF_JUSTIFYMASK 0x0003
746 #define HDF_RTLREADING 0x0004
748 #define HDF_SORTDOWN 0x0200
749 #define HDF_SORTUP 0x0400
750 #define HDF_IMAGE 0x0800
751 #define HDF_BITMAP_ON_RIGHT 0x1000
752 #define HDF_BITMAP 0x2000
753 #define HDF_STRING 0x4000
754 #define HDF_OWNERDRAW 0x8000
756 #define HHT_NOWHERE 0x0001
757 #define HHT_ONHEADER 0x0002
758 #define HHT_ONDIVIDER 0x0004
759 #define HHT_ONDIVOPEN 0x0008
760 #define HHT_ONFILTER 0x0010
761 #define HHT_ONFILTERBUTTON 0x0020
762 #define HHT_ABOVE 0x0100
763 #define HHT_BELOW 0x0200
764 #define HHT_TORIGHT 0x0400
765 #define HHT_TOLEFT 0x0800
767 #define HDM_FIRST 0x1200
768 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
769 #define HDM_INSERTITEMA (HDM_FIRST+1)
770 #define HDM_INSERTITEMW (HDM_FIRST+10)
771 #define HDM_INSERTITEM WINELIB_NAME_AW(HDM_INSERTITEM)
772 #define HDM_DELETEITEM (HDM_FIRST+2)
773 #define HDM_GETITEMA (HDM_FIRST+3)
774 #define HDM_GETITEMW (HDM_FIRST+11)
775 #define HDM_GETITEM WINELIB_NAME_AW(HDM_GETITEM)
776 #define HDM_SETITEMA (HDM_FIRST+4)
777 #define HDM_SETITEMW (HDM_FIRST+12)
778 #define HDM_SETITEM WINELIB_NAME_AW(HDM_SETITEM)
779 #define HDM_LAYOUT (HDM_FIRST+5)
780 #define HDM_HITTEST (HDM_FIRST+6)
781 #define HDM_GETITEMRECT (HDM_FIRST+7)
782 #define HDM_SETIMAGELIST (HDM_FIRST+8)
783 #define HDM_GETIMAGELIST (HDM_FIRST+9)
785 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
786 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
787 #define HDM_GETORDERARRAY (HDM_FIRST+17)
788 #define HDM_SETORDERARRAY (HDM_FIRST+18)
789 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
790 #define HDM_SETBITMAPMARGIN (HDM_FIRST+20)
791 #define HDM_GETBITMAPMARGIN (HDM_FIRST+21)
792 #define HDM_SETFILTERCHANGETIMEOUT (HDM_FIRST+22)
793 #define HDM_EDITFILTER (HDM_FIRST+23)
794 #define HDM_CLEARFILTER (HDM_FIRST+24)
795 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
796 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
798 #define HDN_FIRST (0U-300U)
799 #define HDN_LAST (0U-399U)
800 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
801 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
802 #define HDN_ITEMCHANGING WINELIB_NAME_AW(HDN_ITEMCHANGING)
803 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
804 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
805 #define HDN_ITEMCHANGED WINELIB_NAME_AW(HDN_ITEMCHANGED)
806 #define HDN_ITEMCLICKA (HDN_FIRST-2)
807 #define HDN_ITEMCLICKW (HDN_FIRST-22)
808 #define HDN_ITEMCLICK WINELIB_NAME_AW(HDN_ITEMCLICK)
809 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
810 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
811 #define HDN_ITEMDBLCLICK WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
812 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
813 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
814 #define HDN_DIVIDERDBLCLICK WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
815 #define HDN_BEGINTRACKA (HDN_FIRST-6)
816 #define HDN_BEGINTRACKW (HDN_FIRST-26)
817 #define HDN_BEGINTRACK WINELIB_NAME_AW(HDN_BEGINTRACK)
818 #define HDN_ENDTRACKA (HDN_FIRST-7)
819 #define HDN_ENDTRACKW (HDN_FIRST-27)
820 #define HDN_ENDTRACK WINELIB_NAME_AW(HDN_ENDTRACK)
821 #define HDN_TRACKA (HDN_FIRST-8)
822 #define HDN_TRACKW (HDN_FIRST-28)
823 #define HDN_TRACK WINELIB_NAME_AW(HDN_TRACK)
824 #define HDN_GETDISPINFOA (HDN_FIRST-9)
825 #define HDN_GETDISPINFOW (HDN_FIRST-29)
826 #define HDN_GETDISPINFO WINELIB_NAME_AW(HDN_GETDISPINFO)
827 #define HDN_BEGINDRAG (HDN_FIRST-10)
828 #define HDN_ENDDRAG (HDN_FIRST-11)
829 #define HDN_FILTERCHANGE (HDN_FIRST-12)
830 #define HDN_FILTERBTNCLICK (HDN_FIRST-13)
832 typedef struct _HD_LAYOUT
836 } HDLAYOUT
, *LPHDLAYOUT
;
838 #define HD_LAYOUT HDLAYOUT
840 typedef struct _HD_ITEMA
853 } HDITEMA
, *LPHDITEMA
;
855 typedef struct _HD_ITEMW
868 } HDITEMW
, *LPHDITEMW
;
870 #define HDITEM WINELIB_NAME_AW(HDITEM)
871 #define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
872 #define HD_ITEM HDITEM
874 #define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
875 #define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
876 #define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
878 #define HDFT_ISSTRING 0x0000
879 #define HDFT_ISNUMBER 0x0001
880 #define HDFT_HASNOVALUE 0x8000
882 typedef struct _HD_TEXTFILTERA
886 } HD_TEXTFILTERA
, *LPHD_TEXTFILTERA
;
888 typedef struct _HD_TEXTFILTERW
892 } HD_TEXTFILTERW
, *LPHD_TEXTFILTERW
;
894 #define HD_TEXTFILTER WINELIB_NAME_AW(HD_TEXTFILTER)
895 #define HDTEXTFILTER WINELIB_NAME_AW(HD_TEXTFILTER)
896 #define LPHD_TEXTFILTER WINELIB_NAME_AW(LPHD_TEXTFILTER)
897 #define LPHDTEXTFILTER WINELIB_NAME_AW(LPHD_TEXTFILTER)
899 typedef struct _HD_HITTESTINFO
904 } HDHITTESTINFO
, *LPHDHITTESTINFO
;
906 #define HD_HITTESTINFO HDHITTESTINFO
908 typedef struct tagNMHEADERA
914 } NMHEADERA
, *LPNMHEADERA
;
916 typedef struct tagNMHEADERW
922 } NMHEADERW
, *LPNMHEADERW
;
924 #define NMHEADER WINELIB_NAME_AW(NMHEADER)
925 #define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
926 #define HD_NOTIFY NMHEADER
928 typedef struct tagNMHDDISPINFOA
937 } NMHDDISPINFOA
, *LPNMHDDISPINFOA
;
939 typedef struct tagNMHDDISPINFOW
948 } NMHDDISPINFOW
, *LPNMHDDISPINFOW
;
950 #define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
951 #define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
953 typedef struct tagNMHDFILTERBTNCLICK
958 } NMHDFILTERBTNCLICK
, *LPNMHDFILTERBTNCLICK
;
960 #define Header_GetItemCount(hwndHD) \
961 (INT)SNDMSGA((hwndHD),HDM_GETITEMCOUNT,0,0L)
962 #define Header_InsertItemA(hwndHD,i,phdi) \
963 (INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
964 #define Header_InsertItemW(hwndHD,i,phdi) \
965 (INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
966 #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
967 #define Header_DeleteItem(hwndHD,i) \
968 (BOOL)SNDMSGA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
969 #define Header_GetItemA(hwndHD,i,phdi) \
970 (BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
971 #define Header_GetItemW(hwndHD,i,phdi) \
972 (BOOL)SNDMSGW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
973 #define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
974 #define Header_SetItemA(hwndHD,i,phdi) \
975 (BOOL)SNDMSGA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
976 #define Header_SetItemW(hwndHD,i,phdi) \
977 (BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
978 #define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
979 #define Header_Layout(hwndHD,playout) \
980 (BOOL)SNDMSGA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
981 #define Header_GetItemRect(hwnd,iItem,lprc) \
982 (BOOL)SNDMSGA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
983 #define Header_SetImageList(hwnd,himl) \
984 (HIMAGELIST)SNDMSGA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
985 #define Header_GetImageList(hwnd) \
986 (HIMAGELIST)SNDMSGA((hwnd),HDM_GETIMAGELIST,0,0)
987 #define Header_OrderToIndex(hwnd,i) \
988 (INT)SNDMSGA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
989 #define Header_CreateDragImage(hwnd,i) \
990 (HIMAGELIST)SNDMSGA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
991 #define Header_GetOrderArray(hwnd,iCount,lpi) \
992 (BOOL)SNDMSGA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
993 #define Header_SetOrderArray(hwnd,iCount,lpi) \
994 (BOOL)SNDMSGA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
995 #define Header_SetHotDivider(hwnd,fPos,dw) \
996 (INT)SNDMSGA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
997 #define Header_SetUnicodeFormat(hwnd,fUnicode) \
998 (BOOL)SNDMSGA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
999 #define Header_GetUnicodeFormat(hwnd) \
1000 (BOOL)SNDMSGA((hwnd),HDM_GETUNICODEFORMAT,0,0)
1002 /* Win32 5.1 Button Theme */
1003 #define BCN_FIRST (0U-1250U)
1004 #define BCN_LAST (0U-1350U)
1006 #define BCN_HOTITEMCHANGE (BCN_FIRST + 0x0001)
1011 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
1012 #if defined(__GNUC__)
1013 # define TOOLBARCLASSNAMEW (const WCHAR []){ 'T','o','o','l','b','a','r', \
1014 'W','i','n','d','o','w','3','2',0 }
1015 #elif defined(_MSC_VER)
1016 # define TOOLBARCLASSNAMEW L"ToolbarWindow32"
1018 static const WCHAR TOOLBARCLASSNAMEW
[] = { 'T','o','o','l','b','a','r',
1019 'W','i','n','d','o','w','3','2',0 };
1021 #define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
1023 #define CMB_MASKED 0x02
1025 #define TBSTATE_CHECKED 0x01
1026 #define TBSTATE_PRESSED 0x02
1027 #define TBSTATE_ENABLED 0x04
1028 #define TBSTATE_HIDDEN 0x08
1029 #define TBSTATE_INDETERMINATE 0x10
1030 #define TBSTATE_WRAP 0x20
1031 #define TBSTATE_ELLIPSES 0x40
1032 #define TBSTATE_MARKED 0x80
1035 /* as of _WIN32_IE >= 0x0500 the following symbols are obsolete,
1036 * "everyone" should use the BTNS_... stuff below
1038 #define TBSTYLE_BUTTON 0x00
1039 #define TBSTYLE_SEP 0x01
1040 #define TBSTYLE_CHECK 0x02
1041 #define TBSTYLE_GROUP 0x04
1042 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
1043 #define TBSTYLE_DROPDOWN 0x08
1044 #define TBSTYLE_AUTOSIZE 0x10
1045 #define TBSTYLE_NOPREFIX 0x20
1046 #define BTNS_BUTTON TBSTYLE_BUTTON
1047 #define BTNS_SEP TBSTYLE_SEP
1048 #define BTNS_CHECK TBSTYLE_CHECK
1049 #define BTNS_GROUP TBSTYLE_GROUP
1050 #define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP
1051 #define BTNS_DROPDOWN TBSTYLE_DROPDOWN
1052 #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE
1053 #define BTNS_NOPREFIX TBSTYLE_NOPREFIX
1054 #define BTNS_SHOWTEXT 0x40 /* ignored unless TBSTYLE_EX_MIXEDB set */
1055 #define BTNS_WHOLEDROPDOWN 0x80 /* draw dropdown arrow, but without split arrow section */
1057 #define TBSTYLE_TOOLTIPS 0x0100
1058 #define TBSTYLE_WRAPABLE 0x0200
1059 #define TBSTYLE_ALTDRAG 0x0400
1060 #define TBSTYLE_FLAT 0x0800
1061 #define TBSTYLE_LIST 0x1000
1062 #define TBSTYLE_CUSTOMERASE 0x2000
1063 #define TBSTYLE_REGISTERDROP 0x4000
1064 #define TBSTYLE_TRANSPARENT 0x8000
1065 #define TBSTYLE_EX_DRAWDDARROWS 0x00000001
1066 #define TBSTYLE_EX_UNDOC1 0x00000004 /* similar to TBSTYLE_WRAPABLE */
1067 #define TBSTYLE_EX_MIXEDBUTTONS 0x00000008
1068 #define TBSTYLE_EX_HIDECLIPPEDBUTTONS 0x00000010 /* don't show partially obscured buttons */
1069 #define TBSTYLE_EX_DOUBLEBUFFER 0x00000080 /* Double Buffer the toolbar ??? */
1071 #define TBIF_IMAGE 0x00000001
1072 #define TBIF_TEXT 0x00000002
1073 #define TBIF_STATE 0x00000004
1074 #define TBIF_STYLE 0x00000008
1075 #define TBIF_LPARAM 0x00000010
1076 #define TBIF_COMMAND 0x00000020
1077 #define TBIF_SIZE 0x00000040
1078 #define TBIF_BYINDEX 0x80000000
1080 #define TBBF_LARGE 0x0001
1082 #define TB_ENABLEBUTTON (WM_USER+1)
1083 #define TB_CHECKBUTTON (WM_USER+2)
1084 #define TB_PRESSBUTTON (WM_USER+3)
1085 #define TB_HIDEBUTTON (WM_USER+4)
1086 #define TB_INDETERMINATE (WM_USER+5)
1087 #define TB_MARKBUTTON (WM_USER+6)
1088 #define TB_ISBUTTONENABLED (WM_USER+9)
1089 #define TB_ISBUTTONCHECKED (WM_USER+10)
1090 #define TB_ISBUTTONPRESSED (WM_USER+11)
1091 #define TB_ISBUTTONHIDDEN (WM_USER+12)
1092 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
1093 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
1094 #define TB_SETSTATE (WM_USER+17)
1095 #define TB_GETSTATE (WM_USER+18)
1096 #define TB_ADDBITMAP (WM_USER+19)
1097 #define TB_ADDBUTTONSA (WM_USER+20)
1098 #define TB_ADDBUTTONSW (WM_USER+68)
1099 #define TB_ADDBUTTONS WINELIB_NAME_AW(TB_ADDBUTTONS)
1100 #define TB_HITTEST (WM_USER+69)
1101 #define TB_INSERTBUTTONA (WM_USER+21)
1102 #define TB_INSERTBUTTONW (WM_USER+67)
1103 #define TB_INSERTBUTTON WINELIB_NAME_AW(TB_INSERTBUTTON)
1104 #define TB_DELETEBUTTON (WM_USER+22)
1105 #define TB_GETBUTTON (WM_USER+23)
1106 #define TB_BUTTONCOUNT (WM_USER+24)
1107 #define TB_COMMANDTOINDEX (WM_USER+25)
1108 #define TB_SAVERESTOREA (WM_USER+26)
1109 #define TB_SAVERESTOREW (WM_USER+76)
1110 #define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
1111 #define TB_CUSTOMIZE (WM_USER+27)
1112 #define TB_ADDSTRINGA (WM_USER+28)
1113 #define TB_ADDSTRINGW (WM_USER+77)
1114 #define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
1115 #define TB_GETITEMRECT (WM_USER+29)
1116 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
1117 #define TB_SETBUTTONSIZE (WM_USER+31)
1118 #define TB_SETBITMAPSIZE (WM_USER+32)
1119 #define TB_AUTOSIZE (WM_USER+33)
1120 #define TB_GETTOOLTIPS (WM_USER+35)
1121 #define TB_SETTOOLTIPS (WM_USER+36)
1122 #define TB_SETPARENT (WM_USER+37)
1123 #define TB_SETROWS (WM_USER+39)
1124 #define TB_GETROWS (WM_USER+40)
1125 #define TB_GETBITMAPFLAGS (WM_USER+41)
1126 #define TB_SETCMDID (WM_USER+42)
1127 #define TB_CHANGEBITMAP (WM_USER+43)
1128 #define TB_GETBITMAP (WM_USER+44)
1129 #define TB_GETBUTTONTEXTA (WM_USER+45)
1130 #define TB_GETBUTTONTEXTW (WM_USER+75)
1131 #define TB_GETBUTTONTEXT WINELIB_NAME_AW(TB_GETBUTTONTEXT)
1132 #define TB_REPLACEBITMAP (WM_USER+46)
1133 #define TB_SETINDENT (WM_USER+47)
1134 #define TB_SETIMAGELIST (WM_USER+48)
1135 #define TB_GETIMAGELIST (WM_USER+49)
1136 #define TB_LOADIMAGES (WM_USER+50)
1137 #define TB_GETRECT (WM_USER+51) /* wParam is the Cmd instead of index */
1138 #define TB_SETHOTIMAGELIST (WM_USER+52)
1139 #define TB_GETHOTIMAGELIST (WM_USER+53)
1140 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
1141 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
1142 #define TB_SETSTYLE (WM_USER+56)
1143 #define TB_GETSTYLE (WM_USER+57)
1144 #define TB_GETBUTTONSIZE (WM_USER+58)
1145 #define TB_SETBUTTONWIDTH (WM_USER+59)
1146 #define TB_SETMAXTEXTROWS (WM_USER+60)
1147 #define TB_GETTEXTROWS (WM_USER+61)
1148 #define TB_GETOBJECT (WM_USER+62)
1149 #define TB_GETBUTTONINFOW (WM_USER+63)
1150 #define TB_GETBUTTONINFOA (WM_USER+65)
1151 #define TB_GETBUTTONINFO WINELIB_NAME_AW(TB_GETBUTTONINFO)
1152 #define TB_SETBUTTONINFOW (WM_USER+64)
1153 #define TB_SETBUTTONINFOA (WM_USER+66)
1154 #define TB_SETBUTTONINFO WINELIB_NAME_AW(TB_SETBUTTONINFO)
1155 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
1156 #define TB_GETHOTITEM (WM_USER+71)
1157 #define TB_SETHOTITEM (WM_USER+72)
1158 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
1159 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
1160 #define TB_MAPACCELERATORA (WM_USER+78)
1161 #define TB_MAPACCELERATORW (WM_USER+90)
1162 #define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
1163 #define TB_GETINSERTMARK (WM_USER+79)
1164 #define TB_SETINSERTMARK (WM_USER+80)
1165 #define TB_INSERTMARKHITTEST (WM_USER+81)
1166 #define TB_MOVEBUTTON (WM_USER+82)
1167 #define TB_GETMAXSIZE (WM_USER+83)
1168 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
1169 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
1170 #define TB_GETPADDING (WM_USER+86)
1171 #define TB_SETPADDING (WM_USER+87)
1172 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
1173 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
1174 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1175 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1176 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1177 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1178 #define TB_GETSTRINGW (WM_USER+91)
1179 #define TB_GETSTRINGA (WM_USER+92)
1180 #define TB_GETSTRING WINELIB_NAME_AW(TB_GETSTRING)
1182 /* undocumented messages in Toolbar */
1183 #define TB_UNKWN45D (WM_USER+93)
1184 #define TB_UNKWN45E (WM_USER+94)
1185 #define TB_UNKWN460 (WM_USER+96)
1186 #define TB_UNKWN462 (WM_USER+98)
1187 #define TB_UNKWN463 (WM_USER+99)
1188 #define TB_UNKWN464 (WM_USER+100)
1190 #define TB_GETMETRICS (WM_USER+101)
1191 #define TB_SETMETRICS (WM_USER+102)
1192 #define TB_SETWINDOWTHEME CCM_SETWINDOWTHEME
1194 #define TBN_FIRST (0U-700U)
1195 #define TBN_LAST (0U-720U)
1196 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
1197 #define TBN_GETBUTTONINFOW (TBN_FIRST-20)
1198 #define TBN_GETBUTTONINFO WINELIB_NAME_AW(TBN_GETBUTTONINFO)
1199 #define TBN_BEGINDRAG (TBN_FIRST-1)
1200 #define TBN_ENDDRAG (TBN_FIRST-2)
1201 #define TBN_BEGINADJUST (TBN_FIRST-3)
1202 #define TBN_ENDADJUST (TBN_FIRST-4)
1203 #define TBN_RESET (TBN_FIRST-5)
1204 #define TBN_QUERYINSERT (TBN_FIRST-6)
1205 #define TBN_QUERYDELETE (TBN_FIRST-7)
1206 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
1207 #define TBN_CUSTHELP (TBN_FIRST-9)
1208 #define TBN_DROPDOWN (TBN_FIRST-10)
1209 #define TBN_GETOBJECT (TBN_FIRST-12)
1210 #define TBN_HOTITEMCHANGE (TBN_FIRST-13)
1211 #define TBN_DRAGOUT (TBN_FIRST-14)
1212 #define TBN_DELETINGBUTTON (TBN_FIRST-15)
1213 #define TBN_GETDISPINFOA (TBN_FIRST-16)
1214 #define TBN_GETDISPINFOW (TBN_FIRST-17)
1215 #define TBN_GETDISPINFO WINELIB_NAME_AW(TBN_GETDISPINFO)
1216 #define TBN_GETINFOTIPA (TBN_FIRST-18)
1217 #define TBN_GETINFOTIPW (TBN_FIRST-19)
1218 #define TBN_GETINFOTIP WINELIB_NAME_AW(TBN_GETINFOTIP)
1219 #define TBN_RESTORE (TBN_FIRST-21)
1220 #define TBN_SAVE (TBN_FIRST-22)
1221 #define TBN_INITCUSTOMIZE (TBN_FIRST-23)
1222 #define TBNRF_HIDEHELP 0x00000001
1225 /* Return values from TBN_DROPDOWN */
1226 #define TBDDRET_DEFAULT 0
1227 #define TBDDRET_NODEFAULT 1
1228 #define TBDDRET_TREATPRESSED 2
1230 typedef struct _NMTBCUSTOMDRAW
1233 HBRUSH hbrMonoDither
;
1238 COLORREF clrTextHighlight
;
1239 COLORREF clrBtnFace
;
1240 COLORREF clrBtnHighlight
;
1241 COLORREF clrHighlightHotTrack
;
1244 int nHLStringBkMode
;
1246 } NMTBCUSTOMDRAW
, *LPNMTBCUSTOMDRAW
;
1248 /* return flags for Toolbar NM_CUSTOMDRAW notifications */
1249 #define TBCDRF_NOEDGES 0x00010000 /* Don't draw button edges */
1250 #define TBCDRF_HILITEHOTTRACK 0x00020000 /* Use color of the button bkgnd */
1251 /* when hottracked */
1252 #define TBCDRF_NOOFFSET 0x00040000 /* No offset button if pressed */
1253 #define TBCDRF_NOMARK 0x00080000 /* Don't draw default highlight */
1254 /* for TBSTATE_MARKED */
1255 #define TBCDRF_NOETCHEDEFFECT 0x00100000 /* No etched effect for */
1256 /* disabled items */
1257 #define TBCDRF_BLENDICON 0x00200000 /* ILD_BLEND50 on the icon image */
1258 #define TBCDRF_NOBACKGROUND 0x00400000 /* ILD_BLEND50 on the icon image */
1261 /* This is just for old CreateToolbar. */
1262 /* Don't use it in new programs. */
1263 typedef struct _OLDTBBUTTON
{
1270 } OLDTBBUTTON
, *POLDTBBUTTON
, *LPOLDTBBUTTON
;
1271 typedef const OLDTBBUTTON
*LPCOLDTBBUTTON
;
1274 typedef struct _TBBUTTON
{
1282 } TBBUTTON
, *PTBBUTTON
, *LPTBBUTTON
;
1283 typedef const TBBUTTON
*LPCTBBUTTON
;
1286 typedef struct _COLORMAP
{
1289 } COLORMAP
, *LPCOLORMAP
;
1292 typedef struct tagTBADDBITMAP
{
1295 } TBADDBITMAP
, *LPTBADDBITMAP
;
1297 #define HINST_COMMCTRL ((HINSTANCE)-1)
1298 #define IDB_STD_SMALL_COLOR 0
1299 #define IDB_STD_LARGE_COLOR 1
1300 #define IDB_VIEW_SMALL_COLOR 4
1301 #define IDB_VIEW_LARGE_COLOR 5
1302 #define IDB_HIST_SMALL_COLOR 8
1303 #define IDB_HIST_LARGE_COLOR 9
1310 #define STD_DELETE 5
1311 #define STD_FILENEW 6
1312 #define STD_FILEOPEN 7
1313 #define STD_FILESAVE 8
1314 #define STD_PRINTPRE 9
1315 #define STD_PROPERTIES 10
1318 #define STD_REPLACE 13
1319 #define STD_PRINT 14
1321 #define VIEW_LARGEICONS 0
1322 #define VIEW_SMALLICONS 1
1324 #define VIEW_DETAILS 3
1325 #define VIEW_SORTNAME 4
1326 #define VIEW_SORTSIZE 5
1327 #define VIEW_SORTDATE 6
1328 #define VIEW_SORTTYPE 7
1329 #define VIEW_PARENTFOLDER 8
1330 #define VIEW_NETCONNECT 9
1331 #define VIEW_NETDISCONNECT 10
1332 #define VIEW_NEWFOLDER 11
1333 #define VIEW_VIEWMENU 12
1336 #define HIST_FORWARD 1
1337 #define HIST_FAVORITES 2
1338 #define HIST_ADDTOFAVORITES 3
1339 #define HIST_VIEWTREE 4
1341 typedef struct tagTBSAVEPARAMSA
{
1344 LPCSTR pszValueName
;
1345 } TBSAVEPARAMSA
, *LPTBSAVEPARAMSA
;
1347 typedef struct tagTBSAVEPARAMSW
{
1350 LPCWSTR pszValueName
;
1351 } TBSAVEPARAMSW
, *LPTBSAVEPARAMSW
;
1353 #define TBSAVEPARAMS WINELIB_NAME_AW(TBSAVEPARAMS)
1354 #define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
1368 } TBBUTTONINFOA
, *LPTBBUTTONINFOA
;
1382 } TBBUTTONINFOW
, *LPTBBUTTONINFOW
;
1384 #define TBBUTTONINFO WINELIB_NAME_AW(TBBUTTONINFO)
1385 #define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
1387 typedef struct tagNMTBHOTITEM
1393 } NMTBHOTITEM
, *LPNMTBHOTITEM
;
1395 typedef struct tagNMTBGETINFOTIPA
1402 } NMTBGETINFOTIPA
, *LPNMTBGETINFOTIPA
;
1404 typedef struct tagNMTBGETINFOTIPW
1411 } NMTBGETINFOTIPW
, *LPNMTBGETINFOTIPW
;
1413 #define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOFTIP)
1414 #define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
1425 } NMTBDISPINFOA
, *LPNMTBDISPINFOA
;
1436 } NMTBDISPINFOW
, *LPNMTBDISPINFOW
;
1438 #define NMTBDISPINFO WINELIB_NAME_AW(NMTBDISPINFO)
1439 #define LPNMTBDISPINFO WINELIB_NAME_AW(LPNMTBDISPINFO)
1441 /* contents of dwMask in the NMTBDISPINFO structure */
1442 #define TBNF_IMAGE 0x00000001
1443 #define TBNF_TEXT 0x00000002
1444 #define TBNF_DI_SETITEM 0x10000000
1447 typedef struct tagNMTOOLBARA
1454 RECT rcButton
; /* Version 5.80 */
1455 } NMTOOLBARA
, *LPNMTOOLBARA
, TBNOTIFYA
, *LPTBNOTIFYA
;
1457 typedef struct tagNMTOOLBARW
1464 RECT rcButton
; /* Version 5.80 */
1465 } NMTOOLBARW
, *LPNMTOOLBARW
, TBNOTIFYW
, *LPTBNOTIFYW
;
1467 #define NMTOOLBAR WINELIB_NAME_AW(NMTOOLBAR)
1468 #define LPNMTOOLBAR WINELIB_NAME_AW(LPNMTOOLBAR)
1469 #define TBNOTIFY WINELIB_NAME_AW(TBNOTIFY)
1470 #define LPTBNOTIFY WINELIB_NAME_AW(LPTBNOTIFY)
1479 } TBREPLACEBITMAP
, *LPTBREPLACEBITMAP
;
1481 #define HICF_OTHER 0x00000000
1482 #define HICF_MOUSE 0x00000001 /* Triggered by mouse */
1483 #define HICF_ARROWKEYS 0x00000002 /* Triggered by arrow keys */
1484 #define HICF_ACCELERATOR 0x00000004 /* Triggered by accelerator */
1485 #define HICF_DUPACCEL 0x00000008 /* This accelerator is not unique */
1486 #define HICF_ENTERING 0x00000010 /* idOld is invalid */
1487 #define HICF_LEAVING 0x00000020 /* idNew is invalid */
1488 #define HICF_RESELECT 0x00000040 /* hot item reselected */
1489 #define HICF_LMOUSE 0x00000080 /* left mouse button selected */
1490 #define HICF_TOGGLEDROPDOWN 0x00000100 /* Toggle button's dropdown state */
1496 } TBINSERTMARK
, *LPTBINSERTMARK
;
1497 #define TBIMHT_AFTER 0x00000001 /* TRUE = insert After iButton, otherwise before */
1498 #define TBIMHT_BACKGROUND 0x00000002 /* TRUE if and only if missed buttons completely */
1500 typedef struct tagNMTBSAVE
1509 } NMTBSAVE
, *LPNMTBSAVE
;
1511 typedef struct tagNMTBRESTORE
1519 int cbBytesPerRecord
;
1521 } NMTBRESTORE
, *LPNMTBRESTORE
;
1523 #define TBMF_PAD 0x00000001
1524 #define TBMF_BARPAD 0x00000002
1525 #define TBMF_BUTTONSPACING 0x00000004
1535 INT cxButtonSpacing
;
1536 INT cyButtonSpacing
;
1537 } TBMETRICS
, *LPTBMETRICS
;
1540 CreateToolbar(HWND
, DWORD
, UINT
, INT
, HINSTANCE
,
1541 UINT
, LPCTBBUTTON
, INT
);
1544 CreateToolbarEx(HWND
, DWORD
, UINT
, INT
,
1545 HINSTANCE
, UINT
, LPCTBBUTTON
,
1546 INT
, INT
, INT
, INT
, INT
, UINT
);
1549 CreateMappedBitmap (HINSTANCE
, INT
, UINT
, LPCOLORMAP
, INT
);
1554 #define TOOLTIPS_CLASSA "tooltips_class32"
1555 #if defined(__GNUC__)
1556 # define TOOLTIPS_CLASSW (const WCHAR []){ 't','o','o','l','t','i','p','s','_', \
1557 'c','l','a','s','s','3','2',0 }
1558 #elif defined(_MSC_VER)
1559 # define TOOLTIPS_CLASSW L"tooltips_class32"
1561 static const WCHAR TOOLTIPS_CLASSW
[] = { 't','o','o','l','t','i','p','s','_',
1562 'c','l','a','s','s','3','2',0 };
1564 #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
1566 #define INFOTIPSIZE 1024
1568 #define TTS_ALWAYSTIP 0x01
1569 #define TTS_NOPREFIX 0x02
1570 #define TTS_NOANIMATE 0x10
1571 #define TTS_NOFADE 0x20
1572 #define TTS_BALLOON 0x40
1573 #define TTS_CLOSE 0x80
1575 #define TTF_IDISHWND 0x0001
1576 #define TTF_CENTERTIP 0x0002
1577 #define TTF_RTLREADING 0x0004
1578 #define TTF_SUBCLASS 0x0010
1579 #define TTF_TRACK 0x0020
1580 #define TTF_ABSOLUTE 0x0080
1581 #define TTF_TRANSPARENT 0x0100
1582 #define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
1585 #define TTDT_AUTOMATIC 0
1586 #define TTDT_RESHOW 1
1587 #define TTDT_AUTOPOP 2
1588 #define TTDT_INITIAL 3
1593 #define TTI_WARNING 2
1597 #define TTM_ACTIVATE (WM_USER+1)
1598 #define TTM_SETDELAYTIME (WM_USER+3)
1599 #define TTM_ADDTOOLA (WM_USER+4)
1600 #define TTM_ADDTOOLW (WM_USER+50)
1601 #define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
1602 #define TTM_DELTOOLA (WM_USER+5)
1603 #define TTM_DELTOOLW (WM_USER+51)
1604 #define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
1605 #define TTM_NEWTOOLRECTA (WM_USER+6)
1606 #define TTM_NEWTOOLRECTW (WM_USER+52)
1607 #define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
1608 #define TTM_RELAYEVENT (WM_USER+7)
1609 #define TTM_GETTOOLINFOA (WM_USER+8)
1610 #define TTM_GETTOOLINFOW (WM_USER+53)
1611 #define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
1612 #define TTM_SETTOOLINFOA (WM_USER+9)
1613 #define TTM_SETTOOLINFOW (WM_USER+54)
1614 #define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
1615 #define TTM_HITTESTA (WM_USER+10)
1616 #define TTM_HITTESTW (WM_USER+55)
1617 #define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
1618 #define TTM_GETTEXTA (WM_USER+11)
1619 #define TTM_GETTEXTW (WM_USER+56)
1620 #define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
1621 #define TTM_UPDATETIPTEXTA (WM_USER+12)
1622 #define TTM_UPDATETIPTEXTW (WM_USER+57)
1623 #define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
1624 #define TTM_GETTOOLCOUNT (WM_USER+13)
1625 #define TTM_ENUMTOOLSA (WM_USER+14)
1626 #define TTM_ENUMTOOLSW (WM_USER+58)
1627 #define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
1628 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1629 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1630 #define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
1631 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1632 #define TTM_TRACKACTIVATE (WM_USER+17)
1633 #define TTM_TRACKPOSITION (WM_USER+18)
1634 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1635 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1636 #define TTM_GETDELAYTIME (WM_USER+21)
1637 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1638 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1639 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1640 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1641 #define TTM_SETMARGIN (WM_USER+26)
1642 #define TTM_GETMARGIN (WM_USER+27)
1643 #define TTM_POP (WM_USER+28)
1644 #define TTM_UPDATE (WM_USER+29)
1645 #define TTM_GETBUBBLESIZE (WM_USER+30)
1646 #define TTM_ADJUSTRECT (WM_USER+31)
1647 #define TTM_SETTITLEA (WM_USER+32)
1648 #define TTM_SETTITLEW (WM_USER+33)
1649 #define TTM_SETTITLE WINELIB_NAME_AW(TTM_SETTITLE)
1650 #define TTM_POPUP (WM_USER+34)
1651 #define TTM_GETTITLE (WM_USER+35)
1652 #define TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME
1655 #define TTN_FIRST (0U-520U)
1656 #define TTN_LAST (0U-549U)
1657 #define TTN_GETDISPINFOA (TTN_FIRST-0)
1658 #define TTN_GETDISPINFOW (TTN_FIRST-10)
1659 #define TTN_GETDISPINFO WINELIB_NAME_AW(TTN_GETDISPINFO)
1660 #define TTN_SHOW (TTN_FIRST-1)
1661 #define TTN_POP (TTN_FIRST-2)
1663 #define TTN_NEEDTEXT TTN_GETDISPINFO
1664 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1665 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1667 typedef struct tagTOOLINFOA
{
1677 } TTTOOLINFOA
, *LPTOOLINFOA
, *PTOOLINFOA
, *LPTTTOOLINFOA
;
1679 typedef struct tagTOOLINFOW
{
1689 } TTTOOLINFOW
, *LPTOOLINFOW
, *PTOOLINFOW
, *LPTTTOOLINFOW
;
1691 #define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1692 #define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1693 #define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
1694 #define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
1695 #define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
1697 #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
1698 #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
1699 #define TTTOOLINFO_V1_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(TTTOOLINFO), lpszText)
1701 typedef struct _TT_HITTESTINFOA
1706 } TTHITTESTINFOA
, *LPTTHITTESTINFOA
;
1707 #define LPHITTESTINFOA LPTTHITTESTINFOA
1709 typedef struct _TT_HITTESTINFOW
1714 } TTHITTESTINFOW
, *LPTTHITTESTINFOW
;
1715 #define LPHITTESTINFOW LPTTHITTESTINFOW
1717 #define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
1718 #define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
1719 #define LPHITTESTINFO WINELIB_NAME_AW(LPHITTESTINFO)
1721 typedef struct tagNMTTDISPINFOA
1729 } NMTTDISPINFOA
, *LPNMTTDISPINFOA
;
1731 typedef struct tagNMTTDISPINFOW
1739 } NMTTDISPINFOW
, *LPNMTTDISPINFOW
;
1741 #define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
1742 #define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
1744 #define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
1745 #define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
1746 #define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)
1748 typedef struct _TTGETTITLE
1754 } TTGETTITLE
, *PTTGETTITLE
;
1756 #define TOOLTIPTEXTW NMTTDISPINFOW
1757 #define TOOLTIPTEXTA NMTTDISPINFOA
1758 #define TOOLTIPTEXT NMTTDISPINFO
1759 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1760 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1761 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1766 #define REBARCLASSNAMEA "ReBarWindow32"
1767 #if defined(__GNUC__)
1768 # define REBARCLASSNAMEW (const WCHAR []){ 'R','e','B','a','r', \
1769 'W','i','n','d','o','w','3','2',0 }
1770 #elif defined(_MSC_VER)
1771 # define REBARCLASSNAMEW L"ReBarWindow32"
1773 static const WCHAR REBARCLASSNAMEW
[] = { 'R','e','B','a','r',
1774 'W','i','n','d','o','w','3','2',0 };
1776 #define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
1778 #define RBS_TOOLTIPS 0x0100
1779 #define RBS_VARHEIGHT 0x0200
1780 #define RBS_BANDBORDERS 0x0400
1781 #define RBS_FIXEDORDER 0x0800
1782 #define RBS_REGISTERDROP 0x1000
1783 #define RBS_AUTOSIZE 0x2000
1784 #define RBS_VERTICALGRIPPER 0x4000
1785 #define RBS_DBLCLKTOGGLE 0x8000
1787 #define RBIM_IMAGELIST 0x00000001
1789 #define RBBIM_STYLE 0x00000001
1790 #define RBBIM_COLORS 0x00000002
1791 #define RBBIM_TEXT 0x00000004
1792 #define RBBIM_IMAGE 0x00000008
1793 #define RBBIM_CHILD 0x00000010
1794 #define RBBIM_CHILDSIZE 0x00000020
1795 #define RBBIM_SIZE 0x00000040
1796 #define RBBIM_BACKGROUND 0x00000080
1797 #define RBBIM_ID 0x00000100
1798 #define RBBIM_IDEALSIZE 0x00000200
1799 #define RBBIM_LPARAM 0x00000400
1800 #define RBBIM_HEADERSIZE 0x00000800
1802 #define RBBS_BREAK 0x00000001
1803 #define RBBS_FIXEDSIZE 0x00000002
1804 #define RBBS_CHILDEDGE 0x00000004
1805 #define RBBS_HIDDEN 0x00000008
1806 #define RBBS_NOVERT 0x00000010
1807 #define RBBS_FIXEDBMP 0x00000020
1808 #define RBBS_VARIABLEHEIGHT 0x00000040
1809 #define RBBS_GRIPPERALWAYS 0x00000080
1810 #define RBBS_NOGRIPPER 0x00000100
1811 #define RBBS_USECHEVRON 0x00000200
1812 #define RBBS_HIDETITLE 0x00000400
1813 #define RBBS_TOPALIGN 0x00000800
1815 #define RBNM_ID 0x00000001
1816 #define RBNM_STYLE 0x00000002
1817 #define RBNM_LPARAM 0x00000004
1819 #define RBHT_NOWHERE 0x0001
1820 #define RBHT_CAPTION 0x0002
1821 #define RBHT_CLIENT 0x0003
1822 #define RBHT_GRABBER 0x0004
1823 #define RBHT_CHEVRON 0x0008
1825 #define RB_INSERTBANDA (WM_USER+1)
1826 #define RB_INSERTBANDW (WM_USER+10)
1827 #define RB_INSERTBAND WINELIB_NAME_AW(RB_INSERTBAND)
1828 #define RB_DELETEBAND (WM_USER+2)
1829 #define RB_GETBARINFO (WM_USER+3)
1830 #define RB_SETBARINFO (WM_USER+4)
1831 #define RB_SETBANDINFOA (WM_USER+6)
1832 #define RB_SETBANDINFOW (WM_USER+11)
1833 #define RB_SETBANDINFO WINELIB_NAME_AW(RB_SETBANDINFO)
1834 #define RB_SETPARENT (WM_USER+7)
1835 #define RB_HITTEST (WM_USER+8)
1836 #define RB_GETRECT (WM_USER+9)
1837 #define RB_GETBANDCOUNT (WM_USER+12)
1838 #define RB_GETROWCOUNT (WM_USER+13)
1839 #define RB_GETROWHEIGHT (WM_USER+14)
1840 #define RB_IDTOINDEX (WM_USER+16)
1841 #define RB_GETTOOLTIPS (WM_USER+17)
1842 #define RB_SETTOOLTIPS (WM_USER+18)
1843 #define RB_SETBKCOLOR (WM_USER+19)
1844 #define RB_GETBKCOLOR (WM_USER+20)
1845 #define RB_SETTEXTCOLOR (WM_USER+21)
1846 #define RB_GETTEXTCOLOR (WM_USER+22)
1847 #define RB_SIZETORECT (WM_USER+23)
1848 #define RB_BEGINDRAG (WM_USER+24)
1849 #define RB_ENDDRAG (WM_USER+25)
1850 #define RB_DRAGMOVE (WM_USER+26)
1851 #define RB_GETBARHEIGHT (WM_USER+27)
1852 #define RB_GETBANDINFOW (WM_USER+28)
1853 #define RB_GETBANDINFOA (WM_USER+29)
1854 #define RB_GETBANDINFO WINELIB_NAME_AW(RB_GETBANDINFO)
1855 #define RB_MINIMIZEBAND (WM_USER+30)
1856 #define RB_MAXIMIZEBAND (WM_USER+31)
1857 #define RB_GETBANDBORDERS (WM_USER+34)
1858 #define RB_SHOWBAND (WM_USER+35)
1859 #define RB_SETPALETTE (WM_USER+37)
1860 #define RB_GETPALETTE (WM_USER+38)
1861 #define RB_MOVEBAND (WM_USER+39)
1862 #define RB_GETBANDMARGINS (WM_USER+40)
1863 #define RB_PUSHCHEVRON (WM_USER+43)
1864 #define RB_GETDROPTARGET CCM_GETDROPTARGET
1865 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1866 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1867 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1868 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1869 #define RB_SETWINDOWTHEME CCM_SETWINDOWTHEME
1871 #define RBN_FIRST (0U-831U)
1872 #define RBN_LAST (0U-859U)
1873 #define RBN_HEIGHTCHANGE (RBN_FIRST-0)
1874 #define RBN_GETOBJECT (RBN_FIRST-1)
1875 #define RBN_LAYOUTCHANGED (RBN_FIRST-2)
1876 #define RBN_AUTOSIZE (RBN_FIRST-3)
1877 #define RBN_BEGINDRAG (RBN_FIRST-4)
1878 #define RBN_ENDDRAG (RBN_FIRST-5)
1879 #define RBN_DELETINGBAND (RBN_FIRST-6)
1880 #define RBN_DELETEDBAND (RBN_FIRST-7)
1881 #define RBN_CHILDSIZE (RBN_FIRST-8)
1882 #define RBN_CHEVRONPUSHED (RBN_FIRST-10)
1883 #define RBN_MINMAX (RBN_FIRST-21)
1884 #define RBN_AUTOBREAK (RBN_FIRST-22)
1886 typedef struct tagREBARINFO
1891 } REBARINFO
, *LPREBARINFO
;
1893 typedef struct tagREBARBANDINFOA
1915 } REBARBANDINFOA
, *LPREBARBANDINFOA
;
1917 typedef REBARBANDINFOA
const *LPCREBARBANDINFOA
;
1919 typedef struct tagREBARBANDINFOW
1941 } REBARBANDINFOW
, *LPREBARBANDINFOW
;
1943 typedef REBARBANDINFOW
const *LPCREBARBANDINFOW
;
1945 #define REBARBANDINFO WINELIB_NAME_AW(REBARBANDINFO)
1946 #define LPREBARBANDINFO WINELIB_NAME_AW(LPREBARBANDINFO)
1947 #define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
1949 #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
1950 #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
1951 #define REBARBANDINFO_V3_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(REBARBANDINFO), wID)
1953 typedef struct tagNMREBARCHILDSIZE
1960 } NMREBARCHILDSIZE
, *LPNMREBARCHILDSIZE
;
1962 typedef struct tagNMREBAR
1970 } NMREBAR
, *LPNMREBAR
;
1972 typedef struct tagNMRBAUTOSIZE
1978 } NMRBAUTOSIZE
, *LPNMRBAUTOSIZE
;
1980 typedef struct tagNMREBARCHEVRON
1988 } NMREBARCHEVRON
, *LPNMREBARCHEVRON
;
1990 typedef struct _RB_HITTESTINFO
1995 } RBHITTESTINFO
, *LPRBHITTESTINFO
;
1997 #define RBAB_AUTOSIZE 0x0001
1998 #define RBAB_ADDBAND 0x0002
2000 typedef struct tagNMREBARAUTOBREAK
2009 } NMREBARAUTOBREAK
, *LPNMREBARAUTOBREAK
;
2012 /* Trackbar control */
2014 #define TRACKBAR_CLASSA "msctls_trackbar32"
2015 #if defined(__GNUC__)
2016 # define TRACKBAR_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
2017 't','r','a','c','k','b','a','r','3','2',0 }
2018 #elif defined(_MSC_VER)
2019 # define TRACKBAR_CLASSW L"msctls_trackbar32"
2021 static const WCHAR TRACKBAR_CLASSW
[] = { 'm','s','c','t','l','s','_',
2022 't','r','a','c','k','b','a','r','3','2',0 };
2024 #define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
2026 #define TBS_AUTOTICKS 0x0001
2027 #define TBS_VERT 0x0002
2028 #define TBS_HORZ 0x0000
2029 #define TBS_TOP 0x0004
2030 #define TBS_BOTTOM 0x0000
2031 #define TBS_LEFT 0x0004
2032 #define TBS_RIGHT 0x0000
2033 #define TBS_BOTH 0x0008
2034 #define TBS_NOTICKS 0x0010
2035 #define TBS_ENABLESELRANGE 0x0020
2036 #define TBS_FIXEDLENGTH 0x0040
2037 #define TBS_NOTHUMB 0x0080
2038 #define TBS_TOOLTIPS 0x0100
2039 #define TBS_REVERSED 0x0200
2040 #define TBS_DOWNISLEFT 0x0400
2044 #define TBTS_BOTTOM 2
2045 #define TBTS_RIGHT 3
2048 #define TB_LINEDOWN 1
2050 #define TB_PAGEDOWN 3
2051 #define TB_THUMBPOSITION 4
2052 #define TB_THUMBTRACK 5
2055 #define TB_ENDTRACK 8
2057 #define TBCD_TICS 0x0001
2058 #define TBCD_THUMB 0x0002
2059 #define TBCD_CHANNEL 0x0003
2061 #define TBM_GETPOS (WM_USER)
2062 #define TBM_GETRANGEMIN (WM_USER+1)
2063 #define TBM_GETRANGEMAX (WM_USER+2)
2064 #define TBM_GETTIC (WM_USER+3)
2065 #define TBM_SETTIC (WM_USER+4)
2066 #define TBM_SETPOS (WM_USER+5)
2067 #define TBM_SETRANGE (WM_USER+6)
2068 #define TBM_SETRANGEMIN (WM_USER+7)
2069 #define TBM_SETRANGEMAX (WM_USER+8)
2070 #define TBM_CLEARTICS (WM_USER+9)
2071 #define TBM_SETSEL (WM_USER+10)
2072 #define TBM_SETSELSTART (WM_USER+11)
2073 #define TBM_SETSELEND (WM_USER+12)
2074 #define TBM_GETPTICS (WM_USER+14)
2075 #define TBM_GETTICPOS (WM_USER+15)
2076 #define TBM_GETNUMTICS (WM_USER+16)
2077 #define TBM_GETSELSTART (WM_USER+17)
2078 #define TBM_GETSELEND (WM_USER+18)
2079 #define TBM_CLEARSEL (WM_USER+19)
2080 #define TBM_SETTICFREQ (WM_USER+20)
2081 #define TBM_SETPAGESIZE (WM_USER+21)
2082 #define TBM_GETPAGESIZE (WM_USER+22)
2083 #define TBM_SETLINESIZE (WM_USER+23)
2084 #define TBM_GETLINESIZE (WM_USER+24)
2085 #define TBM_GETTHUMBRECT (WM_USER+25)
2086 #define TBM_GETCHANNELRECT (WM_USER+26)
2087 #define TBM_SETTHUMBLENGTH (WM_USER+27)
2088 #define TBM_GETTHUMBLENGTH (WM_USER+28)
2089 #define TBM_SETTOOLTIPS (WM_USER+29)
2090 #define TBM_GETTOOLTIPS (WM_USER+30)
2091 #define TBM_SETTIPSIDE (WM_USER+31)
2092 #define TBM_SETBUDDY (WM_USER+32)
2093 #define TBM_GETBUDDY (WM_USER+33)
2094 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2095 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2100 #define WC_PAGESCROLLERA "SysPager"
2101 #if defined(__GNUC__)
2102 # define WC_PAGESCROLLERW (const WCHAR []){ 'S','y','s','P','a','g','e','r',0 }
2103 #elif defined(_MSC_VER)
2104 # define WC_PAGESCROLLERW L"SysPager"
2106 static const WCHAR WC_PAGESCROLLERW
[] = { 'S','y','s','P','a','g','e','r',0 };
2108 #define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
2110 #define PGS_VERT 0x00000000
2111 #define PGS_HORZ 0x00000001
2112 #define PGS_AUTOSCROLL 0x00000002
2113 #define PGS_DRAGNDROP 0x00000004
2115 #define PGF_INVISIBLE 0
2116 #define PGF_NORMAL 1
2117 #define PGF_GRAYED 2
2118 #define PGF_DEPRESSED 4
2121 #define PGB_TOPORLEFT 0
2122 #define PGB_BOTTOMORRIGHT 1
2124 /* only used with PGN_SCROLL */
2125 #define PGF_SCROLLUP 1
2126 #define PGF_SCROLLDOWN 2
2127 #define PGF_SCROLLLEFT 4
2128 #define PGF_SCROLLRIGHT 8
2131 #define PGK_CONTROL 2
2134 /* only used with PGN_CALCSIZE */
2135 #define PGF_CALCWIDTH 1
2136 #define PGF_CALCHEIGHT 2
2138 #define PGM_FIRST 0x1400
2139 #define PGM_SETCHILD (PGM_FIRST+1)
2140 #define PGM_RECALCSIZE (PGM_FIRST+2)
2141 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
2142 #define PGM_SETBKCOLOR (PGM_FIRST+4)
2143 #define PGM_GETBKCOLOR (PGM_FIRST+5)
2144 #define PGM_SETBORDER (PGM_FIRST+6)
2145 #define PGM_GETBORDER (PGM_FIRST+7)
2146 #define PGM_SETPOS (PGM_FIRST+8)
2147 #define PGM_GETPOS (PGM_FIRST+9)
2148 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
2149 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
2150 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
2151 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
2153 #define PGN_FIRST (0U-900U)
2154 #define PGN_LAST (0U-950U)
2155 #define PGN_SCROLL (PGN_FIRST-1)
2156 #define PGN_CALCSIZE (PGN_FIRST-2)
2158 #include <pshpack1.h>
2169 } NMPGSCROLL
, *LPNMPGSCROLL
;
2171 #include <poppack.h>
2179 } NMPGCALCSIZE
, *LPNMPGCALCSIZE
;
2182 /* Treeview control */
2184 #define WC_TREEVIEWA "SysTreeView32"
2185 #if defined(__GNUC__)
2186 # define WC_TREEVIEWW (const WCHAR []){ 'S','y','s', \
2187 'T','r','e','e','V','i','e','w','3','2',0 }
2188 #elif defined(_MSC_VER)
2189 # define WC_TREEVIEWW L"SysTreeView32"
2191 static const WCHAR WC_TREEVIEWW
[] = { 'S','y','s',
2192 'T','r','e','e','V','i','e','w','3','2',0 };
2194 #define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
2196 #define TVSIL_NORMAL 0
2197 #define TVSIL_STATE 2
2199 #define TV_FIRST 0x1100
2200 #define TVM_INSERTITEMA (TV_FIRST+0)
2201 #define TVM_INSERTITEMW (TV_FIRST+50)
2202 #define TVM_INSERTITEM WINELIB_NAME_AW(TVM_INSERTITEM)
2203 #define TVM_DELETEITEM (TV_FIRST+1)
2204 #define TVM_EXPAND (TV_FIRST+2)
2205 #define TVM_GETITEMRECT (TV_FIRST+4)
2206 #define TVM_GETCOUNT (TV_FIRST+5)
2207 #define TVM_GETINDENT (TV_FIRST+6)
2208 #define TVM_SETINDENT (TV_FIRST+7)
2209 #define TVM_GETIMAGELIST (TV_FIRST+8)
2210 #define TVM_SETIMAGELIST (TV_FIRST+9)
2211 #define TVM_GETNEXTITEM (TV_FIRST+10)
2212 #define TVM_SELECTITEM (TV_FIRST+11)
2213 #define TVM_GETITEMA (TV_FIRST+12)
2214 #define TVM_GETITEMW (TV_FIRST+62)
2215 #define TVM_GETITEM WINELIB_NAME_AW(TVM_GETITEM)
2216 #define TVM_SETITEMA (TV_FIRST+13)
2217 #define TVM_SETITEMW (TV_FIRST+63)
2218 #define TVM_SETITEM WINELIB_NAME_AW(TVM_SETITEM)
2219 #define TVM_EDITLABELA (TV_FIRST+14)
2220 #define TVM_EDITLABELW (TV_FIRST+65)
2221 #define TVM_EDITLABEL WINELIB_NAME_AW(TVM_EDITLABEL)
2222 #define TVM_GETEDITCONTROL (TV_FIRST+15)
2223 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
2224 #define TVM_HITTEST (TV_FIRST+17)
2225 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
2226 #define TVM_SORTCHILDREN (TV_FIRST+19)
2227 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
2228 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
2229 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
2230 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
2231 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
2232 #define TVM_GETISEARCHSTRING WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
2233 #define TVM_SETTOOLTIPS (TV_FIRST+24)
2234 #define TVM_GETTOOLTIPS (TV_FIRST+25)
2235 #define TVM_SETINSERTMARK (TV_FIRST+26)
2236 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
2237 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
2238 #define TVM_SETBKCOLOR (TV_FIRST+29)
2239 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
2240 #define TVM_GETBKCOLOR (TV_FIRST+31)
2241 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
2242 #define TVM_SETSCROLLTIME (TV_FIRST+33)
2243 #define TVM_GETSCROLLTIME (TV_FIRST+34)
2244 #define TVM_UNKNOWN35 (TV_FIRST+35)
2245 #define TVM_UNKNOWN36 (TV_FIRST+36)
2246 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
2247 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
2248 #define TVM_GETITEMSTATE (TV_FIRST+39)
2249 #define TVM_SETLINECOLOR (TV_FIRST+40)
2250 #define TVM_GETLINECOLOR (TV_FIRST+41)
2251 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2252 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2253 #define TVM_MAPACCIDTOHTREEITEM (TV_FIRST + 42)
2254 #define TVM_MAPHTREEITEMTOACCID (TV_FIRST + 43)
2257 #define TVN_FIRST (0U-400U)
2258 #define TVN_LAST (0U-499U)
2260 #define TVN_SELCHANGINGA (TVN_FIRST-1)
2261 #define TVN_SELCHANGINGW (TVN_FIRST-50)
2262 #define TVN_SELCHANGING WINELIB_NAME_AW(TVN_SELCHANGING)
2264 #define TVN_SELCHANGEDA (TVN_FIRST-2)
2265 #define TVN_SELCHANGEDW (TVN_FIRST-51)
2266 #define TVN_SELCHANGED WINELIB_NAME_AW(TVN_SELCHANGED)
2268 #define TVN_GETDISPINFOA (TVN_FIRST-3)
2269 #define TVN_GETDISPINFOW (TVN_FIRST-52)
2270 #define TVN_GETDISPINFO WINELIB_NAME_AW(TVN_GETDISPINFO)
2272 #define TVN_SETDISPINFOA (TVN_FIRST-4)
2273 #define TVN_SETDISPINFOW (TVN_FIRST-53)
2274 #define TVN_SETDISPINFO WINELIB_NAME_AW(TVN_SETDISPINFO)
2276 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
2277 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
2278 #define TVN_ITEMEXPANDING WINELIB_NAME_AW(TVN_ITEMEXPANDING)
2280 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
2281 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
2282 #define TVN_ITEMEXPANDED WINELIB_NAME_AW(TVN_ITEMEXPANDED)
2284 #define TVN_BEGINDRAGA (TVN_FIRST-7)
2285 #define TVN_BEGINDRAGW (TVN_FIRST-56)
2286 #define TVN_BEGINDRAG WINELIB_NAME_AW(TVN_BEGINDRAG)
2288 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
2289 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
2290 #define TVN_BEGINRDRAG WINELIB_NAME_AW(TVN_BEGINRDRAG)
2292 #define TVN_DELETEITEMA (TVN_FIRST-9)
2293 #define TVN_DELETEITEMW (TVN_FIRST-58)
2294 #define TVN_DELETEITEM WINELIB_NAME_AW(TVN_DELETEITEM)
2296 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
2297 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
2298 #define TVN_BEGINLABELEDIT WINELIB_NAME_AW(TVN_BEGINLABELEDIT)
2300 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
2301 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
2302 #define TVN_ENDLABELEDIT WINELIB_NAME_AW(TVN_ENDLABELEDIT)
2304 #define TVN_KEYDOWN (TVN_FIRST-12)
2306 #define TVN_GETINFOTIPA (TVN_FIRST-13)
2307 #define TVN_GETINFOTIPW (TVN_FIRST-14)
2308 #define TVN_GETINFOTIP WINELIB_NAME_AW(TVN_GETINFOTIP)
2310 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
2316 #define TVIF_TEXT 0x0001
2317 #define TVIF_IMAGE 0x0002
2318 #define TVIF_PARAM 0x0004
2319 #define TVIF_STATE 0x0008
2320 #define TVIF_HANDLE 0x0010
2321 #define TVIF_SELECTEDIMAGE 0x0020
2322 #define TVIF_CHILDREN 0x0040
2323 #define TVIF_INTEGRAL 0x0080
2324 #define TVIF_DI_SETITEM 0x1000
2326 #define TVI_ROOT ((HTREEITEM)0xffff0000) /* -65536 */
2327 #define TVI_FIRST ((HTREEITEM)0xffff0001) /* -65535 */
2328 #define TVI_LAST ((HTREEITEM)0xffff0002) /* -65534 */
2329 #define TVI_SORT ((HTREEITEM)0xffff0003) /* -65533 */
2331 #define TVIS_FOCUSED 0x0001
2332 #define TVIS_SELECTED 0x0002
2333 #define TVIS_CUT 0x0004
2334 #define TVIS_DROPHILITED 0x0008
2335 #define TVIS_BOLD 0x0010
2336 #define TVIS_EXPANDED 0x0020
2337 #define TVIS_EXPANDEDONCE 0x0040
2338 #define TVIS_EXPANDPARTIAL 0x0080
2339 #define TVIS_OVERLAYMASK 0x0f00
2340 #define TVIS_STATEIMAGEMASK 0xf000
2341 #define TVIS_USERMASK 0xf000
2343 #define TVHT_NOWHERE 0x0001
2344 #define TVHT_ONITEMICON 0x0002
2345 #define TVHT_ONITEMLABEL 0x0004
2346 #define TVHT_ONITEMINDENT 0x0008
2347 #define TVHT_ONITEMBUTTON 0x0010
2348 #define TVHT_ONITEMRIGHT 0x0020
2349 #define TVHT_ONITEMSTATEICON 0x0040
2350 #define TVHT_ONITEM 0x0046
2351 #define TVHT_ABOVE 0x0100
2352 #define TVHT_BELOW 0x0200
2353 #define TVHT_TORIGHT 0x0400
2354 #define TVHT_TOLEFT 0x0800
2356 #define TVS_HASBUTTONS 0x0001
2357 #define TVS_HASLINES 0x0002
2358 #define TVS_LINESATROOT 0x0004
2359 #define TVS_EDITLABELS 0x0008
2360 #define TVS_DISABLEDRAGDROP 0x0010
2361 #define TVS_SHOWSELALWAYS 0x0020
2362 #define TVS_RTLREADING 0x0040
2363 #define TVS_NOTOOLTIPS 0x0080
2364 #define TVS_CHECKBOXES 0x0100
2365 #define TVS_TRACKSELECT 0x0200
2366 #define TVS_SINGLEEXPAND 0x0400
2367 #define TVS_INFOTIP 0x0800
2368 #define TVS_FULLROWSELECT 0x1000
2369 #define TVS_NOSCROLL 0x2000
2370 #define TVS_NONEVENHEIGHT 0x4000
2371 #define TVS_NOHSCROLL 0x8000
2373 #define TVS_SHAREDIMAGELISTS 0x0000
2374 #define TVS_PRIVATEIMAGELISTS 0x0400
2377 #define TVE_COLLAPSE 0x0001
2378 #define TVE_EXPAND 0x0002
2379 #define TVE_TOGGLE 0x0003
2380 #define TVE_EXPANDPARTIAL 0x4000
2381 #define TVE_COLLAPSERESET 0x8000
2385 #define TVGN_PREVIOUS 2
2386 #define TVGN_PARENT 3
2387 #define TVGN_CHILD 4
2388 #define TVGN_FIRSTVISIBLE 5
2389 #define TVGN_NEXTVISIBLE 6
2390 #define TVGN_PREVIOUSVISIBLE 7
2391 #define TVGN_DROPHILITE 8
2392 #define TVGN_CARET 9
2393 #define TVGN_LASTVISIBLE 10
2394 #define TVSI_NOSINGLEEXPAND 0x8000
2396 #define TVC_UNKNOWN 0x00
2397 #define TVC_BYMOUSE 0x01
2398 #define TVC_BYKEYBOARD 0x02
2401 typedef struct _TREEITEM
*HTREEITEM
;
2414 } TVITEMA
, *LPTVITEMA
;
2427 } TVITEMW
, *LPTVITEMW
;
2429 #define TV_ITEMA TVITEMA
2430 #define TV_ITEMW TVITEMW
2431 #define LPTV_ITEMA LPTVITEMA
2432 #define LPTV_ITEMW LPTVITEMW
2434 #define TVITEM WINELIB_NAME_AW(TVITEM)
2435 #define LPTVITEM WINELIB_NAME_AW(LPTVITEM)
2436 #define TV_ITEM WINELIB_NAME_AW(TV_ITEM)
2437 #define LPTV_ITEM WINELIB_NAME_AW(LPTV_ITEM)
2451 } TVITEMEXA
, *LPTVITEMEXA
;
2465 } TVITEMEXW
, *LPTVITEMEXW
;
2467 #define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
2468 #define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
2470 typedef struct tagTVINSERTSTRUCTA
{
2472 HTREEITEM hInsertAfter
;
2477 } TVINSERTSTRUCTA
, *LPTVINSERTSTRUCTA
;
2479 typedef struct tagTVINSERTSTRUCTW
{
2481 HTREEITEM hInsertAfter
;
2486 } TVINSERTSTRUCTW
, *LPTVINSERTSTRUCTW
;
2488 #define TVINSERTSTRUCT WINELIB_NAME_AW(TVINSERTSTRUCT)
2489 #define LPTVINSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
2491 #define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
2492 #define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
2493 #define TVINSERTSTRUCT_V1_SIZE WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)
2495 #define TV_INSERTSTRUCT TVINSERTSTRUCT
2496 #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
2497 #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
2498 #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
2499 #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
2500 #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
2504 typedef struct tagNMTREEVIEWA
{
2510 } NMTREEVIEWA
, *LPNMTREEVIEWA
;
2512 typedef struct tagNMTREEVIEWW
{
2518 } NMTREEVIEWW
, *LPNMTREEVIEWW
;
2520 #define NMTREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2521 #define NM_TREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2522 #define NM_TREEVIEWA NMTREEVIEWA
2523 #define NM_TREEVIEWW NMTREEVIEWW
2524 #define LPNMTREEVIEW WINELIB_NAME_AW(LPNMTREEVIEW)
2526 #define LPNM_TREEVIEW LPNMTREEVIEW
2527 #define LPNM_TREEVIEWA LPNMTREEVIEWA
2528 #define LPNM_TREEVIEWW LPNMTREEVIEWW
2530 typedef struct tagTVDISPINFOA
{
2533 } NMTVDISPINFOA
, *LPNMTVDISPINFOA
;
2535 typedef struct tagTVDISPINFOW
{
2538 } NMTVDISPINFOW
, *LPNMTVDISPINFOW
;
2540 #define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
2541 #define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
2542 #define TV_DISPINFO NMTVDISPINFO
2544 typedef INT (CALLBACK
*PFNTVCOMPARE
)(LPARAM
, LPARAM
, LPARAM
);
2546 typedef struct tagTVSORTCB
2549 PFNTVCOMPARE lpfnCompare
;
2551 } TVSORTCB
, *LPTVSORTCB
;
2553 #define TV_SORTCB TVSORTCB
2554 #define LPTV_SORTCB LPTVSORTCB
2556 typedef struct tagTVHITTESTINFO
{
2560 } TVHITTESTINFO
, *LPTVHITTESTINFO
;
2562 #define TV_HITTESTINFO TVHITTESTINFO
2565 /* Custom Draw Treeview */
2567 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
2569 #define TVCDRF_NOIMAGES 0x00010000
2571 typedef struct tagNMTVCUSTOMDRAW
2576 INT iLevel
; /* IE>0x0400 */
2577 } NMTVCUSTOMDRAW
, *LPNMTVCUSTOMDRAW
;
2579 /* Treeview tooltips */
2581 typedef struct tagNMTVGETINFOTIPA
2588 } NMTVGETINFOTIPA
, *LPNMTVGETINFOTIPA
;
2590 typedef struct tagNMTVGETINFOTIPW
2597 } NMTVGETINFOTIPW
, *LPNMTVGETINFOTIPW
;
2599 #define NMTVGETINFOTIP WINELIB_NAME_AW(NMTVGETINFOTIP)
2600 #define LPNMTVGETINFOTIP WINELIB_NAME_AW(LPNMTVGETINFOTIP)
2602 #include <pshpack1.h>
2603 typedef struct tagTVKEYDOWN
2608 } NMTVKEYDOWN
, *LPNMTVKEYDOWN
;
2609 #include <poppack.h>
2611 #define TV_KEYDOWN NMTVKEYDOWN
2613 #define TreeView_InsertItemA(hwnd, phdi) \
2614 (HTREEITEM)SNDMSGA((hwnd), TVM_INSERTITEMA, 0, \
2615 (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
2616 #define TreeView_InsertItemW(hwnd,phdi) \
2617 (HTREEITEM)SNDMSGW((hwnd), TVM_INSERTITEMW, 0, \
2618 (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
2619 #define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem)
2621 #define TreeView_DeleteItem(hwnd, hItem) \
2622 (BOOL)SNDMSGA((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
2623 #define TreeView_DeleteAllItems(hwnd) \
2624 (BOOL)SNDMSGA((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
2625 #define TreeView_Expand(hwnd, hitem, code) \
2626 (BOOL)SNDMSGA((hwnd), TVM_EXPAND, (WPARAM)code, \
2627 (LPARAM)(HTREEITEM)(hitem))
2629 #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
2630 (*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSGA((hwnd), \
2631 TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
2633 #define TreeView_GetCount(hwnd) \
2634 (UINT)SNDMSGA((hwnd), TVM_GETCOUNT, 0, 0)
2635 #define TreeView_GetIndent(hwnd) \
2636 (UINT)SNDMSGA((hwnd), TVM_GETINDENT, 0, 0)
2637 #define TreeView_SetIndent(hwnd, indent) \
2638 (BOOL)SNDMSGA((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
2640 #define TreeView_GetImageList(hwnd, iImage) \
2641 (HIMAGELIST)SNDMSGA((hwnd), TVM_GETIMAGELIST, iImage, 0)
2643 #define TreeView_SetImageList(hwnd, himl, iImage) \
2644 (HIMAGELIST)SNDMSGA((hwnd), TVM_SETIMAGELIST, iImage, \
2645 (LPARAM)(UINT)(HIMAGELIST)(himl))
2647 #define TreeView_GetNextItem(hwnd, hitem, code) \
2648 (HTREEITEM)SNDMSGA((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
2649 (LPARAM)(HTREEITEM) (hitem))
2651 #define TreeView_GetChild(hwnd, hitem) \
2652 TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
2653 #define TreeView_GetNextSibling(hwnd, hitem) \
2654 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
2655 #define TreeView_GetPrevSibling(hwnd, hitem) \
2656 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
2657 #define TreeView_GetParent(hwnd, hitem) \
2658 TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
2659 #define TreeView_GetFirstVisible(hwnd) \
2660 TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
2661 #define TreeView_GetLastVisible(hwnd) \
2662 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2663 #define TreeView_GetNextVisible(hwnd, hitem) \
2664 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
2665 #define TreeView_GetPrevVisible(hwnd, hitem) \
2666 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
2667 #define TreeView_GetSelection(hwnd) \
2668 TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
2669 #define TreeView_GetDropHilight(hwnd) \
2670 TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
2671 #define TreeView_GetRoot(hwnd) \
2672 TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
2673 #define TreeView_GetLastVisible(hwnd) \
2674 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2677 #define TreeView_Select(hwnd, hitem, code) \
2678 (UINT)SNDMSGA((hwnd), TVM_SELECTITEM, (WPARAM)code, \
2679 (LPARAM)(UINT)(hitem))
2682 #define TreeView_SelectItem(hwnd, hitem) \
2683 TreeView_Select(hwnd, hitem, TVGN_CARET)
2684 #define TreeView_SelectDropTarget(hwnd, hitem) \
2685 TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
2686 #define TreeView_SelectSetFirstVisible(hwnd, hitem) \
2687 TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
2690 #define TreeView_GetItemA(hwnd, pitem) \
2691 (BOOL)SNDMSGA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2692 #define TreeView_GetItemW(hwnd, pitem) \
2693 (BOOL)SNDMSGW((hwnd), TVM_GETITEMW, 0, (LPARAM) (TVITEMW *)(pitem))
2694 #define TreeView_GetItem WINELIB_NAME_AW(TreeView_GetItem)
2696 #define TreeView_SetItemA(hwnd, pitem) \
2697 (BOOL)SNDMSGA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2698 #define TreeView_SetItemW(hwnd, pitem) \
2699 (BOOL)SNDMSGW((hwnd), TVM_SETITEMW, 0, (LPARAM)(const TVITEMW *)(pitem))
2700 #define TreeView_SetItem WINELIB_NAME_AW(TreeView_SetItem)
2702 #define TreeView_EditLabel(hwnd, hitem) \
2703 (HWND)SNDMSGA((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
2705 #define TreeView_GetEditControl(hwnd) \
2706 (HWND)SNDMSGA((hwnd), TVM_GETEDITCONTROL, 0, 0)
2708 #define TreeView_GetVisibleCount(hwnd) \
2709 (UINT)SNDMSGA((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
2711 #define TreeView_HitTest(hwnd, lpht) \
2712 (HTREEITEM)SNDMSGA((hwnd), TVM_HITTEST, 0,\
2713 (LPARAM)(LPTVHITTESTINFO)(lpht))
2715 #define TreeView_CreateDragImage(hwnd, hitem) \
2716 (HIMAGELIST)SNDMSGA((hwnd), TVM_CREATEDRAGIMAGE, 0,\
2717 (LPARAM)(HTREEITEM)(hitem))
2719 #define TreeView_SortChildren(hwnd, hitem, recurse) \
2720 (BOOL)SNDMSGA((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
2721 (LPARAM)(HTREEITEM)(hitem))
2723 #define TreeView_EnsureVisible(hwnd, hitem) \
2724 (BOOL)SNDMSGA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
2726 #define TreeView_SortChildrenCB(hwnd, psort, recurse) \
2727 (BOOL)SNDMSGA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
2728 (LPARAM)(LPTV_SORTCB)(psort))
2730 #define TreeView_EndEditLabelNow(hwnd, fCancel) \
2731 (BOOL)SNDMSGA((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
2733 #define TreeView_GetISearchString(hwnd, lpsz) \
2734 (BOOL)SNDMSGA((hwnd), TVM_GETISEARCHSTRING, 0, \
2735 (LPARAM)(LPTSTR)lpsz)
2737 #define TreeView_SetToolTips(hwnd, hwndTT) \
2738 (HWND)SNDMSGA((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
2740 #define TreeView_GetToolTips(hwnd) \
2741 (HWND)SNDMSGA((hwnd), TVM_GETTOOLTIPS, 0, 0)
2743 #define TreeView_SetItemHeight(hwnd, iHeight) \
2744 (INT)SNDMSGA((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
2746 #define TreeView_GetItemHeight(hwnd) \
2747 (INT)SNDMSGA((hwnd), TVM_GETITEMHEIGHT, 0, 0)
2749 #define TreeView_SetBkColor(hwnd, clr) \
2750 (COLORREF)SNDMSGA((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
2752 #define TreeView_SetTextColor(hwnd, clr) \
2753 (COLORREF)SNDMSGA((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
2755 #define TreeView_GetBkColor(hwnd) \
2756 (COLORREF)SNDMSGA((hwnd), TVM_GETBKCOLOR, 0, 0)
2758 #define TreeView_GetTextColor(hwnd) \
2759 (COLORREF)SNDMSGA((hwnd), TVM_GETTEXTCOLOR, 0, 0)
2761 #define TreeView_SetScrollTime(hwnd, uTime) \
2762 (UINT)SNDMSGA((hwnd), TVM_SETSCROLLTIME, uTime, 0)
2764 #define TreeView_GetScrollTime(hwnd) \
2765 (UINT)SNDMSGA((hwnd), TVM_GETSCROLLTIME, 0, 0)
2767 #define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
2768 (BOOL)SNDMSGA((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
2771 #define TreeView_SetInsertMarkColor(hwnd, clr) \
2772 (COLORREF)SNDMSGA((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
2774 #define TreeView_GetInsertMarkColor(hwnd) \
2775 (COLORREF)SNDMSGA((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
2777 #define TreeView_SetItemState(hwndTV, hti, data, _mask) \
2779 _TVi.mask = TVIF_STATE; \
2781 _TVi.stateMask = _mask; \
2782 _TVi.state = data; \
2783 SNDMSG((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_TVi); \
2786 #define TreeView_GetItemState(hwndTV, hti, mask) \
2787 (UINT)SNDMSGA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
2788 #define TreeView_GetCheckState(hwndTV, hti) \
2789 ((((UINT)(SNDMSGA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
2790 TVIS_STATEIMAGEMASK))) >> 12) -1)
2792 #define TreeView_SetLineColor(hwnd, clr) \
2793 (COLORREF)SNDMSGA((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
2795 #define TreeView_GetLineColor(hwnd) \
2796 (COLORREF)SNDMSGA((hwnd), TVM_GETLINECOLOR, 0, 0)
2798 #define TreeView_MapAccIDToHTREEITEM(hwnd, id) \
2799 (HTREEITEM)SNDMSG((hwnd), TVM_MAPACCIDTOHTREEITEM, id, 0)
2801 #define TreeView_MapHTREEITEMToAccID(hwnd, htreeitem) \
2802 (UINT)SNDMSG((hwnd), TVM_MAPHTREEITEMTOACCID, (WPARAM)htreeitem, 0)
2805 /* Listview control */
2807 #define WC_LISTVIEWA "SysListView32"
2808 #if defined(__GNUC__)
2809 # define WC_LISTVIEWW (const WCHAR []){ 'S','y','s', \
2810 'L','i','s','t','V','i','e','w','3','2',0 }
2811 #elif defined(_MSC_VER)
2812 # define WC_LISTVIEWW L"SysListView32"
2814 static const WCHAR WC_LISTVIEWW
[] = { 'S','y','s',
2815 'L','i','s','t','V','i','e','w','3','2',0 };
2817 #define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
2819 #define LVSCW_AUTOSIZE -1
2820 #define LVSCW_AUTOSIZE_USEHEADER -2
2822 #define LVS_ICON 0x0000
2823 #define LVS_REPORT 0x0001
2824 #define LVS_SMALLICON 0x0002
2825 #define LVS_LIST 0x0003
2826 #define LVS_TYPEMASK 0x0003
2827 #define LVS_SINGLESEL 0x0004
2828 #define LVS_SHOWSELALWAYS 0x0008
2829 #define LVS_SORTASCENDING 0x0010
2830 #define LVS_SORTDESCENDING 0x0020
2831 #define LVS_SHAREIMAGELISTS 0x0040
2832 #define LVS_NOLABELWRAP 0x0080
2833 #define LVS_AUTOARRANGE 0x0100
2834 #define LVS_EDITLABELS 0x0200
2835 #define LVS_OWNERDATA 0x1000
2836 #define LVS_NOSCROLL 0x2000
2837 #define LVS_TYPESTYLEMASK 0xfc00
2838 #define LVS_ALIGNTOP 0x0000
2839 #define LVS_ALIGNLEFT 0x0800
2840 #define LVS_ALIGNMASK 0x0c00
2841 #define LVS_OWNERDRAWFIXED 0x0400
2842 #define LVS_NOCOLUMNHEADER 0x4000
2843 #define LVS_NOSORTHEADER 0x8000
2845 #define LVS_EX_GRIDLINES 0x0001
2846 #define LVS_EX_SUBITEMIMAGES 0x0002
2847 #define LVS_EX_CHECKBOXES 0x0004
2848 #define LVS_EX_TRACKSELECT 0x0008
2849 #define LVS_EX_HEADERDRAGDROP 0x0010
2850 #define LVS_EX_FULLROWSELECT 0x0020
2851 #define LVS_EX_ONECLICKACTIVATE 0x0040
2852 #define LVS_EX_TWOCLICKACTIVATE 0x0080
2853 #define LVS_EX_FLATSB 0x0100
2854 #define LVS_EX_REGIONAL 0x0200
2855 #define LVS_EX_INFOTIP 0x0400
2856 #define LVS_EX_UNDERLINEHOT 0x0800
2857 #define LVS_EX_UNDERLINECOLD 0x1000
2858 #define LVS_EX_MULTIWORKAREAS 0x2000
2859 #define LVS_EX_LABELTIP 0x4000
2860 #define LVS_EX_BORDERSELECT 0x8000
2861 #define LVS_EX_DOUBLEBUFFER 0x00010000
2862 #define LVS_EX_HIDELABELS 0x00020000
2863 #define LVS_EX_SINGLEROW 0x00040000
2864 #define LVS_EX_SNAPTOGRID 0x00080000
2865 #define LVS_EX_SIMPLESELECT 0x00100000
2867 #define LVCF_FMT 0x0001
2868 #define LVCF_WIDTH 0x0002
2869 #define LVCF_TEXT 0x0004
2870 #define LVCF_SUBITEM 0x0008
2871 #define LVCF_IMAGE 0x0010
2872 #define LVCF_ORDER 0x0020
2874 #define LVCFMT_LEFT 0x0000
2875 #define LVCFMT_RIGHT 0x0001
2876 #define LVCFMT_CENTER 0x0002
2877 #define LVCFMT_JUSTIFYMASK 0x0003
2878 #define LVCFMT_IMAGE 0x0800
2879 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2880 #define LVCFMT_COL_HAS_IMAGES 0x8000
2882 #define LVSIL_NORMAL 0
2883 #define LVSIL_SMALL 1
2884 #define LVSIL_STATE 2
2886 /* following 2 flags only for LVS_OWNERDATA listviews */
2887 /* and only in report or list mode */
2888 #define LVSICF_NOINVALIDATEALL 0x0001
2889 #define LVSICF_NOSCROLL 0x0002
2892 #define LVFI_PARAM 0X0001
2893 #define LVFI_STRING 0X0002
2894 #define LVFI_PARTIAL 0X0008
2895 #define LVFI_WRAP 0X0020
2896 #define LVFI_NEARESTXY 0X0040
2898 #define LVIF_TEXT 0x0001
2899 #define LVIF_IMAGE 0x0002
2900 #define LVIF_PARAM 0x0004
2901 #define LVIF_STATE 0x0008
2902 #define LVIF_INDENT 0x0010
2903 #define LVIF_GROUPID 0x0100
2904 #define LVIF_COLUMNS 0x0200
2905 #define LVIF_NORECOMPUTE 0x0800
2906 #define LVIF_DI_SETITEM 0x1000
2908 #define LVIR_BOUNDS 0x0000
2909 #define LVIR_ICON 0x0001
2910 #define LVIR_LABEL 0x0002
2911 #define LVIR_SELECTBOUNDS 0x0003
2913 #define LVIS_FOCUSED 0x0001
2914 #define LVIS_SELECTED 0x0002
2915 #define LVIS_CUT 0x0004
2916 #define LVIS_DROPHILITED 0x0008
2917 #define LVIS_ACTIVATING 0x0020
2919 #define LVIS_OVERLAYMASK 0x0F00
2920 #define LVIS_STATEIMAGEMASK 0xF000
2922 #define LVNI_ALL 0x0000
2923 #define LVNI_FOCUSED 0x0001
2924 #define LVNI_SELECTED 0x0002
2925 #define LVNI_CUT 0x0004
2926 #define LVNI_DROPHILITED 0x0008
2928 #define LVNI_ABOVE 0x0100
2929 #define LVNI_BELOW 0x0200
2930 #define LVNI_TOLEFT 0x0400
2931 #define LVNI_TORIGHT 0x0800
2933 #define LVHT_NOWHERE 0x0001
2934 #define LVHT_ONITEMICON 0x0002
2935 #define LVHT_ONITEMLABEL 0x0004
2936 #define LVHT_ONITEMSTATEICON 0x0008
2937 #define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
2939 #define LVHT_ABOVE 0x0008
2940 #define LVHT_BELOW 0x0010
2941 #define LVHT_TORIGHT 0x0020
2942 #define LVHT_TOLEFT 0x0040
2944 #define LV_VIEW_ICON 0x0000
2945 #define LV_VIEW_DETAILS 0x0001
2946 #define LV_VIEW_SMALLICON 0x0002
2947 #define LV_VIEW_LIST 0x0003
2948 #define LV_VIEW_TILE 0x0004
2949 #define LV_VIEW_MAX 0x0004
2951 #define LVGF_NONE 0x00000000
2952 #define LVGF_HEADER 0x00000001
2953 #define LVGF_FOOTER 0x00000002
2954 #define LVGF_STATE 0x00000004
2955 #define LVGF_ALIGN 0x00000008
2956 #define LVGF_GROUPID 0x00000010
2958 #define LVGS_NORMAL 0x00000000
2959 #define LVGS_COLLAPSED 0x00000001
2960 #define LVGS_HIDDEN 0x00000002
2962 #define LVGA_HEADER_LEFT 0x00000001
2963 #define LVGA_HEADER_CENTER 0x00000002
2964 #define LVGA_HEADER_RIGHT 0x00000004
2965 #define LVGA_FOOTER_LEFT 0x00000008
2966 #define LVGA_FOOTER_CENTER 0x00000010
2967 #define LVGA_FOOTER_RIGHT 0x00000020
2969 #define LVGMF_NONE 0x00000000
2970 #define LVGMF_BORDERSIZE 0x00000001
2971 #define LVGMF_BORDERCOLOR 0x00000002
2972 #define LVGMF_TEXTCOLOR 0x00000004
2974 #define LVTVIF_AUTOSIZE 0x00000000
2975 #define LVTVIF_FIXEDWIDTH 0x00000001
2976 #define LVTVIF_FIXEDHEIGHT 0x00000002
2977 #define LVTVIF_FIXEDSIZE 0x00000003
2979 #define LVTVIM_TILESIZE 0x00000001
2980 #define LVTVIM_COLUMNS 0x00000002
2981 #define LVTVIM_LABELMARGIN 0x00000004
2983 #define LVIM_AFTER 0x00000001
2985 #define LVM_FIRST 0x1000
2986 #define LVM_GETBKCOLOR (LVM_FIRST+0)
2987 #define LVM_SETBKCOLOR (LVM_FIRST+1)
2988 #define LVM_GETIMAGELIST (LVM_FIRST+2)
2989 #define LVM_SETIMAGELIST (LVM_FIRST+3)
2990 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
2991 #define LVM_GETITEMA (LVM_FIRST+5)
2992 #define LVM_GETITEMW (LVM_FIRST+75)
2993 #define LVM_GETITEM WINELIB_NAME_AW(LVM_GETITEM)
2994 #define LVM_SETITEMA (LVM_FIRST+6)
2995 #define LVM_SETITEMW (LVM_FIRST+76)
2996 #define LVM_SETITEM WINELIB_NAME_AW(LVM_SETITEM)
2997 #define LVM_INSERTITEMA (LVM_FIRST+7)
2998 #define LVM_INSERTITEMW (LVM_FIRST+77)
2999 #define LVM_INSERTITEM WINELIB_NAME_AW(LVM_INSERTITEM)
3000 #define LVM_DELETEITEM (LVM_FIRST+8)
3001 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
3002 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
3003 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
3004 #define LVM_GETNEXTITEM (LVM_FIRST+12)
3005 #define LVM_FINDITEMA (LVM_FIRST+13)
3006 #define LVM_FINDITEMW (LVM_FIRST+83)
3007 #define LVM_FINDITEM WINELIB_NAME_AW(LVM_FINDITEM)
3008 #define LVM_GETITEMRECT (LVM_FIRST+14)
3009 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
3010 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
3011 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
3012 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
3013 #define LVM_GETSTRINGWIDTH WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
3014 #define LVM_HITTEST (LVM_FIRST+18)
3015 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
3016 #define LVM_SCROLL (LVM_FIRST+20)
3017 #define LVM_REDRAWITEMS (LVM_FIRST+21)
3018 #define LVM_ARRANGE (LVM_FIRST+22)
3019 #define LVM_EDITLABELA (LVM_FIRST+23)
3020 #define LVM_EDITLABELW (LVM_FIRST+118)
3021 #define LVM_EDITLABEL WINELIB_NAME_AW(LVM_EDITLABEL)
3022 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
3023 #define LVM_GETCOLUMNA (LVM_FIRST+25)
3024 #define LVM_GETCOLUMNW (LVM_FIRST+95)
3025 #define LVM_GETCOLUMN WINELIB_NAME_AW(LVM_GETCOLUMN)
3026 #define LVM_SETCOLUMNA (LVM_FIRST+26)
3027 #define LVM_SETCOLUMNW (LVM_FIRST+96)
3028 #define LVM_SETCOLUMN WINELIB_NAME_AW(LVM_SETCOLUMN)
3029 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
3030 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
3031 #define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
3032 #define LVM_DELETECOLUMN (LVM_FIRST+28)
3033 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
3034 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
3035 #define LVM_GETHEADER (LVM_FIRST+31)
3037 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
3038 #define LVM_GETVIEWRECT (LVM_FIRST+34)
3039 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
3040 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
3041 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
3042 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
3043 #define LVM_GETTOPINDEX (LVM_FIRST+39)
3044 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
3045 #define LVM_GETORIGIN (LVM_FIRST+41)
3046 #define LVM_UPDATE (LVM_FIRST+42)
3047 #define LVM_SETITEMSTATE (LVM_FIRST+43)
3048 #define LVM_GETITEMSTATE (LVM_FIRST+44)
3049 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
3050 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
3051 #define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
3052 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
3053 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
3054 #define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
3055 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
3056 #define LVM_SORTITEMS (LVM_FIRST+48)
3057 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
3058 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
3059 #define LVM_GETITEMSPACING (LVM_FIRST+51)
3060 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
3061 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
3062 #define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
3063 #define LVM_SETICONSPACING (LVM_FIRST+53)
3064 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
3065 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
3066 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
3067 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
3068 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
3069 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
3070 #define LVM_SETHOTITEM (LVM_FIRST+60)
3071 #define LVM_GETHOTITEM (LVM_FIRST+61)
3072 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
3073 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
3074 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
3075 #define LVM_SETWORKAREAS (LVM_FIRST+65)
3076 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
3077 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
3078 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
3079 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
3080 #define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
3081 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
3082 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
3083 #define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
3084 #define LVM_GETWORKAREAS (LVM_FIRST+70)
3085 #define LVM_SETHOVERTIME (LVM_FIRST+71)
3086 #define LVM_GETHOVERTIME (LVM_FIRST+72)
3087 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
3088 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
3089 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
3090 #define LVM_GETUNICODEFORMAT (CCM_GETUNICODEFORMAT)
3091 #define LVM_SETUNICODEFORMAT (CCM_SETUNICODEFORMAT)
3092 #define LVM_SETSELECTEDCOLUMN (LVM_FIRST + 140)
3093 #define LVM_SETTILEWIDTH (LVM_FIRST + 141)
3094 #define LVM_SETVIEW (LVM_FIRST + 142)
3095 #define LVM_GETVIEW (LVM_FIRST + 143)
3096 #define LVM_INSERTGROUP (LVM_FIRST + 145)
3097 #define LVM_SETGROUPINFO (LVM_FIRST + 147)
3098 #define LVM_GETGROUPINFO (LVM_FIRST + 149)
3099 #define LVM_REMOVEGROUP (LVM_FIRST + 150)
3100 #define LVM_MOVEGROUP (LVM_FIRST + 151)
3101 #define LVM_MOVEITEMTOGROUP (LVM_FIRST + 154)
3102 #define LVM_SETGROUPMETRICS (LVM_FIRST + 155)
3103 #define LVM_GETGROUPMETRICS (LVM_FIRST + 156)
3104 #define LVM_ENABLEGROUPVIEW (LVM_FIRST + 157)
3105 #define LVM_SORTGROUPS (LVM_FIRST + 158)
3106 #define LVM_INSERTGROUPSORTED (LVM_FIRST + 159)
3107 #define LVM_REMOVEALLGROUPS (LVM_FIRST + 160)
3108 #define LVM_HASGROUP (LVM_FIRST + 161)
3109 #define LVM_SETTILEVIEWINFO (LVM_FIRST + 162)
3110 #define LVM_GETTILEVIEWINFO (LVM_FIRST + 163)
3111 #define LVM_SETTILEINFO (LVM_FIRST + 164)
3112 #define LVM_GETTILEINFO (LVM_FIRST + 165)
3113 #define LVM_SETINSERTMARK (LVM_FIRST + 166)
3114 #define LVM_GETINSERTMARK (LVM_FIRST + 167)
3115 #define LVM_INSERTMARKHITTEST (LVM_FIRST + 168)
3116 #define LVM_GETINSERTMARKRECT (LVM_FIRST + 169)
3117 #define LVM_SETINSERTMARKCOLOR (LVM_FIRST + 170)
3118 #define LVM_GETINSERTMARKCOLOR (LVM_FIRST + 171)
3119 #define LVM_SETINFOTIP (LVM_FIRST + 173)
3120 #define LVM_GETSELECTEDCOLUMN (LVM_FIRST + 174)
3121 #define LVM_ISGROUPVIEWENABLED (LVM_FIRST + 175)
3122 #define LVM_GETOUTLINECOLOR (LVM_FIRST + 176)
3123 #define LVM_SETOUTLINECOLOR (LVM_FIRST + 177)
3124 #define LVM_CANCELEDITLABEL (LVM_FIRST + 179)
3125 #define LVM_MAPINDEXTOID (LVM_FIRST + 180)
3126 #define LVM_MAPIDTOINDEX (LVM_FIRST + 181)
3128 #define LVN_FIRST (0U-100U)
3129 #define LVN_LAST (0U-199U)
3130 #define LVN_ITEMCHANGING (LVN_FIRST-0)
3131 #define LVN_ITEMCHANGED (LVN_FIRST-1)
3132 #define LVN_INSERTITEM (LVN_FIRST-2)
3133 #define LVN_DELETEITEM (LVN_FIRST-3)
3134 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
3135 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
3136 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
3137 #define LVN_BEGINLABELEDIT WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
3138 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
3139 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
3140 #define LVN_ENDLABELEDIT WINELIB_NAME_AW(LVN_ENDLABELEDIT)
3141 #define LVN_COLUMNCLICK (LVN_FIRST-8)
3142 #define LVN_BEGINDRAG (LVN_FIRST-9)
3143 #define LVN_BEGINRDRAG (LVN_FIRST-11)
3144 #define LVN_ODCACHEHINT (LVN_FIRST-13)
3145 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
3146 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
3147 #define LVN_HOTTRACK (LVN_FIRST-21)
3148 #define LVN_ODFINDITEMA (LVN_FIRST-52)
3149 #define LVN_ODFINDITEMW (LVN_FIRST-79)
3150 #define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
3151 #define LVN_GETDISPINFOA (LVN_FIRST-50)
3152 #define LVN_GETDISPINFOW (LVN_FIRST-77)
3153 #define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
3154 #define LVN_SETDISPINFOA (LVN_FIRST-51)
3155 #define LVN_SETDISPINFOW (LVN_FIRST-78)
3156 #define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
3157 #define LVN_KEYDOWN (LVN_FIRST-55)
3158 #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
3159 #define LVN_GETINFOTIPA (LVN_FIRST-57)
3160 #define LVN_GETINFOTIPW (LVN_FIRST-58)
3161 #define LVN_GETINFOTIP WINELIB_NAME_AW(LVN_GETINFOTIP)
3163 #define LVA_DEFAULT 0x0000
3164 #define LVA_ALIGNLEFT 0x0001
3165 #define LVA_ALIGNTOP 0x0002
3166 #define LVA_SNAPTOGRID 0x0005
3168 typedef struct tagLVITEMA
3179 INT iIndent
; /* (_WIN32_IE >= 0x0300) */
3180 int iGroupId
; /* (_WIN32_IE >= 0x560) */
3181 UINT cColumns
; /* (_WIN32_IE >= 0x560) */
3182 PUINT puColumns
; /* (_WIN32_IE >= 0x560) */
3183 } LVITEMA
, *LPLVITEMA
;
3185 typedef struct tagLVITEMW
3196 INT iIndent
; /* (_WIN32_IE >= 0x0300) */
3197 int iGroupId
; /* (_WIN32_IE >= 0x560) */
3198 UINT cColumns
; /* (_WIN32_IE >= 0x560) */
3199 PUINT puColumns
; /* (_WIN32_IE >= 0x560) */
3200 } LVITEMW
, *LPLVITEMW
;
3202 #define LVITEM WINELIB_NAME_AW(LVITEM)
3203 #define LPLVITEM WINELIB_NAME_AW(LPLVITEM)
3205 #define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
3206 #define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
3207 #define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
3209 #define LV_ITEM LVITEM
3210 #define LV_ITEMA LVITEMA
3211 #define LV_ITEMW LVITEMW
3213 typedef struct LVSETINFOTIPA
3220 } LVSETINFOTIPA
, *PLVSETINFOTIPA
;
3222 typedef struct LVSETINFOTIPW
3229 } LVSETINFOTIPW
, *PLVSETINFOTIPW
;
3231 #define LVSETINFOTIP WINELIB_NAME_AW(LVSETINFOTIP)
3232 #define PLVSETINFOTIP WINELIB_NAME_AW(PLVSETINFOTIP)
3234 /* ListView background image structs and constants
3235 For _WIN32_IE version 0x400 and later. */
3237 typedef struct tagLVBKIMAGEA
3245 } LVBKIMAGEA
, *LPLVBKIMAGEA
;
3247 typedef struct tagLVBKIMAGEW
3255 } LVBKIMAGEW
, *LPLVBKIMAGEW
;
3257 #define LVBKIMAGE WINELIB_NAME_AW(LVBKIMAGE)
3258 #define LPLVBKIMAGE WINELIB_NAME_AW(LPLVBKIMAGE)
3260 #define LVBKIF_SOURCE_NONE 0x00000000
3261 #define LVBKIF_SOURCE_HBITMAP 0x00000001
3262 #define LVBKIF_SOURCE_URL 0x00000002
3263 #define LVBKIF_SOURCE_MASK 0x00000003
3264 #define LVBKIF_STYLE_NORMAL 0x00000000
3265 #define LVBKIF_STYLE_TILE 0x00000010
3266 #define LVBKIF_STYLE_MASK 0x00000010
3267 #define LVBKIF_FLAG_TILEOFFSET 0x00000100
3268 #define LVBKIF_TYPE_WATERMARK 0x10000000
3270 #define ListView_SetBkImage(hwnd, plvbki) \
3271 (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)plvbki)
3273 #define ListView_GetBkImage(hwnd, plvbki) \
3274 (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)plvbki)
3276 typedef struct tagLVCOLUMNA
3284 INT iImage
; /* (_WIN32_IE >= 0x0300) */
3285 INT iOrder
; /* (_WIN32_IE >= 0x0300) */
3286 } LVCOLUMNA
, *LPLVCOLUMNA
;
3288 typedef struct tagLVCOLUMNW
3296 INT iImage
; /* (_WIN32_IE >= 0x0300) */
3297 INT iOrder
; /* (_WIN32_IE >= 0x0300) */
3298 } LVCOLUMNW
, *LPLVCOLUMNW
;
3300 #define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
3301 #define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)
3303 #define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
3304 #define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
3305 #define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)
3307 #define LV_COLUMN LVCOLUMN
3310 typedef struct tagNMLISTVIEW
3320 } NMLISTVIEW
, *LPNMLISTVIEW
;
3322 #define NM_LISTVIEW NMLISTVIEW
3323 #define LPNM_LISTVIEW LPNMLISTVIEW
3325 typedef struct tagNMITEMACTIVATE
3336 } NMITEMACTIVATE
, *LPNMITEMACTIVATE
;
3338 #define LVKF_ALT 0x0001
3339 #define LVKF_CONTROL 0x0002
3340 #define LVKF_SHIFT 0x0004
3342 typedef struct tagLVDISPINFO
3346 } NMLVDISPINFOA
, *LPNMLVDISPINFOA
;
3348 typedef struct tagLVDISPINFOW
3352 } NMLVDISPINFOW
, *LPNMLVDISPINFOW
;
3354 #define NMLVDISPINFO WINELIB_NAME_AW(NMLVDISPINFO)
3355 #define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
3357 #define LV_DISPINFO NMLVDISPINFO
3358 #define LV_DISPINFOA NMLVDISPINFOA
3359 #define LV_DISPINFOW NMLVDISPINFOW
3361 #include <pshpack1.h>
3362 typedef struct tagLVKEYDOWN
3367 } NMLVKEYDOWN
, *LPNMLVKEYDOWN
;
3368 #include <poppack.h>
3370 #define LV_KEYDOWN NMLVKEYDOWN
3372 typedef struct tagNMLVGETINFOTIPA
3381 } NMLVGETINFOTIPA
, *LPNMLVGETINFOTIPA
;
3383 typedef struct tagNMLVGETINFOTIPW
3392 } NMLVGETINFOTIPW
, *LPNMLVGETINFOTIPW
;
3394 #define NMLVGETINFOTIP WINELIB_NAME_AW(NMLVGETINFOTIP)
3395 #define LPNMLVGETINFOTIP WINELIB_NAME_AW(LPNMLVGETINFOTIP)
3397 typedef struct tagLVHITTESTINFO
3403 } LVHITTESTINFO
, *LPLVHITTESTINFO
;
3405 #define LV_HITTESTINFO LVHITTESTINFO
3406 #define _LV_HITTESTINFO tagLVHITTESTINFO
3407 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
3409 typedef struct tagLVFINDINFOA
3416 } LVFINDINFOA
, *LPLVFINDINFOA
;
3418 typedef struct tagLVFINDINFOW
3425 } LVFINDINFOW
, *LPLVFINDINFOW
;
3427 #define LVFINDINFO WINELIB_NAME_AW(LVFINDINFO)
3428 #define LPLVFINDINFO WINELIB_NAME_AW(LPLVFINDINFO)
3430 #define LV_FINDINFO LVFINDINFO
3431 #define LV_FINDINFOA LVFINDINFOA
3432 #define LV_FINDINFOW LVFINDINFOW
3434 /* Groups relates structures */
3436 typedef struct LVGROUP
3448 } LVGROUP
, *PLVGROUP
;
3450 typedef struct LVGROUPMETRICS
3462 COLORREF crRightHeader
;
3464 } LVGROUPMETRICS
, *PLVGROUPMETRICS
;
3466 typedef INT (*PFNLVGROUPCOMPARE
)(INT
, INT
, VOID
*);
3468 typedef struct LVINSERTGROUPSORTED
3470 PFNLVGROUPCOMPARE pfnGroupCompare
;
3473 } LVINSERTGROUPSORTED
, *PLVINSERTGROUPSORTED
;
3475 /* Tile related structures */
3477 typedef struct LVTILEINFO
3483 } LVTILEINFO
, *PLVTILEINFO
;
3485 typedef struct LVTILEVIEWINFO
3493 } LVTILEVIEWINFO
, *PLVTILEVIEWINFO
;
3495 typedef struct LVINSERTMARK
3501 } LVINSERTMARK
, *PLVINSERTMARK
;
3503 typedef struct tagTCHITTESTINFO
3507 } TCHITTESTINFO
, *LPTCHITTESTINFO
;
3509 #define TC_HITTESTINFO TCHITTESTINFO
3511 typedef INT (CALLBACK
*PFNLVCOMPARE
)(LPARAM
, LPARAM
, LPARAM
);
3513 #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLCUSTOMDRW, clrTextBk)
3515 typedef struct tagNMLVCUSTOMDRAW
3520 int iSubItem
; /* (_WIN32_IE >= 0x0400) */
3521 DWORD dwItemType
; /* (_WIN32_IE >= 0x560) */
3522 COLORREF clrFace
; /* (_WIN32_IE >= 0x560) */
3523 int iIconEffect
; /* (_WIN32_IE >= 0x560) */
3524 int iIconPhase
; /* (_WIN32_IE >= 0x560) */
3525 int iPartId
; /* (_WIN32_IE >= 0x560) */
3526 int iStateId
; /* (_WIN32_IE >= 0x560) */
3527 RECT rcText
; /* (_WIN32_IE >= 0x560) */
3528 UINT uAlign
; /* (_WIN32_IE >= 0x560) */
3529 } NMLVCUSTOMDRAW
, *LPNMLVCUSTOMDRAW
;
3531 typedef struct tagNMLVCACHEHINT
3536 } NMLVCACHEHINT
, *LPNMLVCACHEHINT
;
3538 #define LPNM_CACHEHINT LPNMLVCACHEHINT
3539 #define PNM_CACHEHINT LPNMLVCACHEHINT
3540 #define NM_CACHEHINT NMLVCACHEHINT
3542 typedef struct tagNMLVFINDITEMA
3547 } NMLVFINDITEMA
, *LPNMLVFINDITEMA
;
3549 typedef struct tagNMLVFINDITEMW
3554 } NMLVFINDITEMW
, *LPNMLVFINDITEMW
;
3556 #define NMLVFINDITEM WINELIB_NAME_AW(NMLVFINDITEM)
3557 #define LPNMLVFINDITEM WINELIB_NAME_AW(LPNMLVFINDITEM)
3558 #define NM_FINDITEM NMLVFINDITEM
3559 #define LPNM_FINDITEM LPNMLVFINDITEM
3560 #define PNM_FINDITEM LPNMLVFINDITEM
3562 typedef struct tagNMLVODSTATECHANGE
3569 } NMLVODSTATECHANGE
, *LPNMLVODSTATECHANGE
;
3571 #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3572 #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3573 #define NM_ODSTATECHANGE NMLVODSTATECHANGE
3575 typedef struct NMLVSCROLL
3580 } NMLVSCROLL
, *LPNMLVSCROLL
;
3582 #define ListView_SetItemCount(hwnd,count) \
3583 (BOOL)SNDMSGA((hwnd),LVM_SETITEMCOUNT,(WPARAM)(INT)(count),0)
3584 #define ListView_SetTextBkColor(hwnd,clrBk) \
3585 (BOOL)SNDMSGA((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3586 #define ListView_SetTextColor(hwnd,clrBk) \
3587 (BOOL)SNDMSGA((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3588 #define ListView_DeleteColumn(hwnd,col)\
3589 (LRESULT)SNDMSGA((hwnd),LVM_DELETECOLUMN,0,(LPARAM)(INT)(col))
3590 #define ListView_GetColumnA(hwnd,x,col)\
3591 (LRESULT)SNDMSGA((hwnd),LVM_GETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3592 #define ListView_GetColumnW(hwnd,x,col)\
3593 (LRESULT)SNDMSGW((hwnd),LVM_GETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3594 #define ListView_GetColumn WINELIB_NAME_AW(ListView_GetColumn)
3595 #define ListView_SetColumnA(hwnd,x,col)\
3596 (LRESULT)SNDMSGA((hwnd),LVM_SETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3597 #define ListView_SetColumnW(hwnd,x,col)\
3598 (LRESULT)SNDMSGW((hwnd),LVM_SETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3599 #define ListView_SetColumn WINELIB_NAME_AW(ListView_SetColumn)
3600 #define ListView_GetColumnWidth(hwnd,x)\
3601 (INT)SNDMSGW((hwnd),LVM_GETCOLUMNWIDTH,(WPARAM)(INT)(x),0L)
3602 #define ListView_SetColumnWidth(hwnd,x,width)\
3603 (BOOL)SNDMSGW((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(INT)(x),(LPARAM)(MAKELPARAM(width,0)))
3606 #define ListView_GetNextItem(hwnd,nItem,flags) \
3607 (INT)SNDMSGA((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
3608 #define ListView_FindItemA(hwnd,nItem,plvfi) \
3609 (INT)SNDMSGA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOA*)(plvfi))
3610 #define ListView_FindItemW(hwnd,nItem,plvfi) \
3611 (INT)SNDMSGW((hwnd),LVM_FINDITEMW,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOW*)(plvfi))
3612 #define ListView_FindItem WINELIB_NAME_AW(ListView_FindItem)
3614 #define ListView_Arrange(hwnd,code) \
3615 (INT)SNDMSGA((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
3616 #define ListView_GetItemPosition(hwnd,i,ppt) \
3617 (INT)SNDMSGA((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
3618 #define ListView_GetItemRect(hwnd,i,prc,code) \
3619 (BOOL)SNDMSGA((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
3620 ((prc) ? (((RECT*)(prc))->left = (code),(LPARAM)(RECT \
3621 *)(prc)) : (LPARAM)(RECT*)NULL))
3622 #define ListView_SetItemA(hwnd,pitem) \
3623 (INT)SNDMSGA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3624 #define ListView_SetItemW(hwnd,pitem) \
3625 (INT)SNDMSGW((hwnd),LVM_SETITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3626 #define ListView_SetItem WINELIB_NAME_AW(ListView_SetItem)
3627 #define ListView_SetItemState(hwnd,i,data,dataMask) \
3628 { LVITEMA _LVi; _LVi.state = data; _LVi.stateMask = dataMask;\
3629 SNDMSGA(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEMA)&_LVi);}
3630 #define ListView_GetItemState(hwnd,i,mask) \
3631 (BOOL)SNDMSGA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
3632 #define ListView_GetCountPerPage(hwnd) \
3633 (BOOL)SNDMSGW((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
3634 #define ListView_GetImageList(hwnd,iImageList) \
3635 (HIMAGELIST)SNDMSGA((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
3636 #define ListView_GetStringWidthA(hwnd,pstr) \
3637 (INT)SNDMSGA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
3638 #define ListView_GetStringWidthW(hwnd,pstr) \
3639 (INT)SNDMSGW((hwnd),LVM_GETSTRINGWIDTHW,0,(LPARAM)(LPCWSTR)(pstr))
3640 #define ListView_GetStringWidth WINELIB_NAME_AW(ListView_GetStringWidth)
3641 #define ListView_GetTopIndex(hwnd) \
3642 (BOOL)SNDMSGA((hwnd),LVM_GETTOPINDEX,0,0L)
3643 #define ListView_Scroll(hwnd,dx,dy) \
3644 (BOOL)SNDMSGA((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
3645 #define ListView_EnsureVisible(hwnd,i,fPartialOk) \
3646 (BOOL)SNDMSGA((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
3647 #define ListView_SetBkColor(hwnd,clrBk) \
3648 (BOOL)SNDMSGA((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3649 #define ListView_SetImageList(hwnd,himl,iImageList) \
3650 (HIMAGELIST)(UINT)SNDMSGA((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(UINT)(HIMAGELIST)(himl))
3651 #define ListView_GetItemCount(hwnd) \
3652 (INT)SNDMSGA((hwnd),LVM_GETITEMCOUNT,0,0L)
3653 #define ListView_RedrawItems(hwnd,first,last) \
3654 (BOOL)SNDMSGA((hwnd),LVM_REDRAWITEMS,(WPARAM)(INT)(first),(LPARAM)(INT)(last))
3655 #define ListView_GetEditControl(hwnd) \
3656 (HWND)SNDMSGA((hwnd), LVM_GETEDITCONTROL, 0, 0)
3657 #define ListView_GetTextColor(hwnd) \
3658 (COLORREF)SNDMSGA((hwnd), LVM_GETTEXTCOLOR, 0, 0)
3659 #define ListView_GetBkColor(hwnd) \
3660 (COLORREF)SNDMSGA((hwnd), LVM_GETBKCOLOR, 0, 0)
3661 #define ListView_GetItemA(hwnd,pitem) \
3662 (BOOL)SNDMSGA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
3663 #define ListView_GetItemW(hwnd,pitem) \
3664 (BOOL)SNDMSGW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
3665 #define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
3667 #define ListView_HitTest(hwnd,pinfo) \
3668 (INT)SNDMSGA((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
3670 #define ListView_InsertItemA(hwnd,pitem) \
3671 (INT)SNDMSGA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3672 #define ListView_InsertItemW(hwnd,pitem) \
3673 (INT)SNDMSGW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3674 #define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
3676 #define ListView_DeleteAllItems(hwnd) \
3677 (BOOL)SNDMSGA((hwnd),LVM_DELETEALLITEMS,0,0L)
3679 #define ListView_InsertColumnA(hwnd,iCol,pcol) \
3680 (INT)SNDMSGA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
3681 #define ListView_InsertColumnW(hwnd,iCol,pcol) \
3682 (INT)SNDMSGW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
3683 #define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
3685 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
3686 (BOOL)SNDMSGA((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
3687 #define ListView_SetItemPosition(hwndLV, i, x, y) \
3688 (BOOL)SNDMSGA((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
3689 #define ListView_GetSelectedCount(hwndLV) \
3690 (UINT)SNDMSGA((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
3692 #define ListView_EditLabelA(hwndLV, i) \
3693 (HWND)SNDMSGA((hwndLV),LVM_EDITLABELA,(WPARAM)(int)(i), 0L)
3694 #define ListView_EditLabelW(hwndLV, i) \
3695 (HWND)SNDMSGW((hwndLV),LVM_EDITLABELW,(WPARAM)(int)(i), 0L)
3696 #define ListView_EditLabel WINELIB_NAME_AW(ListView_EditLabel)
3698 #define ListView_GetItemTextA(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
3701 _LVi.iSubItem = _iSubItem;\
3702 _LVi.cchTextMax = _cchTextMax;\
3703 _LVi.pszText = _pszText;\
3704 SNDMSGA(hwndLV, LVM_GETITEMTEXTA, (WPARAM)(i), (LPARAM)&_LVi);\
3706 #define ListView_GetItemTextW(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
3709 _LVi.iSubItem = _iSubItem;\
3710 _LVi.cchTextMax = _cchTextMax;\
3711 _LVi.pszText = _pszText;\
3712 SNDMSGW(hwndLV, LVM_GETITEMTEXTW, (WPARAM)(i), (LPARAM)&_LVi);\
3714 #define ListView_GetItemText WINELIB_NAME_AW(ListView_GetItemText)
3715 #define ListView_SetItemPosition32(hwnd,n,x1,y1) \
3716 { POINT ptNewPos; ptNewPos.x = (x1); ptNewPos.y = (y1); SNDMSGA((hwnd), LVM_SETITEMPOSITION32, (WPARAM)(int)(n), (LPARAM)&ptNewPos); }
3717 #define ListView_SetItemTextA(hwndLV, i, _iSubItem, _pszText) \
3718 { LVITEMA _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3719 SNDMSGA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}
3720 #define ListView_SetItemTextW(hwndLV, i, _iSubItem, _pszText) \
3721 { LVITEMW _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3722 SNDMSGW(hwndLV, LVM_SETITEMTEXTW, (WPARAM)i, (LPARAM) (LVITEMW*)& _LVi);}
3723 #define ListView_SetItemText WINELIB_NAME_AW(ListView_SetItemText)
3725 #define ListView_DeleteItem(hwndLV, i) \
3726 (BOOL)SNDMSGA(hwndLV, LVM_DELETEITEM, (WPARAM)(int)(i), 0L)
3727 #define ListView_Update(hwndLV, i) \
3728 (BOOL)SNDMSGA((hwndLV), LVM_UPDATE, (WPARAM)(i), 0L)
3729 #define ListView_GetColumnOrderArray(hwndLV, iCount, pi) \
3730 (BOOL)SNDMSGA((hwndLV), LVM_GETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3731 #define ListView_GetExtendedListViewStyle(hwndLV) \
3732 (DWORD)SNDMSGA((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0L)
3733 #define ListView_GetHotCursor(hwndLV) \
3734 (HCURSOR)SNDMSGA((hwndLV), LVM_GETHOTCURSOR, 0, 0L)
3735 #define ListView_GetHotItem(hwndLV) \
3736 (int)SNDMSGA((hwndLV), LVM_GETHOTITEM, 0, 0L)
3737 #define ListView_GetItemSpacing(hwndLV, fSmall) \
3738 (DWORD)SNDMSGA((hwndLV), LVM_GETITEMSPACING, (WPARAM)fSmall, 0L)
3739 #define ListView_GetSubItemRect(hwndLV, iItem, iSubItem, code, prc) \
3740 (BOOL)SNDMSGA((hwndLV), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
3741 ((prc) ? ((((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code), (LPARAM)(prc)) : 0))
3742 #define ListView_GetToolTips(hwndLV) \
3743 (HWND)SNDMSGA((hwndLV), LVM_GETTOOLTIPS, 0, 0L)
3744 #define ListView_SetColumnOrderArray(hwndLV, iCount, pi) \
3745 (BOOL)SNDMSGA((hwndLV), LVM_SETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3746 #define ListView_SetExtendedListViewStyle(hwndLV, dw) \
3747 (DWORD)SNDMSGA((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dw)
3748 #define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw) \
3749 (DWORD)SNDMSGA((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)dwMask, (LPARAM)dw)
3750 #define ListView_SetHotCursor(hwndLV, hcur) \
3751 (HCURSOR)SNDMSGA((hwndLV), LVM_SETHOTCURSOR, 0, (LPARAM)hcur)
3752 #define ListView_SetHotItem(hwndLV, i) \
3753 (int)SNDMSGA((hwndLV), LVM_SETHOTITEM, (WPARAM)i, 0L)
3754 #define ListView_SetIconSpacing(hwndLV, cx, cy) \
3755 (DWORD)SNDMSGA((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
3756 #define ListView_SetToolTips(hwndLV, hwndNewHwnd) \
3757 (HWND)SNDMSGA((hwndLV), LVM_SETTOOLTIPS, (WPARAM)hwndNewHwnd, 0L)
3758 #define ListView_SubItemHitTest(hwndLV, plvhti) \
3759 (int)SNDMSGA((hwndLV), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
3760 #define ListView_GetSelectionMark(hwndLV) \
3761 (int)SNDMSG((hwndLV), LVM_GETSELECTIONMARK, 0, 0)
3762 #define ListView_SetSelectionMark(hwndLV, iItem) \
3763 (int)SNDMSG((hwndLV), LVM_SETSELECTIONMARK, 0, (LPARAM)(iItem))
3764 #define ListView_GetViewRect(hwndLV, prc) \
3765 (BOOL)SNDMSG((hwndLV),LVM_GETVIEWRECT,0,(LPARAM)(LPRECT)(prc))
3766 #define ListView_GetHeader(hwndLV) \
3767 (HWND)SNDMSG((hwndLV),LVM_GETHEADER,0,0L)
3768 #define ListView_SetSelectedColumn(hwnd, iCol) \
3769 SNDMSG((hwnd), LVM_SETSELECTEDCOLUMN, (WPARAM)iCol, 0)
3770 #define ListView_SetTileWidth(hwnd, cpWidth) \
3771 SNDMSG((hwnd), LVM_SETTILEWIDTH, (WPARAM)cpWidth, 0)
3772 #define ListView_SetView(hwnd, iView) \
3773 (DWORD)SNDMSG((hwnd), LVM_SETVIEW, (WPARAM)(DWORD)iView, 0)
3774 #define ListView_GetView(hwnd) \
3775 (DWORD)SNDMSG((hwnd), LVM_GETVIEW, 0, 0)
3776 #define ListView_InsertGroup(hwnd, index, pgrp) \
3777 SNDMSG((hwnd), LVM_INSERTGROUP, (WPARAM)index, (LPARAM)pgrp)
3778 #define ListView_SetGroupInfo(hwnd, iGroupId, pgrp) \
3779 SNDMSG((hwnd), LVM_SETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
3780 #define ListView_GetGroupInfo(hwnd, iGroupId, pgrp) \
3781 SNDMSG((hwnd), LVM_GETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)
3782 #define ListView_RemoveGroup(hwnd, iGroupId) \
3783 SNDMSG((hwnd), LVM_REMOVEGROUP, (WPARAM)iGroupId, 0)
3784 #define ListView_MoveGroup(hwnd, iGroupId, toIndex) \
3785 SNDMSG((hwnd), LVM_MOVEGROUP, (WPARAM)iGroupId, (LPARAM)toIndex)
3786 #define ListView_MoveItemToGroup(hwnd, idItemFrom, idGroupTo) \
3787 SNDMSG((hwnd), LVM_MOVEITEMTOGROUP, (WPARAM)idItemFrom, (LPARAM)idGroupTo)
3788 #define ListView_SetGroupMetrics(hwnd, pGroupMetrics) \
3789 SNDMSG((hwnd), LVM_SETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
3790 #define ListView_GetGroupMetrics(hwnd, pGroupMetrics) \
3791 SNDMSG((hwnd), LVM_GETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)
3792 #define ListView_EnableGroupView(hwnd, fEnable) \
3793 SNDMSG((hwnd), LVM_ENABLEGROUPVIEW, (WPARAM)fEnable, 0)
3794 #define ListView_SortGroups(hwnd, _pfnGroupCompate, _plv) \
3795 SNDMSG((hwnd), LVM_SORTGROUPS, (WPARAM)_pfnGroupCompate, (LPARAM)_plv)
3796 #define ListView_InsertGroupSorted(hwnd, structInsert) \
3797 SNDMSG((hwnd), LVM_INSERTGROUPSORTED, (WPARAM)structInsert, 0)
3798 #define ListView_RemoveAllGroups(hwnd) \
3799 SNDMSG((hwnd), LVM_REMOVEALLGROUPS, 0, 0)
3800 #define ListView_HasGroup(hwnd, dwGroupId) \
3801 SNDMSG((hwnd), LVM_HASGROUP, dwGroupId, 0)
3802 #define ListView_SetTileViewInfo(hwnd, ptvi) \
3803 SNDMSG((hwnd), LVM_SETTILEVIEWINFO, 0, (LPARAM)ptvi)
3804 #define ListView_GetTileViewInfo(hwnd, ptvi) \
3805 SNDMSG((hwnd), LVM_GETTILEVIEWINFO, 0, (LPARAM)ptvi)
3806 #define ListView_SetTileInfo(hwnd, pti) \
3807 SNDMSG((hwnd), LVM_SETTILEINFO, 0, (LPARAM)pti)
3808 #define ListView_GetTileInfo(hwnd, pti) \
3809 SNDMSG((hwnd), LVM_GETTILEINFO, 0, (LPARAM)pti)
3810 #define ListView_SetInsertMark(hwnd, lvim) \
3811 (BOOL)SNDMSG((hwnd), LVM_SETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
3812 #define ListView_GetInsertMark(hwnd, lvim) \
3813 (BOOL)SNDMSG((hwnd), LVM_GETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))
3814 #define ListView_InsertMarkHitTest(hwnd, point, lvim) \
3815 (int)SNDMSG((hwnd), LVM_INSERTMARKHITTEST, (WPARAM)(LPPOINT)(point), (LPARAM)(LPLVINSERTMARK)(lvim))
3816 #define ListView_GetInsertMarkRect(hwnd, rc) \
3817 (int)SNDMSG((hwnd), LVM_GETINSERTMARKRECT, (WPARAM)0, (LPARAM)(LPRECT)(rc))
3818 #define ListView_SetInsertMarkColor(hwnd, color) \
3819 (COLORREF)SNDMSG((hwnd), LVM_SETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
3820 #define ListView_GetInsertMarkColor(hwnd) \
3821 (COLORREF)SNDMSG((hwnd), LVM_GETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)0)
3822 #define ListView_SetInfoTip(hwndLV, plvInfoTip)\
3823 (BOOL)SNDMSG((hwndLV), LVM_SETINFOTIP, (WPARAM)0, (LPARAM)plvInfoTip)
3824 #define ListView_GetSelectedColumn(hwnd) \
3825 (UINT)SNDMSG((hwnd), LVM_GETSELECTEDCOLUMN, 0, 0)
3826 #define ListView_IsGroupViewEnabled(hwnd) \
3827 (BOOL)SNDMSG((hwnd), LVM_ISGROUPVIEWENABLED, 0, 0)
3828 #define ListView_GetOutlineColor(hwnd) \
3829 (COLORREF)SNDMSG((hwnd), LVM_GETOUTLINECOLOR, 0, 0)
3830 #define ListView_SetOutlineColor(hwnd, color) \
3831 (COLORREF)SNDMSG((hwnd), LVM_SETOUTLINECOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))
3832 #define ListView_CancelEditLabel(hwnd) \
3833 (VOID)SNDMSG((hwnd), LVM_CANCELEDITLABEL, (WPARAM)0, (LPARAM)0)
3834 #define ListView_MapIndexToID(hwnd, index) \
3835 (UINT)SNDMSG((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, (LPARAM)0)
3836 #define ListView_MapIDToIndex(hwnd, id) \
3837 (UINT)SNDMSG((hwnd), LVM_MAPIDTOINDEX, (WPARAM)id, (LPARAM)0)
3841 #define WC_TABCONTROLA "SysTabControl32"
3842 #if defined(__GNUC__)
3843 # define WC_TABCONTROLW (const WCHAR []){ 'S','y','s', \
3844 'T','a','b','C','o','n','t','r','o','l','3','2',0 }
3845 #elif defined(_MSC_VER)
3846 # define WC_TABCONTROLW L"SysTabControl32"
3848 static const WCHAR WC_TABCONTROLW
[] = { 'S','y','s',
3849 'T','a','b','C','o','n','t','r','o','l','3','2',0 };
3851 #define WC_TABCONTROL WINELIB_NAME_AW(WC_TABCONTROL)
3853 /* tab control styles */
3854 #define TCS_SCROLLOPPOSITE 0x0001 /* assumes multiline tab */
3855 #define TCS_BOTTOM 0x0002
3856 #define TCS_RIGHT 0x0002
3857 #define TCS_MULTISELECT 0x0004 /* allow multi-select in button mode */
3858 #define TCS_FLATBUTTONS 0x0008
3859 #define TCS_FORCEICONLEFT 0x0010
3860 #define TCS_FORCELABELLEFT 0x0020
3861 #define TCS_HOTTRACK 0x0040
3862 #define TCS_VERTICAL 0x0080
3863 #define TCS_TABS 0x0000
3864 #define TCS_BUTTONS 0x0100
3865 #define TCS_SINGLELINE 0x0000
3866 #define TCS_MULTILINE 0x0200
3867 #define TCS_RIGHTJUSTIFY 0x0000
3868 #define TCS_FIXEDWIDTH 0x0400
3869 #define TCS_RAGGEDRIGHT 0x0800
3870 #define TCS_FOCUSONBUTTONDOWN 0x1000
3871 #define TCS_OWNERDRAWFIXED 0x2000
3872 #define TCS_TOOLTIPS 0x4000
3873 #define TCS_FOCUSNEVER 0x8000
3874 #define TCS_EX_FLATSEPARATORS 0x00000001 /* to be used with */
3875 #define TCS_EX_REGISTERDROP 0x00000002 /* TCM_SETEXTENDEDSTYLE */
3878 #define TCM_FIRST 0x1300
3880 #define TCM_GETIMAGELIST (TCM_FIRST + 2)
3881 #define TCM_SETIMAGELIST (TCM_FIRST + 3)
3882 #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
3883 #define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
3884 #define TCM_GETITEMA (TCM_FIRST + 5)
3885 #define TCM_GETITEMW (TCM_FIRST + 60)
3886 #define TCM_SETITEMA (TCM_FIRST + 6)
3887 #define TCM_SETITEMW (TCM_FIRST + 61)
3888 #define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
3889 #define TCM_INSERTITEMA (TCM_FIRST + 7)
3890 #define TCM_INSERTITEMW (TCM_FIRST + 62)
3891 #define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
3892 #define TCM_DELETEITEM (TCM_FIRST + 8)
3893 #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
3894 #define TCM_GETITEMRECT (TCM_FIRST + 10)
3895 #define TCM_GETCURSEL (TCM_FIRST + 11)
3896 #define TCM_SETCURSEL (TCM_FIRST + 12)
3897 #define TCM_HITTEST (TCM_FIRST + 13)
3898 #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
3899 #define TCM_ADJUSTRECT (TCM_FIRST + 40)
3900 #define TCM_SETITEMSIZE (TCM_FIRST + 41)
3901 #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
3902 #define TCM_SETPADDING (TCM_FIRST + 43)
3903 #define TCM_GETROWCOUNT (TCM_FIRST + 44)
3904 #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
3905 #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
3906 #define TCM_GETCURFOCUS (TCM_FIRST + 47)
3907 #define TCM_SETCURFOCUS (TCM_FIRST + 48)
3908 #define TCM_SETMINTABWIDTH (TCM_FIRST + 49)
3909 #define TCM_DESELECTALL (TCM_FIRST + 50)
3910 #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
3911 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
3912 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
3913 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3914 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3917 #define TCIF_TEXT 0x0001
3918 #define TCIF_IMAGE 0x0002
3919 #define TCIF_RTLREADING 0x0004
3920 #define TCIF_PARAM 0x0008
3921 #define TCIF_STATE 0x0010
3923 #define TCIS_BUTTONPRESSED 0x0001
3924 #define TCIS_HIGHLIGHTED 0x0002
3926 /* TabCtrl Macros */
3927 #define TabCtrl_GetImageList(hwnd) \
3928 (HIMAGELIST)SNDMSGA((hwnd), TCM_GETIMAGELIST, 0, 0L)
3929 #define TabCtrl_SetImageList(hwnd, himl) \
3930 (HIMAGELIST)SNDMSGA((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
3931 #define TabCtrl_GetItemCount(hwnd) \
3932 (int)SNDMSGA((hwnd), TCM_GETITEMCOUNT, 0, 0L)
3933 #define TabCtrl_GetItemA(hwnd, iItem, pitem) \
3934 (BOOL)SNDMSGA((hwnd), TCM_GETITEMA, (WPARAM)(int)iItem, (LPARAM)(TCITEMA *)(pitem))
3935 #define TabCtrl_GetItemW(hwnd, iItem, pitem) \
3936 (BOOL)SNDMSGW((hwnd), TCM_GETITEMW, (WPARAM)(int)iItem, (LPARAM)(TCITEMW *)(pitem))
3937 #define TabCtrl_GetItem WINELIB_NAME_AW(TabCtrl_GetItem)
3938 #define TabCtrl_SetItemA(hwnd, iItem, pitem) \
3939 (BOOL)SNDMSGA((hwnd), TCM_SETITEMA, (WPARAM)(int)iItem, (LPARAM)(TCITEMA *)(pitem))
3940 #define TabCtrl_SetItemW(hwnd, iItem, pitem) \
3941 (BOOL)SNDMSGW((hwnd), TCM_SETITEMW, (WPARAM)(int)iItem, (LPARAM)(TCITEMW *)(pitem))
3942 #define TabCtrl_SetItem WINELIB_NAME_AW(TabCtrl_SetItem)
3943 #define TabCtrl_InsertItemA(hwnd, iItem, pitem) \
3944 (int)SNDMSGA((hwnd), TCM_INSERTITEMA, (WPARAM)(int)iItem, (LPARAM)(const TCITEMA *)(pitem))
3945 #define TabCtrl_InsertItemW(hwnd, iItem, pitem) \
3946 (int)SNDMSGW((hwnd), TCM_INSERTITEMW, (WPARAM)(int)iItem, (LPARAM)(const TCITEMW *)(pitem))
3947 #define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
3948 #define TabCtrl_DeleteItem(hwnd, i) \
3949 (BOOL)SNDMSGA((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
3950 #define TabCtrl_DeleteAllItems(hwnd) \
3951 (BOOL)SNDMSGA((hwnd), TCM_DELETEALLITEMS, 0, 0L)
3952 #define TabCtrl_GetItemRect(hwnd, i, prc) \
3953 (BOOL)SNDMSGA((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
3954 #define TabCtrl_GetCurSel(hwnd) \
3955 (int)SNDMSGA((hwnd), TCM_GETCURSEL, 0, 0)
3956 #define TabCtrl_SetCurSel(hwnd, i) \
3957 (int)SNDMSGA((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
3958 #define TabCtrl_HitTest(hwndTC, pinfo) \
3959 (int)SNDMSGA((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
3960 #define TabCtrl_SetItemExtra(hwndTC, cb) \
3961 (BOOL)SNDMSGA((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
3962 #define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
3963 (int)SNDMSGA(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
3964 #define TabCtrl_SetItemSize(hwnd, x, y) \
3965 (DWORD)SNDMSGA((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
3966 #define TabCtrl_RemoveImage(hwnd, i) \
3967 (void)SNDMSGA((hwnd), TCM_REMOVEIMAGE, i, 0L)
3968 #define TabCtrl_SetPadding(hwnd, cx, cy) \
3969 (void)SNDMSGA((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
3970 #define TabCtrl_GetRowCount(hwnd) \
3971 (int)SNDMSGA((hwnd), TCM_GETROWCOUNT, 0, 0L)
3972 #define TabCtrl_GetToolTips(hwnd) \
3973 (HWND)SNDMSGA((hwnd), TCM_GETTOOLTIPS, 0, 0L)
3974 #define TabCtrl_SetToolTips(hwnd, hwndTT) \
3975 (void)SNDMSGA((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
3976 #define TabCtrl_GetCurFocus(hwnd) \
3977 (int)SNDMSGA((hwnd), TCM_GETCURFOCUS, 0, 0)
3978 #define TabCtrl_SetCurFocus(hwnd, i) \
3979 SNDMSGA((hwnd),TCM_SETCURFOCUS, i, 0)
3980 #define TabCtrl_SetMinTabWidth(hwnd, x) \
3981 (int)SNDMSGA((hwnd), TCM_SETMINTABWIDTH, 0, x)
3982 #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
3983 (void)SNDMSGA((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
3984 #define TabCtrl_GetUnicodeFormat(hwnd) \
3985 (BOOL)SNDMSGA((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
3986 #define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) \
3987 (BOOL)SNDMSGA((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)fUnicode, 0)
3988 #define TabCtrl_GetExtendedStyle(hwnd) \
3989 (BOOL)SNDMSGA((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
3990 #define TabCtrl_SetExtendedStyle(hwnd, dwExStyle) \
3991 (BOOL)SNDMSGA((hwnd), TCM_GETEXTENDEDSTYLE, 0, (LPARAM)dwExStyle)
3992 #define TabCtrl_HighlightItem(hwnd, i, fHighlight) \
3993 (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)i, (LPARAM)MAKELONG(fHighlight, 0))
3995 /* constants for TCHITTESTINFO */
3997 #define TCHT_NOWHERE 0x01
3998 #define TCHT_ONITEMICON 0x02
3999 #define TCHT_ONITEMLABEL 0x04
4000 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
4002 typedef struct tagTCITEMHEADERA
4010 } TCITEMHEADERA
, *LPTCITEMHEADERA
;
4012 typedef struct tagTCITEMHEADERW
4020 } TCITEMHEADERW
, *LPTCITEMHEADERW
;
4022 #define TCITEMHEADER WINELIB_NAME_AW(TCITEMHEADER)
4023 #define LPTCITEMHEADER WINELIB_NAME_AW(LPTCITEMHEADER)
4024 #define TC_ITEMHEADER WINELIB_NAME_AW(TCITEMHEADER)
4025 #define LPTC_ITEMHEADER WINELIB_NAME_AW(LPTCITEMHEADER)
4027 typedef struct tagTCITEMA
4036 } TCITEMA
, *LPTCITEMA
;
4038 typedef struct tagTCITEMW
4047 } TCITEMW
, *LPTCITEMW
;
4049 #define TCITEM WINELIB_NAME_AW(TCITEM)
4050 #define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
4051 #define TC_ITEM WINELIB_NAME_AW(TCITEM)
4052 #define LPTC_ITEM WINELIB_NAME_AW(LPTCITEM)
4054 #define TCN_FIRST (0U-550U)
4055 #define TCN_LAST (0U-580U)
4056 #define TCN_KEYDOWN (TCN_FIRST - 0)
4057 #define TCN_SELCHANGE (TCN_FIRST - 1)
4058 #define TCN_SELCHANGING (TCN_FIRST - 2)
4059 #define TCN_GETOBJECT (TCN_FIRST - 3)
4061 #include <pshpack1.h>
4062 typedef struct tagTCKEYDOWN
4068 #include <poppack.h>
4070 #define TC_KEYDOWN NMTCKEYDOWN
4072 /* ComboBoxEx control */
4074 #define WC_COMBOBOXEXA "ComboBoxEx32"
4075 #if defined(__GNUC__)
4076 # define WC_COMBOBOXEXW (const WCHAR []){ 'C','o','m','b','o', \
4077 'B','o','x','E','x','3','2',0 }
4078 #elif defined(_MSC_VER)
4079 # define WC_COMBOBOXEXW L"ComboBoxEx32"
4081 static const WCHAR WC_COMBOBOXEXW
[] = { 'C','o','m','b','o',
4082 'B','o','x','E','x','3','2',0 };
4084 #define WC_COMBOBOXEX WINELIB_NAME_AW(WC_COMBOBOXEX)
4086 #define CBEIF_TEXT 0x00000001
4087 #define CBEIF_IMAGE 0x00000002
4088 #define CBEIF_SELECTEDIMAGE 0x00000004
4089 #define CBEIF_OVERLAY 0x00000008
4090 #define CBEIF_INDENT 0x00000010
4091 #define CBEIF_LPARAM 0x00000020
4092 #define CBEIF_DI_SETITEM 0x10000000
4094 #define CBEM_INSERTITEMA (WM_USER+1)
4095 #define CBEM_INSERTITEMW (WM_USER+11)
4096 #define CBEM_INSERTITEM WINELIB_NAME_AW(CBEM_INSERTITEM)
4097 #define CBEM_SETIMAGELIST (WM_USER+2)
4098 #define CBEM_GETIMAGELIST (WM_USER+3)
4099 #define CBEM_GETITEMA (WM_USER+4)
4100 #define CBEM_GETITEMW (WM_USER+13)
4101 #define CBEM_GETITEM WINELIB_NAME_AW(CBEM_GETITEM)
4102 #define CBEM_SETITEMA (WM_USER+5)
4103 #define CBEM_SETITEMW (WM_USER+12)
4104 #define CBEM_SETITEM WINELIB_NAME_AW(CBEM_SETITEM)
4105 #define CBEM_DELETEITEM CB_DELETESTRING
4106 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
4107 #define CBEM_GETEDITCONTROL (WM_USER+7)
4108 #define CBEM_SETEXSTYLE (WM_USER+8)
4109 #define CBEM_GETEXSTYLE (WM_USER+9)
4110 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
4111 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
4112 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4113 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4114 #define CBEM_HASEDITCHANGED (WM_USER+10)
4115 #define CBEM_SETWINDOWTHEME CCM_SETWINDOWTHEME
4117 #define CBEIF_TEXT 0x00000001
4118 #define CBEIF_IMAGE 0x00000002
4119 #define CBEIF_SELECTEDIMAGE 0x00000004
4120 #define CBEIF_OVERLAY 0x00000008
4121 #define CBEIF_INDENT 0x00000010
4122 #define CBEIF_LPARAM 0x00000020
4123 #define CBEIF_DI_SETITEM 0x10000000
4125 #define CBEN_FIRST (0U-800U)
4126 #define CBEN_LAST (0U-830U)
4128 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
4129 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
4130 #define CBEN_GETDISPINFO WINELIB_NAME_AW(CBEN_GETDISPINFO)
4131 #define CBEN_INSERTITEM (CBEN_FIRST - 1)
4132 #define CBEN_DELETEITEM (CBEN_FIRST - 2)
4133 #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
4134 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
4135 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
4136 #define CBEN_ENDEDIT WINELIB_NAME_AW(CBEN_ENDEDIT)
4137 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
4138 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
4139 #define CBEN_DRAGBEGIN WINELIB_NAME_AW(CBEN_DRAGBEGIN)
4141 #define CBES_EX_NOEDITIMAGE 0x00000001
4142 #define CBES_EX_NOEDITIMAGEINDENT 0x00000002
4143 #define CBES_EX_PATHWORDBREAKPROC 0x00000004
4144 #define CBES_EX_NOSIZELIMIT 0x00000008
4145 #define CBES_EX_CASESENSITIVE 0x00000010
4148 typedef struct tagCOMBOBOXEXITEMA
4159 } COMBOBOXEXITEMA
, *PCOMBOBOXEXITEMA
;
4160 typedef COMBOBOXEXITEMA
const *PCCOMBOEXITEMA
; /* Yes, there's a BOX missing */
4162 typedef struct tagCOMBOBOXEXITEMW
4173 } COMBOBOXEXITEMW
, *PCOMBOBOXEXITEMW
;
4174 typedef COMBOBOXEXITEMW
const *PCCOMBOEXITEMW
; /* Yes, there's a BOX missing */
4176 #define COMBOBOXEXITEM WINELIB_NAME_AW(COMBOBOXEXITEM)
4177 #define PCOMBOBOXEXITEM WINELIB_NAME_AW(PCOMBOBOXEXITEM)
4178 #define PCCOMBOBOXEXITEM WINELIB_NAME_AW(PCCOMBOEXITEM) /* Yes, there's a BOX missing */
4180 #define CBENF_KILLFOCUS 1
4181 #define CBENF_RETURN 2
4182 #define CBENF_ESCAPE 3
4183 #define CBENF_DROPDOWN 4
4185 #define CBEMAXSTRLEN 260
4187 typedef struct tagNMCBEENDEDITW
4192 WCHAR szText
[CBEMAXSTRLEN
];
4194 } NMCBEENDEDITW
, *LPNMCBEENDEDITW
, *PNMCBEENDEDITW
;
4196 typedef struct tagNMCBEENDEDITA
4201 char szText
[CBEMAXSTRLEN
];
4203 } NMCBEENDEDITA
, *LPNMCBEENDEDITA
, *PNMCBEENDEDITA
;
4205 #define NMCBEENDEDIT WINELIB_NAME_AW(NMCBEENDEDIT)
4206 #define LPNMCBEENDEDIT WINELIB_NAME_AW(LPNMCBEENDEDIT)
4207 #define PNMCBEENDEDIT WINELIB_NAME_AW(PNMCBEENDEDIT)
4212 COMBOBOXEXITEMA ceItem
;
4213 } NMCOMBOBOXEXA
, *PNMCOMBOBOXEXA
;
4218 COMBOBOXEXITEMW ceItem
;
4219 } NMCOMBOBOXEXW
, *PNMCOMBOBOXEXW
;
4221 #define NMCOMBOBOXEX WINELIB_NAME_AW(NMCOMBOBOXEX)
4222 #define PNMCOMBOBOXEX WINELIB_NAME_AW(PNMCOMBOBOXEX)
4228 char szText
[CBEMAXSTRLEN
];
4229 } NMCBEDRAGBEGINA
, *PNMCBEDRAGBEGINA
, *LPNMCBEDRAGBEGINA
;
4235 WCHAR szText
[CBEMAXSTRLEN
];
4236 } NMCBEDRAGBEGINW
, *PNMCBEDRAGBEGINW
, *LPNMCBEDRAGBEGINW
;
4238 #define NMCBEDRAGBEGIN WINELIB_NAME_AW(NMCBEDRAGBEGIN)
4239 #define PNMCBEDRAGBEGIN WINELIB_NAME_AW(PNMCBEDRAGBEGIN)
4240 #define LPNMCBEDRAGBEGIN WINELIB_NAME_AW(LPNMCBEDRAGBEGIN)
4243 /* Hotkey control */
4245 #define HOTKEY_CLASSA "msctls_hotkey32"
4246 #if defined(__GNUC__)
4247 # define HOTKEY_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
4248 'h','o','t','k','e','y','3','2',0 }
4249 #elif defined(_MSC_VER)
4250 # define HOTKEY_CLASSW L"msctls_hotkey32"
4252 static const WCHAR HOTKEY_CLASSW
[] = { 'm','s','c','t','l','s','_',
4253 'h','o','t','k','e','y','3','2',0 };
4255 #define HOTKEY_CLASS WINELIB_NAME_AW(HOTKEY_CLASS)
4257 #define HOTKEYF_SHIFT 0x01
4258 #define HOTKEYF_CONTROL 0x02
4259 #define HOTKEYF_ALT 0x04
4260 #define HOTKEYF_EXT 0x08
4262 #define HKCOMB_NONE 0x0001
4263 #define HKCOMB_S 0x0002
4264 #define HKCOMB_C 0x0004
4265 #define HKCOMB_A 0x0008
4266 #define HKCOMB_SC 0x0010
4267 #define HKCOMB_SA 0x0020
4268 #define HKCOMB_CA 0x0040
4269 #define HKCOMB_SCA 0x0080
4271 #define HKM_SETHOTKEY (WM_USER+1)
4272 #define HKM_GETHOTKEY (WM_USER+2)
4273 #define HKM_SETRULES (WM_USER+3)
4276 /* animate control */
4278 #define ANIMATE_CLASSA "SysAnimate32"
4279 #if defined(__GNUC__)
4280 # define ANIMATE_CLASSW (const WCHAR []){ 'S','y','s', \
4281 'A','n','i','m','a','t','e','3','2',0 }
4282 #elif defined(_MSC_VER)
4283 # define ANIMATE_CLASSW L"SysAnimate32"
4285 static const WCHAR ANIMATE_CLASSW
[] = { 'S','y','s',
4286 'A','n','i','m','a','t','e','3','2',0 };
4288 #define ANIMATE_CLASS WINELIB_NAME_AW(ANIMATE_CLASS)
4290 #define ACS_CENTER 0x0001
4291 #define ACS_TRANSPARENT 0x0002
4292 #define ACS_AUTOPLAY 0x0004
4293 #define ACS_TIMER 0x0008 /* no threads, just timers */
4295 #define ACM_OPENA (WM_USER+100)
4296 #define ACM_OPENW (WM_USER+103)
4297 #define ACM_OPEN WINELIB_NAME_AW(ACM_OPEN)
4298 #define ACM_PLAY (WM_USER+101)
4299 #define ACM_STOP (WM_USER+102)
4304 #define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
4305 CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
4306 #define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
4307 CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
4308 #define Animate_Create WINELIB_NAME_AW(Animate_Create)
4309 #define Animate_OpenA(hwnd,szName) \
4310 (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
4311 #define Animate_OpenW(hwnd,szName) \
4312 (BOOL)SNDMSGW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
4313 #define Animate_Open WINELIB_NAME_AW(Animate_Open)
4314 #define Animate_OpenExA(hwnd,hInst,szName) \
4315 (BOOL)SNDMSGA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
4316 #define Animate_OpenExW(hwnd,hInst,szName) \
4317 (BOOL)SNDMSGW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
4318 #define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
4319 #define Animate_Play(hwnd,from,to,rep) \
4320 (BOOL)SNDMSGA(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
4321 #define Animate_Stop(hwnd) \
4322 (BOOL)SNDMSGA(hwnd,ACM_STOP,0,0)
4323 #define Animate_Close(hwnd) \
4324 (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,0)
4325 #define Animate_Seek(hwnd,frame) \
4326 (BOOL)SNDMSGA(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
4329 /**************************************************************************
4330 * IP Address control
4333 #define WC_IPADDRESSA "SysIPAddress32"
4334 #if defined(__GNUC__)
4335 # define WC_IPADDRESSW (const WCHAR []){ 'S','y','s', \
4336 'I','P','A','d','d','r','e','s','s','3','2',0 }
4337 #elif defined(_MSC_VER)
4338 # define WC_IPADDRESSW L"SysIPAddress32"
4340 static const WCHAR WC_IPADDRESSW
[] = { 'S','y','s',
4341 'I','P','A','d','d','r','e','s','s','3','2',0 };
4343 #define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
4345 #define IPM_CLEARADDRESS (WM_USER+100)
4346 #define IPM_SETADDRESS (WM_USER+101)
4347 #define IPM_GETADDRESS (WM_USER+102)
4348 #define IPM_SETRANGE (WM_USER+103)
4349 #define IPM_SETFOCUS (WM_USER+104)
4350 #define IPM_ISBLANK (WM_USER+105)
4352 #define IPN_FIRST (0U-860U)
4353 #define IPN_LAST (0U-879U)
4354 #define IPN_FIELDCHANGED (IPN_FIRST-0)
4356 typedef struct tagNMIPADDRESS
4361 } NMIPADDRESS
, *LPNMIPADDRESS
;
4363 #define MAKEIPRANGE(low,high) \
4364 ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
4365 #define MAKEIPADDRESS(b1,b2,b3,b4) \
4366 ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
4368 #define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
4369 #define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
4370 #define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
4371 #define FOURTH_IPADDRESS(x) ((x)&0xff)
4374 /**************************************************************************
4375 * Native Font control
4378 #define WC_NATIVEFONTCTLA "NativeFontCtl"
4379 #if defined(__GNUC__)
4380 # define WC_NATIVEFONTCTLW (const WCHAR []){ 'N','a','t','i','v','e', \
4381 'F','o','n','t','C','t','l',0 }
4382 #elif defined(_MSC_VER)
4383 # define WC_NATIVEFONTCTLW L"NativeFontCtl"
4385 static const WCHAR WC_NATIVEFONTCTLW
[] = { 'N','a','t','i','v','e',
4386 'F','o','n','t','C','t','l',0 };
4388 #define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
4390 #define NFS_EDIT 0x0001
4391 #define NFS_STATIC 0x0002
4392 #define NFS_LISTCOMBO 0x0004
4393 #define NFS_BUTTON 0x0008
4394 #define NFS_ALL 0x0010
4397 /**************************************************************************
4398 * Month calendar control
4402 #define MONTHCAL_CLASSA "SysMonthCal32"
4403 #if defined(__GNUC__)
4404 # define MONTHCAL_CLASSW (const WCHAR []){ 'S','y','s', \
4405 'M','o','n','t','h','C','a','l','3','2',0 }
4406 #elif defined(_MSC_VER)
4407 # define MONTHCAL_CLASSW L"SysMonthCal32"
4409 static const WCHAR MONTHCAL_CLASSW
[] = { 'S','y','s',
4410 'M','o','n','t','h','C','a','l','3','2',0 };
4412 #define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
4414 #define MCM_FIRST 0x1000
4415 #define MCN_FIRST (0U-750U)
4416 #define MCN_LAST (0U-759U)
4419 #define MCM_GETCURSEL (MCM_FIRST + 1)
4420 #define MCM_SETCURSEL (MCM_FIRST + 2)
4421 #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
4422 #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
4423 #define MCM_GETSELRANGE (MCM_FIRST + 5)
4424 #define MCM_SETSELRANGE (MCM_FIRST + 6)
4425 #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
4426 #define MCM_SETDAYSTATE (MCM_FIRST + 8)
4427 #define MCM_GETMINREQRECT (MCM_FIRST + 9)
4428 #define MCM_SETCOLOR (MCM_FIRST + 10)
4429 #define MCM_GETCOLOR (MCM_FIRST + 11)
4430 #define MCM_SETTODAY (MCM_FIRST + 12)
4431 #define MCM_GETTODAY (MCM_FIRST + 13)
4432 #define MCM_HITTEST (MCM_FIRST + 14)
4433 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
4434 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
4435 #define MCM_GETRANGE (MCM_FIRST + 17)
4436 #define MCM_SETRANGE (MCM_FIRST + 18)
4437 #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
4438 #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
4439 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
4440 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4441 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4446 #define MCN_SELCHANGE (MCN_FIRST + 1)
4447 #define MCN_GETDAYSTATE (MCN_FIRST + 3)
4448 #define MCN_SELECT (MCN_FIRST + 4)
4450 #define MCSC_BACKGROUND 0
4452 #define MCSC_TITLEBK 2
4453 #define MCSC_TITLETEXT 3
4454 #define MCSC_MONTHBK 4
4455 #define MCSC_TRAILINGTEXT 5
4457 #define MCS_DAYSTATE 0x0001
4458 #define MCS_MULTISELECT 0x0002
4459 #define MCS_WEEKNUMBERS 0x0004
4460 #define MCS_NOTODAY 0x0010
4461 #define MCS_NOTODAYCIRCLE 0x0008
4463 #define MCHT_TITLE 0x00010000
4464 #define MCHT_CALENDAR 0x00020000
4465 #define MCHT_TODAYLINK 0x00030000
4467 #define MCHT_NEXT 0x01000000
4468 #define MCHT_PREV 0x02000000
4469 #define MCHT_NOWHERE 0x00000000
4470 #define MCHT_TITLEBK (MCHT_TITLE)
4471 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
4472 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
4473 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
4474 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
4476 #define MCHT_CALENDARBK (MCHT_CALENDAR)
4477 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
4478 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
4479 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
4480 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
4481 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
4485 #define GMR_VISIBLE 0
4486 #define GMR_DAYSTATE 1
4489 /* Month calendar's structures */
4497 } MCHITTESTINFO
, *PMCHITTESTINFO
;
4499 typedef struct tagNMSELCHANGE
4502 SYSTEMTIME stSelStart
;
4503 SYSTEMTIME stSelEnd
;
4504 } NMSELCHANGE
, *LPNMSELCHANGE
;
4506 typedef NMSELCHANGE NMSELECT
, *LPNMSELECT
;
4507 typedef DWORD MONTHDAYSTATE
, *LPMONTHDAYSTATE
;
4509 typedef struct tagNMDAYSTATE
4514 LPMONTHDAYSTATE prgDayState
;
4515 } NMDAYSTATE
, *LPNMDAYSTATE
;
4520 #define MonthCal_GetCurSel(hmc, pst) \
4521 (BOOL)SNDMSGA(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
4522 #define MonthCal_SetCurSel(hmc, pst) \
4523 (BOOL)SNDMSGA(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
4524 #define MonthCal_GetMaxSelCount(hmc) \
4525 (DWORD)SNDMSGA(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
4526 #define MonthCal_SetMaxSelCount(hmc, n) \
4527 (BOOL)SNDMSGA(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
4528 #define MonthCal_GetSelRange(hmc, rgst) \
4529 SNDMSGA(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst))
4530 #define MonthCal_SetSelRange(hmc, rgst) \
4531 SNDMSGA(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst))
4532 #define MonthCal_GetMonthRange(hmc, gmr, rgst) \
4533 (DWORD)SNDMSGA(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
4534 #define MonthCal_SetDayState(hmc, cbds, rgds) \
4535 SNDMSGA(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
4536 #define MonthCal_GetMinReqRect(hmc, prc) \
4537 SNDMSGA(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
4538 #define MonthCal_SetColor(hmc, iColor, clr)\
4539 SNDMSGA(hmc, MCM_SETCOLOR, iColor, clr)
4540 #define MonthCal_GetColor(hmc, iColor) \
4541 SNDMSGA(hmc, MCM_SETCOLOR, iColor, 0)
4542 #define MonthCal_GetToday(hmc, pst)\
4543 (BOOL)SNDMSGA(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
4544 #define MonthCal_SetToday(hmc, pst)\
4545 SNDMSGA(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
4546 #define MonthCal_HitTest(hmc, pinfo) \
4547 SNDMSGA(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
4548 #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
4549 SNDMSGA(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
4550 #define MonthCal_GetFirstDayOfWeek(hmc) \
4551 (DWORD)SNDMSGA(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
4552 #define MonthCal_GetRange(hmc, rgst) \
4553 (DWORD)SNDMSGA(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
4554 #define MonthCal_SetRange(hmc, gd, rgst) \
4555 (BOOL)SNDMSGA(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4556 #define MonthCal_GetMonthDelta(hmc) \
4557 (int)SNDMSGA(hmc, MCM_GETMONTHDELTA, 0, 0)
4558 #define MonthCal_SetMonthDelta(hmc, n) \
4559 (int)SNDMSGA(hmc, MCM_SETMONTHDELTA, n, 0)
4560 #define MonthCal_GetMaxTodayWidth(hmc) \
4561 (DWORD)SNDMSGA(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
4562 #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
4563 (BOOL)SNDMSGA((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
4564 #define MonthCal_GetUnicodeFormat(hwnd) \
4565 (BOOL)SNDMSGA((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
4568 /**************************************************************************
4569 * Date and time picker control
4572 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
4573 #if defined(__GNUC__)
4574 # define DATETIMEPICK_CLASSW (const WCHAR []){ 'S','y','s', \
4575 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 }
4576 #elif defined(_MSC_VER)
4577 # define DATETIMEPICK_CLASSW L"SysDateTimePick32"
4579 static const WCHAR DATETIMEPICK_CLASSW
[] = { 'S','y','s',
4580 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 };
4582 #define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
4584 #define DTM_FIRST 0x1000
4585 #define DTN_FIRST (0U-760U)
4586 #define DTN_LAST (0U-799U)
4589 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
4590 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
4591 #define DTM_GETRANGE (DTM_FIRST+3)
4592 #define DTM_SETRANGE (DTM_FIRST+4)
4593 #define DTM_SETFORMATA (DTM_FIRST+5)
4594 #define DTM_SETFORMATW (DTM_FIRST + 50)
4595 #define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
4596 #define DTM_SETMCCOLOR (DTM_FIRST+6)
4597 #define DTM_GETMCCOLOR (DTM_FIRST+7)
4598 #define DTM_GETMONTHCAL (DTM_FIRST+8)
4599 #define DTM_SETMCFONT (DTM_FIRST+9)
4600 #define DTM_GETMCFONT (DTM_FIRST+10)
4603 /* Datetime Notifications */
4605 #define DTN_DATETIMECHANGE (DTN_FIRST + 1)
4606 #define DTN_USERSTRINGA (DTN_FIRST + 2)
4607 #define DTN_WMKEYDOWNA (DTN_FIRST + 3)
4608 #define DTN_FORMATA (DTN_FIRST + 4)
4609 #define DTN_FORMATQUERYA (DTN_FIRST + 5)
4610 #define DTN_DROPDOWN (DTN_FIRST + 6)
4611 #define DTN_CLOSEUP (DTN_FIRST + 7)
4612 #define DTN_USERSTRINGW (DTN_FIRST + 15)
4613 #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
4614 #define DTN_FORMATW (DTN_FIRST + 17)
4615 #define DTN_FORMATQUERYW (DTN_FIRST + 18)
4617 #define DTN_USERSTRING WINELIB_NAME_AW(DTN_USERSTRING)
4618 #define DTN_WMKEYDOWN WINELIB_NAME_AW(DTN_WMKEYDOWN)
4619 #define DTN_FORMAT WINELIB_NAME_AW(DTN_FORMAT)
4620 #define DTN_FORMATQUERY WINELIB_NAME_AW(DTN_FORMATQUERY)
4622 #define DTS_SHORTDATEFORMAT 0x0000
4623 #define DTS_UPDOWN 0x0001
4624 #define DTS_SHOWNONE 0x0002
4625 #define DTS_LONGDATEFORMAT 0x0004
4626 #define DTS_TIMEFORMAT 0x0009
4627 #define DTS_APPCANPARSE 0x0010
4628 #define DTS_RIGHTALIGN 0x0020
4630 typedef struct tagNMDATETIMECHANGE
4635 } NMDATETIMECHANGE
, *LPNMDATETIMECHANGE
;
4637 typedef struct tagNMDATETIMESTRINGA
4640 LPCSTR pszUserString
;
4643 } NMDATETIMESTRINGA
, *LPNMDATETIMESTRINGA
;
4645 typedef struct tagNMDATETIMESTRINGW
4648 LPCWSTR pszUserString
;
4651 } NMDATETIMESTRINGW
, *LPNMDATETIMESTRINGW
;
4653 DECL_WINELIB_TYPE_AW(NMDATETIMESTRING
)
4654 DECL_WINELIB_TYPE_AW(LPNMDATETIMESTRING
)
4656 typedef struct tagNMDATETIMEWMKEYDOWNA
4662 } NMDATETIMEWMKEYDOWNA
, *LPNMDATETIMEWMKEYDOWNA
;
4664 typedef struct tagNMDATETIMEWMKEYDOWNW
4670 } NMDATETIMEWMKEYDOWNW
, *LPNMDATETIMEWMKEYDOWNW
;
4672 DECL_WINELIB_TYPE_AW(NMDATETIMEWMKEYDOWN
)
4673 DECL_WINELIB_TYPE_AW(LPNMDATETIMEWMKEYDOWN
)
4675 typedef struct tagNMDATETIMEFORMATA
4682 } NMDATETIMEFORMATA
, *LPNMDATETIMEFORMATA
;
4685 typedef struct tagNMDATETIMEFORMATW
4691 WCHAR szDisplay
[64];
4692 } NMDATETIMEFORMATW
, *LPNMDATETIMEFORMATW
;
4694 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMAT
)
4695 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMAT
)
4697 typedef struct tagNMDATETIMEFORMATQUERYA
4702 } NMDATETIMEFORMATQUERYA
, *LPNMDATETIMEFORMATQUERYA
;
4704 typedef struct tagNMDATETIMEFORMATQUERYW
4709 } NMDATETIMEFORMATQUERYW
, *LPNMDATETIMEFORMATQUERYW
;
4711 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMATQUERY
)
4712 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMATQUERY
)
4716 #define GDT_ERROR -1
4720 #define GDTR_MIN 0x0001
4721 #define GDTR_MAX 0x0002
4724 #define DateTime_GetSystemtime(hdp, pst) \
4725 (DWORD)SNDMSGA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
4726 #define DateTime_SetSystemtime(hdp, gd, pst) \
4727 (BOOL)SNDMSGA (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
4728 #define DateTime_GetRange(hdp, rgst) \
4729 (DWORD)SNDMSGA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
4730 #define DateTime_SetRange(hdp, gd, rgst) \
4731 (BOOL)SNDMSGA (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4732 #define DateTime_SetFormatA(hdp, sz) \
4733 (BOOL)SNDMSGA (hdp, DTM_SETFORMATA, 0, (LPARAM)(sz))
4734 #define DateTime_SetFormatW(hdp, sz) \
4735 (BOOL)SNDMSGW (hdp, DTM_SETFORMATW, 0, (LPARAM)(sz))
4736 #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
4737 #define DateTime_GetMonthCalColor(hdp, iColor) \
4738 SNDMSGA (hdp, DTM_GETMCCOLOR, iColor, 0)
4739 #define DateTime_GetMonthCal(hdp) \
4740 (HWND) SNDMSGA (hdp, DTM_GETMONTHCAL, 0, 0)
4741 #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \
4742 SNDMSGA (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
4743 #define DateTime_GetMonthCalFont(hdp) \
4744 SNDMSGA (hdp, DTM_GETMCFONT, 0, 0)
4746 #define DA_LAST (0x7fffffff)
4747 #define DPA_APPEND (0x7fffffff)
4748 #define DPA_ERR (-1)
4750 #define DSA_APPEND (0x7fffffff)
4751 #define DSA_ERR (-1)
4754 typedef struct _DSA
*HDSA
;
4756 typedef INT (CALLBACK
*PFNDSAENUMCALLBACK
)(LPVOID
, LPVOID
);
4758 HDSA WINAPI
DSA_Create(INT
, INT
);
4759 BOOL WINAPI
DSA_Destroy(HDSA
);
4760 void WINAPI
DSA_DestroyCallback(HDSA
, PFNDSAENUMCALLBACK
, LPVOID
);
4761 LPVOID WINAPI
DSA_GetItemPtr(HDSA
, INT
);
4762 INT WINAPI
DSA_InsertItem(HDSA
, INT
, LPVOID
);
4764 #define DPAS_SORTED 0x0001
4765 #define DPAS_INSERTBEFORE 0x0002
4766 #define DPAS_INSERTAFTER 0x0004
4770 typedef struct _DPA
*HDPA
;
4772 typedef INT (CALLBACK
*PFNDPAENUMCALLBACK
)(LPVOID
, LPVOID
);
4773 typedef INT (CALLBACK
*PFNDPACOMPARE
)(LPVOID
, LPVOID
, LPARAM
);
4775 HDPA WINAPI
DPA_Create(INT
);
4776 BOOL WINAPI
DPA_Destroy(HDPA
);
4777 LPVOID WINAPI
DPA_DeletePtr(HDPA
, INT
);
4778 BOOL WINAPI
DPA_DeleteAllPtrs(HDPA
);
4779 BOOL WINAPI
DPA_SetPtr(HDPA
, INT
, LPVOID
);
4780 LPVOID WINAPI
DPA_GetPtr(HDPA
, INT
);
4781 INT WINAPI
DPA_InsertPtr(HDPA
, INT
, LPVOID
);
4782 BOOL WINAPI
DPA_Sort(HDPA
, PFNDPACOMPARE
, LPARAM
);
4783 void WINAPI
DPA_EnumCallback(HDPA
, PFNDPAENUMCALLBACK
, LPVOID
);
4784 void WINAPI
DPA_DestroyCallback(HDPA
, PFNDPAENUMCALLBACK
, LPVOID
);
4785 INT WINAPI
DPA_Search(HDPA
, LPVOID
, INT
, PFNDPACOMPARE
, LPARAM
, UINT
);
4787 BOOL WINAPI
Str_SetPtrW (LPWSTR
*, LPCWSTR
);
4789 /**************************************************************************
4793 #if defined(__GNUC__)
4794 # define WC_LINK (const WCHAR []){ 'S','y','s','L','i','n','k',0 }
4795 #elif defined(_MSC_VER)
4796 # define WC_LINK L"SysLink"
4798 static const WCHAR WC_LINK
[] = { 'S','y','s','L','i','n','k',0 };
4801 /* SysLink messages */
4802 #define LM_HITTEST (WM_USER + 768)
4803 #define LM_GETIDEALHEIGHT (WM_USER + 769)
4804 #define LM_SETITEM (WM_USER + 770)
4805 #define LM_GETITEM (WM_USER + 771)
4807 /* SysLink links flags */
4809 #define LIF_ITEMINDEX 1
4811 #define LIF_ITEMID 4
4814 /* SysLink links states */
4816 #define LIS_FOCUSED 1
4817 #define LIS_ENABLED 2
4818 #define LIS_VISITED 4
4822 #define INVALID_LINK_INDEX (-1)
4823 #define MAX_LINKID_TEXT 48
4824 #define L_MAX_URL_LENGTH 2084
4826 /* SysLink structures */
4828 typedef struct tagLITEM
4834 WCHAR szID
[MAX_LINKID_TEXT
];
4835 WCHAR szUrl
[L_MAX_URL_LENGTH
];
4838 typedef struct tagLHITTESTINFO
4842 } LHITTESTINFO
, *PLHITTESTINFO
;
4844 typedef struct tagNMLINK
4854 #endif /* __WINE_COMMCTRL_H */