2 * Common controls definitions
5 #ifndef __WINE_COMMCTRL_H
6 #define __WINE_COMMCTRL_H
11 #include "imagelist.h"
18 BOOL WINAPI ShowHideMenuCtl (HWND, UINT, LPINT);
19 VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, LPINT);
20 VOID WINAPI InitCommonControls (VOID);
22 typedef struct tagINITCOMMONCONTROLSEX {
25 } INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
27 BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
29 #define COMCTL32_VERSION 5 /* dll version */
31 #define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
32 #define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
33 #define ICC_BAR_CLASSES 0x00000004 /* toolbar, statusbar, trackbar, tooltips */
34 #define ICC_TAB_CLASSES 0x00000008 /* tab, tooltips */
35 #define ICC_UPDOWN_CLASS 0x00000010 /* updown */
36 #define ICC_PROGRESS_CLASS 0x00000020 /* progress */
37 #define ICC_HOTKEY_CLASS 0x00000040 /* hotkey */
38 #define ICC_ANIMATE_CLASS 0x00000080 /* animate */
39 #define ICC_WIN95_CLASSES 0x000000FF
40 #define ICC_DATE_CLASSES 0x00000100 /* month picker, date picker, time picker, updown */
41 #define ICC_USEREX_CLASSES 0x00000200 /* comboex */
42 #define ICC_COOL_CLASSES 0x00000400 /* rebar (coolbar) */
43 #define ICC_INTERNET_CLASSES 0x00000800 /* IP address, ... */
44 #define ICC_PAGESCROLLER_CLASS 0x00001000 /* page scroller */
45 #define ICC_NATIVEFNTCTL_CLASS 0x00002000 /* native font control ???*/
48 /* common control styles */
49 #define CCS_TOP 0x00000001L
50 #define CCS_NOMOVEY 0x00000002L
51 #define CCS_BOTTOM 0x00000003L
52 #define CCS_NORESIZE 0x00000004L
53 #define CCS_NOPARENTALIGN 0x00000008L
54 #define CCS_ADJUSTABLE 0x00000020L
55 #define CCS_NODIVIDER 0x00000040L
56 #define CCS_VERT 0x00000080L
57 #define CCS_LEFT (CCS_VERT|CCS_TOP)
58 #define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
59 #define CCS_NOMOVEX (CCS_VERT|CCS_NOMOVEY)
62 /* common control shared messages */
63 #define CCM_FIRST 0x2000
65 #define CCM_SETBKCOLOR (CCM_FIRST+1) /* lParam = bkColor */
66 #define CCM_SETCOLORSCHEME (CCM_FIRST+2)
67 #define CCM_GETCOLORSCHEME (CCM_FIRST+3)
68 #define CCM_GETDROPTARGET (CCM_FIRST+4)
69 #define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
70 #define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
71 #define CCM_SETVERSION (CCM_FIRST+7)
72 #define CCM_GETVERSION (CCM_FIRST+8)
73 #define CCM_SETNOTIFYWINDOW (CCM_FIRST+9) /* wParam = hwndParent */
76 /* common notification codes (WM_NOTIFY)*/
77 #define NM_FIRST (0U- 0U)
78 #define NM_LAST (0U- 99U)
79 #define NM_OUTOFMEMORY (NM_FIRST-1)
80 #define NM_CLICK (NM_FIRST-2)
81 #define NM_DBLCLK (NM_FIRST-3)
82 #define NM_RETURN (NM_FIRST-4)
83 #define NM_RCLICK (NM_FIRST-5)
84 #define NM_RDBLCLK (NM_FIRST-6)
85 #define NM_SETFOCUS (NM_FIRST-7)
86 #define NM_KILLFOCUS (NM_FIRST-8)
87 #define NM_CUSTOMDRAW (NM_FIRST-12)
88 #define NM_HOVER (NM_FIRST-13)
89 #define NM_NCHITTEST (NM_FIRST-14)
90 #define NM_KEYDOWN (NM_FIRST-15)
91 #define NM_RELEASEDCAPTURE (NM_FIRST-16)
92 #define NM_SETCURSOR (NM_FIRST-17)
93 #define NM_CHAR (NM_FIRST-18)
94 #define NM_TOOLTIPSCREATED (NM_FIRST-19)
95 #define NM_UPDOWN NMUPDOWN
97 /* callback constants */
98 #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
99 #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
100 #define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
102 #define I_IMAGECALLBACK (-1)
103 #define I_INDENTCALLBACK (-1)
104 #define I_CHILDRENCALLBACK (-1)
107 /* owner drawn types */
108 #define ODT_HEADER 100
110 #define ODT_LISTVIEW 102
112 /* common notification structures */
113 typedef struct tagNMTOOLTIPSCREATED
117 } NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;
120 #ifndef CCSIZEOF_STRUCT
121 #define CCSIZEOF_STRUCT(name, member) \
122 (((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
123 sizeof(((name*)0)->member))
127 /* This is only for Winelib applications. DON't use it wine itself!!! */
128 #define SNDMSG WINELIB_NAME_AW(SendMessage)
132 /* Custom Draw messages */
134 #define CDRF_DODEFAULT 0x0
135 #define CDRF_NEWFONT 0x00000002
136 #define CDRF_SKIPDEFAULT 0x00000004
137 #define CDRF_NOTIFYPOSTPAINT 0x00000010
138 #define CDRF_NOTIFYITEMDRAW 0x00000020
139 #define CDRF_NOTIFYSUBITEMDRAW 0x00000020
140 #define CDRF_NOTIFYPOSTERASE 0x00000040
141 #define CDRF_NOTIFYITEMERASE 0x00000080 /* obsolete ??? */
144 /* drawstage flags */
146 #define CDDS_PREPAINT 1
147 #define CDDS_POSTPAINT 2
148 #define CDDS_PREERASE 3
149 #define CDDS_POSTERASE 4
151 #define CDDS_ITEM 0x00010000
152 #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
153 #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
154 #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
155 #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
156 #define CDDS_SUBITEM 0x00020000
158 /* itemState flags */
160 #define CDIS_SELECTED 0x0001
161 #define CDIS_GRAYED 0x0002
162 #define CDIS_DISABLED 0x0004
163 #define CDIS_CHECKED 0x0008
164 #define CDIS_FOCUS 0x0010
165 #define CDIS_DEFAULT 0x0020
166 #define CDIS_HOT 0x0040
167 #define CDIS_MARKED 0x0080
168 #define CDIS_INDETERMINATE 0x0100
171 typedef struct tagNMCUSTOMDRAWINFO
180 } NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
182 typedef struct tagNMTTCUSTOMDRAW
186 } NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
193 #define STATUSCLASSNAME16 "msctls_statusbar"
194 #define STATUSCLASSNAMEA "msctls_statusbar32"
195 /* Does not work. gcc creates 4 byte wide strings.
196 * #define STATUSCLASSNAME32W L"msctls_statusbar32"
198 static const WCHAR _scn32w[] = {
199 'm','s','c','t','l','s','_','s','t','a','t','u','s','b','a','r','3','2',0
201 #define STATUSCLASSNAMEW _scn32w
202 #define STATUSCLASSNAME WINELIB_NAME_AW(STATUSCLASSNAME)
204 #define SBT_NOBORDERS 0x0100
205 #define SBT_POPOUT 0x0200
206 #define SBT_RTLREADING 0x0400 /* not supported */
207 #define SBT_TOOLTIPS 0x0800
208 #define SBT_OWNERDRAW 0x1000
210 #define SBARS_SIZEGRIP 0x0100
212 #define SB_SETTEXTA (WM_USER+1)
213 #define SB_SETTEXTW (WM_USER+11)
214 #define SB_SETTEXT WINELIB_NAME_AW(SB_SETTEXT)
215 #define SB_GETTEXTA (WM_USER+2)
216 #define SB_GETTEXTW (WM_USER+13)
217 #define SB_GETTEXT WINELIB_NAME_AW(SB_GETTEXT)
218 #define SB_GETTEXTLENGTHA (WM_USER+3)
219 #define SB_GETTEXTLENGTHW (WM_USER+12)
220 #define SB_GETTEXTLENGTH WINELIB_NAME_AW(SB_GETTEXTLENGTH)
221 #define SB_SETPARTS (WM_USER+4)
222 #define SB_GETPARTS (WM_USER+6)
223 #define SB_GETBORDERS (WM_USER+7)
224 #define SB_SETMINHEIGHT (WM_USER+8)
225 #define SB_SIMPLE (WM_USER+9)
226 #define SB_GETRECT (WM_USER+10)
227 #define SB_ISSIMPLE (WM_USER+14)
228 #define SB_SETICON (WM_USER+15)
229 #define SB_SETTIPTEXTA (WM_USER+16)
230 #define SB_SETTIPTEXTW (WM_USER+17)
231 #define SB_SETTIPTEXT WINELIB_NAME_AW(SB_SETTIPTEXT)
232 #define SB_GETTIPTEXTA (WM_USER+18)
233 #define SB_GETTIPTEXTW (WM_USER+19)
234 #define SB_GETTIPTEXT WINELIB_NAME_AW(SB_GETTIPTEXT)
235 #define SB_GETICON (WM_USER+20)
236 #define SB_SETBKCOLOR CCM_SETBKCOLOR /* lParam = bkColor */
237 #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
238 #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
240 #define SBN_FIRST (0U-880U)
241 #define SBN_LAST (0U-899U)
242 #define SBN_SIMPLEMODECHANGE (SBN_FIRST-0)
244 HWND WINAPI CreateStatusWindowA (INT, LPCSTR, HWND, UINT);
245 HWND WINAPI CreateStatusWindowW (INT, LPCWSTR, HWND, UINT);
246 #define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
247 VOID WINAPI DrawStatusTextA (HDC, LPRECT, LPCSTR, UINT);
248 VOID WINAPI DrawStatusTextW (HDC, LPRECT, LPCWSTR, UINT);
249 #define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
250 VOID WINAPI MenuHelp (UINT, WPARAM, LPARAM, HMENU,
251 HINSTANCE, HWND, LPUINT);
253 /**************************************************************************
257 typedef struct tagDRAGLISTINFO
262 } DRAGLISTINFO, *LPDRAGLISTINFO;
264 #define DL_BEGINDRAG (WM_USER+133)
265 #define DL_DRAGGING (WM_USER+134)
266 #define DL_DROPPED (WM_USER+135)
267 #define DL_CANCELDRAG (WM_USER+136)
269 #define DL_CURSORSET 0
270 #define DL_STOPCURSOR 1
271 #define DL_COPYCURSOR 2
272 #define DL_MOVECURSOR 3
274 #define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
276 BOOL WINAPI MakeDragList (HWND);
277 VOID WINAPI DrawInsert (HWND, HWND, INT);
278 INT WINAPI LBItemFromPt (HWND, POINT, BOOL);
283 #define UPDOWN_CLASS16 "msctls_updown"
284 #define UPDOWN_CLASSA "msctls_updown32"
285 #define UPDOWN_CLASSW L"msctls_updown32"
286 #define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
288 typedef struct tagUDACCEL
294 #define UD_MAXVAL 0x7fff
295 #define UD_MINVAL 0x8001
297 #define UDS_WRAP 0x0001
298 #define UDS_SETBUDDYINT 0x0002
299 #define UDS_ALIGNRIGHT 0x0004
300 #define UDS_ALIGNLEFT 0x0008
301 #define UDS_AUTOBUDDY 0x0010
302 #define UDS_ARROWKEYS 0x0020
303 #define UDS_HORZ 0x0040
304 #define UDS_NOTHOUSANDS 0x0080
306 #define UDN_FIRST (0U-721)
307 #define UDN_LAST (0U-740)
308 #define UDN_DELTAPOS (UDN_FIRST-1)
310 #define UDM_SETRANGE (WM_USER+101)
311 #define UDM_GETRANGE (WM_USER+102)
312 #define UDM_SETPOS (WM_USER+103)
313 #define UDM_GETPOS (WM_USER+104)
314 #define UDM_SETBUDDY (WM_USER+105)
315 #define UDM_GETBUDDY (WM_USER+106)
316 #define UDM_SETACCEL (WM_USER+107)
317 #define UDM_GETACCEL (WM_USER+108)
318 #define UDM_SETBASE (WM_USER+109)
319 #define UDM_GETBASE (WM_USER+110)
320 #define UDM_SETRANGE32 (WM_USER+111)
321 #define UDM_GETRANGE32 (WM_USER+112)
323 HWND WINAPI CreateUpDownControl (DWORD, INT, INT, INT, INT,
324 HWND, INT, HINSTANCE, HWND,
329 #define PROGRESS_CLASSA "msctls_progress32"
330 #define PROGRESS_CLASSW L"msctls_progress32"
331 #define PROGRESS_CLASS16 "msctls_progress"
332 #define PROGRESS_CLASS WINELIB_NAME_AW(PROGRESS_CLASS)
334 #define PBM_SETRANGE (WM_USER+1)
335 #define PBM_SETPOS (WM_USER+2)
336 #define PBM_DELTAPOS (WM_USER+3)
337 #define PBM_SETSTEP (WM_USER+4)
338 #define PBM_STEPIT (WM_USER+5)
339 #define PBM_SETRANGE32 (WM_USER+6)
340 #define PBM_GETRANGE (WM_USER+7)
341 #define PBM_GETPOS (WM_USER+8)
342 #define PBM_SETBARCOLOR (WM_USER+9)
343 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
345 #define PBS_SMOOTH 0x01
346 #define PBS_VERTICAL 0x04
352 } PBRANGE, *PPBRANGE;
357 #if !defined(__WINE__) || !defined(__WINE_IMAGELIST_C)
359 typedef struct _IMAGELIST *HIMAGELIST;
360 #endif */ /* __WINE__ */
362 #define CLR_NONE 0xFFFFFFFF
363 #define CLR_DEFAULT 0xFF000000
364 #define CLR_HILIGHT CLR_DEFAULT
366 #define ILC_MASK 0x0001
367 #define ILC_COLOR 0x0000
368 #define ILC_COLORDDB 0x00FE
369 #define ILC_COLOR4 0x0004
370 #define ILC_COLOR8 0x0008
371 #define ILC_COLOR16 0x0010
372 #define ILC_COLOR24 0x0018
373 #define ILC_COLOR32 0x0020
374 #define ILC_PALETTE 0x0800 /* no longer supported by M$ */
376 #define ILD_NORMAL 0x0000
377 #define ILD_TRANSPARENT 0x0001
378 #define ILD_BLEND25 0x0002
379 #define ILD_BLEND50 0x0004
380 #define ILD_MASK 0x0010
381 #define ILD_IMAGE 0x0020
382 #define ILD_ROP 0x0040
383 #define ILD_OVERLAYMASK 0x0F00
385 #define ILD_SELECTED ILD_BLEND50
386 #define ILD_FOCUS ILD_BLEND25
387 #define ILD_BLEND ILD_BLEND50
389 #define INDEXTOOVERLAYMASK(i) ((i)<<8)
390 #define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
392 #define ILCF_MOVE (0x00000000)
393 #define ILCF_SWAP (0x00000001)
396 typedef struct _IMAGEINFO
406 typedef struct _IMAGELISTDRAWPARAMS
416 INT xBitmap; /* x offest from the upperleft of bitmap */
417 INT yBitmap; /* y offset from the upperleft of bitmap */
422 } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
425 INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
426 INT WINAPI ImageList_AddIcon (HIMAGELIST, HICON);
427 INT WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
428 BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT);
429 BOOL WINAPI ImageList_Copy(HIMAGELIST,INT,HIMAGELIST,INT,INT);
430 HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
431 BOOL WINAPI ImageList_Destroy(HIMAGELIST);
432 BOOL WINAPI ImageList_DragEnter(HWND,INT,INT);
433 BOOL WINAPI ImageList_DragLeave(HWND);
434 BOOL WINAPI ImageList_DragMove(INT,INT);
435 BOOL WINAPI ImageList_DragShowNolock (BOOL);
436 BOOL WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
437 BOOL WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
438 INT,COLORREF,COLORREF,UINT);
439 BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
440 HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
441 BOOL WINAPI ImageList_EndDrag(VOID);
442 COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
443 HIMAGELIST WINAPI ImageList_GetDragImage(POINT*,POINT*);
444 HICON WINAPI ImageList_GetIcon(HIMAGELIST,INT,UINT);
445 BOOL WINAPI ImageList_GetIconSize(HIMAGELIST,INT*,INT*);
446 INT WINAPI ImageList_GetImageCount(HIMAGELIST);
447 BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST,INT,IMAGEINFO*);
448 BOOL WINAPI ImageList_GetImageRect(HIMAGELIST,INT,LPRECT);
449 HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,INT,INT,
451 HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,INT,INT,
453 #define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
454 HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
455 #ifdef __IStream_INTREFACE_DEFINED__
456 HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
458 BOOL WINAPI ImageList_Remove(HIMAGELIST,INT);
459 BOOL WINAPI ImageList_Replace(HIMAGELIST,INT,HBITMAP,HBITMAP);
460 INT WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT,HICON);
461 COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
462 BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT,INT,INT);
464 BOOL WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
465 BOOL WINAPI ImageList_SetImageCount(HIMAGELIST,INT);
466 BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
467 #ifdef __IStream_INTREFACE_DEFINED__
468 BOOL WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
472 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
474 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
475 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
476 ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
477 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
480 #ifndef WM_MOUSEHOVER
481 #define WM_MOUSEHOVER 0x02A1
482 #define WM_MOUSELEAVE 0x02A3
487 #define TME_HOVER 0x00000001
488 #define TME_LEAVE 0x00000002
489 #define TME_QUERY 0x40000000
490 #define TME_CANCEL 0x80000000
493 #define HOVER_DEFAULT 0xFFFFFFFF
495 typedef struct tagTRACKMOUSEEVENT {
500 } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
507 LPTRACKMOUSEEVENT lpEventTrack);
509 /* Flat Scrollbar control */
511 #define FLATSB_CLASS16 "flatsb_class"
512 #define FLATSB_CLASSA "flatsb_class32"
513 #define FLATSB_CLASSW L"flatsb_class32"
514 #define FLATSB_CLASS WINELIB_NAME_AW(FLATSB_CLASS)
516 #define WSB_PROP_CYVSCROLL 0x00000001L
517 #define WSB_PROP_CXHSCROLL 0x00000002L
518 #define WSB_PROP_CYHSCROLL 0x00000004L
519 #define WSB_PROP_CXVSCROLL 0x00000008L
520 #define WSB_PROP_CXHTHUMB 0x00000010L
521 #define WSB_PROP_CYVTHUMB 0x00000020L
522 #define WSB_PROP_VBKGCOLOR 0x00000040L
523 #define WSB_PROP_HBKGCOLOR 0x00000080L
524 #define WSB_PROP_VSTYLE 0x00000100L
525 #define WSB_PROP_HSTYLE 0x00000200L
526 #define WSB_PROP_WINSTYLE 0x00000400L
527 #define WSB_PROP_PALETTE 0x00000800L
528 #define WSB_PROP_MASK 0x00000FFFL
530 #define FSB_REGULAR_MODE 0
531 #define FSB_ENCARTA_MODE 1
532 #define FSB_FLAT_MODE 2
535 BOOL WINAPI FlatSB_EnableScrollBar(HWND, INT, UINT);
536 BOOL WINAPI FlatSB_ShowScrollBar(HWND, INT, BOOL);
537 BOOL WINAPI FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
538 BOOL WINAPI FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
539 INT WINAPI FlatSB_GetScrollPos(HWND, INT);
540 BOOL WINAPI FlatSB_GetScrollProp(HWND, INT, LPINT);
541 INT WINAPI FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
542 INT WINAPI FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
543 INT WINAPI FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
544 BOOL WINAPI FlatSB_SetScrollProp(HWND, UINT, INT, BOOL);
545 BOOL WINAPI InitializeFlatSB(HWND);
546 HRESULT WINAPI UninitializeFlatSB(HWND);
551 #define WC_HEADER16 "SysHeader"
552 #define WC_HEADERA "SysHeader32"
553 #define WC_HEADERW L"SysHeader32"
554 #define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
556 #define HDS_HORZ 0x0000
557 #define HDS_BUTTONS 0x0002
558 #define HDS_HOTTRACK 0x0004
559 #define HDS_HIDDEN 0x0008
560 #define HDS_DRAGDROP 0x0040
561 #define HDS_FULLDRAG 0x0080
563 #define HDI_WIDTH 0x0001
564 #define HDI_HEIGHT HDI_WIDTH
565 #define HDI_TEXT 0x0002
566 #define HDI_FORMAT 0x0004
567 #define HDI_LPARAM 0x0008
568 #define HDI_BITMAP 0x0010
569 #define HDI_IMAGE 0x0020
570 #define HDI_DI_SETITEM 0x0040
571 #define HDI_ORDER 0x0080
573 #define HDF_LEFT 0x0000
574 #define HDF_RIGHT 0x0001
575 #define HDF_CENTER 0x0002
576 #define HDF_JUSTIFYMASK 0x0003
578 #define HDF_IMAGE 0x0800
579 #define HDF_BITMAP_ON_RIGHT 0x1000
580 #define HDF_BITMAP 0x2000
581 #define HDF_STRING 0x4000
582 #define HDF_OWNERDRAW 0x8000
584 #define HHT_NOWHERE 0x0001
585 #define HHT_ONHEADER 0x0002
586 #define HHT_ONDIVIDER 0x0004
587 #define HHT_ONDIVOPEN 0x0008
588 #define HHT_ABOVE 0x0100
589 #define HHT_BELOW 0x0200
590 #define HHT_TORIGHT 0x0400
591 #define HHT_TOLEFT 0x0800
593 #define HDM_FIRST 0x1200
594 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
595 #define HDM_INSERTITEMA (HDM_FIRST+1)
596 #define HDM_INSERTITEMW (HDM_FIRST+10)
597 #define HDM_INSERTITEM WINELIB_NAME_AW(HDM_INSERTITEM)
598 #define HDM_DELETEITEM (HDM_FIRST+2)
599 #define HDM_GETITEMA (HDM_FIRST+3)
600 #define HDM_GETITEMW (HDM_FIRST+11)
601 #define HDM_GETITEM WINELIB_NAME_AW(HDM_GETITEM)
602 #define HDM_SETITEMA (HDM_FIRST+4)
603 #define HDM_SETITEMW (HDM_FIRST+12)
604 #define HDM_SETITEM WINELIB_NAME_AW(HDM_SETITEM)
605 #define HDM_LAYOUT (HDM_FIRST+5)
606 #define HDM_HITTEST (HDM_FIRST+6)
607 #define HDM_GETITEMRECT (HDM_FIRST+7)
608 #define HDM_SETIMAGELIST (HDM_FIRST+8)
609 #define HDM_GETIMAGELIST (HDM_FIRST+9)
611 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
612 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
613 #define HDM_GETORDERARRAY (HDM_FIRST+17)
614 #define HDM_SETORDERARRAY (HDM_FIRST+18)
615 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
616 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
617 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
619 #define HDN_FIRST (0U-300U)
620 #define HDN_LAST (0U-399U)
621 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
622 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
623 #define HDN_ITEMCHANGING WINELIB_NAME_AW(HDN_ITEMCHANGING)
624 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
625 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
626 #define HDN_ITEMCHANGED WINELIB_NAME_AW(HDN_ITEMCHANGED)
627 #define HDN_ITEMCLICKA (HDN_FIRST-2)
628 #define HDN_ITEMCLICKW (HDN_FIRST-22)
629 #define HDN_ITEMCLICK WINELIB_NAME_AW(HDN_ITEMCLICK)
630 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
631 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
632 #define HDN_ITEMDBLCLICK WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
633 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
634 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
635 #define HDN_DIVIDERDBLCLICK WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
636 #define HDN_BEGINTRACKA (HDN_FIRST-6)
637 #define HDN_BEGINTRACKW (HDN_FIRST-26)
638 #define HDN_BEGINTRACK WINELIB_NAME_AW(HDN_BEGINTRACK)
639 #define HDN_ENDTRACKA (HDN_FIRST-7)
640 #define HDN_ENDTRACKW (HDN_FIRST-27)
641 #define HDN_ENDTRACK WINELIB_NAME_AW(HDN_ENDTRACK)
642 #define HDN_TRACKA (HDN_FIRST-8)
643 #define HDN_TRACKW (HDN_FIRST-28)
644 #define HDN_TRACK WINELIB_NAME_AW(HDN_TRACK)
645 #define HDN_GETDISPINFOA (HDN_FIRST-9)
646 #define HDN_GETDISPINFOW (HDN_FIRST-29)
647 #define HDN_GETDISPINFO WINELIB_NAME_AW(HDN_GETDISPINFO)
648 #define HDN_BEGINDRACK (HDN_FIRST-10)
649 #define HDN_ENDDRACK (HDN_FIRST-11)
651 typedef struct _HD_LAYOUT
655 } HDLAYOUT, *LPHDLAYOUT;
657 #define HD_LAYOUT HDLAYOUT
659 typedef struct _HD_ITEMA
670 } HDITEMA, *LPHDITEMA;
672 typedef struct _HD_ITEMW
683 } HDITEMW, *LPHDITEMW;
685 #define HDITEM WINELIB_NAME_AW(HDITEM)
686 #define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
687 #define HD_ITEM HDITEM
689 #define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
690 #define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
691 #define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
693 typedef struct _HD_HITTESTINFO
698 } HDHITTESTINFO, *LPHDHITTESTINFO;
700 #define HD_HITTESTINFO HDHITTESTINFO
702 typedef struct tagNMHEADERA
708 } NMHEADERA, *LPNMHEADERA;
710 typedef struct tagNMHEADERW
716 } NMHEADERW, *LPNMHEADERW;
718 #define NMHEADER WINELIB_NAME_AW(NMHEADER)
719 #define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
720 #define HD_NOTIFY NMHEADER
722 typedef struct tagNMHDDISPINFOA
731 } NMHDDISPINFOA, *LPNMHDDISPINFOA;
733 typedef struct tagNMHDDISPINFOW
742 } NMHDDISPINFOW, *LPNMHDDISPINFOW;
744 #define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
745 #define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
747 #define Header_GetItemCount(hwndHD) \
748 (INT)SendMessageA((hwndHD),HDM_GETITEMCOUNT,0,0L)
749 #define Header_InsertItemA(hwndHD,i,phdi) \
750 (INT)SendMessageA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
751 #define Header_InsertItemW(hwndHD,i,phdi) \
752 (INT)SendMessageW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
753 #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
754 #define Header_DeleteItem(hwndHD,i) \
755 (BOOL)SendMessageA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
756 #define Header_GetItemA(hwndHD,i,phdi) \
757 (BOOL)SendMessageA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
758 #define Header_GetItemW(hwndHD,i,phdi) \
759 (BOOL)SendMessageW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
760 #define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
761 #define Header_SetItemA(hwndHD,i,phdi) \
762 (BOOL)SendMessageA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
763 #define Header_SetItemW(hwndHD,i,phdi) \
764 (BOOL)SendMessageW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
765 #define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
766 #define Header_Layout(hwndHD,playout) \
767 (BOOL)SendMessageA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
768 #define Header_GetItemRect(hwnd,iItem,lprc) \
769 (BOOL)SendMessageA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
770 #define Header_SetImageList(hwnd,himl) \
771 (HIMAGELIST)SendMessageA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
772 #define Header_GetImageList(hwnd) \
773 (HIMAGELIST)SendMessageA((hwnd),HDM_GETIMAGELIST,0,0)
774 #define Header_OrderToIndex(hwnd,i) \
775 (INT)SendMessageA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
776 #define Header_CreateDragImage(hwnd,i) \
777 (HIMAGELIST)SendMessageA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
778 #define Header_GetOrderArray(hwnd,iCount,lpi) \
779 (BOOL)SendMessageA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
780 #define Header_SetOrderArray(hwnd,iCount,lpi) \
781 (BOOL)SendMessageA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
782 #define Header_SetHotDivider(hwnd,fPos,dw) \
783 (INT)SendMessageA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
784 #define Header_SetUnicodeFormat(hwnd,fUnicode) \
785 (BOOL)SendMessageA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
786 #define Header_GetUnicodeFormat(hwnd) \
787 (BOOL)SendMessageA((hwnd),HDM_GETUNICODEFORMAT,0,0)
792 #define TOOLBARCLASSNAME16 "ToolbarWindow"
793 #define TOOLBARCLASSNAMEW "ToolbarWindow32"
794 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
795 #define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
797 #define CMB_MASKED 0x02
799 #define TBSTATE_CHECKED 0x01
800 #define TBSTATE_PRESSED 0x02
801 #define TBSTATE_ENABLED 0x04
802 #define TBSTATE_HIDDEN 0x08
803 #define TBSTATE_INDETERMINATE 0x10
804 #define TBSTATE_WRAP 0x20
805 #define TBSTATE_ELLIPSES 0x40
806 #define TBSTATE_MARKED 0x80
808 #define TBSTYLE_BUTTON 0x00
809 #define TBSTYLE_SEP 0x01
810 #define TBSTYLE_CHECK 0x02
811 #define TBSTYLE_GROUP 0x04
812 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
813 #define TBSTYLE_DROPDOWN 0x08
815 #define TBSTYLE_TOOLTIPS 0x0100
816 #define TBSTYLE_WRAPABLE 0x0200
817 #define TBSTYLE_ALTDRAG 0x0400
818 #define TBSTYLE_FLAT 0x0800
819 #define TBSTYLE_LIST 0x1000
820 #define TBSTYLE_CUSTOMERASE 0x2000
822 #define TBIF_IMAGE 0x00000001
823 #define TBIF_TEXT 0x00000002
824 #define TBIF_STATE 0x00000004
825 #define TBIF_STYLE 0x00000008
826 #define TBIF_LPARAM 0x00000010
827 #define TBIF_COMMAND 0x00000020
828 #define TBIF_SIZE 0x00000040
830 #define TBBF_LARGE 0x0001
832 #define TB_ENABLEBUTTON (WM_USER+1)
833 #define TB_CHECKBUTTON (WM_USER+2)
834 #define TB_PRESSBUTTON (WM_USER+3)
835 #define TB_HIDEBUTTON (WM_USER+4)
836 #define TB_INDETERMINATE (WM_USER+5)
837 #define TB_ISBUTTONENABLED (WM_USER+9)
838 #define TB_ISBUTTONCHECKED (WM_USER+10)
839 #define TB_ISBUTTONPRESSED (WM_USER+11)
840 #define TB_ISBUTTONHIDDEN (WM_USER+12)
841 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
842 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
843 #define TB_SETSTATE (WM_USER+17)
844 #define TB_GETSTATE (WM_USER+18)
845 #define TB_ADDBITMAP (WM_USER+19)
846 #define TB_ADDBUTTONSA (WM_USER+20)
847 #define TB_ADDBUTTONSW (WM_USER+68)
848 #define TB_ADDBUTTONS WINELIB_NAME_AW(TB_ADDBUTTONS)
849 #define TB_HITTEST (WM_USER+69)
850 #define TB_INSERTBUTTONA (WM_USER+21)
851 #define TB_INSERTBUTTONW (WM_USER+67)
852 #define TB_INSERTBUTTON WINELIB_NAME_AW(TB_INSERTBUTTON)
853 #define TB_DELETEBUTTON (WM_USER+22)
854 #define TB_GETBUTTON (WM_USER+23)
855 #define TB_BUTTONCOUNT (WM_USER+24)
856 #define TB_COMMANDTOINDEX (WM_USER+25)
857 #define TB_SAVERESTOREA (WM_USER+26)
858 #define TB_SAVERESTOREW (WM_USER+76)
859 #define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
860 #define TB_CUSTOMIZE (WM_USER+27)
861 #define TB_ADDSTRINGA (WM_USER+28)
862 #define TB_ADDSTRINGW (WM_USER+77)
863 #define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
864 #define TB_GETITEMRECT (WM_USER+29)
865 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
866 #define TB_SETBUTTONSIZE (WM_USER+31)
867 #define TB_SETBITMAPSIZE (WM_USER+32)
868 #define TB_AUTOSIZE (WM_USER+33)
869 #define TB_GETTOOLTIPS (WM_USER+35)
870 #define TB_SETTOOLTIPS (WM_USER+36)
871 #define TB_SETPARENT (WM_USER+37)
872 #define TB_SETROWS (WM_USER+39)
873 #define TB_GETROWS (WM_USER+40)
874 #define TB_GETBITMAPFLAGS (WM_USER+41)
875 #define TB_SETCMDID (WM_USER+42)
876 #define TB_CHANGEBITMAP (WM_USER+43)
877 #define TB_GETBITMAP (WM_USER+44)
878 #define TB_GETBUTTONTEXTA (WM_USER+45)
879 #define TB_GETBUTTONTEXTW (WM_USER+75)
880 #define TB_GETBUTTONTEXT WINELIB_NAME_AW(TB_GETBUTTONTEXT)
881 #define TB_REPLACEBITMAP (WM_USER+46)
882 #define TB_SETINDENT (WM_USER+47)
883 #define TB_SETIMAGELIST (WM_USER+48)
884 #define TB_GETIMAGELIST (WM_USER+49)
885 #define TB_LOADIMAGES (WM_USER+50)
886 #define TB_GETRECT (WM_USER+51) /* wParam is the Cmd instead of index */
887 #define TB_SETHOTIMAGELIST (WM_USER+52)
888 #define TB_GETHOTIMAGELIST (WM_USER+53)
889 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
890 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
891 #define TB_SETSTYLE (WM_USER+56)
892 #define TB_GETSTYLE (WM_USER+57)
893 #define TB_GETBUTTONSIZE (WM_USER+58)
894 #define TB_SETBUTTONWIDTH (WM_USER+59)
895 #define TB_SETMAXTEXTROWS (WM_USER+60)
896 #define TB_GETTEXTROWS (WM_USER+61)
897 #define TB_GETOBJECT (WM_USER+62)
898 #define TB_GETBUTTONINFOW (WM_USER+63)
899 #define TB_GETBUTTONINFOA (WM_USER+65)
900 #define TB_GETBUTTONINFO WINELIB_NAME_AW(TB_GETBUTTONINFO)
901 #define TB_SETBUTTONINFOW (WM_USER+64)
902 #define TB_SETBUTTONINFOA (WM_USER+66)
903 #define TB_SETBUTTONINFO WINELIB_NAME_AW(TB_SETBUTTONINFO)
904 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
905 #define TB_GETHOTITEM (WM_USER+71)
906 #define TB_SETHOTITEM (WM_USER+72)
907 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
908 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
909 #define TB_MAPACCELERATORA (WM_USER+78)
910 #define TB_MAPACCELERATORW (WM_USER+90)
911 #define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
912 #define TB_GETINSERTMARK (WM_USER+79)
913 #define TB_SETINSERTMARK (WM_USER+80)
914 #define TB_INSERTMARKHITTEST (WM_USER+81)
915 #define TB_MOVEBUTTON (WM_USER+82)
916 #define TB_GETMAXSIZE (WM_USER+83)
917 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
918 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
919 #define TB_GETPADDING (WM_USER+86)
920 #define TB_SETPADDING (WM_USER+87)
921 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
922 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
923 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
924 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
925 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
926 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
928 #define TBN_FIRST (0U-700U)
929 #define TBN_LAST (0U-720U)
930 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
931 #define TBN_GETBUTTONINFOW (TBN_FIRST-20)
932 #define TBN_GETBUTTONINFO WINELIB_NAME_AW(TBN_GETBUTTONINFO)
933 #define TBN_BEGINDRAG (TBN_FIRST-1)
934 #define TBN_ENDDRAG (TBN_FIRST-2)
935 #define TBN_BEGINADJUST (TBN_FIRST-3)
936 #define TBN_ENDADJUST (TBN_FIRST-4)
937 #define TBN_RESET (TBN_FIRST-5)
938 #define TBN_QUERYINSERT (TBN_FIRST-6)
939 #define TBN_QUERYDELETE (TBN_FIRST-7)
940 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
941 #define TBN_CUSTHELP (TBN_FIRST-9)
942 #define TBN_DROPDOWN (TBN_FIRST-10)
943 #define TBN_GETOBJECT (TBN_FIRST-12)
944 #define TBN_HOTITEMCHANGE (TBN_FIRST-13)
945 #define TBN_DRAGOUT (TBN_FIRST-14)
946 #define TBN_DELETINGBUTTON (TBN_FIRST-15)
947 #define TBN_GETDISPINFOA (TBN_FIRST-16)
948 #define TBN_GETDISPINFOW (TBN_FIRST-17)
949 #define TBN_GETDISPINFO WINELIB_NAME_AW(TBN_GETDISPINFO)
950 #define TBN_GETINFOTIPA (TBN_FIRST-18)
951 #define TBN_GETINFOTIPW (TBN_FIRST-19)
952 #define TBN_GETINFOTIP WINELIB_NAME_AW(TBN_GETINFOTIP)
955 /* This is just for old CreateToolbar. */
956 /* Don't use it in new programs. */
957 typedef struct _OLDTBBUTTON {
964 } OLDTBBUTTON, *POLDTBBUTTON, *LPOLDTBBUTTON;
965 typedef const OLDTBBUTTON *LPCOLDTBBUTTON;
968 typedef struct _TBBUTTON {
976 } TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
977 typedef const TBBUTTON *LPCTBBUTTON;
980 typedef struct _COLORMAP {
983 } COLORMAP, *LPCOLORMAP;
986 typedef struct tagTBADDBITMAP {
989 } TBADDBITMAP, *LPTBADDBITMAP;
991 #define HINST_COMMCTRL ((HINSTANCE)-1)
992 #define IDB_STD_SMALL_COLOR 0
993 #define IDB_STD_LARGE_COLOR 1
994 #define IDB_VIEW_SMALL_COLOR 4
995 #define IDB_VIEW_LARGE_COLOR 5
996 #define IDB_HIST_SMALL_COLOR 8
997 #define IDB_HIST_LARGE_COLOR 9
1004 #define STD_DELETE 5
1005 #define STD_FILENEW 6
1006 #define STD_FILEOPEN 7
1007 #define STD_FILESAVE 8
1008 #define STD_PRINTPRE 9
1009 #define STD_PROPERTIES 10
1012 #define STD_REPLACE 13
1013 #define STD_PRINT 14
1015 #define VIEW_LARGEICONS 0
1016 #define VIEW_SMALLICONS 1
1018 #define VIEW_DETAILS 3
1019 #define VIEW_SORTNAME 4
1020 #define VIEW_SORTSIZE 5
1021 #define VIEW_SORTDATE 6
1022 #define VIEW_SORTTYPE 7
1023 #define VIEW_PARENTFOLDER 8
1024 #define VIEW_NETCONNECT 9
1025 #define VIEW_NETDISCONNECT 10
1026 #define VIEW_NEWFOLDER 11
1028 typedef struct tagTBSAVEPARAMSA {
1031 LPCSTR pszValueName;
1032 } TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
1034 typedef struct tagTBSAVEPARAMSW {
1037 LPCWSTR pszValueName;
1038 } TBSAVEPARAMSAW, *LPTBSAVEPARAMSAW;
1040 #define TBSAVEPARAMS WINELIB_NAME_AW(TBSAVEPARAMS)
1041 #define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
1055 } TBBUTTONINFOA, *LPTBBUTTONINFOA;
1069 } TBBUTTONINFOW, *LPTBBUTTONINFOW;
1071 #define TBBUTTONINFO WINELIB_NAME_AW(TBBUTTONINFO)
1072 #define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
1074 typedef struct tagNMTBGETINFOTIPA
1081 } NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
1083 typedef struct tagNMTBGETINFOTIPW
1090 } NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
1092 #define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOFTIP)
1093 #define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
1095 typedef struct tagNMTOOLBARA
1102 RECT rcButton; /* Version 5.80 */
1103 } NMTOOLBARA, *LPNMTOOLBARA;
1105 typedef struct tagNMTOOLBARW
1112 RECT rcButton; /* Version 5.80 */
1113 } NMTOOLBARW, *LPNMTOOLBARW;
1115 #define NMTOOLBAR WINELIB_NAME_AW(NMTOOLBAR)
1116 #define LPNMTOOLBAR WINELIB_NAME_AW(LPNMTOOLBAR)
1125 } TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
1128 CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
1129 UINT, LPCOLDTBBUTTON, INT);
1132 CreateToolbarEx(HWND, DWORD, UINT, INT,
1133 HINSTANCE, UINT, LPCTBBUTTON,
1134 INT, INT, INT, INT, INT, UINT);
1137 CreateMappedBitmap (HINSTANCE, INT, UINT, LPCOLORMAP, INT);
1142 #define TOOLTIPS_CLASS16 "tooltips_class"
1143 #define TOOLTIPS_CLASSA "tooltips_class32"
1144 #define TOOLTIPS_CLASS32W L"tooltips_class32"
1145 #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
1147 #define INFOTIPSIZE 1024
1149 #define TTS_ALWAYSTIP 0x01
1150 #define TTS_NOPREFIX 0x02
1152 #define TTF_IDISHWND 0x0001
1153 #define TTF_CENTERTIP 0x0002
1154 #define TTF_RTLREADING 0x0004
1155 #define TTF_SUBCLASS 0x0010
1156 #define TTF_TRACK 0x0020
1157 #define TTF_ABSOLUTE 0x0080
1158 #define TTF_TRANSPARENT 0x0100
1159 #define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
1162 #define TTDT_AUTOMATIC 0
1163 #define TTDT_RESHOW 1
1164 #define TTDT_AUTOPOP 2
1165 #define TTDT_INITIAL 3
1168 #define TTM_ACTIVATE (WM_USER+1)
1169 #define TTM_SETDELAYTIME (WM_USER+3)
1170 #define TTM_ADDTOOLA (WM_USER+4)
1171 #define TTM_ADDTOOLW (WM_USER+50)
1172 #define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
1173 #define TTM_DELTOOLA (WM_USER+5)
1174 #define TTM_DELTOOLW (WM_USER+51)
1175 #define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
1176 #define TTM_NEWTOOLRECTA (WM_USER+6)
1177 #define TTM_NEWTOOLRECTW (WM_USER+52)
1178 #define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
1179 #define TTM_RELAYEVENT (WM_USER+7)
1180 #define TTM_GETTOOLINFOA (WM_USER+8)
1181 #define TTM_GETTOOLINFOW (WM_USER+53)
1182 #define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
1183 #define TTM_SETTOOLINFOA (WM_USER+9)
1184 #define TTM_SETTOOLINFOW (WM_USER+54)
1185 #define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
1186 #define TTM_HITTESTA (WM_USER+10)
1187 #define TTM_HITTESTW (WM_USER+55)
1188 #define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
1189 #define TTM_GETTEXTA (WM_USER+11)
1190 #define TTM_GETTEXTW (WM_USER+56)
1191 #define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
1192 #define TTM_UPDATETIPTEXTA (WM_USER+12)
1193 #define TTM_UPDATETIPTEXTW (WM_USER+57)
1194 #define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
1195 #define TTM_GETTOOLCOUNT (WM_USER+13)
1196 #define TTM_ENUMTOOLSA (WM_USER+14)
1197 #define TTM_ENUMTOOLSW (WM_USER+58)
1198 #define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
1199 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1200 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1201 #define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
1202 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1203 #define TTM_TRACKACTIVATE (WM_USER+17)
1204 #define TTM_TRACKPOSITION (WM_USER+18)
1205 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1206 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1207 #define TTM_GETDELAYTIME (WM_USER+21)
1208 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1209 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1210 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1211 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1212 #define TTM_SETMARGIN (WM_USER+26)
1213 #define TTM_GETMARGIN (WM_USER+27)
1214 #define TTM_POP (WM_USER+28)
1215 #define TTM_UPDATE (WM_USER+29)
1218 #define TTN_FIRST (0U-520U)
1219 #define TTN_LAST (0U-549U)
1220 #define TTN_GETDISPINFOA (TTN_FIRST-0)
1221 #define TTN_GETDISPINFOW (TTN_FIRST-10)
1222 #define TTN_GETDISPINFO WINELIB_NAME_AW(TTN_GETDISPINFO)
1223 #define TTN_SHOW (TTN_FIRST-1)
1224 #define TTN_POP (TTN_FIRST-2)
1226 #define TTN_NEEDTEXT TTN_GETDISPINFO
1227 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1228 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1230 typedef struct tagTOOLINFOA {
1239 } TTTOOLINFOA, *LPTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
1241 typedef struct tagTOOLINFOW {
1250 } TTTOOLINFOW, *LPTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW;
1252 #define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1253 #define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1254 #define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
1255 #define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
1256 #define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
1258 #define TTTOOLINFO_V1_SIZEA CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
1259 #define TTTOOLINFO_V1_SIZEW CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
1260 #define TTTOOLINFO_V1_SIZE WINELIB_NAME_AW(TTTOOLINFO_V1_SIZE)
1262 typedef struct _TT_HITTESTINFOA
1267 } TTHITTESTINFOA, *LPTTHITTESTINFOA;
1269 typedef struct _TT_HITTESTINFOW
1274 } TTHITTESTINFOW, *LPTTHITTESTINFOW;
1276 #define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
1277 #define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
1279 typedef struct tagNMTTDISPINFOA
1287 } NMTTDISPINFOA, *LPNMTTDISPINFOA;
1289 typedef struct tagNMTTDISPINFOW
1297 } NMTTDISPINFOW, *LPNMTTDISPINFOW;
1299 #define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
1300 #define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
1302 #define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
1303 #define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
1304 #define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)
1306 #define TOOLTIPTEXTW NMTTDISPINFOW
1307 #define TOOLTIPTEXTA NMTTDISPINFOA
1308 #define TOOLTIPTEXT NMTTDISPINFO
1309 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1310 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1311 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1316 #define REBARCLASSNAME16 "ReBarWindow"
1317 #define REBARCLASSNAMEA "ReBarWindow32"
1318 #define REBARCLASSNAMEW L"ReBarWindow32"
1319 #define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
1321 #define RBS_TOOLTIPS 0x0100
1322 #define RBS_VARHEIGHT 0x0200
1323 #define RBS_BANDBORDERS 0x0400
1324 #define RBS_FIXEDORDER 0x0800
1325 #define RBS_REGISTERDROP 0x1000
1326 #define RBS_AUTOSIZE 0x2000
1327 #define RBS_VERTICALGRIPPER 0x4000
1328 #define RBS_DBLCLKTOGGLE 0x8000
1330 #define RBIM_IMAGELIST 0x00000001
1332 #define RBBIM_STYLE 0x00000001
1333 #define RBBIM_COLORS 0x00000002
1334 #define RBBIM_TEXT 0x00000004
1335 #define RBBIM_IMAGE 0x00000008
1336 #define RBBIM_CHILD 0x00000010
1337 #define RBBIM_CHILDSIZE 0x00000020
1338 #define RBBIM_SIZE 0x00000040
1339 #define RBBIM_BACKGROUND 0x00000080
1340 #define RBBIM_ID 0x00000100
1341 #define RBBIM_IDEALSIZE 0x00000200
1342 #define RBBIM_LPARAM 0x00000400
1343 #define RBBIM_HEADERSIZE 0x00000800
1345 #define RBBS_BREAK 0x00000001
1346 #define RBBS_FIXEDSIZE 0x00000002
1347 #define RBBS_CHILDEDGE 0x00000004
1348 #define RBBS_HIDDEN 0x00000008
1349 #define RBBS_NOVERT 0x00000010
1350 #define RBBS_FIXEDBMP 0x00000020
1351 #define RBBS_VARIABLEHEIGHT 0x00000040
1352 #define RBBS_GRIPPERALWAYS 0x00000080
1353 #define RBBS_NOGRIPPER 0x00000100
1355 #define RBNM_ID 0x00000001
1356 #define RBNM_STYLE 0x00000002
1357 #define RBNM_LPARAM 0x00000004
1359 #define RBHT_NOWHERE 0x0001
1360 #define RBHT_CAPTION 0x0002
1361 #define RBHT_CLIENT 0x0003
1362 #define RBHT_GRABBER 0x0004
1364 #define RB_INSERTBANDA (WM_USER+1)
1365 #define RB_INSERTBANDW (WM_USER+10)
1366 #define RB_INSERTBAND WINELIB_NAME_AW(RB_INSERTBAND)
1367 #define RB_DELETEBAND (WM_USER+2)
1368 #define RB_GETBARINFO (WM_USER+3)
1369 #define RB_SETBARINFO (WM_USER+4)
1370 #define RB_GETBANDINFO (WM_USER+5) /* just for compatibility */
1371 #define RB_SETBANDINFOA (WM_USER+6)
1372 #define RB_SETBANDINFOW (WM_USER+11)
1373 #define RB_SETBANDINFO WINELIB_NAME_AW(RB_SETBANDINFO)
1374 #define RB_SETPARENT (WM_USER+7)
1375 #define RB_HITTEST (WM_USER+8)
1376 #define RB_GETRECT (WM_USER+9)
1377 #define RB_GETBANDCOUNT (WM_USER+12)
1378 #define RB_GETROWCOUNT (WM_USER+13)
1379 #define RB_GETROWHEIGHT (WM_USER+14)
1380 #define RB_IDTOINDEX (WM_USER+16)
1381 #define RB_GETTOOLTIPS (WM_USER+17)
1382 #define RB_SETTOOLTIPS (WM_USER+18)
1383 #define RB_SETBKCOLOR (WM_USER+19)
1384 #define RB_GETBKCOLOR (WM_USER+20)
1385 #define RB_SETTEXTCOLOR (WM_USER+21)
1386 #define RB_GETTEXTCOLOR (WM_USER+22)
1387 #define RB_SIZETORECT (WM_USER+23)
1388 #define RB_BEGINDRAG (WM_USER+24)
1389 #define RB_ENDDRAG (WM_USER+25)
1390 #define RB_DRAGMOVE (WM_USER+26)
1391 #define RB_GETBARHEIGHT (WM_USER+27)
1392 #define RB_GETBANDINFOW (WM_USER+28)
1393 #define RB_GETBANDINFOA (WM_USER+29)
1394 #define RB_GETBANDINFO16 WINELIB_NAME_AW(RB_GETBANDINFO16)
1395 #define RB_MINIMIZEBAND (WM_USER+30)
1396 #define RB_MAXIMIZEBAND (WM_USER+31)
1397 #define RB_GETBANDBORDERS (WM_USER+34)
1398 #define RB_SHOWBAND (WM_USER+35)
1399 #define RB_SETPALETTE (WM_USER+37)
1400 #define RB_GETPALETTE (WM_USER+38)
1401 #define RB_MOVEBAND (WM_USER+39)
1402 #define RB_GETDROPTARGET CCM_GETDROPTARGET
1403 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1404 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1405 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1406 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1408 #define RBN_FIRST (0U-831U)
1409 #define RBN_LAST (0U-859U)
1410 #define RBN_HEIGHTCHANGE (RBN_FIRST-0)
1411 #define RBN_GETOBJECT (RBN_FIRST-1)
1412 #define RBN_LAYOUTCHANGED (RBN_FIRST-2)
1413 #define RBN_AUTOSIZE (RBN_FIRST-3)
1414 #define RBN_BEGINDRAG (RBN_FIRST-4)
1415 #define RBN_ENDDRAG (RBN_FIRST-5)
1416 #define RBN_DELETINGBAND (RBN_FIRST-6)
1417 #define RBN_DELETEDBAND (RBN_FIRST-7)
1418 #define RBN_CHILDSIZE (RBN_FIRST-8)
1420 typedef struct tagREBARINFO
1425 } REBARINFO, *LPREBARINFO;
1427 typedef struct tagREBARBANDINFOA
1449 } REBARBANDINFOA, *LPREBARBANDINFOA;
1451 typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
1453 typedef struct tagREBARBANDINFOW
1475 } REBARBANDINFOW, *LPREBARBANDINFOW;
1477 typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
1479 #define REBARBANDINFO WINELIB_NAME_AW(REBARBANDINFO)
1480 #define LPREBARBANDINFO WINELIB_NAME_AW(LPREBARBANDINFO)
1481 #define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
1483 #define REBARBANDINFO_V3_SIZEA CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
1484 #define REBARBANDINFO_V3_SIZEW CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
1485 #define REBARBANDINFO_V3_SIZE WINELIB_NAME_AW(REBARBANDINFO_V3_SIZE)
1487 typedef struct tagNMREBARCHILDSIZE
1494 } NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;
1496 typedef struct tagNMREBAR
1504 } NMREBAR, *LPNMREBAR;
1506 typedef struct tagNMRBAUTOSIZE
1512 } NMRBAUTOSIZE, *LPNMRBAUTOSIZE;
1514 typedef struct _RB_HITTESTINFO
1519 } RBHITTESTINFO, *LPRBHITTESTINFO;
1522 /* Trackbar control */
1524 #define TRACKBAR_CLASS16 "msctls_trackbar"
1525 #define TRACKBAR_CLASSA "msctls_trackbar32"
1526 #define TRACKBAR_CLASSW L"msctls_trackbar32"
1527 #define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
1529 #define TBS_AUTOTICKS 0x0001
1530 #define TBS_VERT 0x0002
1531 #define TBS_HORZ 0x0000
1532 #define TBS_TOP 0x0004
1533 #define TBS_BOTTOM 0x0000
1534 #define TBS_LEFT 0x0004
1535 #define TBS_RIGHT 0x0000
1536 #define TBS_BOTH 0x0008
1537 #define TBS_NOTICKS 0x0010
1538 #define TBS_ENABLESELRANGE 0x0020
1539 #define TBS_FIXEDLENGTH 0x0040
1540 #define TBS_NOTHUMB 0x0080
1541 #define TBS_TOOLTIPS 0x0100
1542 #define TBS_REVERSED 0x0200
1546 #define TBTS_BOTTOM 2
1547 #define TBTS_RIGHT 3
1550 #define TB_LINEDOWN 1
1552 #define TB_PAGEDOWN 3
1553 #define TB_THUMBPOSITION 4
1554 #define TB_THUMBTRACK 5
1557 #define TB_ENDTRACK 8
1559 #define TBCD_TICS 0x0001
1560 #define TBCD_THUMB 0x0002
1561 #define TBCD_CHANNEL 0x0003
1563 #define TBM_GETPOS (WM_USER)
1564 #define TBM_GETRANGEMIN (WM_USER+1)
1565 #define TBM_GETRANGEMAX (WM_USER+2)
1566 #define TBM_GETTIC (WM_USER+3)
1567 #define TBM_SETTIC (WM_USER+4)
1568 #define TBM_SETPOS (WM_USER+5)
1569 #define TBM_SETRANGE (WM_USER+6)
1570 #define TBM_SETRANGEMIN (WM_USER+7)
1571 #define TBM_SETRANGEMAX (WM_USER+8)
1572 #define TBM_CLEARTICS (WM_USER+9)
1573 #define TBM_SETSEL (WM_USER+10)
1574 #define TBM_SETSELSTART (WM_USER+11)
1575 #define TBM_SETSELEND (WM_USER+12)
1576 #define TBM_GETPTICS (WM_USER+14)
1577 #define TBM_GETTICPOS (WM_USER+15)
1578 #define TBM_GETNUMTICS (WM_USER+16)
1579 #define TBM_GETSELSTART (WM_USER+17)
1580 #define TBM_GETSELEND (WM_USER+18)
1581 #define TBM_CLEARSEL (WM_USER+19)
1582 #define TBM_SETTICFREQ (WM_USER+20)
1583 #define TBM_SETPAGESIZE (WM_USER+21)
1584 #define TBM_GETPAGESIZE (WM_USER+22)
1585 #define TBM_SETLINESIZE (WM_USER+23)
1586 #define TBM_GETLINESIZE (WM_USER+24)
1587 #define TBM_GETTHUMBRECT (WM_USER+25)
1588 #define TBM_GETCHANNELRECT (WM_USER+26)
1589 #define TBM_SETTHUMBLENGTH (WM_USER+27)
1590 #define TBM_GETTHUMBLENGTH (WM_USER+28)
1591 #define TBM_SETTOOLTIPS (WM_USER+29)
1592 #define TBM_GETTOOLTIPS (WM_USER+30)
1593 #define TBM_SETTIPSIDE (WM_USER+31)
1594 #define TBM_SETBUDDY (WM_USER+32)
1595 #define TBM_GETBUDDY (WM_USER+33)
1596 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1597 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1602 #define WC_PAGESCROLLERA "SysPager"
1603 #define WC_PAGESCROLLERW L"SysPager"
1604 #define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
1606 #define PGS_VERT 0x00000000
1607 #define PGS_HORZ 0x00000001
1608 #define PGS_AUTOSCROLL 0x00000002
1609 #define PGS_DRAGNDROP 0x00000004
1611 #define PGF_INVISIBLE 0
1612 #define PGF_NORMAL 1
1613 #define PGF_GRAYED 2
1614 #define PGF_DEPRESSED 4
1617 #define PGB_TOPORLEFT 0
1618 #define PGB_BOTTOMORRIGHT 1
1620 /* only used with PGN_SCROLL */
1621 #define PGF_SCROLLUP 1
1622 #define PGF_SCROLLDOWN 2
1623 #define PGF_SCROLLLEFT 4
1624 #define PGF_SCROLLRIGHT 8
1627 #define PGK_CONTROL 2
1630 /* only used with PGN_CALCSIZE */
1631 #define PGF_CALCWIDTH 1
1632 #define PGF_CALCHEIGHT 2
1634 #define PGM_FIRST 0x1400
1635 #define PGM_SETCHILD (PGM_FIRST+1)
1636 #define PGM_RECALCSIZE (PGM_FIRST+2)
1637 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
1638 #define PGM_SETBKCOLOR (PGM_FIRST+4)
1639 #define PGM_GETBKCOLOR (PGM_FIRST+5)
1640 #define PGM_SETBORDER (PGM_FIRST+6)
1641 #define PGM_GETBORDER (PGM_FIRST+7)
1642 #define PGM_SETPOS (PGM_FIRST+8)
1643 #define PGM_GETPOS (PGM_FIRST+9)
1644 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
1645 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
1646 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
1647 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
1649 #define PGN_FIRST (0U-900U)
1650 #define PGN_LAST (0U-950U)
1651 #define PGN_SCROLL (PGN_FIRST-1)
1652 #define PGN_CALCSIZE (PGN_FIRST-2)
1663 } NMPGSCROLL, *LPNMPGSCROLL;
1671 } NMPGCALCSIZE, *LPNMPGCALCSIZE;
1674 /* Treeview control */
1676 #define WC_TREEVIEWA "SysTreeView32"
1677 #define WC_TREEVIEWW L"SysTreeView32"
1678 #define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
1680 #define TVSIL_NORMAL 0
1681 #define TVSIL_STATE 2
1683 #define TV_FIRST 0x1100
1684 #define TVM_INSERTITEMA (TV_FIRST+0)
1685 #define TVM_INSERTITEMW (TV_FIRST+50)
1686 #define TVM_INSERTITEM WINELIB_NAME_AW(TVM_INSERTITEM)
1687 #define TVM_DELETEITEM (TV_FIRST+1)
1688 #define TVM_EXPAND (TV_FIRST+2)
1689 #define TVM_GETITEMRECT (TV_FIRST+4)
1690 #define TVM_GETCOUNT (TV_FIRST+5)
1691 #define TVM_GETINDENT (TV_FIRST+6)
1692 #define TVM_SETINDENT (TV_FIRST+7)
1693 #define TVM_GETIMAGELIST (TV_FIRST+8)
1694 #define TVM_SETIMAGELIST (TV_FIRST+9)
1695 #define TVM_GETNEXTITEM (TV_FIRST+10)
1696 #define TVM_SELECTITEM (TV_FIRST+11)
1697 #define TVM_GETITEMA (TV_FIRST+12)
1698 #define TVM_GETITEMW (TV_FIRST+62)
1699 #define TVM_GETITEM WINELIB_NAME_AW(TVM_GETITEM)
1700 #define TVM_SETITEMA (TV_FIRST+13)
1701 #define TVM_SETITEMW (TV_FIRST+63)
1702 #define TVM_SETITEM WINELIB_NAME_AW(TVM_SETITEM)
1703 #define TVM_EDITLABELA (TV_FIRST+14)
1704 #define TVM_EDITLABELW (TV_FIRST+65)
1705 #define TVM_EDITLABEL WINELIB_NAME_AW(TVM_EDITLABEL)
1706 #define TVM_GETEDITCONTROL (TV_FIRST+15)
1707 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
1708 #define TVM_HITTEST (TV_FIRST+17)
1709 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
1710 #define TVM_SORTCHILDREN (TV_FIRST+19)
1711 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
1712 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
1713 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
1714 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
1715 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
1716 #define TVM_GETISEARCHSTRING WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
1717 #define TVM_SETTOOLTIPS (TV_FIRST+24)
1718 #define TVM_GETTOOLTIPS (TV_FIRST+25)
1719 #define TVM_SETINSERTMARK (TV_FIRST+26)
1720 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
1721 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
1722 #define TVM_SETBKCOLOR (TV_FIRST+29)
1723 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
1724 #define TVM_GETBKCOLOR (TV_FIRST+31)
1725 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
1726 #define TVM_SETSCROLLTIME (TV_FIRST+33)
1727 #define TVM_GETSCROLLTIME (TV_FIRST+34)
1728 #define TVM_UNKNOWN35 (TV_FIRST+35)
1729 #define TVM_UNKNOWN36 (TV_FIRST+36)
1730 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
1731 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
1732 #define TVM_GETITEMSTATE (TV_FIRST+39)
1733 #define TVM_SETLINECOLOR (TV_FIRST+40)
1734 #define TVM_GETLINECOLOR (TV_FIRST+41)
1735 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1736 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1740 #define TVN_FIRST (0U-400U)
1741 #define TVN_LAST (0U-499U)
1743 #define TVN_SELCHANGING (TVN_FIRST-1)
1744 #define TVN_SELCHANGED (TVN_FIRST-2)
1745 #define TVN_GETDISPINFO (TVN_FIRST-3)
1746 #define TVN_SETDISPINFO (TVN_FIRST-4)
1747 #define TVN_ITEMEXPANDING (TVN_FIRST-5)
1748 #define TVN_ITEMEXPANDED (TVN_FIRST-6)
1749 #define TVN_BEGINDRAG (TVN_FIRST-7)
1750 #define TVN_BEGINRDRAG (TVN_FIRST-8)
1751 #define TVN_DELETEITEM (TVN_FIRST-9)
1752 #define TVN_BEGINLABELEDIT (TVN_FIRST-10)
1753 #define TVN_ENDLABELEDIT (TVN_FIRST-11)
1754 #define TVN_KEYDOWN (TVN_FIRST-12)
1755 #define TVN_GETINFOTIPA (TVN_FIRST-13)
1756 #define TVN_GETINFOTIPW (TVN_FIRST-14)
1757 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
1760 #define TVN_SELCHANGINGW (TVN_FIRST-50)
1761 #define TVN_SELCHANGEDW (TVN_FIRST-51)
1762 #define TVN_GETDISPINFOW (TVN_FIRST-52)
1763 #define TVN_SETDISPINFOW (TVN_FIRST-53)
1764 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
1765 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
1766 #define TVN_BEGINDRAGW (TVN_FIRST-56)
1767 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
1768 #define TVN_DELETEITEMW (TVN_FIRST-58)
1769 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
1770 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
1774 #define TVIF_TEXT 0x0001
1775 #define TVIF_IMAGE 0x0002
1776 #define TVIF_PARAM 0x0004
1777 #define TVIF_STATE 0x0008
1778 #define TVIF_HANDLE 0x0010
1779 #define TVIF_SELECTEDIMAGE 0x0020
1780 #define TVIF_CHILDREN 0x0040
1781 #define TVIF_INTEGRAL 0x0080
1782 #define TVIF_DI_SETITEM 0x1000
1784 #define TVI_ROOT ((HTREEITEM)0xffff0000) /* -65536 */
1785 #define TVI_FIRST ((HTREEITEM)0xffff0001) /* -65535 */
1786 #define TVI_LAST ((HTREEITEM)0xffff0002) /* -65534 */
1787 #define TVI_SORT ((HTREEITEM)0xffff0003) /* -65533 */
1789 #define TVIS_FOCUSED 0x0001
1790 #define TVIS_SELECTED 0x0002
1791 #define TVIS_CUT 0x0004
1792 #define TVIS_DROPHILITED 0x0008
1793 #define TVIS_BOLD 0x0010
1794 #define TVIS_EXPANDED 0x0020
1795 #define TVIS_EXPANDEDONCE 0x0040
1796 #define TVIS_OVERLAYMASK 0x0f00
1797 #define TVIS_STATEIMAGEMASK 0xf000
1798 #define TVIS_USERMASK 0xf000
1800 #define TVHT_NOWHERE 0x0001
1801 #define TVHT_ONITEMICON 0x0002
1802 #define TVHT_ONITEMLABEL 0x0004
1803 #define TVHT_ONITEMINDENT 0x0008
1804 #define TVHT_ONITEMBUTTON 0x0010
1805 #define TVHT_ONITEMRIGHT 0x0020
1806 #define TVHT_ONITEMSTATEICON 0x0040
1807 #define TVHT_ONITEM 0x0046
1808 #define TVHT_ABOVE 0x0100
1809 #define TVHT_BELOW 0x0200
1810 #define TVHT_TORIGHT 0x0400
1811 #define TVHT_TOLEFT 0x0800
1813 #define TVS_HASBUTTONS 0x0001
1814 #define TVS_HASLINES 0x0002
1815 #define TVS_LINESATROOT 0x0004
1816 #define TVS_EDITLABELS 0x0008
1817 #define TVS_DISABLEDRAGDROP 0x0010
1818 #define TVS_SHOWSELALWAYS 0x0020
1819 #define TVS_RTLREADING 0x0040
1820 #define TVS_NOTOOLTIPS 0x0080
1821 #define TVS_CHECKBOXES 0x0100
1822 #define TVS_TRACKSELECT 0x0200
1823 #define TVS_SINGLEEXPAND 0x0400
1824 #define TVS_INFOTIP 0x0800
1825 #define TVS_FULLROWSELECT 0x1000
1826 #define TVS_NOSCROLL 0x2000
1827 #define TVS_NONEVENHEIGHT 0x4000
1828 #define TVS_NOHSCROLL 0x8000
1830 #define TVS_SHAREDIMAGELISTS 0x0000
1831 #define TVS_PRIVATEIMAGELISTS 0x0400
1834 #define TVE_COLLAPSE 0x0001
1835 #define TVE_EXPAND 0x0002
1836 #define TVE_TOGGLE 0x0003
1837 #define TVE_EXPANDPARTIAL 0x4000
1838 #define TVE_COLLAPSERESET 0x8000
1842 #define TVGN_PREVIOUS 2
1843 #define TVGN_PARENT 3
1844 #define TVGN_CHILD 4
1845 #define TVGN_FIRSTVISIBLE 5
1846 #define TVGN_NEXTVISIBLE 6
1847 #define TVGN_PREVIOUSVISIBLE 7
1848 #define TVGN_DROPHILITE 8
1849 #define TVGN_CARET 9
1850 #define TVGN_LASTVISIBLE 10
1852 #define TVC_UNKNOWN 0x00
1853 #define TVC_BYMOUSE 0x01
1854 #define TVC_BYKEYBOARD 0x02
1857 typedef struct _TREEITEM *HTREEITEM;
1870 } TVITEMA, *LPTVITEMA;
1883 } TVITEMW, *LPTVITEMW;
1885 #define TVITEM WINELIB_NAME_AW(TVITEM)
1886 #define LPTVITEM WINELIB_NAME_AW(LPTVITEM)
1887 #define TV_ITEM TVITEM
1901 } TVITEMEXA, *LPTVITEMEXA;
1915 } TVITEMEXW, *LPTVITEMEXW;
1917 #define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
1918 #define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
1920 typedef struct tagTVINSERTSTRUCTA {
1922 HTREEITEM hInsertAfter;
1927 } TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
1929 typedef struct tagTVINSERTSTRUCTW {
1931 HTREEITEM hInsertAfter;
1936 } TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
1938 #define TV_INSERTSTRUCT WINELIB_NAME_AW(TVINSERTSTRUCT)
1939 #define LPTV_INSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
1941 #define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
1942 #define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
1943 #define TVINSERTSTRUCT_V1_SIZE WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)
1947 typedef struct tagNMTREEVIEWA {
1953 } NMTREEVIEWA, *LPNMTREEVIEWA;
1955 typedef struct tagNMTREEVIEWW {
1961 } NMTREEVIEWW, *LPNMTREEVIEWW;
1963 #define NMTREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
1964 #define NM_TREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
1965 #define LPNMTREEVIEW WINELIB_NAME_AW(LPNMTREEVIEW)
1967 typedef struct tagTVDISPINFOA {
1970 } NMTVDISPINFOA, *LPNMTVDISPINFOA;
1972 typedef struct tagTVDISPINFOW {
1975 } NMTVDISPINFOW, *LPNMTVDISPINFOW;
1977 #define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
1978 #define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
1979 #define TV_DISPINFO NMTVDISPINFO
1981 typedef INT (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
1983 typedef struct tagTVSORTCB
1986 PFNTVCOMPARE lpfnCompare;
1988 } TVSORTCB, *LPTVSORTCB;
1990 #define TV_SORTCB TVSORTCB
1991 #define LPTV_SORTCB LPTVSORTCB
1993 typedef struct tagTVHITTESTINFO {
1997 } TVHITTESTINFO, *LPTVHITTESTINFO;
1999 #define TV_HITTESTINFO TVHITTESTINFO
2002 /* Custom Draw Treeview */
2004 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
2006 #define TVCDRF_NOIMAGES 0x00010000
2008 typedef struct tagNMTVCUSTOMDRAW
2013 INT iLevel; /* IE>0x0400 */
2014 } NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
2016 /* Treeview tooltips */
2018 typedef struct tagNMTVGETINFOTIPA
2025 } NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
2027 typedef struct tagNMTVGETINFOTIPW
2034 } NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
2038 #define TreeView_InsertItemA(hwnd, phdi) \
2039 (INT)SendMessageA((hwnd), TVM_INSERTITEMA, 0, \
2040 (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
2041 #define TreeView_InsertItemW(hwnd,phdi) \
2042 (INT)SendMessageW((hwnd), TVM_INSERTITEMW, 0, \
2043 (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
2044 #define TreeView_DeleteItem(hwnd, hItem) \
2045 (BOOL)SendMessageA((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
2046 #define TreeView_DeleteAllItems(hwnd) \
2047 (BOOL)SendMessageA((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
2048 #define TreeView_Expand(hwnd, hitem, code) \
2049 (BOOL)SendMessageA((hwnd), TVM_EXPAND, (WPARAM)code, \
2050 (LPARAM)(HTREEITEM)(hitem))
2052 #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
2053 (*(HTREEITEM *)prc = (hitem), (BOOL)SendMessageA((hwnd), \
2054 TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
2056 #define TreeView_GetCount(hwnd) \
2057 (UINT)SendMessageA((hwnd), TVM_GETCOUNT, 0, 0)
2058 #define TreeView_GetIndent(hwnd) \
2059 (UINT)SendMessageA((hwnd), TVM_GETINDENT, 0, 0)
2060 #define TreeView_SetIndent(hwnd, indent) \
2061 (BOOL)SendMessageA((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
2063 #define TreeView_GetImageList(hwnd, iImage) \
2064 (HIMAGELIST)SendMessageA((hwnd), TVM_GETIMAGELIST, iImage, 0)
2066 #define TreeView_SetImageList(hwnd, himl, iImage) \
2067 (HIMAGELIST)SendMessageA((hwnd), TVM_SETIMAGELIST, iImage, \
2068 (LPARAM)(UINT)(HIMAGELIST)(himl))
2070 #define TreeView_GetNextItem(hwnd, hitem, code) \
2071 (HTREEITEM)SendMessageA((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
2072 (LPARAM)(HTREEITEM) (hitem))
2074 #define TreeView_GetChild(hwnd, hitem) \
2075 TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
2076 #define TreeView_GetNextSibling(hwnd, hitem) \
2077 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
2078 #define TreeView_GetPrevSibling(hwnd, hitem) \
2079 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
2080 #define TreeView_GetParent(hwnd, hitem) \
2081 TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
2082 #define TreeView_GetFirstVisible(hwnd) \
2083 TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
2084 #define TreeView_GetLastVisible(hwnd) \
2085 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2086 #define TreeView_GetNextVisible(hwnd, hitem) \
2087 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
2088 #define TreeView_GetPrevVisible(hwnd, hitem) \
2089 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
2090 #define TreeView_GetSelection(hwnd) \
2091 TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
2092 #define TreeView_GetDropHilight(hwnd) \
2093 TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
2094 #define TreeView_GetRoot(hwnd) \
2095 TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
2096 #define TreeView_GetLastVisible(hwnd) \
2097 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2100 #define TreeView_Select(hwnd, hitem, code) \
2101 (UINT)SendMessageA((hwnd), TVM_SELECTITEM, (WPARAM)code, \
2102 (LPARAM)(UINT)(hitem))
2105 #define TreeView_SelectItem(hwnd, hitem) \
2106 TreeView_Select(hwnd, hitem, TVGN_CARET)
2107 #define TreeView_SelectDropTarget(hwnd, hitem) \
2108 TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
2109 #define TreeView_SelectSetFirstVisible(hwnd, hitem) \
2110 TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
2113 #define TreeView_GetItemA(hwnd, pitem) \
2114 (BOOL)SendMessageA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2115 #define TreeView_GetItemW(hwnd, pitem) \
2116 (BOOL)SendMessageW((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2118 #define TreeView_SetItemA(hwnd, pitem) \
2119 (BOOL)SendMessageA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2120 #define TreeView_SetItemW(hwnd, pitem) \
2121 (BOOL)SendMessageW((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2123 #define TreeView_EditLabel(hwnd, hitem) \
2124 (HWND)SendMessageA((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
2126 #define TreeView_GetEditControl(hwnd) \
2127 (HWND)SendMessageA((hwnd), TVM_GETEDITCONTROL, 0, 0)
2129 #define TreeView_GetVisibleCount(hwnd) \
2130 (UINT)SendMessageA((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
2132 #define TreeView_HitTest(hwnd, lpht) \
2133 (HTREEITEM)SendMessageA((hwnd), TVM_HITTEST, 0,\
2134 (LPARAM)(LPTVHITTESTINFO)(lpht))
2136 #define TreeView_CreateDragImage(hwnd, hitem) \
2137 (HIMAGELIST)SendMessageA((hwnd), TVM_CREATEDRAGIMAGE, 0,\
2138 (LPARAM)(HTREEITEM)(hitem))
2140 #define TreeView_SortChildren(hwnd, hitem, recurse) \
2141 (BOOL)SendMessageA((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
2142 (LPARAM)(HTREEITEM)(hitem))
2144 #define TreeView_EnsureVisible(hwnd, hitem) \
2145 (BOOL)SendMessageA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
2147 #define TreeView_SortChildrenCB(hwnd, psort, recurse) \
2148 (BOOL)SendMessageA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
2149 (LPARAM)(LPTV_SORTCB)(psort))
2151 #define TreeView_EndEditLabelNow(hwnd, fCancel) \
2152 (BOOL)SendMessageA((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
2154 #define TreeView_GetISearchString(hwnd, lpsz) \
2155 (BOOL)SendMessageA((hwnd), TVM_GETISEARCHSTRING, 0, \
2156 (LPARAM)(LPTSTR)lpsz)
2158 #define TreeView_SetToolTips(hwnd, hwndTT) \
2159 (BOOL)SendMessageA((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
2161 #define TreeView_GetToolTips(hwnd) \
2162 (BOOL)SendMessageA((hwnd), TVM_GETTOOLTIPS, 0, 0)
2164 #define TreeView_SetItemHeight(hwnd, iHeight) \
2165 (INT)SendMessageA((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
2167 #define TreeView_GetItemHeight(hwnd) \
2168 (INT)SendMessageA((hwnd), TVM_GETITEMHEIGHT, 0, 0)
2170 #define TreeView_SetBkColor(hwnd, clr) \
2171 (COLORREF)SendMessageA((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
2173 #define TreeView_SetTextColor(hwnd, clr) \
2174 (COLORREF)SendMessageA((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
2176 #define TreeView_GetBkColor(hwnd) \
2177 (COLORREF)SendMessageA((hwnd), TVM_GETBKCOLOR, 0, 0)
2179 #define TreeView_GetTextColor(hwnd) \
2180 (COLORREF)SendMessageA((hwnd), TVM_GETTEXTCOLOR, 0, 0)
2182 #define TreeView_SetScrollTime(hwnd, uTime) \
2183 (UINT)SendMessageA((hwnd), TVM_SETSCROLLTIME, uTime, 0)
2185 #define TreeView_GetScrollTime(hwnd) \
2186 (UINT)SendMessageA((hwnd), TVM_GETSCROLLTIME, 0, 0)
2188 #define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
2189 (BOOL)SendMessageA((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
2192 #define TreeView_SetInsertMarkColor(hwnd, clr) \
2193 (COLORREF)SendMessageA((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
2195 #define TreeView_GetInsertMarkColor(hwnd) \
2196 (COLORREF)SendMessageA((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
2198 #define TreeView_GetItemState(hwndTV, hti, mask) \
2199 (UINT)SendMessageA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
2200 #define TreeView_GetCheckState(hwndTV, hti) \
2201 ((((UINT)(SendMessageA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
2202 TVIS_STATEIMAGEMASK))) >> 12) -1)
2204 #define TreeView_SetLineColor(hwnd, clr) \
2205 (COLORREF)SendMessageA((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
2207 #define TreeView_GetLineColor(hwnd) \
2208 (COLORREF)SendMessageA((hwnd), TVM_GETLINECOLOR, 0, 0)
2210 #define TreeView_SetItemState(hwndTV, hti, data, _mask) \
2212 _TVi.mask = TVIF_STATE; \
2214 _TVi.stateMask = _mask; \
2215 _TVi.state = data; \
2216 SendMessageA((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_TVi); \
2227 /* Listview control */
2229 #define WC_LISTVIEWA "SysListView32"
2230 #define WC_LISTVIEWW L"SysListView32"
2231 #define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
2233 #define LVS_ICON 0x0000
2234 #define LVS_REPORT 0x0001
2235 #define LVS_SMALLICON 0x0002
2236 #define LVS_LIST 0x0003
2237 #define LVS_TYPEMASK 0x0003
2238 #define LVS_SINGLESEL 0x0004
2239 #define LVS_SHOWSELALWAYS 0x0008
2240 #define LVS_SORTASCENDING 0x0010
2241 #define LVS_SORTDESCENDING 0x0020
2242 #define LVS_SHAREIMAGELISTS 0x0040
2243 #define LVS_NOLABELWRAP 0x0080
2244 #define LVS_AUTOARRANGE 0x0100
2245 #define LVS_EDITLABELS 0x0200
2246 #define LVS_OWNERDATA 0x1000
2247 #define LVS_NOSCROLL 0x2000
2248 #define LVS_TYPESTYLEMASK 0xfc00
2249 #define LVS_ALIGNTOP 0x0000
2250 #define LVS_ALIGNLEFT 0x0800
2251 #define LVS_ALIGNMASK 0x0c00
2252 #define LVS_OWNERDRAWFIXED 0x0400
2253 #define LVS_NOCOLUMNHEADER 0x4000
2254 #define LVS_NOSORTHEADER 0x8000
2256 #define LVCF_FMT 0x0001
2257 #define LVCF_WIDTH 0x0002
2258 #define LVCF_TEXT 0x0004
2259 #define LVCF_SUBITEM 0x0008
2260 #define LVCF_IMAGE 0x0010
2261 #define LVCF_ORDER 0x0020
2263 #define LVCFMT_LEFT 0x0000
2264 #define LVCFMT_RIGHT 0x0001
2265 #define LVCFMT_CENTER 0x0002
2266 #define LVCFMT_JUSTIFYMASK 0x0003
2267 #define LVCFMT_IMAGE 0x0800
2268 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2269 #define LVCFMT_COL_HAS_IMAGES 0x8000
2271 #define LVSIL_NORMAL 0
2272 #define LVSIL_SMALL 1
2273 #define LVSIL_STATE 2
2275 #define LVFI_PARAM 0X0001
2276 #define LVFI_STRING 0X0002
2277 #define LVFI_PARTIAL 0X0008
2278 #define LVFI_WRAP 0X0020
2279 #define LVFI_NEARESTXY 0X0040
2281 #define LVIF_TEXT 0x0001
2282 #define LVIF_IMAGE 0x0002
2283 #define LVIF_PARAM 0x0004
2284 #define LVIF_STATE 0x0008
2285 #define LVIF_INDENT 0x0010
2286 #define LVIF_NORECOMPUTE 0x0800
2287 #define LVIF_DI_SETITEM 0x1000
2289 #define LVIR_BOUNDS 0x0000
2290 #define LVIR_LABEL 0x0002
2291 #define LVIR_ICON 0x0001
2292 #define LVIR_SELECTBOUNDS 0x0003
2294 #define LVIS_FOCUSED 0x0001
2295 #define LVIS_SELECTED 0x0002
2296 #define LVIS_CUT 0x0004
2297 #define LVIS_DROPHILITED 0x0008
2298 #define LVIS_ACTIVATING 0x0020
2300 #define LVIS_OVERLAYMASK 0x0F00
2301 #define LVIS_STATEIMAGEMASK 0xF000
2303 #define LVNI_ALL 0x0000
2304 #define LVNI_FOCUSED 0x0001
2305 #define LVNI_SELECTED 0x0002
2306 #define LVNI_CUT 0x0004
2307 #define LVNI_DROPHILITED 0x0008
2309 #define LVNI_ABOVE 0x0100
2310 #define LVNI_BELOW 0x0200
2311 #define LVNI_TOLEFT 0x0400
2312 #define LVNI_TORIGHT 0x0800
2314 #define LVHT_NOWHERE 0x0001
2315 #define LVHT_ONITEMICON 0x0002
2316 #define LVHT_ONITEMLABEL 0x0004
2317 #define LVHT_ONITEMSTATEICON 0x0008
2318 #define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
2320 #define LVHT_ABOVE 0x0008
2321 #define LVHT_BELOW 0x0010
2322 #define LVHT_TORIGHT 0x0020
2323 #define LVHT_TOLEFT 0x0040
2325 #define LVM_FIRST 0x1000
2326 #define LVM_GETBKCOLOR (LVM_FIRST+0)
2327 #define LVM_SETBKCOLOR (LVM_FIRST+1)
2328 #define LVM_GETIMAGELIST (LVM_FIRST+2)
2329 #define LVM_SETIMAGELIST (LVM_FIRST+3)
2330 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
2331 #define LVM_GETITEMA (LVM_FIRST+5)
2332 #define LVM_GETITEMW (LVM_FIRST+75)
2333 #define LVM_GETITEM WINELIB_NAME_AW(LVM_GETITEM)
2334 #define LVM_SETITEMA (LVM_FIRST+6)
2335 #define LVM_SETITEMW (LVM_FIRST+76)
2336 #define LVM_SETITEM WINELIB_NAME_AW(LVM_SETITEM)
2337 #define LVM_INSERTITEMA (LVM_FIRST+7)
2338 #define LVM_INSERTITEMW (LVM_FIRST+77)
2339 #define LVM_INSERTITEM WINELIB_NAME_AW(LVM_INSERTITEM)
2340 #define LVM_DELETEITEM (LVM_FIRST+8)
2341 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
2342 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
2343 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
2344 #define LVM_GETNEXTITEM (LVM_FIRST+12)
2345 #define LVM_FINDITEMA (LVM_FIRST+13)
2346 #define LVM_FINDITEMW (LVM_FIRST+83)
2347 #define LVM_FINDITEM WINELIB_NAME_AW(LVM_FINDITEM)
2348 #define LVM_GETITEMRECT (LVM_FIRST+14)
2349 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
2350 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
2351 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
2352 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
2353 #define LVM_GETSTRINGWIDTH WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
2354 #define LVM_HITTEST (LVM_FIRST+18)
2355 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
2356 #define LVM_SCROLL (LVM_FIRST+20)
2357 #define LVM_REDRAWITEMS (LVM_FIRST+21)
2358 #define LVM_ARRANGE (LVM_FIRST+22)
2359 #define LVM_EDITLABELA (LVM_FIRST+23)
2360 #define LVM_EDITLABELW (LVM_FIRST+118)
2361 #define LVM_EDITLABEL WINELIB_NAME_AW(LVM_EDITLABEL)
2362 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
2363 #define LVM_GETCOLUMNA (LVM_FIRST+25)
2364 #define LVM_GETCOLUMNW (LVM_FIRST+95)
2365 #define LVM_GETCOLUMN WINELIB_NAME_AW(LVM_GETCOLUMN)
2366 #define LVM_SETCOLUMNA (LVM_FIRST+26)
2367 #define LVM_SETCOLUMNW (LVM_FIRST+96)
2368 #define LVM_SETCOLUMN WINELIB_NAME_AW(LVM_SETCOLUMN)
2369 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
2370 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
2371 #define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
2372 #define LVM_DELETECOLUMN (LVM_FIRST+28)
2373 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
2374 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
2375 #define LVM_GETHEADER (LVM_FIRST+31)
2377 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
2378 #define LVM_GETVIEWRECT (LVM_FIRST+34)
2379 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
2380 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
2381 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
2382 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
2383 #define LVM_GETTOPINDEX (LVM_FIRST+39)
2384 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
2385 #define LVM_GETORIGIN (LVM_FIRST+41)
2386 #define LVM_UPDATE (LVM_FIRST+42)
2387 #define LVM_SETITEMSTATE (LVM_FIRST+43)
2388 #define LVM_GETITEMSTATE (LVM_FIRST+44)
2389 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
2390 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
2391 #define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
2392 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
2393 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
2394 #define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
2395 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
2396 #define LVM_SORTITEMS (LVM_FIRST+48)
2397 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
2398 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
2399 #define LVM_GETITEMSPACING (LVM_FIRST+51)
2400 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
2401 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
2402 #define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
2403 #define LVM_SETICONSPACING (LVM_FIRST+53)
2404 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
2405 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
2406 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
2407 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
2408 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
2409 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
2410 #define LVM_SETHOTITEM (LVM_FIRST+60)
2411 #define LVM_GETHOTITEM (LVM_FIRST+61)
2412 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
2413 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
2414 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
2415 #define LVM_SETWORKAREAS (LVM_FIRST+65)
2416 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
2417 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
2418 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
2419 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
2420 #define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
2421 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
2422 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
2423 #define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
2424 #define LVM_GETWORKAREAS (LVM_FIRST+70)
2425 #define LVM_SETHOVERTIME (LVM_FIRST+71)
2426 #define LVM_GETHOVERTIME (LVM_FIRST+72)
2427 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
2428 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
2430 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
2432 #define LVN_FIRST (0U-100U)
2433 #define LVN_LAST (0U-199U)
2434 #define LVN_ITEMCHANGING (LVN_FIRST-0)
2435 #define LVN_ITEMCHANGED (LVN_FIRST-1)
2436 #define LVN_INSERTITEM (LVN_FIRST-2)
2437 #define LVN_DELETEITEM (LVN_FIRST-3)
2438 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
2439 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
2440 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
2441 #define LVN_BEGINLABELEDIT WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
2442 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
2443 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
2444 #define LVN_ENDLABELEDIT WINELIB_NAME_AW(LVN_ENDLABELEDIT)
2445 #define LVN_COLUMNCLICK (LVN_FIRST-8)
2446 #define LVN_BEGINDRAG (LVN_FIRST-9)
2447 #define LVN_BEGINRDRAG (LVN_FIRST-11)
2448 #define LVN_ODCACHEHINT (LVN_FIRST-13)
2449 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
2450 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
2451 #define LVN_HOTTRACK (LVN_FIRST-21)
2452 #define LVN_ODFINDITEMA (LVN_FIRST-52)
2453 #define LVN_ODFINDITEMW (LVN_FIRST-79)
2454 #define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
2455 #define LVN_GETDISPINFOA (LVN_FIRST-50)
2456 #define LVN_GETDISPINFOW (LVN_FIRST-77)
2457 #define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
2458 #define LVN_SETDISPINFOA (LVN_FIRST-51)
2459 #define LVN_SETDISPINFOW (LVN_FIRST-78)
2460 #define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
2461 #define LVN_KEYDOWN (LVN_FIRST-55)
2463 #define LVA_ALIGNLEFT 0x0000
2464 #define LVA_DEFAULT 0x0001
2465 #define LVA_ALIGNTOP 0x0002
2466 #define LVA_SNAPTOGRID 0x0005
2468 typedef struct tagLVITEMA
2479 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2480 } LVITEMA, *LPLVITEMA;
2482 typedef struct tagLVITEMW
2493 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2494 } LVITEMW, *LPLVITEMW;
2496 #define LVITEM WINELIB_NAME_AW(LVITEM)
2497 #define LPLVITEM WINELIB_NAME_AW(LPLVITEM)
2499 #define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
2500 #define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
2501 #define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
2503 #define LV_ITEM LVITEM
2505 typedef struct tagLVCOLUMNA
2513 INT iImage; /* (_WIN32_IE >= 0x0300) */
2514 INT iOrder; /* (_WIN32_IE >= 0x0300) */
2515 } LVCOLUMNA, *LPLVCOLUMNA;
2517 typedef struct tagLVCOLUMNW
2525 INT iImage; /* (_WIN32_IE >= 0x0300) */
2526 INT iOrder; /* (_WIN32_IE >= 0x0300) */
2527 } LVCOLUMNW, *LPLVCOLUMNW;
2529 #define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
2530 #define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)
2532 #define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
2533 #define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
2534 #define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)
2536 #define LV_COLUMN LVCOLUMN
2539 typedef struct tagNMLISTVIEW
2549 } NMLISTVIEW, *LPNMLISTVIEW;
2551 #define LPNM_LISTVIEW LPNMLISTVIEW
2552 #define NM_LISTVIEW NMLISTVIEW
2555 typedef struct tagLVDISPINFO
2559 } NMLVDISPINFOA, *LPNMLVDISPINFOA;
2561 typedef struct tagLVDISPINFOW
2565 } NMLVDISPINFOW, *LPNMLVDISPINFOW;
2567 #define NMLVDISPINFO WINELIB_NAME_AW(NMLVDISPINFO)
2568 #define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
2570 #define LV_DISPINFO NMLVDISPINFO
2572 typedef struct tagLVKEYDOWN
2577 } NMLVKEYDOWN, *LPNMLVKEYDOWN;
2579 #define LV_KEYDOWN NMLVKEYDOWN
2581 typedef struct tagLVHITTESTINFO
2587 } LVHITTESTINFO, *LPLVHITTESTINFO;
2589 #define LV_HITTESTINFO LVHITTESTINFO
2590 #define _LV_HITTESTINFO tagLVHITTESTINFO
2591 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
2593 typedef struct tagLVFINDINFO
2600 } LVFINDINFO, *LPLVFINDINFO;
2602 #define LV_FINDINFO LVFINDINFO
2604 typedef struct tagTCHITTESTINFO
2608 } TCHITTESTINFO, *LPTCHITTESTINFO;
2610 #define TC_HITTESTINFO TCHITTESTINFO
2612 typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
2614 typedef struct tagNMLVCACHEHINT
2619 } NMLVCACHEHINT, *LPNMLVCACHEHINT;
2621 #define LPNM_CACHEHINT LPNMLVCACHEHINT
2622 #define PNM_CACHEHINT LPNMLVCACHEHINT
2623 #define NM_CACHEHINT NMLVCACHEHINT
2625 #define ListView_GetNextItem(hwnd,nItem,flags) \
2626 (INT)SendMessageA((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
2627 #define ListView_FindItem(hwnd,nItem,plvfi) \
2628 (INT)SendMessageA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFO*)(plvfi))
2629 #define ListView_Arrange(hwnd,code) \
2630 (INT)SendMessageA((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
2631 #define ListView_GetItemPosition(hwnd,i,ppt) \
2632 (INT)SendMessageA((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
2633 #define ListView_GetItemRect(hwnd,i,prc) \
2634 (INT)SendMessageA((hwnd),LVM_GETITEMRECT,(WPARAM)(INT)(i),(LPARAM)(LPRECT)(prc))
2635 #define ListView_SetItemA(hwnd,pitem) \
2636 (INT)SendMessageA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
2637 #define ListView_SetItemState(hwnd,i,pitem) \
2638 (BOOL)SendMessageA((hwnd),LVM_SETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(LPLVITEMA)(pitem))
2639 #define ListView_GetItemState(hwnd,i,mask) \
2640 (BOOL)SendMessageA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
2641 #define ListView_GetCountPerPage(hwnd) \
2642 (BOOL)SendMessageW((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
2643 #define ListView_GetImageList(hwnd,iImageList) \
2644 (HIMAGELIST)SendMessageA((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
2645 #define ListView_GetStringWidthA(hwnd,pstr) \
2646 (INT)SendMessageA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
2647 #define ListView_GetTopIndex(hwnd) \
2648 (BOOL)SendMessageA((hwnd),LVM_GETTOPINDEX,0,0L)
2649 #define ListView_Scroll(hwnd,dx,dy) \
2650 (BOOL)SendMessageA((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
2651 #define ListView_EnsureVisible(hwnd,i,fPartialOk) \
2652 (BOOL)SendMessageA((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
2653 #define ListView_SetBkColor(hwnd,clrBk) \
2654 (BOOL)SendMessageA((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
2655 #define ListView_SetImageList(hwnd,himl,iImageList) \
2656 (HIMAGELIST)(UINT)SendMessageA((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(UINT)(HIMAGELIST)(himl))
2657 #define ListView_GetItemCount(hwnd) \
2658 (INT)SendMessageA((hwnd),LVM_GETITEMCOUNT,0,0L)
2659 #define ListView_GetItemA(hwnd,pitem) \
2660 (BOOL)SendMessageA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
2661 #define ListView_GetItemW(hwnd,pitem) \
2662 (BOOL)SendMessageW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
2663 #define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
2664 #define ListView_HitTest(hwnd,pinfo) \
2665 (INT)SendMessageA((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
2666 #define ListView_InsertItemA(hwnd,pitem) \
2667 (INT)SendMessageA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
2668 #define ListView_InsertItemW(hwnd,pitem) \
2669 (INT)SendMessageW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
2670 #define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
2671 #define ListView_DeleteAllItems(hwnd) \
2672 (BOOL)SendMessageA((hwnd),LVM_DELETEALLITEMS,0,0L)
2673 #define ListView_InsertColumnA(hwnd,iCol,pcol) \
2674 (INT)SendMessageA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
2675 #define ListView_InsertColumnW(hwnd,iCol,pcol) \
2676 (INT)SendMessageW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
2677 #define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
2678 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
2679 (BOOL)SendMessageA((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
2680 #define ListView_SetItemPosition(hwndLV, i, x, y) \
2681 (BOOL)SendMessageA((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
2682 #define ListView_GetSelectedCount(hwndLV) \
2683 (UINT)SendMessageA((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
2688 #define WC_TABCONTROL16 "SysTabControl"
2689 #define WC_TABCONTROLA "SysTabControl32"
2690 #define WC_TABCONTROLW L"SysTabControl32"
2692 #define WC_TABCONTROL WINELIB_NAME_AW(WC_TABCONTROL)
2694 /* tab control styles */
2695 #define TCS_SCROLLOPPOSITE 0x0001 /* assumes multiline tab */
2696 #define TCS_BOTTOM 0x0002
2697 #define TCS_RIGHT 0x0002
2698 #define TCS_MULTISELECT 0x0004 /* allow multi-select in button mode */
2699 #define TCS_FLATBUTTONS 0x0008
2700 #define TCS_FORCEICONLEFT 0x0010
2701 #define TCS_FORCELABELLEFT 0x0020
2702 #define TCS_HOTTRACK 0x0040
2703 #define TCS_VERTICAL 0x0080
2704 #define TCS_TABS 0x0000
2705 #define TCS_BUTTONS 0x0100
2706 #define TCS_SINGLELINE 0x0000
2707 #define TCS_MULTILINE 0x0200
2708 #define TCS_RIGHTJUSTIFY 0x0000
2709 #define TCS_FIXEDWIDTH 0x0400
2710 #define TCS_RAGGEDRIGHT 0x0800
2711 #define TCS_FOCUSONBUTTONDOWN 0x1000
2712 #define TCS_OWNERDRAWFIXED 0x2000
2713 #define TCS_TOOLTIPS 0x4000
2714 #define TCS_FOCUSNEVER 0x8000
2715 #define TCS_EX_FLATSEPARATORS 0x00000001 /* to be used with */
2716 #define TCS_EX_REGISTERDROP 0x00000002 /* TCM_SETEXTENDEDSTYLE */
2719 #define TCM_FIRST 0x1300
2721 #define TCM_GETIMAGELIST (TCM_FIRST + 2)
2722 #define TCM_SETIMAGELIST (TCM_FIRST + 3)
2723 #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
2724 #define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
2725 #define TCM_GETITEMA (TCM_FIRST + 5)
2726 #define TCM_GETITEMW (TCM_FIRST + 60)
2727 #define TCM_SETITEMA (TCM_FIRST + 6)
2728 #define TCM_SETITEMW (TCM_FIRST + 61)
2729 #define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
2730 #define TCM_INSERTITEMA (TCM_FIRST + 7)
2731 #define TCM_INSERTITEMW (TCM_FIRST + 62)
2732 #define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
2733 #define TCM_DELETEITEM (TCM_FIRST + 8)
2734 #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
2735 #define TCM_GETITEMRECT (TCM_FIRST + 10)
2736 #define TCM_GETCURSEL (TCM_FIRST + 11)
2737 #define TCM_SETCURSEL (TCM_FIRST + 12)
2738 #define TCM_HITTEST (TCM_FIRST + 13)
2739 #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
2740 #define TCM_ADJUSTRECT (TCM_FIRST + 40)
2741 #define TCM_SETITEMSIZE (TCM_FIRST + 41)
2742 #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
2743 #define TCM_SETPADDING (TCM_FIRST + 43)
2744 #define TCM_GETROWCOUNT (TCM_FIRST + 44)
2745 #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
2746 #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
2747 #define TCM_GETCURFOCUS (TCM_FIRST + 47)
2748 #define TCM_SETCURFOCUS (TCM_FIRST + 48)
2749 #define TCM_SETMINTTABWIDTH (TCM_FIRST + 49)
2750 #define TCM_DESELECTALL (TCM_FIRST + 50)
2751 #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
2752 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
2753 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
2754 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2755 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2758 #define TCIF_TEXT 0x0001
2759 #define TCIF_IMAGE 0x0002
2760 #define TCIF_RTLREADING 0x0004
2761 #define TCIF_PARAM 0x0008
2762 #define TCIF_STATE 0x0010
2764 #define TCIS_BUTTONPRESSED 0x0001
2765 #define TCIS_HIGHLIGHTED 0x0002
2767 /* TabCtrl Macros */
2768 #define TabCtrl_GetImageList(hwnd) \
2769 (HIMAGELIST)SendMessageA((hwnd), TCM_GETIMAGELIST, 0, 0L)
2770 #define TabCtrl_SetImageList(hwnd, himl) \
2771 (HIMAGELIST)SendMessageA((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
2772 #define TabCtrl_GetItemCount(hwnd) \
2773 (int)SendMessageA((hwnd), TCM_GETITEMCOUNT, 0, 0L)
2774 #define TabCtrl_GetItemA(hwnd, iItem, pitem) \
2775 (BOOL)SendMessageA((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2776 #define TabCtrl_GetItemW(hwnd, iItem, pitem) \
2777 (BOOL)SendMessageW((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2778 #define TabCtrl_GetItem WINELIB_NAME_AW(TabCtrl_GetItem)
2779 #define TabCtrl_SetItemA(hwnd, iItem, pitem) \
2780 (BOOL)SendMessageA((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2781 #define TabCtrl_SetItemW(hwnd, iItem, pitem) \
2782 (BOOL)SendMessageW((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2783 #define TabCtrl_SetItem WINELIB_NAME_AW(TabCtrl_GetItem)
2784 #define TabCtrl_InsertItemA(hwnd, iItem, pitem) \
2785 (int)SendMessageA((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
2786 #define TabCtrl_InsertItemW(hwnd, iItem, pitem) \
2787 (int)SendMessageW((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
2788 #define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
2789 #define TabCtrl_DeleteItem(hwnd, i) \
2790 (BOOL)SendMessageA((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
2791 #define TabCtrl_DeleteAllItems(hwnd) \
2792 (BOOL)SendMessageA((hwnd), TCM_DELETEALLITEMS, 0, 0L)
2793 #define TabCtrl_GetItemRect(hwnd, i, prc) \
2794 (BOOL)SendMessageA((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
2795 #define TabCtrl_GetCurSel(hwnd) \
2796 (int)SendMessageA((hwnd), TCM_GETCURSEL, 0, 0)
2797 #define TabCtrl_SetCurSel(hwnd, i) \
2798 (int)SendMessageA((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
2799 #define TabCtrl_HitTest(hwndTC, pinfo) \
2800 (int)SendMessageA((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
2801 #define TabCtrl_SetItemExtra(hwndTC, cb) \
2802 (BOOL)SendMessageA((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
2803 #define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
2804 (int)SendMessageA(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
2805 #define TabCtrl_SetItemSize(hwnd, x, y) \
2806 (DWORD)SendMessageA((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
2807 #define TabCtrl_RemoveImage(hwnd, i) \
2808 (void)SendMessageA((hwnd), TCM_REMOVEIMAGE, i, 0L)
2809 #define TabCtrl_SetPadding(hwnd, cx, cy) \
2810 (void)SendMessageA((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
2811 #define TabCtrl_GetRowCount(hwnd) \
2812 (int)SendMessageA((hwnd), TCM_GETROWCOUNT, 0, 0L)
2813 #define TabCtrl_GetToolTips(hwnd) \
2814 (HWND)SendMessageA((hwnd), TCM_GETTOOLTIPS, 0, 0L)
2815 #define TabCtrl_SetToolTips(hwnd, hwndTT) \
2816 (void)SendMessageA((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
2817 #define TabCtrl_GetCurFocus(hwnd) \
2818 (int)SendMessageA((hwnd), TCM_GETCURFOCUS, 0, 0)
2819 #define TabCtrl_SetCurFocus(hwnd, i) \
2820 SendMessageA((hwnd),TCM_SETCURFOCUS, i, 0)
2821 #define TabCtrl_SetMinTabWidth(hwnd, x) \
2822 (int)SendMessageA((hwnd), TCM_SETMINTABWIDTH, 0, x)
2823 #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
2824 (void)SendMessageA((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
2827 /* constants for TCHITTESTINFO */
2829 #define TCHT_NOWHERE 0x01
2830 #define TCHT_ONITEMICON 0x02
2831 #define TCHT_ONITEMLABEL 0x04
2832 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
2835 typedef struct tagTCITEMA {
2843 } TCITEMA, *LPTCITEMA;
2845 typedef struct tagTCITEMW
2854 } TCITEMW, *LPTCITEMW;
2856 #define TCITEM WINELIB_NAME_AW(TCITEM)
2857 #define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
2858 #define TC_ITEM TCITEM
2860 #define TCN_FIRST (0U-550U)
2861 #define TCN_LAST (0U-580U)
2862 #define TCN_KEYDOWN (TCN_FIRST - 0)
2863 #define TCN_SELCHANGE (TCN_FIRST - 1)
2864 #define TCN_SELCHANGING (TCN_FIRST - 2)
2865 #define TCN_GETOBJECT (TCN_FIRST - 3)
2868 /* ComboBoxEx control */
2870 #define WC_COMBOBOXEXA "ComboBoxEx32"
2871 #define WC_COMBOBOXEXW L"ComboBoxEx32"
2872 #define WC_COMBOBOXEX WINELIB_NAME_AW(WC_COMBOBOXEX)
2874 #define CBEM_INSERTITEMA (WM_USER+1)
2875 #define CBEM_INSERTITEMW (WM_USER+11)
2876 #define CBEM_INSERTITEM WINELIB_NAME_AW(CBEM_INSERTITEM)
2877 #define CBEM_SETIMAGELIST (WM_USER+2)
2878 #define CBEM_GETIMAGELIST (WM_USER+3)
2879 #define CBEM_GETITEMA (WM_USER+4)
2880 #define CBEM_GETITEMW (WM_USER+13)
2881 #define CBEM_GETITEM WINELIB_NAME_AW(CBEM_GETITEM)
2882 #define CBEM_SETITEMA (WM_USER+5)
2883 #define CBEM_SETITEMW (WM_USER+12)
2884 #define CBEM_SETITEM WINELIB_NAME_AW(CBEM_SETITEM)
2885 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
2886 #define CBEM_GETEDITCONTROL (WM_USER+7)
2887 #define CBEM_SETEXSTYLE (WM_USER+8)
2888 #define CBEM_GETEXSTYLE (WM_USER+9)
2889 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
2890 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
2891 #define CBEM_HASEDITCHANGED (WM_USER+10)
2892 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2893 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2895 #define CBEN_FIRST (0U-800U)
2896 #define CBEN_LAST (0U-830U)
2899 /* Hotkey control */
2901 #define HOTKEY_CLASS16 "msctls_hotkey"
2902 #define HOTKEY_CLASSA "msctls_hotkey32"
2903 #define HOTKEY_CLASSW L"msctls_hotkey32"
2904 #define HOTKEY_CLASS WINELIB_NAME_AW(HOTKEY_CLASS)
2906 #define HOTKEYF_SHIFT 0x01
2907 #define HOTKEYF_CONTROL 0x02
2908 #define HOTKEYF_ALT 0x04
2909 #define HOTKEYF_EXT 0x08
2911 #define HKCOMB_NONE 0x0001
2912 #define HKCOMB_S 0x0002
2913 #define HKCOMB_C 0x0004
2914 #define HKCOMB_A 0x0008
2915 #define HKCOMB_SC 0x0010
2916 #define HKCOMB_SA 0x0020
2917 #define HKCOMB_CA 0x0040
2918 #define HKCOMB_SCA 0x0080
2920 #define HKM_SETHOTKEY (WM_USER+1)
2921 #define HKM_GETHOTKEY (WM_USER+2)
2922 #define HKM_SETRULES (WM_USER+3)
2925 /* animate control */
2927 #define ANIMATE_CLASSA "SysAnimate32"
2928 #define ANIMATE_CLASSW L"SysAnimate32"
2929 #define ANIMATE_CLASS WINELIB_NAME_AW(ANIMATE_CLASS)
2931 #define ACS_CENTER 0x0001
2932 #define ACS_TRANSPARENT 0x0002
2933 #define ACS_AUTOPLAY 0x0004
2934 #define ACS_TIMER 0x0008 /* no threads, just timers */
2936 #define ACM_OPENA (WM_USER+100)
2937 #define ACM_OPENW (WM_USER+103)
2938 #define ACM_OPEN WINELIB_NAME_AW(ACM_OPEN)
2939 #define ACM_PLAY (WM_USER+101)
2940 #define ACM_STOP (WM_USER+102)
2945 #define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
2946 CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
2947 #define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
2948 CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
2949 #define Animate_Create WINELIB_NAME_AW(Animate_Create)
2950 #define Animate_OpenA(hwnd,szName) \
2951 (BOOL)SendMessageA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
2952 #define Animate_OpenW(hwnd,szName) \
2953 (BOOL)SendMessageW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
2954 #define Animate_Open WINELIB_NAME_AW(Animate_Open)
2955 #define Animate_OpenExA(hwnd,hInst,szName) \
2956 (BOOL)SendMessageA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
2957 #define Animate_OpenExW(hwnd,hInst,szName) \
2958 (BOOL)SendMessageW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
2959 #define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
2960 #define Animate_Play(hwnd,from,to,rep) \
2961 (BOOL)SendMessageA(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
2962 #define Animate_Stop(hwnd) \
2963 (BOOL)SendMessageA(hwnd,ACM_STOP,0,0)
2964 #define Animate_Close(hwnd) \
2965 (BOOL)SendMessageA(hwnd,ACM_OPENA,0,0)
2966 #define Animate_Seek(hwnd,frame) \
2967 (BOOL)SendMessageA(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
2970 /**************************************************************************
2971 * IP Address control
2974 #define WC_IPADDRESSA "SysIPAddress32"
2975 #define WC_IPADDRESSW L"SysIPAddress32"
2976 #define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
2978 #define IPM_CLEARADDRESS (WM_USER+100)
2979 #define IPM_SETADDRESS (WM_USER+101)
2980 #define IPM_GETADDRESS (WM_USER+102)
2981 #define IPM_SETRANGE (WM_USER+103)
2982 #define IPM_SETFOCUS (WM_USER+104)
2983 #define IPM_ISBLANK (WM_USER+105)
2985 #define IPN_FIRST (0U-860U)
2986 #define IPN_LAST (0U-879U)
2987 #define IPN_FIELDCHANGED (IPN_FIRST-0)
2989 typedef struct tagNMIPADDRESS
2994 } NMIPADDRESS, *LPNMIPADDRESS;
2996 #define MAKEIPRANGE(low,high) \
2997 ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
2998 #define MAKEIPADDRESS(b1,b2,b3,b4) \
2999 ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
3001 #define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
3002 #define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
3003 #define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
3004 #define FOURTH_IPADDRESS(x) ((x)&0xff)
3007 /**************************************************************************
3008 * Native Font control
3011 #define WC_NATIVEFONTCTLA "NativeFontCtl"
3012 #define WC_NATIVEFONTCTLW L"NativeFontCtl"
3013 #define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
3015 #define NFS_EDIT 0x0001
3016 #define NFS_STATIC 0x0002
3017 #define NFS_LISTCOMBO 0x0004
3018 #define NFS_BUTTON 0x0008
3019 #define NFS_ALL 0x0010
3022 /**************************************************************************
3023 * Month calendar control
3027 #define MONTHCAL_CLASSA "SysMonthCal32"
3028 #define MONTHCAL_CLASSW L"SysMonthCal32"
3029 #define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
3031 #define MCM_FIRST 0x1000
3032 #define MCN_FIRST (0U-750U)
3033 #define MCN_LAST (0U-759U)
3036 #define MCM_GETCURSEL (MCM_FIRST + 1)
3037 #define MCM_SETCURSEL (MCM_FIRST + 2)
3038 #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
3039 #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
3040 #define MCM_GETSELRANGE (MCM_FIRST + 5)
3041 #define MCM_SETSELRANGE (MCM_FIRST + 6)
3042 #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
3043 #define MCM_SETDAYSTATE (MCM_FIRST + 8)
3044 #define MCM_GETMINREQRECT (MCM_FIRST + 9)
3045 #define MCM_SETCOLOR (MCM_FIRST + 10)
3046 #define MCM_GETCOLOR (MCM_FIRST + 11)
3047 #define MCM_SETTODAY (MCM_FIRST + 12)
3048 #define MCM_GETTODAY (MCM_FIRST + 13)
3049 #define MCM_HITTEST (MCM_FIRST + 14)
3050 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
3051 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
3052 #define MCM_GETRANGE (MCM_FIRST + 17)
3053 #define MCM_SETRANGE (MCM_FIRST + 18)
3054 #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
3055 #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
3056 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
3057 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3058 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3063 #define MCN_SELCHANGE (MCN_FIRST + 1)
3064 #define MCN_GETDAYSTATE (MCN_FIRST + 3)
3065 #define MCN_SELECT (MCN_FIRST + 4)
3067 #define MCSC_BACKGROUND 0
3069 #define MCSC_TITLEBK 2
3070 #define MCSC_TITLETEXT 3
3071 #define MCSC_MONTHBK 4
3072 #define MCSC_TRAILINGTEXT 5
3074 #define MCS_DAYSTATE 0x0001
3075 #define MCS_MULTISELECT 0x0002
3076 #define MCS_WEEKNUMBERS 0x0004
3077 #define MCS_NOTODAY 0x0010
3078 #define MCS_NOTODAYCIRCLE 0x0008
3080 #define MCHT_TITLE 0x00010000
3081 #define MCHT_CALENDAR 0x00020000
3082 #define MCHT_TODAYLINK 0x00030000
3084 #define MCHT_NEXT 0x01000000
3085 #define MCHT_PREV 0x02000000
3086 #define MCHT_NOWHERE 0x00000000
3087 #define MCHT_TITLEBK (MCHT_TITLE)
3088 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
3089 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
3090 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
3091 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
3093 #define MCHT_CALENDARBK (MCHT_CALENDAR)
3094 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
3095 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
3096 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
3097 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
3098 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
3102 #define GMR_VISIBLE 0
3103 #define GMR_DAYSTATE 1
3106 /* Month calendar's structures */
3114 } MCHITTESTINFO, *PMCHITTESTINFO;
3116 typedef struct tagNMSELCHANGE
3119 SYSTEMTIME stSelStart;
3120 SYSTEMTIME stSelEnd;
3121 } NMSELCHANGE, *LPNMSELCHANGE;
3123 typedef NMSELCHANGE NMSELECT, *LPNMSELECT;
3124 typedef DWORD MONTHDAYSTATE, *LPMONTHDAYSTATE;
3126 typedef struct tagNMDAYSTATE
3131 LPMONTHDAYSTATE prgDayState;
3132 } NMDAYSTATE, *LPNMDAYSTATE;
3137 #define MonthCal_GetCurSel(hmc, pst) \
3138 (BOOL)SendMessageA(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
3139 #define MonthCal_SetCurSel(hmc, pst) \
3140 (BOOL)SendMessageA(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
3141 #define MonthCal_GetMaxSelCount(hmc) \
3142 (DWORD)SendMessageA(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
3143 #define MonthCal_SetMaxSelCount(hmc, n) \
3144 (BOOL)SendMessageA(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
3145 #define MonthCal_GetSelRange(hmc, rgst) \
3146 SendMessageA(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst))
3147 #define MonthCal_SetSelRange(hmc, rgst) \
3148 SendMessageA(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst))
3149 #define MonthCal_GetMonthRange(hmc, gmr, rgst) \
3150 (DWORD)SendMessageA(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
3151 #define MonthCal_SetDayState(hmc, cbds, rgds) \
3152 SendMessageA(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
3153 #define MonthCal_GetMinReqRect(hmc, prc) \
3154 SendMessageA(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
3155 #define MonthCal_SetColor(hmc, iColor, clr)\
3156 SendMessageA(hmc, MCM_SETCOLOR, iColor, clr
3157 #define MonthCal_GetColor(hmc, iColor) \
3158 SendMessageA(hmc, MCM_SETCOLOR, iColor, 0)
3159 #define MonthCal_GetToday(hmc, pst)\
3160 (BOOL)SendMessageA(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
3161 #define MonthCal_SetToday(hmc, pst)\
3162 SendMessageA(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
3163 #define MonthCal_HitTest(hmc, pinfo) \
3164 SendMessageA(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
3165 #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
3166 SendMessageA(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
3167 #define MonthCal_GetFirstDayOfWeek(hmc) \
3168 (DWORD)SendMessageA(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
3169 #define MonthCal_GetRange(hmc, rgst) \
3170 (DWORD)SendMessageA(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
3171 #define MonthCal_SetRange(hmc, gd, rgst) \
3172 (BOOL)SendMessageA(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
3173 #define MonthCal_GetMonthDelta(hmc) \
3174 (int)SendMessageA(hmc, MCM_GETMONTHDELTA, 0, 0)
3175 #define MonthCal_SetMonthDelta(hmc, n) \
3176 (int)SendMessageA(hmc, MCM_SETMONTHDELTA, n, 0)
3177 #define MonthCal_GetMaxTodayWidth(hmc) \
3178 (DWORD)SendMessageA(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
3179 #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
3180 (BOOL)SendMessageA((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
3181 #define MonthCal_GetUnicodeFormat(hwnd) \
3182 (BOOL)SendMessageA((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
3185 /**************************************************************************
3186 * Date and time picker control
3189 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
3190 #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
3191 #define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
3193 #define DTM_FIRST 0x1000
3194 #define DTN_FIRST (0U-760U)
3195 #define DTN_LAST (0U-799U)
3198 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
3199 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
3200 #define DTM_GETRANGE (DTM_FIRST+3)
3201 #define DTM_SETRANGE (DTM_FIRST+4)
3202 #define DTM_SETFORMATA (DTM_FIRST+5)
3203 #define DTM_SETFORMATW (DTM_FIRST + 50)
3204 #define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
3205 #define DTM_SETMCCOLOR (DTM_FIRST+6)
3206 #define DTM_GETMCCOLOR (DTM_FIRST+7)
3207 #define DTM_GETMONTHCAL (DTM_FIRST+8)
3208 #define DTM_SETMCFONT (DTM_FIRST+9)
3209 #define DTM_GETMCFONT (DTM_FIRST+10)
3212 /* Datetime Notifications */
3214 #define DTN_DATETIMECHANGE (DTN_FIRST + 1)
3215 #define DTN_USERSTRINGA (DTN_FIRST + 2)
3216 #define DTN_WMKEYDOWNA (DTN_FIRST + 3)
3217 #define DTN_FORMATA (DTN_FIRST + 4)
3218 #define DTN_FORMATQUERYA (DTN_FIRST + 5)
3219 #define DTN_DROPDOWN (DTN_FIRST + 6)
3220 #define DTN_CLOSEUP (DTN_FIRST + 7)
3221 #define DTN_USERSTRINGW (DTN_FIRST + 15)
3222 #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
3223 #define DTN_FORMATW (DTN_FIRST + 17)
3224 #define DTN_FORMATQUERYW (DTN_FIRST + 18)
3227 #define DTS_SHORTDATEFORMAT 0x0000
3228 #define DTS_UPDOWN 0x0001
3229 #define DTS_SHOWNONE 0x0002
3230 #define DTS_LONGDATEFORMAT 0x0004
3231 #define DTS_TIMEFORMAT 0x0009
3232 #define DTS_APPCANPARSE 0x0010
3233 #define DTS_RIGHTALIGN 0x0020
3235 typedef struct tagNMDATETIMECHANGE
3240 } NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
3242 typedef struct tagNMDATETIMESTRINGA
3245 LPCSTR pszUserString;
3248 } NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;
3250 typedef struct tagNMDATETIMESTRINGW
3253 LPCWSTR pszUserString;
3256 } NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
3259 typedef struct tagNMDATETIMEWMKEYDOWNA
3265 } NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;
3267 typedef struct tagNMDATETIMEWMKEYDOWNW
3273 } NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;
3277 typedef struct tagNMDATETIMEFORMATA
3284 } NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;
3287 typedef struct tagNMDATETIMEFORMATW
3293 WCHAR szDisplay[64];
3294 } NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;
3298 typedef struct tagNMDATETIMEFORMATQUERYA
3303 } NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;
3305 typedef struct tagNMDATETIMEFORMATQUERYW
3310 } NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;
3313 #define NMDATETIMESTRING WINELIB_NAME_AW(NMDATETIMESTRING)
3314 #define NMDATETIMEWMKEYDOWN WINELIB_NAME_AW(NMDATETIMEWMKEYDOWN)
3315 #define NMDATETIMEFORMAT WINELIB_NAME_AW(NMDATETIMEFORMAT)
3316 #define NMDATETIMEFORMATQUERY WINELIB_NAME_AW(NMDATETIMEFORMATQUERY)
3322 #define GDT_ERROR -1
3326 #define GDTR_MIN 0x0001
3327 #define GDTR_MAX 0x0002
3330 #define DateTime_GetSystemtime(hdp, pst) \
3331 (DWORD)SendMessageA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
3332 #define DateTime_SetSystemtime(hdp, gd, pst) \
3333 (BOOL)SendMessageA (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
3334 #define DateTime_GetRange(hdp, rgst) \
3335 (DWORD)SendMessageA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
3336 #define DateTime_SetRange(hdp, gd, rgst) \
3337 (BOOL)SendMessageA (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
3338 #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
3339 #define DateTime_SetFormatA(hdp, sz) \
3340 (BOOL)SendMessageA (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
3341 #define DateTime_SetFormatW(hdp, sz) \
3342 (BOOL)SendMessageW (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
3343 #define DateTime_GetMonthCalColor(hdp, iColor) \
3344 SendMessageA (hdp, DTM_GETMCCOLOR, iColor, 0)
3345 #define DateTime_GetMonthCal(hdp) \
3346 (HWND) SendMessageA (hdp, DTM_GETMONTHCAL, 0, 0)
3347 #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \
3348 SendMessageA (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
3349 #define DateTime_GetMonthCalFont(hdp) \
3350 SendMessageA (hdp, DTM_GETMCFONT, 0, 0)
3357 /**************************************************************************
3358 * UNDOCUMENTED functions
3361 /* private heap memory functions */
3363 LPVOID WINAPI COMCTL32_Alloc (DWORD);
3364 LPVOID WINAPI COMCTL32_ReAlloc (LPVOID, DWORD);
3365 BOOL WINAPI COMCTL32_Free (LPVOID);
3366 DWORD WINAPI COMCTL32_GetSize (LPVOID);
3369 INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
3370 BOOL WINAPI Str_SetPtrA (LPSTR *, LPCSTR);
3371 INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
3372 BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
3373 #define Str_GetPtr WINELIB_NAME_AW(Str_GetPtr)
3374 #define Str_SetPtr WINELIB_NAME_AW(Str_SetPtr)
3377 /* Dynamic Storage Array */
3388 HDSA WINAPI DSA_Create (INT, INT);
3389 BOOL WINAPI DSA_DeleteAllItems (const HDSA);
3390 INT WINAPI DSA_DeleteItem (const HDSA, INT);
3391 BOOL WINAPI DSA_Destroy (const HDSA);
3392 BOOL WINAPI DSA_GetItem (const HDSA, INT, LPVOID);
3393 LPVOID WINAPI DSA_GetItemPtr (const HDSA, INT);
3394 INT WINAPI DSA_InsertItem (const HDSA, INT, LPVOID);
3395 BOOL WINAPI DSA_SetItem (const HDSA, INT, LPVOID);
3397 typedef INT (CALLBACK *DSAENUMPROC)(LPVOID, DWORD);
3398 VOID WINAPI DSA_EnumCallback (const HDSA, DSAENUMPROC, LPARAM);
3399 BOOL WINAPI DSA_DestroyCallback (const HDSA, DSAENUMPROC, LPARAM);
3402 /* Dynamic Pointer Array */
3413 HDPA WINAPI DPA_Create (INT);
3414 HDPA WINAPI DPA_CreateEx (INT, HANDLE);
3415 BOOL WINAPI DPA_Destroy (const HDPA);
3416 HDPA WINAPI DPA_Clone (const HDPA, const HDPA);
3417 LPVOID WINAPI DPA_GetPtr (const HDPA, INT);
3418 INT WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);
3419 BOOL WINAPI DPA_Grow (const HDPA, INT);
3420 BOOL WINAPI DPA_SetPtr (const HDPA, INT, LPVOID);
3421 INT WINAPI DPA_InsertPtr (const HDPA, INT, LPVOID);
3422 LPVOID WINAPI DPA_DeletePtr (const HDPA, INT);
3423 BOOL WINAPI DPA_DeleteAllPtrs (const HDPA);
3425 typedef INT (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
3426 BOOL WINAPI DPA_Sort (const HDPA, PFNDPACOMPARE, LPARAM);
3428 #define DPAS_SORTED 0x0001
3429 #define DPAS_INSERTBEFORE 0x0002
3430 #define DPAS_INSERTAFTER 0x0004
3432 INT WINAPI DPA_Search (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
3434 #define DPAM_SORT 0x0001
3436 typedef PVOID(CALLBACK *PFNDPAMERGE)(DWORD,PVOID,PVOID,LPARAM);
3437 BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
3439 typedef INT (CALLBACK *DPAENUMPROC)(LPVOID, DWORD);
3440 VOID WINAPI DPA_EnumCallback (const HDPA, DPAENUMPROC, LPARAM);
3441 BOOL WINAPI DPA_DestroyCallback (const HDPA, DPAENUMPROC, LPARAM);
3444 #define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
3445 #define DPA_GetPtrPtr(hdpa) (*((LPVOID**)((BYTE*)(hdpa)+sizeof(INT))))
3446 #define DPA_FastGetPtr(hdpa,i) (DPA_GetPtrPtr(hdpa)[i])
3449 /* notification helper functions */
3451 LRESULT WINAPI COMCTL32_SendNotify (HWND, HWND, UINT, LPNMHDR);
3453 /* type and functionality of last parameter is still unknown */
3454 LRESULT WINAPI COMCTL32_SendNotifyEx (HWND, HWND, UINT, LPNMHDR, DWORD);
3460 #endif /* __WINE_COMMCTRL_H */