- Added the TVN_xxxA macros
[wine.git] / include / commctrl.h
blob48c0b69f756e1296cc5e29e20491e0e5190da070
1 /*
2 * Common controls definitions
3 */
5 #ifndef __WINE_COMMCTRL_H
6 #define __WINE_COMMCTRL_H
8 #include "windef.h"
9 #include "winbase.h"
10 #include "wingdi.h"
11 #include "winuser.h"
12 #include "imagelist.h"
13 #include "prsht.h"
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
19 BOOL WINAPI ShowHideMenuCtl (HWND, UINT, LPINT);
20 VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, LPINT);
21 VOID WINAPI InitCommonControls (VOID);
23 typedef struct tagINITCOMMONCONTROLSEX {
24 DWORD dwSize;
25 DWORD dwICC;
26 } INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
28 BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
30 #define COMCTL32_VERSION 5 /* dll version */
32 #ifndef _WIN32_IE
33 #define _WIN32_IE 0x0400
34 #endif
36 #define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
37 #define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
38 #define ICC_BAR_CLASSES 0x00000004 /* toolbar, statusbar, trackbar, tooltips */
39 #define ICC_TAB_CLASSES 0x00000008 /* tab, tooltips */
40 #define ICC_UPDOWN_CLASS 0x00000010 /* updown */
41 #define ICC_PROGRESS_CLASS 0x00000020 /* progress */
42 #define ICC_HOTKEY_CLASS 0x00000040 /* hotkey */
43 #define ICC_ANIMATE_CLASS 0x00000080 /* animate */
44 #define ICC_WIN95_CLASSES 0x000000FF
45 #define ICC_DATE_CLASSES 0x00000100 /* month picker, date picker, time picker, updown */
46 #define ICC_USEREX_CLASSES 0x00000200 /* comboex */
47 #define ICC_COOL_CLASSES 0x00000400 /* rebar (coolbar) */
48 #define ICC_INTERNET_CLASSES 0x00000800 /* IP address, ... */
49 #define ICC_PAGESCROLLER_CLASS 0x00001000 /* page scroller */
50 #define ICC_NATIVEFNTCTL_CLASS 0x00002000 /* native font control ???*/
53 /* common control styles */
54 #define CCS_TOP 0x00000001L
55 #define CCS_NOMOVEY 0x00000002L
56 #define CCS_BOTTOM 0x00000003L
57 #define CCS_NORESIZE 0x00000004L
58 #define CCS_NOPARENTALIGN 0x00000008L
59 #define CCS_ADJUSTABLE 0x00000020L
60 #define CCS_NODIVIDER 0x00000040L
61 #define CCS_VERT 0x00000080L
62 #define CCS_LEFT (CCS_VERT|CCS_TOP)
63 #define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
64 #define CCS_NOMOVEX (CCS_VERT|CCS_NOMOVEY)
67 /* common control shared messages */
68 #define CCM_FIRST 0x2000
70 #define CCM_SETBKCOLOR (CCM_FIRST+1) /* lParam = bkColor */
71 #define CCM_SETCOLORSCHEME (CCM_FIRST+2) /* lParam = COLORSCHEME struct ptr */
72 #define CCM_GETCOLORSCHEME (CCM_FIRST+3) /* lParam = COLORSCHEME struct ptr */
73 #define CCM_GETDROPTARGET (CCM_FIRST+4)
74 #define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
75 #define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
76 #define CCM_SETVERSION (CCM_FIRST+7)
77 #define CCM_GETVERSION (CCM_FIRST+8)
78 #define CCM_SETNOTIFYWINDOW (CCM_FIRST+9) /* wParam = hwndParent */
81 /* common notification codes (WM_NOTIFY)*/
82 #define NM_FIRST (0U- 0U)
83 #define NM_LAST (0U- 99U)
84 #define NM_OUTOFMEMORY (NM_FIRST-1)
85 #define NM_CLICK (NM_FIRST-2)
86 #define NM_DBLCLK (NM_FIRST-3)
87 #define NM_RETURN (NM_FIRST-4)
88 #define NM_RCLICK (NM_FIRST-5)
89 #define NM_RDBLCLK (NM_FIRST-6)
90 #define NM_SETFOCUS (NM_FIRST-7)
91 #define NM_KILLFOCUS (NM_FIRST-8)
92 #define NM_CUSTOMDRAW (NM_FIRST-12)
93 #define NM_HOVER (NM_FIRST-13)
94 #define NM_NCHITTEST (NM_FIRST-14)
95 #define NM_KEYDOWN (NM_FIRST-15)
96 #define NM_RELEASEDCAPTURE (NM_FIRST-16)
97 #define NM_SETCURSOR (NM_FIRST-17)
98 #define NM_CHAR (NM_FIRST-18)
99 #define NM_TOOLTIPSCREATED (NM_FIRST-19)
100 #define NM_UPDOWN NMUPDOWN
102 /* callback constants */
103 #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
104 #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
105 #define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
107 #define I_IMAGECALLBACK (-1)
108 #define I_INDENTCALLBACK (-1)
109 #define I_CHILDRENCALLBACK (-1)
112 /* owner drawn types */
113 #define ODT_HEADER 100
114 #define ODT_TAB 101
115 #define ODT_LISTVIEW 102
117 /* common notification structures */
118 typedef struct tagNMTOOLTIPSCREATED
120 NMHDR hdr;
121 HWND hwndToolTips;
122 } NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;
125 #ifndef CCSIZEOF_STRUCT
126 #define CCSIZEOF_STRUCT(name, member) \
127 (((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
128 sizeof(((name*)0)->member))
129 #endif
132 /* This is only for Winelib applications. DON't use it wine itself!!! */
133 #ifndef SNDMSG
134 #ifdef __cplusplus
135 #define SNDMSG ::SendMessage
136 #else /* __cplusplus */
137 #define SNDMSG SendMessage
138 #endif /* __cplusplus */
139 #endif /* SNDMSG */
143 /* Custom Draw messages */
145 #define CDRF_DODEFAULT 0x0
146 #define CDRF_NEWFONT 0x00000002
147 #define CDRF_SKIPDEFAULT 0x00000004
148 #define CDRF_NOTIFYPOSTPAINT 0x00000010
149 #define CDRF_NOTIFYITEMDRAW 0x00000020
150 #define CDRF_NOTIFYSUBITEMDRAW 0x00000020
151 #define CDRF_NOTIFYPOSTERASE 0x00000040
152 #define CDRF_NOTIFYITEMERASE 0x00000080 /* obsolete ??? */
155 /* drawstage flags */
157 #define CDDS_PREPAINT 1
158 #define CDDS_POSTPAINT 2
159 #define CDDS_PREERASE 3
160 #define CDDS_POSTERASE 4
162 #define CDDS_ITEM 0x00010000
163 #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
164 #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
165 #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
166 #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
167 #define CDDS_SUBITEM 0x00020000
169 /* itemState flags */
171 #define CDIS_SELECTED 0x0001
172 #define CDIS_GRAYED 0x0002
173 #define CDIS_DISABLED 0x0004
174 #define CDIS_CHECKED 0x0008
175 #define CDIS_FOCUS 0x0010
176 #define CDIS_DEFAULT 0x0020
177 #define CDIS_HOT 0x0040
178 #define CDIS_MARKED 0x0080
179 #define CDIS_INDETERMINATE 0x0100
182 typedef struct tagNMCUSTOMDRAWINFO
184 NMHDR hdr;
185 DWORD dwDrawStage;
186 HDC hdc;
187 RECT rc;
188 DWORD dwItemSpec;
189 UINT uItemState;
190 LPARAM lItemlParam;
191 } NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
193 typedef struct tagNMTTCUSTOMDRAW
195 NMCUSTOMDRAW nmcd;
196 UINT uDrawFlags;
197 } NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
202 /* StatusWindow */
204 #define STATUSCLASSNAME16 "msctls_statusbar"
205 #define STATUSCLASSNAMEA "msctls_statusbar32"
206 /* Does not work. gcc creates 4 byte wide strings.
207 * #define STATUSCLASSNAME32W L"msctls_statusbar32"
209 static const WCHAR _scn32w[] = {
210 'm','s','c','t','l','s','_','s','t','a','t','u','s','b','a','r','3','2',0
212 #define STATUSCLASSNAMEW _scn32w
213 #define STATUSCLASSNAME WINELIB_NAME_AW(STATUSCLASSNAME)
215 #define SBT_NOBORDERS 0x0100
216 #define SBT_POPOUT 0x0200
217 #define SBT_RTLREADING 0x0400 /* not supported */
218 #define SBT_TOOLTIPS 0x0800
219 #define SBT_OWNERDRAW 0x1000
221 #define SBARS_SIZEGRIP 0x0100
223 #define SB_SETTEXTA (WM_USER+1)
224 #define SB_SETTEXTW (WM_USER+11)
225 #define SB_SETTEXT WINELIB_NAME_AW(SB_SETTEXT)
226 #define SB_GETTEXTA (WM_USER+2)
227 #define SB_GETTEXTW (WM_USER+13)
228 #define SB_GETTEXT WINELIB_NAME_AW(SB_GETTEXT)
229 #define SB_GETTEXTLENGTHA (WM_USER+3)
230 #define SB_GETTEXTLENGTHW (WM_USER+12)
231 #define SB_GETTEXTLENGTH WINELIB_NAME_AW(SB_GETTEXTLENGTH)
232 #define SB_SETPARTS (WM_USER+4)
233 #define SB_GETPARTS (WM_USER+6)
234 #define SB_GETBORDERS (WM_USER+7)
235 #define SB_SETMINHEIGHT (WM_USER+8)
236 #define SB_SIMPLE (WM_USER+9)
237 #define SB_GETRECT (WM_USER+10)
238 #define SB_ISSIMPLE (WM_USER+14)
239 #define SB_SETICON (WM_USER+15)
240 #define SB_SETTIPTEXTA (WM_USER+16)
241 #define SB_SETTIPTEXTW (WM_USER+17)
242 #define SB_SETTIPTEXT WINELIB_NAME_AW(SB_SETTIPTEXT)
243 #define SB_GETTIPTEXTA (WM_USER+18)
244 #define SB_GETTIPTEXTW (WM_USER+19)
245 #define SB_GETTIPTEXT WINELIB_NAME_AW(SB_GETTIPTEXT)
246 #define SB_GETICON (WM_USER+20)
247 #define SB_SETBKCOLOR CCM_SETBKCOLOR /* lParam = bkColor */
248 #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
249 #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
251 #define SBN_FIRST (0U-880U)
252 #define SBN_LAST (0U-899U)
253 #define SBN_SIMPLEMODECHANGE (SBN_FIRST-0)
255 HWND WINAPI CreateStatusWindowA (INT, LPCSTR, HWND, UINT);
256 HWND WINAPI CreateStatusWindowW (INT, LPCWSTR, HWND, UINT);
257 #define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
258 VOID WINAPI DrawStatusTextA (HDC, LPRECT, LPCSTR, UINT);
259 VOID WINAPI DrawStatusTextW (HDC, LPRECT, LPCWSTR, UINT);
260 #define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
261 VOID WINAPI MenuHelp (UINT, WPARAM, LPARAM, HMENU,
262 HINSTANCE, HWND, LPUINT);
264 typedef struct tagCOLORSCHEME
266 DWORD dwSize;
267 COLORREF clrBtnHighlight; /* highlight color */
268 COLORREF clrBtnShadow; /* shadow color */
269 } COLORSCHEME, *LPCOLORSCHEME;
271 /**************************************************************************
272 * Drag List control
275 typedef struct tagDRAGLISTINFO
277 UINT uNotification;
278 HWND hWnd;
279 POINT ptCursor;
280 } DRAGLISTINFO, *LPDRAGLISTINFO;
282 #define DL_BEGINDRAG (WM_USER+133)
283 #define DL_DRAGGING (WM_USER+134)
284 #define DL_DROPPED (WM_USER+135)
285 #define DL_CANCELDRAG (WM_USER+136)
287 #define DL_CURSORSET 0
288 #define DL_STOPCURSOR 1
289 #define DL_COPYCURSOR 2
290 #define DL_MOVECURSOR 3
292 #define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
294 BOOL WINAPI MakeDragList (HWND);
295 VOID WINAPI DrawInsert (HWND, HWND, INT);
296 INT WINAPI LBItemFromPt (HWND, POINT, BOOL);
299 /* UpDown */
301 #define UPDOWN_CLASS16 "msctls_updown"
302 #define UPDOWN_CLASSA "msctls_updown32"
303 #define UPDOWN_CLASSW L"msctls_updown32"
304 #define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
306 typedef struct tagUDACCEL
308 UINT nSec;
309 UINT nInc;
310 } UDACCEL;
312 #define UD_MAXVAL 0x7fff
313 #define UD_MINVAL 0x8001
315 #define UDS_WRAP 0x0001
316 #define UDS_SETBUDDYINT 0x0002
317 #define UDS_ALIGNRIGHT 0x0004
318 #define UDS_ALIGNLEFT 0x0008
319 #define UDS_AUTOBUDDY 0x0010
320 #define UDS_ARROWKEYS 0x0020
321 #define UDS_HORZ 0x0040
322 #define UDS_NOTHOUSANDS 0x0080
324 #define UDN_FIRST (0U-721)
325 #define UDN_LAST (0U-740)
326 #define UDN_DELTAPOS (UDN_FIRST-1)
328 #define UDM_SETRANGE (WM_USER+101)
329 #define UDM_GETRANGE (WM_USER+102)
330 #define UDM_SETPOS (WM_USER+103)
331 #define UDM_GETPOS (WM_USER+104)
332 #define UDM_SETBUDDY (WM_USER+105)
333 #define UDM_GETBUDDY (WM_USER+106)
334 #define UDM_SETACCEL (WM_USER+107)
335 #define UDM_GETACCEL (WM_USER+108)
336 #define UDM_SETBASE (WM_USER+109)
337 #define UDM_GETBASE (WM_USER+110)
338 #define UDM_SETRANGE32 (WM_USER+111)
339 #define UDM_GETRANGE32 (WM_USER+112)
341 HWND WINAPI CreateUpDownControl (DWORD, INT, INT, INT, INT,
342 HWND, INT, HINSTANCE, HWND,
343 INT, INT, INT);
345 /* Progress Bar */
347 #define PROGRESS_CLASSA "msctls_progress32"
348 #define PROGRESS_CLASSW L"msctls_progress32"
349 #define PROGRESS_CLASS16 "msctls_progress"
350 #define PROGRESS_CLASS WINELIB_NAME_AW(PROGRESS_CLASS)
352 #define PBM_SETRANGE (WM_USER+1)
353 #define PBM_SETPOS (WM_USER+2)
354 #define PBM_DELTAPOS (WM_USER+3)
355 #define PBM_SETSTEP (WM_USER+4)
356 #define PBM_STEPIT (WM_USER+5)
357 #define PBM_SETRANGE32 (WM_USER+6)
358 #define PBM_GETRANGE (WM_USER+7)
359 #define PBM_GETPOS (WM_USER+8)
360 #define PBM_SETBARCOLOR (WM_USER+9)
361 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
363 #define PBS_SMOOTH 0x01
364 #define PBS_VERTICAL 0x04
366 typedef struct
368 INT iLow;
369 INT iHigh;
370 } PBRANGE, *PPBRANGE;
373 /* ImageList */
375 #if !defined(__WINE__) || !defined(__WINE_IMAGELIST_C)
376 struct _IMAGELIST;
377 typedef struct _IMAGELIST *HIMAGELIST;
378 #endif */ /* __WINE__ */
380 #define CLR_NONE 0xFFFFFFFF
381 #define CLR_DEFAULT 0xFF000000
382 #define CLR_HILIGHT CLR_DEFAULT
384 #define ILC_MASK 0x0001
385 #define ILC_COLOR 0x0000
386 #define ILC_COLORDDB 0x00FE
387 #define ILC_COLOR4 0x0004
388 #define ILC_COLOR8 0x0008
389 #define ILC_COLOR16 0x0010
390 #define ILC_COLOR24 0x0018
391 #define ILC_COLOR32 0x0020
392 #define ILC_PALETTE 0x0800 /* no longer supported by M$ */
394 #define ILD_NORMAL 0x0000
395 #define ILD_TRANSPARENT 0x0001
396 #define ILD_BLEND25 0x0002
397 #define ILD_BLEND50 0x0004
398 #define ILD_MASK 0x0010
399 #define ILD_IMAGE 0x0020
400 #define ILD_ROP 0x0040
401 #define ILD_OVERLAYMASK 0x0F00
403 #define ILD_SELECTED ILD_BLEND50
404 #define ILD_FOCUS ILD_BLEND25
405 #define ILD_BLEND ILD_BLEND50
407 #define INDEXTOOVERLAYMASK(i) ((i)<<8)
408 #define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
410 #define ILCF_MOVE (0x00000000)
411 #define ILCF_SWAP (0x00000001)
414 typedef struct _IMAGEINFO
416 HBITMAP hbmImage;
417 HBITMAP hbmMask;
418 INT Unused1;
419 INT Unused2;
420 RECT rcImage;
421 } IMAGEINFO;
424 typedef struct _IMAGELISTDRAWPARAMS
426 DWORD cbSize;
427 HIMAGELIST himl;
428 INT i;
429 HDC hdcDst;
430 INT x;
431 INT y;
432 INT cx;
433 INT cy;
434 INT xBitmap; /* x offest from the upperleft of bitmap */
435 INT yBitmap; /* y offset from the upperleft of bitmap */
436 COLORREF rgbBk;
437 COLORREF rgbFg;
438 UINT fStyle;
439 DWORD dwRop;
440 } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
443 INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
444 INT WINAPI ImageList_AddIcon (HIMAGELIST, HICON);
445 INT WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
446 BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT);
447 BOOL WINAPI ImageList_Copy(HIMAGELIST,INT,HIMAGELIST,INT,INT);
448 HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
449 BOOL WINAPI ImageList_Destroy(HIMAGELIST);
450 BOOL WINAPI ImageList_DragEnter(HWND,INT,INT);
451 BOOL WINAPI ImageList_DragLeave(HWND);
452 BOOL WINAPI ImageList_DragMove(INT,INT);
453 BOOL WINAPI ImageList_DragShowNolock (BOOL);
454 BOOL WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
455 BOOL WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
456 INT,COLORREF,COLORREF,UINT);
457 BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
458 HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
459 BOOL WINAPI ImageList_EndDrag(VOID);
460 COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
461 HIMAGELIST WINAPI ImageList_GetDragImage(POINT*,POINT*);
462 HICON WINAPI ImageList_GetIcon(HIMAGELIST,INT,UINT);
463 BOOL WINAPI ImageList_GetIconSize(HIMAGELIST,INT*,INT*);
464 INT WINAPI ImageList_GetImageCount(HIMAGELIST);
465 BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST,INT,IMAGEINFO*);
466 BOOL WINAPI ImageList_GetImageRect(HIMAGELIST,INT,LPRECT);
467 HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,INT,INT,
468 COLORREF,UINT,UINT);
469 HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,INT,INT,
470 COLORREF,UINT,UINT);
471 #define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
472 HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
473 #ifdef __IStream_INTREFACE_DEFINED__
474 HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
475 #endif
476 BOOL WINAPI ImageList_Remove(HIMAGELIST,INT);
477 BOOL WINAPI ImageList_Replace(HIMAGELIST,INT,HBITMAP,HBITMAP);
478 INT WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT,HICON);
479 COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
480 BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT,INT,INT);
482 BOOL WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
483 BOOL WINAPI ImageList_SetImageCount(HIMAGELIST,INT);
484 BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
485 #ifdef __IStream_INTREFACE_DEFINED__
486 BOOL WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
487 #endif
489 #ifndef __WINE__
490 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
491 #endif
492 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
493 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
494 ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
495 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
498 #ifndef WM_MOUSEHOVER
499 #define WM_MOUSEHOVER 0x02A1
500 #define WM_MOUSELEAVE 0x02A3
501 #endif
503 #ifndef TME_HOVER
505 #define TME_HOVER 0x00000001
506 #define TME_LEAVE 0x00000002
507 #define TME_QUERY 0x40000000
508 #define TME_CANCEL 0x80000000
511 #define HOVER_DEFAULT 0xFFFFFFFF
513 typedef struct tagTRACKMOUSEEVENT {
514 DWORD cbSize;
515 DWORD dwFlags;
516 HWND hwndTrack;
517 DWORD dwHoverTime;
518 } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
520 #endif
522 BOOL
523 WINAPI
524 _TrackMouseEvent(
525 LPTRACKMOUSEEVENT lpEventTrack);
527 /* Flat Scrollbar control */
529 #define FLATSB_CLASS16 "flatsb_class"
530 #define FLATSB_CLASSA "flatsb_class32"
531 #define FLATSB_CLASSW L"flatsb_class32"
532 #define FLATSB_CLASS WINELIB_NAME_AW(FLATSB_CLASS)
534 #define WSB_PROP_CYVSCROLL 0x00000001L
535 #define WSB_PROP_CXHSCROLL 0x00000002L
536 #define WSB_PROP_CYHSCROLL 0x00000004L
537 #define WSB_PROP_CXVSCROLL 0x00000008L
538 #define WSB_PROP_CXHTHUMB 0x00000010L
539 #define WSB_PROP_CYVTHUMB 0x00000020L
540 #define WSB_PROP_VBKGCOLOR 0x00000040L
541 #define WSB_PROP_HBKGCOLOR 0x00000080L
542 #define WSB_PROP_VSTYLE 0x00000100L
543 #define WSB_PROP_HSTYLE 0x00000200L
544 #define WSB_PROP_WINSTYLE 0x00000400L
545 #define WSB_PROP_PALETTE 0x00000800L
546 #define WSB_PROP_MASK 0x00000FFFL
548 #define FSB_REGULAR_MODE 0
549 #define FSB_ENCARTA_MODE 1
550 #define FSB_FLAT_MODE 2
553 BOOL WINAPI FlatSB_EnableScrollBar(HWND, INT, UINT);
554 BOOL WINAPI FlatSB_ShowScrollBar(HWND, INT, BOOL);
555 BOOL WINAPI FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
556 BOOL WINAPI FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
557 INT WINAPI FlatSB_GetScrollPos(HWND, INT);
558 BOOL WINAPI FlatSB_GetScrollProp(HWND, INT, LPINT);
559 INT WINAPI FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
560 INT WINAPI FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
561 INT WINAPI FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
562 BOOL WINAPI FlatSB_SetScrollProp(HWND, UINT, INT, BOOL);
563 BOOL WINAPI InitializeFlatSB(HWND);
564 HRESULT WINAPI UninitializeFlatSB(HWND);
567 /* Header control */
569 #define WC_HEADER16 "SysHeader"
570 #define WC_HEADERA "SysHeader32"
571 #define WC_HEADERW L"SysHeader32"
572 #define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
574 #define HDS_HORZ 0x0000
575 #define HDS_BUTTONS 0x0002
576 #define HDS_HOTTRACK 0x0004
577 #define HDS_HIDDEN 0x0008
578 #define HDS_DRAGDROP 0x0040
579 #define HDS_FULLDRAG 0x0080
581 #define HDI_WIDTH 0x0001
582 #define HDI_HEIGHT HDI_WIDTH
583 #define HDI_TEXT 0x0002
584 #define HDI_FORMAT 0x0004
585 #define HDI_LPARAM 0x0008
586 #define HDI_BITMAP 0x0010
587 #define HDI_IMAGE 0x0020
588 #define HDI_DI_SETITEM 0x0040
589 #define HDI_ORDER 0x0080
591 #define HDF_LEFT 0x0000
592 #define HDF_RIGHT 0x0001
593 #define HDF_CENTER 0x0002
594 #define HDF_JUSTIFYMASK 0x0003
596 #define HDF_IMAGE 0x0800
597 #define HDF_BITMAP_ON_RIGHT 0x1000
598 #define HDF_BITMAP 0x2000
599 #define HDF_STRING 0x4000
600 #define HDF_OWNERDRAW 0x8000
602 #define HHT_NOWHERE 0x0001
603 #define HHT_ONHEADER 0x0002
604 #define HHT_ONDIVIDER 0x0004
605 #define HHT_ONDIVOPEN 0x0008
606 #define HHT_ABOVE 0x0100
607 #define HHT_BELOW 0x0200
608 #define HHT_TORIGHT 0x0400
609 #define HHT_TOLEFT 0x0800
611 #define HDM_FIRST 0x1200
612 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
613 #define HDM_INSERTITEMA (HDM_FIRST+1)
614 #define HDM_INSERTITEMW (HDM_FIRST+10)
615 #define HDM_INSERTITEM WINELIB_NAME_AW(HDM_INSERTITEM)
616 #define HDM_DELETEITEM (HDM_FIRST+2)
617 #define HDM_GETITEMA (HDM_FIRST+3)
618 #define HDM_GETITEMW (HDM_FIRST+11)
619 #define HDM_GETITEM WINELIB_NAME_AW(HDM_GETITEM)
620 #define HDM_SETITEMA (HDM_FIRST+4)
621 #define HDM_SETITEMW (HDM_FIRST+12)
622 #define HDM_SETITEM WINELIB_NAME_AW(HDM_SETITEM)
623 #define HDM_LAYOUT (HDM_FIRST+5)
624 #define HDM_HITTEST (HDM_FIRST+6)
625 #define HDM_GETITEMRECT (HDM_FIRST+7)
626 #define HDM_SETIMAGELIST (HDM_FIRST+8)
627 #define HDM_GETIMAGELIST (HDM_FIRST+9)
629 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
630 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
631 #define HDM_GETORDERARRAY (HDM_FIRST+17)
632 #define HDM_SETORDERARRAY (HDM_FIRST+18)
633 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
634 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
635 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
637 #define HDN_FIRST (0U-300U)
638 #define HDN_LAST (0U-399U)
639 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
640 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
641 #define HDN_ITEMCHANGING WINELIB_NAME_AW(HDN_ITEMCHANGING)
642 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
643 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
644 #define HDN_ITEMCHANGED WINELIB_NAME_AW(HDN_ITEMCHANGED)
645 #define HDN_ITEMCLICKA (HDN_FIRST-2)
646 #define HDN_ITEMCLICKW (HDN_FIRST-22)
647 #define HDN_ITEMCLICK WINELIB_NAME_AW(HDN_ITEMCLICK)
648 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
649 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
650 #define HDN_ITEMDBLCLICK WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
651 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
652 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
653 #define HDN_DIVIDERDBLCLICK WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
654 #define HDN_BEGINTRACKA (HDN_FIRST-6)
655 #define HDN_BEGINTRACKW (HDN_FIRST-26)
656 #define HDN_BEGINTRACK WINELIB_NAME_AW(HDN_BEGINTRACK)
657 #define HDN_ENDTRACKA (HDN_FIRST-7)
658 #define HDN_ENDTRACKW (HDN_FIRST-27)
659 #define HDN_ENDTRACK WINELIB_NAME_AW(HDN_ENDTRACK)
660 #define HDN_TRACKA (HDN_FIRST-8)
661 #define HDN_TRACKW (HDN_FIRST-28)
662 #define HDN_TRACK WINELIB_NAME_AW(HDN_TRACK)
663 #define HDN_GETDISPINFOA (HDN_FIRST-9)
664 #define HDN_GETDISPINFOW (HDN_FIRST-29)
665 #define HDN_GETDISPINFO WINELIB_NAME_AW(HDN_GETDISPINFO)
666 #define HDN_BEGINDRACK (HDN_FIRST-10)
667 #define HDN_ENDDRACK (HDN_FIRST-11)
669 typedef struct _HD_LAYOUT
671 RECT *prc;
672 WINDOWPOS *pwpos;
673 } HDLAYOUT, *LPHDLAYOUT;
675 #define HD_LAYOUT HDLAYOUT
677 typedef struct _HD_ITEMA
679 UINT mask;
680 INT cxy;
681 LPSTR pszText;
682 HBITMAP hbm;
683 INT cchTextMax;
684 INT fmt;
685 LPARAM lParam;
686 INT iImage;
687 INT iOrder;
688 } HDITEMA, *LPHDITEMA;
690 typedef struct _HD_ITEMW
692 UINT mask;
693 INT cxy;
694 LPWSTR pszText;
695 HBITMAP hbm;
696 INT cchTextMax;
697 INT fmt;
698 LPARAM lParam;
699 INT iImage;
700 INT iOrder;
701 } HDITEMW, *LPHDITEMW;
703 #define HDITEM WINELIB_NAME_AW(HDITEM)
704 #define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
705 #define HD_ITEM HDITEM
707 #define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
708 #define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
709 #define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
711 typedef struct _HD_HITTESTINFO
713 POINT pt;
714 UINT flags;
715 INT iItem;
716 } HDHITTESTINFO, *LPHDHITTESTINFO;
718 #define HD_HITTESTINFO HDHITTESTINFO
720 typedef struct tagNMHEADERA
722 NMHDR hdr;
723 INT iItem;
724 INT iButton;
725 HDITEMA *pitem;
726 } NMHEADERA, *LPNMHEADERA;
728 typedef struct tagNMHEADERW
730 NMHDR hdr;
731 INT iItem;
732 INT iButton;
733 HDITEMW *pitem;
734 } NMHEADERW, *LPNMHEADERW;
736 #define NMHEADER WINELIB_NAME_AW(NMHEADER)
737 #define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
738 #define HD_NOTIFY NMHEADER
740 typedef struct tagNMHDDISPINFOA
742 NMHDR hdr;
743 INT iItem;
744 UINT mask;
745 LPSTR pszText;
746 INT cchTextMax;
747 INT iImage;
748 LPARAM lParam;
749 } NMHDDISPINFOA, *LPNMHDDISPINFOA;
751 typedef struct tagNMHDDISPINFOW
753 NMHDR hdr;
754 INT iItem;
755 UINT mask;
756 LPWSTR pszText;
757 INT cchTextMax;
758 INT iImage;
759 LPARAM lParam;
760 } NMHDDISPINFOW, *LPNMHDDISPINFOW;
762 #define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
763 #define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
765 #define Header_GetItemCount(hwndHD) \
766 (INT)SendMessageA((hwndHD),HDM_GETITEMCOUNT,0,0L)
767 #define Header_InsertItemA(hwndHD,i,phdi) \
768 (INT)SendMessageA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
769 #define Header_InsertItemW(hwndHD,i,phdi) \
770 (INT)SendMessageW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
771 #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
772 #define Header_DeleteItem(hwndHD,i) \
773 (BOOL)SendMessageA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
774 #define Header_GetItemA(hwndHD,i,phdi) \
775 (BOOL)SendMessageA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
776 #define Header_GetItemW(hwndHD,i,phdi) \
777 (BOOL)SendMessageW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
778 #define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
779 #define Header_SetItemA(hwndHD,i,phdi) \
780 (BOOL)SendMessageA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
781 #define Header_SetItemW(hwndHD,i,phdi) \
782 (BOOL)SendMessageW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
783 #define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
784 #define Header_Layout(hwndHD,playout) \
785 (BOOL)SendMessageA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
786 #define Header_GetItemRect(hwnd,iItem,lprc) \
787 (BOOL)SendMessageA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
788 #define Header_SetImageList(hwnd,himl) \
789 (HIMAGELIST)SendMessageA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
790 #define Header_GetImageList(hwnd) \
791 (HIMAGELIST)SendMessageA((hwnd),HDM_GETIMAGELIST,0,0)
792 #define Header_OrderToIndex(hwnd,i) \
793 (INT)SendMessageA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
794 #define Header_CreateDragImage(hwnd,i) \
795 (HIMAGELIST)SendMessageA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
796 #define Header_GetOrderArray(hwnd,iCount,lpi) \
797 (BOOL)SendMessageA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
798 #define Header_SetOrderArray(hwnd,iCount,lpi) \
799 (BOOL)SendMessageA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
800 #define Header_SetHotDivider(hwnd,fPos,dw) \
801 (INT)SendMessageA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
802 #define Header_SetUnicodeFormat(hwnd,fUnicode) \
803 (BOOL)SendMessageA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
804 #define Header_GetUnicodeFormat(hwnd) \
805 (BOOL)SendMessageA((hwnd),HDM_GETUNICODEFORMAT,0,0)
808 /* Toolbar */
810 #define TOOLBARCLASSNAME16 "ToolbarWindow"
811 #define TOOLBARCLASSNAMEW "ToolbarWindow32"
812 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
813 #define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
815 #define CMB_MASKED 0x02
817 #define TBSTATE_CHECKED 0x01
818 #define TBSTATE_PRESSED 0x02
819 #define TBSTATE_ENABLED 0x04
820 #define TBSTATE_HIDDEN 0x08
821 #define TBSTATE_INDETERMINATE 0x10
822 #define TBSTATE_WRAP 0x20
823 #define TBSTATE_ELLIPSES 0x40
824 #define TBSTATE_MARKED 0x80
826 #define TBSTYLE_BUTTON 0x00
827 #define TBSTYLE_SEP 0x01
828 #define TBSTYLE_CHECK 0x02
829 #define TBSTYLE_GROUP 0x04
830 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
831 #define TBSTYLE_DROPDOWN 0x08
833 #define TBSTYLE_TOOLTIPS 0x0100
834 #define TBSTYLE_WRAPABLE 0x0200
835 #define TBSTYLE_ALTDRAG 0x0400
836 #define TBSTYLE_FLAT 0x0800
837 #define TBSTYLE_LIST 0x1000
838 #define TBSTYLE_CUSTOMERASE 0x2000
840 #define TBIF_IMAGE 0x00000001
841 #define TBIF_TEXT 0x00000002
842 #define TBIF_STATE 0x00000004
843 #define TBIF_STYLE 0x00000008
844 #define TBIF_LPARAM 0x00000010
845 #define TBIF_COMMAND 0x00000020
846 #define TBIF_SIZE 0x00000040
848 #define TBBF_LARGE 0x0001
850 #define TB_ENABLEBUTTON (WM_USER+1)
851 #define TB_CHECKBUTTON (WM_USER+2)
852 #define TB_PRESSBUTTON (WM_USER+3)
853 #define TB_HIDEBUTTON (WM_USER+4)
854 #define TB_INDETERMINATE (WM_USER+5)
855 #define TB_MARKBUTTON (WM_USER+6)
856 #define TB_ISBUTTONENABLED (WM_USER+9)
857 #define TB_ISBUTTONCHECKED (WM_USER+10)
858 #define TB_ISBUTTONPRESSED (WM_USER+11)
859 #define TB_ISBUTTONHIDDEN (WM_USER+12)
860 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
861 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
862 #define TB_SETSTATE (WM_USER+17)
863 #define TB_GETSTATE (WM_USER+18)
864 #define TB_ADDBITMAP (WM_USER+19)
865 #define TB_ADDBUTTONSA (WM_USER+20)
866 #define TB_ADDBUTTONSW (WM_USER+68)
867 #define TB_ADDBUTTONS WINELIB_NAME_AW(TB_ADDBUTTONS)
868 #define TB_HITTEST (WM_USER+69)
869 #define TB_INSERTBUTTONA (WM_USER+21)
870 #define TB_INSERTBUTTONW (WM_USER+67)
871 #define TB_INSERTBUTTON WINELIB_NAME_AW(TB_INSERTBUTTON)
872 #define TB_DELETEBUTTON (WM_USER+22)
873 #define TB_GETBUTTON (WM_USER+23)
874 #define TB_BUTTONCOUNT (WM_USER+24)
875 #define TB_COMMANDTOINDEX (WM_USER+25)
876 #define TB_SAVERESTOREA (WM_USER+26)
877 #define TB_SAVERESTOREW (WM_USER+76)
878 #define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
879 #define TB_CUSTOMIZE (WM_USER+27)
880 #define TB_ADDSTRINGA (WM_USER+28)
881 #define TB_ADDSTRINGW (WM_USER+77)
882 #define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
883 #define TB_GETITEMRECT (WM_USER+29)
884 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
885 #define TB_SETBUTTONSIZE (WM_USER+31)
886 #define TB_SETBITMAPSIZE (WM_USER+32)
887 #define TB_AUTOSIZE (WM_USER+33)
888 #define TB_GETTOOLTIPS (WM_USER+35)
889 #define TB_SETTOOLTIPS (WM_USER+36)
890 #define TB_SETPARENT (WM_USER+37)
891 #define TB_SETROWS (WM_USER+39)
892 #define TB_GETROWS (WM_USER+40)
893 #define TB_GETBITMAPFLAGS (WM_USER+41)
894 #define TB_SETCMDID (WM_USER+42)
895 #define TB_CHANGEBITMAP (WM_USER+43)
896 #define TB_GETBITMAP (WM_USER+44)
897 #define TB_GETBUTTONTEXTA (WM_USER+45)
898 #define TB_GETBUTTONTEXTW (WM_USER+75)
899 #define TB_GETBUTTONTEXT WINELIB_NAME_AW(TB_GETBUTTONTEXT)
900 #define TB_REPLACEBITMAP (WM_USER+46)
901 #define TB_SETINDENT (WM_USER+47)
902 #define TB_SETIMAGELIST (WM_USER+48)
903 #define TB_GETIMAGELIST (WM_USER+49)
904 #define TB_LOADIMAGES (WM_USER+50)
905 #define TB_GETRECT (WM_USER+51) /* wParam is the Cmd instead of index */
906 #define TB_SETHOTIMAGELIST (WM_USER+52)
907 #define TB_GETHOTIMAGELIST (WM_USER+53)
908 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
909 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
910 #define TB_SETSTYLE (WM_USER+56)
911 #define TB_GETSTYLE (WM_USER+57)
912 #define TB_GETBUTTONSIZE (WM_USER+58)
913 #define TB_SETBUTTONWIDTH (WM_USER+59)
914 #define TB_SETMAXTEXTROWS (WM_USER+60)
915 #define TB_GETTEXTROWS (WM_USER+61)
916 #define TB_GETOBJECT (WM_USER+62)
917 #define TB_GETBUTTONINFOW (WM_USER+63)
918 #define TB_GETBUTTONINFOA (WM_USER+65)
919 #define TB_GETBUTTONINFO WINELIB_NAME_AW(TB_GETBUTTONINFO)
920 #define TB_SETBUTTONINFOW (WM_USER+64)
921 #define TB_SETBUTTONINFOA (WM_USER+66)
922 #define TB_SETBUTTONINFO WINELIB_NAME_AW(TB_SETBUTTONINFO)
923 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
924 #define TB_GETHOTITEM (WM_USER+71)
925 #define TB_SETHOTITEM (WM_USER+72)
926 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
927 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
928 #define TB_MAPACCELERATORA (WM_USER+78)
929 #define TB_MAPACCELERATORW (WM_USER+90)
930 #define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
931 #define TB_GETINSERTMARK (WM_USER+79)
932 #define TB_SETINSERTMARK (WM_USER+80)
933 #define TB_INSERTMARKHITTEST (WM_USER+81)
934 #define TB_MOVEBUTTON (WM_USER+82)
935 #define TB_GETMAXSIZE (WM_USER+83)
936 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
937 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
938 #define TB_GETPADDING (WM_USER+86)
939 #define TB_SETPADDING (WM_USER+87)
940 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
941 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
942 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
943 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
944 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
945 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
947 #define TBN_FIRST (0U-700U)
948 #define TBN_LAST (0U-720U)
949 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
950 #define TBN_GETBUTTONINFOW (TBN_FIRST-20)
951 #define TBN_GETBUTTONINFO WINELIB_NAME_AW(TBN_GETBUTTONINFO)
952 #define TBN_BEGINDRAG (TBN_FIRST-1)
953 #define TBN_ENDDRAG (TBN_FIRST-2)
954 #define TBN_BEGINADJUST (TBN_FIRST-3)
955 #define TBN_ENDADJUST (TBN_FIRST-4)
956 #define TBN_RESET (TBN_FIRST-5)
957 #define TBN_QUERYINSERT (TBN_FIRST-6)
958 #define TBN_QUERYDELETE (TBN_FIRST-7)
959 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
960 #define TBN_CUSTHELP (TBN_FIRST-9)
961 #define TBN_DROPDOWN (TBN_FIRST-10)
962 #define TBN_GETOBJECT (TBN_FIRST-12)
963 #define TBN_HOTITEMCHANGE (TBN_FIRST-13)
964 #define TBN_DRAGOUT (TBN_FIRST-14)
965 #define TBN_DELETINGBUTTON (TBN_FIRST-15)
966 #define TBN_GETDISPINFOA (TBN_FIRST-16)
967 #define TBN_GETDISPINFOW (TBN_FIRST-17)
968 #define TBN_GETDISPINFO WINELIB_NAME_AW(TBN_GETDISPINFO)
969 #define TBN_GETINFOTIPA (TBN_FIRST-18)
970 #define TBN_GETINFOTIPW (TBN_FIRST-19)
971 #define TBN_GETINFOTIP WINELIB_NAME_AW(TBN_GETINFOTIP)
974 /* This is just for old CreateToolbar. */
975 /* Don't use it in new programs. */
976 typedef struct _OLDTBBUTTON {
977 INT iBitmap;
978 INT idCommand;
979 BYTE fsState;
980 BYTE fsStyle;
981 BYTE bReserved[2];
982 DWORD dwData;
983 } OLDTBBUTTON, *POLDTBBUTTON, *LPOLDTBBUTTON;
984 typedef const OLDTBBUTTON *LPCOLDTBBUTTON;
987 typedef struct _TBBUTTON {
988 INT iBitmap;
989 INT idCommand;
990 BYTE fsState;
991 BYTE fsStyle;
992 BYTE bReserved[2];
993 DWORD dwData;
994 INT iString;
995 } TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
996 typedef const TBBUTTON *LPCTBBUTTON;
999 typedef struct _COLORMAP {
1000 COLORREF from;
1001 COLORREF to;
1002 } COLORMAP, *LPCOLORMAP;
1005 typedef struct tagTBADDBITMAP {
1006 HINSTANCE hInst;
1007 UINT nID;
1008 } TBADDBITMAP, *LPTBADDBITMAP;
1010 #define HINST_COMMCTRL ((HINSTANCE)-1)
1011 #define IDB_STD_SMALL_COLOR 0
1012 #define IDB_STD_LARGE_COLOR 1
1013 #define IDB_VIEW_SMALL_COLOR 4
1014 #define IDB_VIEW_LARGE_COLOR 5
1015 #define IDB_HIST_SMALL_COLOR 8
1016 #define IDB_HIST_LARGE_COLOR 9
1018 #define STD_CUT 0
1019 #define STD_COPY 1
1020 #define STD_PASTE 2
1021 #define STD_UNDO 3
1022 #define STD_REDOW 4
1023 #define STD_DELETE 5
1024 #define STD_FILENEW 6
1025 #define STD_FILEOPEN 7
1026 #define STD_FILESAVE 8
1027 #define STD_PRINTPRE 9
1028 #define STD_PROPERTIES 10
1029 #define STD_HELP 11
1030 #define STD_FIND 12
1031 #define STD_REPLACE 13
1032 #define STD_PRINT 14
1034 #define VIEW_LARGEICONS 0
1035 #define VIEW_SMALLICONS 1
1036 #define VIEW_LIST 2
1037 #define VIEW_DETAILS 3
1038 #define VIEW_SORTNAME 4
1039 #define VIEW_SORTSIZE 5
1040 #define VIEW_SORTDATE 6
1041 #define VIEW_SORTTYPE 7
1042 #define VIEW_PARENTFOLDER 8
1043 #define VIEW_NETCONNECT 9
1044 #define VIEW_NETDISCONNECT 10
1045 #define VIEW_NEWFOLDER 11
1047 typedef struct tagTBSAVEPARAMSA {
1048 HKEY hkr;
1049 LPCSTR pszSubKey;
1050 LPCSTR pszValueName;
1051 } TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
1053 typedef struct tagTBSAVEPARAMSW {
1054 HKEY hkr;
1055 LPCWSTR pszSubKey;
1056 LPCWSTR pszValueName;
1057 } TBSAVEPARAMSAW, *LPTBSAVEPARAMSAW;
1059 #define TBSAVEPARAMS WINELIB_NAME_AW(TBSAVEPARAMS)
1060 #define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
1062 typedef struct
1064 UINT cbSize;
1065 DWORD dwMask;
1066 INT idCommand;
1067 INT iImage;
1068 BYTE fsState;
1069 BYTE fsStyle;
1070 WORD cx;
1071 DWORD lParam;
1072 LPSTR pszText;
1073 INT cchText;
1074 } TBBUTTONINFOA, *LPTBBUTTONINFOA;
1076 typedef struct
1078 UINT cbSize;
1079 DWORD dwMask;
1080 INT idCommand;
1081 INT iImage;
1082 BYTE fsState;
1083 BYTE fsStyle;
1084 WORD cx;
1085 DWORD lParam;
1086 LPWSTR pszText;
1087 INT cchText;
1088 } TBBUTTONINFOW, *LPTBBUTTONINFOW;
1090 #define TBBUTTONINFO WINELIB_NAME_AW(TBBUTTONINFO)
1091 #define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
1093 typedef struct tagNMTBGETINFOTIPA
1095 NMHDR hdr;
1096 LPSTR pszText;
1097 INT cchTextMax;
1098 INT iItem;
1099 LPARAM lParam;
1100 } NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
1102 typedef struct tagNMTBGETINFOTIPW
1104 NMHDR hdr;
1105 LPWSTR pszText;
1106 INT cchTextMax;
1107 INT iItem;
1108 LPARAM lParam;
1109 } NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
1111 #define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOFTIP)
1112 #define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
1114 typedef struct tagNMTOOLBARA
1116 NMHDR hdr;
1117 INT iItem;
1118 TBBUTTON tbButton;
1119 INT cchText;
1120 LPSTR pszText;
1121 RECT rcButton; /* Version 5.80 */
1122 } NMTOOLBARA, *LPNMTOOLBARA, TBNOTIFYA, *LPTBNOTIFYA;
1124 typedef struct tagNMTOOLBARW
1126 NMHDR hdr;
1127 INT iItem;
1128 TBBUTTON tbButton;
1129 INT cchText;
1130 LPWSTR pszText;
1131 RECT rcButton; /* Version 5.80 */
1132 } NMTOOLBARW, *LPNMTOOLBARW, TBNOTIFYW, *LPTBNOTIFYW;
1134 #define NMTOOLBAR WINELIB_NAME_AW(NMTOOLBAR)
1135 #define LPNMTOOLBAR WINELIB_NAME_AW(LPNMTOOLBAR)
1136 #define TBNOTIFY WINELIB_NAME_AW(TBNOTIFY)
1137 #define LPTBNOTIFY WINELIB_NAME_AW(LPTBNOTIFY)
1139 typedef struct
1141 HINSTANCE hInstOld;
1142 UINT nIDOld;
1143 HINSTANCE hInstNew;
1144 UINT nIDNew;
1145 INT nButtons;
1146 } TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
1148 typedef struct
1150 int iButton;
1151 DWORD dwFlags;
1152 } TBINSERTMARK, *LPTBINSERTMARK;
1153 #define TBIMHT_AFTER 0x00000001 /* TRUE = insert After iButton, otherwise before */
1154 #define TBIMHT_BACKGROUND 0x00000002 /* TRUE if and only if missed buttons completely */
1156 HWND WINAPI
1157 CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
1158 UINT, LPCOLDTBBUTTON, INT);
1160 HWND WINAPI
1161 CreateToolbarEx(HWND, DWORD, UINT, INT,
1162 HINSTANCE, UINT, LPCTBBUTTON,
1163 INT, INT, INT, INT, INT, UINT);
1165 HBITMAP WINAPI
1166 CreateMappedBitmap (HINSTANCE, INT, UINT, LPCOLORMAP, INT);
1169 /* Tool tips */
1171 #define TOOLTIPS_CLASS16 "tooltips_class"
1172 #define TOOLTIPS_CLASSA "tooltips_class32"
1173 #define TOOLTIPS_CLASS32W L"tooltips_class32"
1174 #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
1176 #define INFOTIPSIZE 1024
1178 #define TTS_ALWAYSTIP 0x01
1179 #define TTS_NOPREFIX 0x02
1181 #define TTF_IDISHWND 0x0001
1182 #define TTF_CENTERTIP 0x0002
1183 #define TTF_RTLREADING 0x0004
1184 #define TTF_SUBCLASS 0x0010
1185 #define TTF_TRACK 0x0020
1186 #define TTF_ABSOLUTE 0x0080
1187 #define TTF_TRANSPARENT 0x0100
1188 #define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
1191 #define TTDT_AUTOMATIC 0
1192 #define TTDT_RESHOW 1
1193 #define TTDT_AUTOPOP 2
1194 #define TTDT_INITIAL 3
1197 #define TTM_ACTIVATE (WM_USER+1)
1198 #define TTM_SETDELAYTIME (WM_USER+3)
1199 #define TTM_ADDTOOLA (WM_USER+4)
1200 #define TTM_ADDTOOLW (WM_USER+50)
1201 #define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
1202 #define TTM_DELTOOLA (WM_USER+5)
1203 #define TTM_DELTOOLW (WM_USER+51)
1204 #define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
1205 #define TTM_NEWTOOLRECTA (WM_USER+6)
1206 #define TTM_NEWTOOLRECTW (WM_USER+52)
1207 #define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
1208 #define TTM_RELAYEVENT (WM_USER+7)
1209 #define TTM_GETTOOLINFOA (WM_USER+8)
1210 #define TTM_GETTOOLINFOW (WM_USER+53)
1211 #define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
1212 #define TTM_SETTOOLINFOA (WM_USER+9)
1213 #define TTM_SETTOOLINFOW (WM_USER+54)
1214 #define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
1215 #define TTM_HITTESTA (WM_USER+10)
1216 #define TTM_HITTESTW (WM_USER+55)
1217 #define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
1218 #define TTM_GETTEXTA (WM_USER+11)
1219 #define TTM_GETTEXTW (WM_USER+56)
1220 #define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
1221 #define TTM_UPDATETIPTEXTA (WM_USER+12)
1222 #define TTM_UPDATETIPTEXTW (WM_USER+57)
1223 #define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
1224 #define TTM_GETTOOLCOUNT (WM_USER+13)
1225 #define TTM_ENUMTOOLSA (WM_USER+14)
1226 #define TTM_ENUMTOOLSW (WM_USER+58)
1227 #define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
1228 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1229 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1230 #define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
1231 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1232 #define TTM_TRACKACTIVATE (WM_USER+17)
1233 #define TTM_TRACKPOSITION (WM_USER+18)
1234 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1235 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1236 #define TTM_GETDELAYTIME (WM_USER+21)
1237 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1238 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1239 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1240 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1241 #define TTM_SETMARGIN (WM_USER+26)
1242 #define TTM_GETMARGIN (WM_USER+27)
1243 #define TTM_POP (WM_USER+28)
1244 #define TTM_UPDATE (WM_USER+29)
1247 #define TTN_FIRST (0U-520U)
1248 #define TTN_LAST (0U-549U)
1249 #define TTN_GETDISPINFOA (TTN_FIRST-0)
1250 #define TTN_GETDISPINFOW (TTN_FIRST-10)
1251 #define TTN_GETDISPINFO WINELIB_NAME_AW(TTN_GETDISPINFO)
1252 #define TTN_SHOW (TTN_FIRST-1)
1253 #define TTN_POP (TTN_FIRST-2)
1255 #define TTN_NEEDTEXT TTN_GETDISPINFO
1256 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1257 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1259 typedef struct tagTOOLINFOA {
1260 UINT cbSize;
1261 UINT uFlags;
1262 HWND hwnd;
1263 UINT uId;
1264 RECT rect;
1265 HINSTANCE hinst;
1266 LPSTR lpszText;
1267 LPARAM lParam;
1268 } TTTOOLINFOA, *LPTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
1270 typedef struct tagTOOLINFOW {
1271 UINT cbSize;
1272 UINT uFlags;
1273 HWND hwnd;
1274 UINT uId;
1275 RECT rect;
1276 HINSTANCE hinst;
1277 LPWSTR lpszText;
1278 LPARAM lParam;
1279 } TTTOOLINFOW, *LPTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW;
1281 #define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1282 #define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1283 #define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
1284 #define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
1285 #define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
1287 #define TTTOOLINFO_V1_SIZEA CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
1288 #define TTTOOLINFO_V1_SIZEW CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
1289 #define TTTOOLINFO_V1_SIZE WINELIB_NAME_AW(TTTOOLINFO_V1_SIZE)
1291 typedef struct _TT_HITTESTINFOA
1293 HWND hwnd;
1294 POINT pt;
1295 TTTOOLINFOA ti;
1296 } TTHITTESTINFOA, *LPTTHITTESTINFOA;
1298 typedef struct _TT_HITTESTINFOW
1300 HWND hwnd;
1301 POINT pt;
1302 TTTOOLINFOW ti;
1303 } TTHITTESTINFOW, *LPTTHITTESTINFOW;
1305 #define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
1306 #define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
1308 typedef struct tagNMTTDISPINFOA
1310 NMHDR hdr;
1311 LPSTR lpszText;
1312 CHAR szText[80];
1313 HINSTANCE hinst;
1314 UINT uFlags;
1315 LPARAM lParam;
1316 } NMTTDISPINFOA, *LPNMTTDISPINFOA;
1318 typedef struct tagNMTTDISPINFOW
1320 NMHDR hdr;
1321 LPWSTR lpszText;
1322 WCHAR szText[80];
1323 HINSTANCE hinst;
1324 UINT uFlags;
1325 LPARAM lParam;
1326 } NMTTDISPINFOW, *LPNMTTDISPINFOW;
1328 #define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
1329 #define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
1331 #define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
1332 #define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
1333 #define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)
1335 #define TOOLTIPTEXTW NMTTDISPINFOW
1336 #define TOOLTIPTEXTA NMTTDISPINFOA
1337 #define TOOLTIPTEXT NMTTDISPINFO
1338 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1339 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1340 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1343 /* Rebar control */
1345 #define REBARCLASSNAME16 "ReBarWindow"
1346 #define REBARCLASSNAMEA "ReBarWindow32"
1347 #define REBARCLASSNAMEW L"ReBarWindow32"
1348 #define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
1350 #define RBS_TOOLTIPS 0x0100
1351 #define RBS_VARHEIGHT 0x0200
1352 #define RBS_BANDBORDERS 0x0400
1353 #define RBS_FIXEDORDER 0x0800
1354 #define RBS_REGISTERDROP 0x1000
1355 #define RBS_AUTOSIZE 0x2000
1356 #define RBS_VERTICALGRIPPER 0x4000
1357 #define RBS_DBLCLKTOGGLE 0x8000
1359 #define RBIM_IMAGELIST 0x00000001
1361 #define RBBIM_STYLE 0x00000001
1362 #define RBBIM_COLORS 0x00000002
1363 #define RBBIM_TEXT 0x00000004
1364 #define RBBIM_IMAGE 0x00000008
1365 #define RBBIM_CHILD 0x00000010
1366 #define RBBIM_CHILDSIZE 0x00000020
1367 #define RBBIM_SIZE 0x00000040
1368 #define RBBIM_BACKGROUND 0x00000080
1369 #define RBBIM_ID 0x00000100
1370 #define RBBIM_IDEALSIZE 0x00000200
1371 #define RBBIM_LPARAM 0x00000400
1372 #define RBBIM_HEADERSIZE 0x00000800
1374 #define RBBS_BREAK 0x00000001
1375 #define RBBS_FIXEDSIZE 0x00000002
1376 #define RBBS_CHILDEDGE 0x00000004
1377 #define RBBS_HIDDEN 0x00000008
1378 #define RBBS_NOVERT 0x00000010
1379 #define RBBS_FIXEDBMP 0x00000020
1380 #define RBBS_VARIABLEHEIGHT 0x00000040
1381 #define RBBS_GRIPPERALWAYS 0x00000080
1382 #define RBBS_NOGRIPPER 0x00000100
1384 #define RBNM_ID 0x00000001
1385 #define RBNM_STYLE 0x00000002
1386 #define RBNM_LPARAM 0x00000004
1388 #define RBHT_NOWHERE 0x0001
1389 #define RBHT_CAPTION 0x0002
1390 #define RBHT_CLIENT 0x0003
1391 #define RBHT_GRABBER 0x0004
1393 #define RB_INSERTBANDA (WM_USER+1)
1394 #define RB_INSERTBANDW (WM_USER+10)
1395 #define RB_INSERTBAND WINELIB_NAME_AW(RB_INSERTBAND)
1396 #define RB_DELETEBAND (WM_USER+2)
1397 #define RB_GETBARINFO (WM_USER+3)
1398 #define RB_SETBARINFO (WM_USER+4)
1399 #define RB_GETBANDINFO (WM_USER+5) /* just for compatibility */
1400 #define RB_SETBANDINFOA (WM_USER+6)
1401 #define RB_SETBANDINFOW (WM_USER+11)
1402 #define RB_SETBANDINFO WINELIB_NAME_AW(RB_SETBANDINFO)
1403 #define RB_SETPARENT (WM_USER+7)
1404 #define RB_HITTEST (WM_USER+8)
1405 #define RB_GETRECT (WM_USER+9)
1406 #define RB_GETBANDCOUNT (WM_USER+12)
1407 #define RB_GETROWCOUNT (WM_USER+13)
1408 #define RB_GETROWHEIGHT (WM_USER+14)
1409 #define RB_IDTOINDEX (WM_USER+16)
1410 #define RB_GETTOOLTIPS (WM_USER+17)
1411 #define RB_SETTOOLTIPS (WM_USER+18)
1412 #define RB_SETBKCOLOR (WM_USER+19)
1413 #define RB_GETBKCOLOR (WM_USER+20)
1414 #define RB_SETTEXTCOLOR (WM_USER+21)
1415 #define RB_GETTEXTCOLOR (WM_USER+22)
1416 #define RB_SIZETORECT (WM_USER+23)
1417 #define RB_BEGINDRAG (WM_USER+24)
1418 #define RB_ENDDRAG (WM_USER+25)
1419 #define RB_DRAGMOVE (WM_USER+26)
1420 #define RB_GETBARHEIGHT (WM_USER+27)
1421 #define RB_GETBANDINFOW (WM_USER+28)
1422 #define RB_GETBANDINFOA (WM_USER+29)
1423 #define RB_GETBANDINFO16 WINELIB_NAME_AW(RB_GETBANDINFO16)
1424 #define RB_MINIMIZEBAND (WM_USER+30)
1425 #define RB_MAXIMIZEBAND (WM_USER+31)
1426 #define RB_GETBANDBORDERS (WM_USER+34)
1427 #define RB_SHOWBAND (WM_USER+35)
1428 #define RB_SETPALETTE (WM_USER+37)
1429 #define RB_GETPALETTE (WM_USER+38)
1430 #define RB_MOVEBAND (WM_USER+39)
1431 #define RB_GETDROPTARGET CCM_GETDROPTARGET
1432 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1433 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1434 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1435 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1437 #define RBN_FIRST (0U-831U)
1438 #define RBN_LAST (0U-859U)
1439 #define RBN_HEIGHTCHANGE (RBN_FIRST-0)
1440 #define RBN_GETOBJECT (RBN_FIRST-1)
1441 #define RBN_LAYOUTCHANGED (RBN_FIRST-2)
1442 #define RBN_AUTOSIZE (RBN_FIRST-3)
1443 #define RBN_BEGINDRAG (RBN_FIRST-4)
1444 #define RBN_ENDDRAG (RBN_FIRST-5)
1445 #define RBN_DELETINGBAND (RBN_FIRST-6)
1446 #define RBN_DELETEDBAND (RBN_FIRST-7)
1447 #define RBN_CHILDSIZE (RBN_FIRST-8)
1449 typedef struct tagREBARINFO
1451 UINT cbSize;
1452 UINT fMask;
1453 HIMAGELIST himl;
1454 } REBARINFO, *LPREBARINFO;
1456 typedef struct tagREBARBANDINFOA
1458 UINT cbSize;
1459 UINT fMask;
1460 UINT fStyle;
1461 COLORREF clrFore;
1462 COLORREF clrBack;
1463 LPSTR lpText;
1464 UINT cch;
1465 INT iImage;
1466 HWND hwndChild;
1467 UINT cxMinChild;
1468 UINT cyMinChild;
1469 UINT cx;
1470 HBITMAP hbmBack;
1471 UINT wID;
1472 UINT cyChild;
1473 UINT cyMaxChild;
1474 UINT cyIntegral;
1475 UINT cxIdeal;
1476 LPARAM lParam;
1477 UINT cxHeader;
1478 } REBARBANDINFOA, *LPREBARBANDINFOA;
1480 typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
1482 typedef struct tagREBARBANDINFOW
1484 UINT cbSize;
1485 UINT fMask;
1486 UINT fStyle;
1487 COLORREF clrFore;
1488 COLORREF clrBack;
1489 LPWSTR lpText;
1490 UINT cch;
1491 INT iImage;
1492 HWND hwndChild;
1493 UINT cxMinChild;
1494 UINT cyMinChild;
1495 UINT cx;
1496 HBITMAP hbmBack;
1497 UINT wID;
1498 UINT cyChild;
1499 UINT cyMaxChild;
1500 UINT cyIntegral;
1501 UINT cxIdeal;
1502 LPARAM lParam;
1503 UINT cxHeader;
1504 } REBARBANDINFOW, *LPREBARBANDINFOW;
1506 typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
1508 #define REBARBANDINFO WINELIB_NAME_AW(REBARBANDINFO)
1509 #define LPREBARBANDINFO WINELIB_NAME_AW(LPREBARBANDINFO)
1510 #define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
1512 #define REBARBANDINFO_V3_SIZEA CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
1513 #define REBARBANDINFO_V3_SIZEW CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
1514 #define REBARBANDINFO_V3_SIZE WINELIB_NAME_AW(REBARBANDINFO_V3_SIZE)
1516 typedef struct tagNMREBARCHILDSIZE
1518 NMHDR hdr;
1519 UINT uBand;
1520 UINT wID;
1521 RECT rcChild;
1522 RECT rcBand;
1523 } NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;
1525 typedef struct tagNMREBAR
1527 NMHDR hdr;
1528 DWORD dwMask;
1529 UINT uBand;
1530 UINT fStyle;
1531 UINT wID;
1532 LPARAM lParam;
1533 } NMREBAR, *LPNMREBAR;
1535 typedef struct tagNMRBAUTOSIZE
1537 NMHDR hdr;
1538 BOOL fChanged;
1539 RECT rcTarget;
1540 RECT rcActual;
1541 } NMRBAUTOSIZE, *LPNMRBAUTOSIZE;
1543 typedef struct _RB_HITTESTINFO
1545 POINT pt;
1546 UINT flags;
1547 INT iBand;
1548 } RBHITTESTINFO, *LPRBHITTESTINFO;
1551 /* Trackbar control */
1553 #define TRACKBAR_CLASS16 "msctls_trackbar"
1554 #define TRACKBAR_CLASSA "msctls_trackbar32"
1555 #define TRACKBAR_CLASSW L"msctls_trackbar32"
1556 #define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
1558 #define TBS_AUTOTICKS 0x0001
1559 #define TBS_VERT 0x0002
1560 #define TBS_HORZ 0x0000
1561 #define TBS_TOP 0x0004
1562 #define TBS_BOTTOM 0x0000
1563 #define TBS_LEFT 0x0004
1564 #define TBS_RIGHT 0x0000
1565 #define TBS_BOTH 0x0008
1566 #define TBS_NOTICKS 0x0010
1567 #define TBS_ENABLESELRANGE 0x0020
1568 #define TBS_FIXEDLENGTH 0x0040
1569 #define TBS_NOTHUMB 0x0080
1570 #define TBS_TOOLTIPS 0x0100
1571 #define TBS_REVERSED 0x0200
1573 #define TBTS_TOP 0
1574 #define TBTS_LEFT 1
1575 #define TBTS_BOTTOM 2
1576 #define TBTS_RIGHT 3
1578 #define TB_LINEUP 0
1579 #define TB_LINEDOWN 1
1580 #define TB_PAGEUP 2
1581 #define TB_PAGEDOWN 3
1582 #define TB_THUMBPOSITION 4
1583 #define TB_THUMBTRACK 5
1584 #define TB_TOP 6
1585 #define TB_BOTTOM 7
1586 #define TB_ENDTRACK 8
1588 #define TBCD_TICS 0x0001
1589 #define TBCD_THUMB 0x0002
1590 #define TBCD_CHANNEL 0x0003
1592 #define TBM_GETPOS (WM_USER)
1593 #define TBM_GETRANGEMIN (WM_USER+1)
1594 #define TBM_GETRANGEMAX (WM_USER+2)
1595 #define TBM_GETTIC (WM_USER+3)
1596 #define TBM_SETTIC (WM_USER+4)
1597 #define TBM_SETPOS (WM_USER+5)
1598 #define TBM_SETRANGE (WM_USER+6)
1599 #define TBM_SETRANGEMIN (WM_USER+7)
1600 #define TBM_SETRANGEMAX (WM_USER+8)
1601 #define TBM_CLEARTICS (WM_USER+9)
1602 #define TBM_SETSEL (WM_USER+10)
1603 #define TBM_SETSELSTART (WM_USER+11)
1604 #define TBM_SETSELEND (WM_USER+12)
1605 #define TBM_GETPTICS (WM_USER+14)
1606 #define TBM_GETTICPOS (WM_USER+15)
1607 #define TBM_GETNUMTICS (WM_USER+16)
1608 #define TBM_GETSELSTART (WM_USER+17)
1609 #define TBM_GETSELEND (WM_USER+18)
1610 #define TBM_CLEARSEL (WM_USER+19)
1611 #define TBM_SETTICFREQ (WM_USER+20)
1612 #define TBM_SETPAGESIZE (WM_USER+21)
1613 #define TBM_GETPAGESIZE (WM_USER+22)
1614 #define TBM_SETLINESIZE (WM_USER+23)
1615 #define TBM_GETLINESIZE (WM_USER+24)
1616 #define TBM_GETTHUMBRECT (WM_USER+25)
1617 #define TBM_GETCHANNELRECT (WM_USER+26)
1618 #define TBM_SETTHUMBLENGTH (WM_USER+27)
1619 #define TBM_GETTHUMBLENGTH (WM_USER+28)
1620 #define TBM_SETTOOLTIPS (WM_USER+29)
1621 #define TBM_GETTOOLTIPS (WM_USER+30)
1622 #define TBM_SETTIPSIDE (WM_USER+31)
1623 #define TBM_SETBUDDY (WM_USER+32)
1624 #define TBM_GETBUDDY (WM_USER+33)
1625 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1626 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1629 /* Pager control */
1631 #define WC_PAGESCROLLERA "SysPager"
1632 #define WC_PAGESCROLLERW L"SysPager"
1633 #define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
1635 #define PGS_VERT 0x00000000
1636 #define PGS_HORZ 0x00000001
1637 #define PGS_AUTOSCROLL 0x00000002
1638 #define PGS_DRAGNDROP 0x00000004
1640 #define PGF_INVISIBLE 0
1641 #define PGF_NORMAL 1
1642 #define PGF_GRAYED 2
1643 #define PGF_DEPRESSED 4
1644 #define PGF_HOT 8
1646 #define PGB_TOPORLEFT 0
1647 #define PGB_BOTTOMORRIGHT 1
1649 /* only used with PGN_SCROLL */
1650 #define PGF_SCROLLUP 1
1651 #define PGF_SCROLLDOWN 2
1652 #define PGF_SCROLLLEFT 4
1653 #define PGF_SCROLLRIGHT 8
1655 #define PGK_SHIFT 1
1656 #define PGK_CONTROL 2
1657 #define PGK_MENU 4
1659 /* only used with PGN_CALCSIZE */
1660 #define PGF_CALCWIDTH 1
1661 #define PGF_CALCHEIGHT 2
1663 #define PGM_FIRST 0x1400
1664 #define PGM_SETCHILD (PGM_FIRST+1)
1665 #define PGM_RECALCSIZE (PGM_FIRST+2)
1666 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
1667 #define PGM_SETBKCOLOR (PGM_FIRST+4)
1668 #define PGM_GETBKCOLOR (PGM_FIRST+5)
1669 #define PGM_SETBORDER (PGM_FIRST+6)
1670 #define PGM_GETBORDER (PGM_FIRST+7)
1671 #define PGM_SETPOS (PGM_FIRST+8)
1672 #define PGM_GETPOS (PGM_FIRST+9)
1673 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
1674 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
1675 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
1676 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
1678 #define PGN_FIRST (0U-900U)
1679 #define PGN_LAST (0U-950U)
1680 #define PGN_SCROLL (PGN_FIRST-1)
1681 #define PGN_CALCSIZE (PGN_FIRST-2)
1683 typedef struct
1685 NMHDR hdr;
1686 WORD fwKeys;
1687 RECT rcParent;
1688 INT iDir;
1689 INT iXpos;
1690 INT iYpos;
1691 INT iScroll;
1692 } NMPGSCROLL, *LPNMPGSCROLL;
1694 typedef struct
1696 NMHDR hdr;
1697 DWORD dwFlag;
1698 INT iWidth;
1699 INT iHeight;
1700 } NMPGCALCSIZE, *LPNMPGCALCSIZE;
1703 /* Treeview control */
1705 #define WC_TREEVIEWA "SysTreeView32"
1706 #define WC_TREEVIEWW L"SysTreeView32"
1707 #define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
1709 #define TVSIL_NORMAL 0
1710 #define TVSIL_STATE 2
1712 #define TV_FIRST 0x1100
1713 #define TVM_INSERTITEMA (TV_FIRST+0)
1714 #define TVM_INSERTITEMW (TV_FIRST+50)
1715 #define TVM_INSERTITEM WINELIB_NAME_AW(TVM_INSERTITEM)
1716 #define TVM_DELETEITEM (TV_FIRST+1)
1717 #define TVM_EXPAND (TV_FIRST+2)
1718 #define TVM_GETITEMRECT (TV_FIRST+4)
1719 #define TVM_GETCOUNT (TV_FIRST+5)
1720 #define TVM_GETINDENT (TV_FIRST+6)
1721 #define TVM_SETINDENT (TV_FIRST+7)
1722 #define TVM_GETIMAGELIST (TV_FIRST+8)
1723 #define TVM_SETIMAGELIST (TV_FIRST+9)
1724 #define TVM_GETNEXTITEM (TV_FIRST+10)
1725 #define TVM_SELECTITEM (TV_FIRST+11)
1726 #define TVM_GETITEMA (TV_FIRST+12)
1727 #define TVM_GETITEMW (TV_FIRST+62)
1728 #define TVM_GETITEM WINELIB_NAME_AW(TVM_GETITEM)
1729 #define TVM_SETITEMA (TV_FIRST+13)
1730 #define TVM_SETITEMW (TV_FIRST+63)
1731 #define TVM_SETITEM WINELIB_NAME_AW(TVM_SETITEM)
1732 #define TVM_EDITLABELA (TV_FIRST+14)
1733 #define TVM_EDITLABELW (TV_FIRST+65)
1734 #define TVM_EDITLABEL WINELIB_NAME_AW(TVM_EDITLABEL)
1735 #define TVM_GETEDITCONTROL (TV_FIRST+15)
1736 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
1737 #define TVM_HITTEST (TV_FIRST+17)
1738 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
1739 #define TVM_SORTCHILDREN (TV_FIRST+19)
1740 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
1741 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
1742 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
1743 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
1744 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
1745 #define TVM_GETISEARCHSTRING WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
1746 #define TVM_SETTOOLTIPS (TV_FIRST+24)
1747 #define TVM_GETTOOLTIPS (TV_FIRST+25)
1748 #define TVM_SETINSERTMARK (TV_FIRST+26)
1749 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
1750 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
1751 #define TVM_SETBKCOLOR (TV_FIRST+29)
1752 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
1753 #define TVM_GETBKCOLOR (TV_FIRST+31)
1754 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
1755 #define TVM_SETSCROLLTIME (TV_FIRST+33)
1756 #define TVM_GETSCROLLTIME (TV_FIRST+34)
1757 #define TVM_UNKNOWN35 (TV_FIRST+35)
1758 #define TVM_UNKNOWN36 (TV_FIRST+36)
1759 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
1760 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
1761 #define TVM_GETITEMSTATE (TV_FIRST+39)
1762 #define TVM_SETLINECOLOR (TV_FIRST+40)
1763 #define TVM_GETLINECOLOR (TV_FIRST+41)
1764 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1765 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1769 #define TVN_FIRST (0U-400U)
1770 #define TVN_LAST (0U-499U)
1772 #define TVN_SELCHANGINGA (TVN_FIRST-1)
1773 #define TVN_SELCHANGINGW (TVN_FIRST-50)
1774 #define TVN_SELCHANGING WINELIB_NAME_AW(TVN_SELCHANGING)
1776 #define TVN_SELCHANGEDA (TVN_FIRST-2)
1777 #define TVN_SELCHANGEDW (TVN_FIRST-51)
1778 #define TVN_SELCHANGED WINELIB_NAME_AW(TVN_SELCHANGED)
1780 #define TVN_GETDISPINFOA (TVN_FIRST-3)
1781 #define TVN_GETDISPINFOW (TVN_FIRST-52)
1782 #define TVN_GETDISPINFO WINELIB_NAME_AW(TVN_GETDISPINFO)
1784 #define TVN_SETDISPINFOA (TVN_FIRST-4)
1785 #define TVN_SETDISPINFOW (TVN_FIRST-53)
1786 #define TVN_SETDISPINFO WINELIB_NAME_AW(TVN_SETDISPINFO)
1788 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
1789 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
1790 #define TVN_ITEMEXPANDING WINELIB_NAME_AW(TVN_ITEMEXPANDING)
1792 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
1793 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
1794 #define TVN_ITEMEXPANDED WINELIB_NAME_AW(TVN_ITEMEXPANDED)
1796 #define TVN_BEGINDRAGA (TVN_FIRST-7)
1797 #define TVN_BEGINDRAGW (TVN_FIRST-56)
1798 #define TVN_BEGINDRAG WINELIB_NAME_AW(TVN_BEGINDRAG)
1800 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
1801 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
1802 #define TVN_BEGINRDRAG WINELIB_NAME_AW(TVN_BEGINRDRAG)
1804 #define TVN_DELETEITEMA (TVN_FIRST-9)
1805 #define TVN_DELETEITEMW (TVN_FIRST-58)
1806 #define TVN_DELETEITEM WINELIB_NAME_AW(TVN_DELETEITEM)
1808 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
1809 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
1810 #define TVN_BEGINLABELEDIT WINELIB_NAME_AW(TVN_BEGINLABELEDIT)
1812 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
1813 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
1814 #define TVN_ENDLABELEDIT WINELIB_NAME_AW(TVN_ENDLABELEDIT)
1816 #define TVN_KEYDOWN (TVN_FIRST-12)
1818 #define TVN_GETINFOTIPA (TVN_FIRST-13)
1819 #define TVN_GETINFOTIPW (TVN_FIRST-14)
1820 #define TVN_GETINFOTIP WINELIB_NAME_AW(TVN_GETINFOTIP)
1822 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
1828 #define TVIF_TEXT 0x0001
1829 #define TVIF_IMAGE 0x0002
1830 #define TVIF_PARAM 0x0004
1831 #define TVIF_STATE 0x0008
1832 #define TVIF_HANDLE 0x0010
1833 #define TVIF_SELECTEDIMAGE 0x0020
1834 #define TVIF_CHILDREN 0x0040
1835 #define TVIF_INTEGRAL 0x0080
1836 #define TVIF_DI_SETITEM 0x1000
1838 #define TVI_ROOT ((HTREEITEM)0xffff0000) /* -65536 */
1839 #define TVI_FIRST ((HTREEITEM)0xffff0001) /* -65535 */
1840 #define TVI_LAST ((HTREEITEM)0xffff0002) /* -65534 */
1841 #define TVI_SORT ((HTREEITEM)0xffff0003) /* -65533 */
1843 #define TVIS_FOCUSED 0x0001
1844 #define TVIS_SELECTED 0x0002
1845 #define TVIS_CUT 0x0004
1846 #define TVIS_DROPHILITED 0x0008
1847 #define TVIS_BOLD 0x0010
1848 #define TVIS_EXPANDED 0x0020
1849 #define TVIS_EXPANDEDONCE 0x0040
1850 #define TVIS_OVERLAYMASK 0x0f00
1851 #define TVIS_STATEIMAGEMASK 0xf000
1852 #define TVIS_USERMASK 0xf000
1854 #define TVHT_NOWHERE 0x0001
1855 #define TVHT_ONITEMICON 0x0002
1856 #define TVHT_ONITEMLABEL 0x0004
1857 #define TVHT_ONITEMINDENT 0x0008
1858 #define TVHT_ONITEMBUTTON 0x0010
1859 #define TVHT_ONITEMRIGHT 0x0020
1860 #define TVHT_ONITEMSTATEICON 0x0040
1861 #define TVHT_ONITEM 0x0046
1862 #define TVHT_ABOVE 0x0100
1863 #define TVHT_BELOW 0x0200
1864 #define TVHT_TORIGHT 0x0400
1865 #define TVHT_TOLEFT 0x0800
1867 #define TVS_HASBUTTONS 0x0001
1868 #define TVS_HASLINES 0x0002
1869 #define TVS_LINESATROOT 0x0004
1870 #define TVS_EDITLABELS 0x0008
1871 #define TVS_DISABLEDRAGDROP 0x0010
1872 #define TVS_SHOWSELALWAYS 0x0020
1873 #define TVS_RTLREADING 0x0040
1874 #define TVS_NOTOOLTIPS 0x0080
1875 #define TVS_CHECKBOXES 0x0100
1876 #define TVS_TRACKSELECT 0x0200
1877 #define TVS_SINGLEEXPAND 0x0400
1878 #define TVS_INFOTIP 0x0800
1879 #define TVS_FULLROWSELECT 0x1000
1880 #define TVS_NOSCROLL 0x2000
1881 #define TVS_NONEVENHEIGHT 0x4000
1882 #define TVS_NOHSCROLL 0x8000
1884 #define TVS_SHAREDIMAGELISTS 0x0000
1885 #define TVS_PRIVATEIMAGELISTS 0x0400
1888 #define TVE_COLLAPSE 0x0001
1889 #define TVE_EXPAND 0x0002
1890 #define TVE_TOGGLE 0x0003
1891 #define TVE_EXPANDPARTIAL 0x4000
1892 #define TVE_COLLAPSERESET 0x8000
1894 #define TVGN_ROOT 0
1895 #define TVGN_NEXT 1
1896 #define TVGN_PREVIOUS 2
1897 #define TVGN_PARENT 3
1898 #define TVGN_CHILD 4
1899 #define TVGN_FIRSTVISIBLE 5
1900 #define TVGN_NEXTVISIBLE 6
1901 #define TVGN_PREVIOUSVISIBLE 7
1902 #define TVGN_DROPHILITE 8
1903 #define TVGN_CARET 9
1904 #define TVGN_LASTVISIBLE 10
1906 #define TVC_UNKNOWN 0x00
1907 #define TVC_BYMOUSE 0x01
1908 #define TVC_BYKEYBOARD 0x02
1911 typedef struct _TREEITEM *HTREEITEM;
1913 typedef struct {
1914 UINT mask;
1915 HTREEITEM hItem;
1916 UINT state;
1917 UINT stateMask;
1918 LPSTR pszText;
1919 INT cchTextMax;
1920 INT iImage;
1921 INT iSelectedImage;
1922 INT cChildren;
1923 LPARAM lParam;
1924 } TVITEMA, *LPTVITEMA;
1926 typedef struct {
1927 UINT mask;
1928 HTREEITEM hItem;
1929 UINT state;
1930 UINT stateMask;
1931 LPWSTR pszText;
1932 INT cchTextMax;
1933 INT iImage;
1934 INT iSelectedImage;
1935 INT cChildren;
1936 LPARAM lParam;
1937 } TVITEMW, *LPTVITEMW;
1939 #define TV_ITEMA TVITEMA
1940 #define TV_ITEMW TVITEMW
1941 #define LPTV_ITEMA LPTVITEMA
1942 #define LPTV_ITEMW LPTVITEMW
1944 #define TVITEM WINELIB_NAME_AW(TVITEM)
1945 #define LPTVITEM WINELIB_NAME_AW(LPTVITEM)
1946 #define TV_ITEM WINELIB_NAME_AW(TV_ITEM)
1947 #define LPTV_ITEM WINELIB_NAME_AW(LPTV_ITEM)
1949 typedef struct {
1950 UINT mask;
1951 HTREEITEM hItem;
1952 UINT state;
1953 UINT stateMask;
1954 LPSTR pszText;
1955 INT cchTextMax;
1956 INT iImage;
1957 INT iSelectedImage;
1958 INT cChildren;
1959 LPARAM lParam;
1960 INT iIntegral;
1961 } TVITEMEXA, *LPTVITEMEXA;
1963 typedef struct {
1964 UINT mask;
1965 HTREEITEM hItem;
1966 UINT state;
1967 UINT stateMask;
1968 LPWSTR pszText;
1969 INT cchTextMax;
1970 INT iImage;
1971 INT iSelectedImage;
1972 INT cChildren;
1973 LPARAM lParam;
1974 INT iIntegral;
1975 } TVITEMEXW, *LPTVITEMEXW;
1977 #define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
1978 #define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
1980 typedef struct tagTVINSERTSTRUCTA {
1981 HTREEITEM hParent;
1982 HTREEITEM hInsertAfter;
1983 union {
1984 TVITEMEXA itemex;
1985 TVITEMA item;
1986 } DUMMYUNIONNAME;
1987 } TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
1989 typedef struct tagTVINSERTSTRUCTW {
1990 HTREEITEM hParent;
1991 HTREEITEM hInsertAfter;
1992 union {
1993 TVITEMEXW itemex;
1994 TVITEMW item;
1995 } DUMMYUNIONNAME;
1996 } TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
1998 #define TV_INSERTSTRUCT WINELIB_NAME_AW(TVINSERTSTRUCT)
1999 #define LPTVINSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
2000 #define LPTV_INSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
2002 #define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
2003 #define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
2004 #define TVINSERTSTRUCT_V1_SIZE WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)
2008 typedef struct tagNMTREEVIEWA {
2009 NMHDR hdr;
2010 UINT action;
2011 TVITEMA itemOld;
2012 TVITEMA itemNew;
2013 POINT ptDrag;
2014 } NMTREEVIEWA, *LPNMTREEVIEWA;
2016 typedef struct tagNMTREEVIEWW {
2017 NMHDR hdr;
2018 UINT action;
2019 TVITEMW itemOld;
2020 TVITEMW itemNew;
2021 POINT ptDrag;
2022 } NMTREEVIEWW, *LPNMTREEVIEWW;
2024 #define NMTREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2025 #define NM_TREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2026 #define LPNMTREEVIEW WINELIB_NAME_AW(LPNMTREEVIEW)
2028 typedef struct tagTVDISPINFOA {
2029 NMHDR hdr;
2030 TVITEMA item;
2031 } NMTVDISPINFOA, *LPNMTVDISPINFOA;
2033 typedef struct tagTVDISPINFOW {
2034 NMHDR hdr;
2035 TVITEMW item;
2036 } NMTVDISPINFOW, *LPNMTVDISPINFOW;
2038 #define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
2039 #define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
2040 #define TV_DISPINFO NMTVDISPINFO
2042 typedef INT (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
2044 typedef struct tagTVSORTCB
2046 HTREEITEM hParent;
2047 PFNTVCOMPARE lpfnCompare;
2048 LPARAM lParam;
2049 } TVSORTCB, *LPTVSORTCB;
2051 #define TV_SORTCB TVSORTCB
2052 #define LPTV_SORTCB LPTVSORTCB
2054 typedef struct tagTVHITTESTINFO {
2055 POINT pt;
2056 UINT flags;
2057 HTREEITEM hItem;
2058 } TVHITTESTINFO, *LPTVHITTESTINFO;
2060 #define TV_HITTESTINFO TVHITTESTINFO
2063 /* Custom Draw Treeview */
2065 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
2067 #define TVCDRF_NOIMAGES 0x00010000
2069 typedef struct tagNMTVCUSTOMDRAW
2071 NMCUSTOMDRAW nmcd;
2072 COLORREF clrText;
2073 COLORREF clrTextBk;
2074 INT iLevel; /* IE>0x0400 */
2075 } NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
2077 /* Treeview tooltips */
2079 typedef struct tagNMTVGETINFOTIPA
2081 NMHDR hdr;
2082 LPSTR pszText;
2083 INT cchTextMax;
2084 HTREEITEM hItem;
2085 LPARAM lParam;
2086 } NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
2088 typedef struct tagNMTVGETINFOTIPW
2090 NMHDR hdr;
2091 LPWSTR pszText;
2092 INT cchTextMax;
2093 HTREEITEM hItem;
2094 LPARAM lParam;
2095 } NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
2099 #define TreeView_InsertItemA(hwnd, phdi) \
2100 (INT)SendMessageA((hwnd), TVM_INSERTITEMA, 0, \
2101 (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
2102 #define TreeView_InsertItemW(hwnd,phdi) \
2103 (INT)SendMessageW((hwnd), TVM_INSERTITEMW, 0, \
2104 (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
2105 #define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem)
2107 #define TreeView_DeleteItem(hwnd, hItem) \
2108 (BOOL)SendMessageA((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
2109 #define TreeView_DeleteAllItems(hwnd) \
2110 (BOOL)SendMessageA((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
2111 #define TreeView_Expand(hwnd, hitem, code) \
2112 (BOOL)SendMessageA((hwnd), TVM_EXPAND, (WPARAM)code, \
2113 (LPARAM)(HTREEITEM)(hitem))
2115 #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
2116 (*(HTREEITEM *)prc = (hitem), (BOOL)SendMessageA((hwnd), \
2117 TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
2119 #define TreeView_GetCount(hwnd) \
2120 (UINT)SendMessageA((hwnd), TVM_GETCOUNT, 0, 0)
2121 #define TreeView_GetIndent(hwnd) \
2122 (UINT)SendMessageA((hwnd), TVM_GETINDENT, 0, 0)
2123 #define TreeView_SetIndent(hwnd, indent) \
2124 (BOOL)SendMessageA((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
2126 #define TreeView_GetImageList(hwnd, iImage) \
2127 (HIMAGELIST)SendMessageA((hwnd), TVM_GETIMAGELIST, iImage, 0)
2129 #define TreeView_SetImageList(hwnd, himl, iImage) \
2130 (HIMAGELIST)SendMessageA((hwnd), TVM_SETIMAGELIST, iImage, \
2131 (LPARAM)(UINT)(HIMAGELIST)(himl))
2133 #define TreeView_GetNextItem(hwnd, hitem, code) \
2134 (HTREEITEM)SendMessageA((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
2135 (LPARAM)(HTREEITEM) (hitem))
2137 #define TreeView_GetChild(hwnd, hitem) \
2138 TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
2139 #define TreeView_GetNextSibling(hwnd, hitem) \
2140 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
2141 #define TreeView_GetPrevSibling(hwnd, hitem) \
2142 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
2143 #define TreeView_GetParent(hwnd, hitem) \
2144 TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
2145 #define TreeView_GetFirstVisible(hwnd) \
2146 TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
2147 #define TreeView_GetLastVisible(hwnd) \
2148 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2149 #define TreeView_GetNextVisible(hwnd, hitem) \
2150 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
2151 #define TreeView_GetPrevVisible(hwnd, hitem) \
2152 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
2153 #define TreeView_GetSelection(hwnd) \
2154 TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
2155 #define TreeView_GetDropHilight(hwnd) \
2156 TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
2157 #define TreeView_GetRoot(hwnd) \
2158 TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
2159 #define TreeView_GetLastVisible(hwnd) \
2160 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2163 #define TreeView_Select(hwnd, hitem, code) \
2164 (UINT)SendMessageA((hwnd), TVM_SELECTITEM, (WPARAM)code, \
2165 (LPARAM)(UINT)(hitem))
2168 #define TreeView_SelectItem(hwnd, hitem) \
2169 TreeView_Select(hwnd, hitem, TVGN_CARET)
2170 #define TreeView_SelectDropTarget(hwnd, hitem) \
2171 TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
2172 #define TreeView_SelectSetFirstVisible(hwnd, hitem) \
2173 TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
2176 #define TreeView_GetItemA(hwnd, pitem) \
2177 (BOOL)SendMessageA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2178 #define TreeView_GetItemW(hwnd, pitem) \
2179 (BOOL)SendMessageW((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2180 #define TreeView_GetItem WINELIB_NAME_AW(TreeView_GetItem)
2182 #define TreeView_SetItemA(hwnd, pitem) \
2183 (BOOL)SendMessageA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2184 #define TreeView_SetItemW(hwnd, pitem) \
2185 (BOOL)SendMessageW((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2187 #define TreeView_EditLabel(hwnd, hitem) \
2188 (HWND)SendMessageA((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
2190 #define TreeView_GetEditControl(hwnd) \
2191 (HWND)SendMessageA((hwnd), TVM_GETEDITCONTROL, 0, 0)
2193 #define TreeView_GetVisibleCount(hwnd) \
2194 (UINT)SendMessageA((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
2196 #define TreeView_HitTest(hwnd, lpht) \
2197 (HTREEITEM)SendMessageA((hwnd), TVM_HITTEST, 0,\
2198 (LPARAM)(LPTVHITTESTINFO)(lpht))
2200 #define TreeView_CreateDragImage(hwnd, hitem) \
2201 (HIMAGELIST)SendMessageA((hwnd), TVM_CREATEDRAGIMAGE, 0,\
2202 (LPARAM)(HTREEITEM)(hitem))
2204 #define TreeView_SortChildren(hwnd, hitem, recurse) \
2205 (BOOL)SendMessageA((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
2206 (LPARAM)(HTREEITEM)(hitem))
2208 #define TreeView_EnsureVisible(hwnd, hitem) \
2209 (BOOL)SendMessageA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
2211 #define TreeView_SortChildrenCB(hwnd, psort, recurse) \
2212 (BOOL)SendMessageA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
2213 (LPARAM)(LPTV_SORTCB)(psort))
2215 #define TreeView_EndEditLabelNow(hwnd, fCancel) \
2216 (BOOL)SendMessageA((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
2218 #define TreeView_GetISearchString(hwnd, lpsz) \
2219 (BOOL)SendMessageA((hwnd), TVM_GETISEARCHSTRING, 0, \
2220 (LPARAM)(LPTSTR)lpsz)
2222 #define TreeView_SetToolTips(hwnd, hwndTT) \
2223 (BOOL)SendMessageA((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
2225 #define TreeView_GetToolTips(hwnd) \
2226 (BOOL)SendMessageA((hwnd), TVM_GETTOOLTIPS, 0, 0)
2228 #define TreeView_SetItemHeight(hwnd, iHeight) \
2229 (INT)SendMessageA((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
2231 #define TreeView_GetItemHeight(hwnd) \
2232 (INT)SendMessageA((hwnd), TVM_GETITEMHEIGHT, 0, 0)
2234 #define TreeView_SetBkColor(hwnd, clr) \
2235 (COLORREF)SendMessageA((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
2237 #define TreeView_SetTextColor(hwnd, clr) \
2238 (COLORREF)SendMessageA((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
2240 #define TreeView_GetBkColor(hwnd) \
2241 (COLORREF)SendMessageA((hwnd), TVM_GETBKCOLOR, 0, 0)
2243 #define TreeView_GetTextColor(hwnd) \
2244 (COLORREF)SendMessageA((hwnd), TVM_GETTEXTCOLOR, 0, 0)
2246 #define TreeView_SetScrollTime(hwnd, uTime) \
2247 (UINT)SendMessageA((hwnd), TVM_SETSCROLLTIME, uTime, 0)
2249 #define TreeView_GetScrollTime(hwnd) \
2250 (UINT)SendMessageA((hwnd), TVM_GETSCROLLTIME, 0, 0)
2252 #define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
2253 (BOOL)SendMessageA((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
2254 (LPARAM) (hItem))
2256 #define TreeView_SetInsertMarkColor(hwnd, clr) \
2257 (COLORREF)SendMessageA((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
2259 #define TreeView_GetInsertMarkColor(hwnd) \
2260 (COLORREF)SendMessageA((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
2262 #define TreeView_GetItemState(hwndTV, hti, mask) \
2263 (UINT)SendMessageA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
2264 #define TreeView_GetCheckState(hwndTV, hti) \
2265 ((((UINT)(SendMessageA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
2266 TVIS_STATEIMAGEMASK))) >> 12) -1)
2268 #define TreeView_SetLineColor(hwnd, clr) \
2269 (COLORREF)SendMessageA((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
2271 #define TreeView_GetLineColor(hwnd) \
2272 (COLORREF)SendMessageA((hwnd), TVM_GETLINECOLOR, 0, 0)
2274 #define TreeView_SetItemState(hwndTV, hti, data, _mask) \
2275 { TVITEM _TVi; \
2276 _TVi.mask = TVIF_STATE; \
2277 _TVi.hItem = hti; \
2278 _TVi.stateMask = _mask; \
2279 _TVi.state = data; \
2280 SendMessageA((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_TVi); \
2291 /* Listview control */
2293 #define WC_LISTVIEWA "SysListView32"
2294 #define WC_LISTVIEWW L"SysListView32"
2295 #define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
2297 #define LVS_ICON 0x0000
2298 #define LVS_REPORT 0x0001
2299 #define LVS_SMALLICON 0x0002
2300 #define LVS_LIST 0x0003
2301 #define LVS_TYPEMASK 0x0003
2302 #define LVS_SINGLESEL 0x0004
2303 #define LVS_SHOWSELALWAYS 0x0008
2304 #define LVS_SORTASCENDING 0x0010
2305 #define LVS_SORTDESCENDING 0x0020
2306 #define LVS_SHAREIMAGELISTS 0x0040
2307 #define LVS_NOLABELWRAP 0x0080
2308 #define LVS_AUTOARRANGE 0x0100
2309 #define LVS_EDITLABELS 0x0200
2310 #define LVS_OWNERDATA 0x1000
2311 #define LVS_NOSCROLL 0x2000
2312 #define LVS_TYPESTYLEMASK 0xfc00
2313 #define LVS_ALIGNTOP 0x0000
2314 #define LVS_ALIGNLEFT 0x0800
2315 #define LVS_ALIGNMASK 0x0c00
2316 #define LVS_OWNERDRAWFIXED 0x0400
2317 #define LVS_NOCOLUMNHEADER 0x4000
2318 #define LVS_NOSORTHEADER 0x8000
2320 #define LVS_EX_GRIDLINES 0x0001
2321 #define LVS_EX_SUBITEMIMAGES 0x0002
2322 #define LVS_EX_CHECKBOXES 0x0004
2323 #define LVS_EX_TRACKSELECT 0x0008
2324 #define LVS_EX_HEADERDRAGDROP 0x0010
2325 #define LVS_EX_FULLROWSELECT 0x0020
2326 #define LVS_EX_ONECLICKACTIVATE 0x0040
2327 #define LVS_EX_TWOCLICKACTIVATE 0x0080
2328 #define LVS_EX_FLATSB 0x0100
2329 #define LVS_EX_REGIONAL 0x0200
2330 #define LVS_EX_INFOTIP 0x0400
2331 #define LVS_EX_UNDERLINEHOT 0x0800
2332 #define LVS_EX_UNDERLINECOLD 0x1000
2333 #define LVS_EX_MULTIWORKAREAS 0x2000
2335 #define LVCF_FMT 0x0001
2336 #define LVCF_WIDTH 0x0002
2337 #define LVCF_TEXT 0x0004
2338 #define LVCF_SUBITEM 0x0008
2339 #define LVCF_IMAGE 0x0010
2340 #define LVCF_ORDER 0x0020
2342 #define LVCFMT_LEFT 0x0000
2343 #define LVCFMT_RIGHT 0x0001
2344 #define LVCFMT_CENTER 0x0002
2345 #define LVCFMT_JUSTIFYMASK 0x0003
2346 #define LVCFMT_IMAGE 0x0800
2347 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2348 #define LVCFMT_COL_HAS_IMAGES 0x8000
2350 #define LVSIL_NORMAL 0
2351 #define LVSIL_SMALL 1
2352 #define LVSIL_STATE 2
2354 /* following 2 flags only for LVS_OWNERDATA listviews */
2355 /* and only in report or list mode */
2356 #define LVSICF_NOINVALIDATEALL 0x0001
2357 #define LVSICF_NOSCROLL 0x0002
2360 #define LVFI_PARAM 0X0001
2361 #define LVFI_STRING 0X0002
2362 #define LVFI_PARTIAL 0X0008
2363 #define LVFI_WRAP 0X0020
2364 #define LVFI_NEARESTXY 0X0040
2366 #define LVIF_TEXT 0x0001
2367 #define LVIF_IMAGE 0x0002
2368 #define LVIF_PARAM 0x0004
2369 #define LVIF_STATE 0x0008
2370 #define LVIF_INDENT 0x0010
2371 #define LVIF_NORECOMPUTE 0x0800
2372 #define LVIF_DI_SETITEM 0x1000
2374 #define LVIR_BOUNDS 0x0000
2375 #define LVIR_LABEL 0x0002
2376 #define LVIR_ICON 0x0001
2377 #define LVIR_SELECTBOUNDS 0x0003
2379 #define LVIS_FOCUSED 0x0001
2380 #define LVIS_SELECTED 0x0002
2381 #define LVIS_CUT 0x0004
2382 #define LVIS_DROPHILITED 0x0008
2383 #define LVIS_ACTIVATING 0x0020
2385 #define LVIS_OVERLAYMASK 0x0F00
2386 #define LVIS_STATEIMAGEMASK 0xF000
2388 #define LVNI_ALL 0x0000
2389 #define LVNI_FOCUSED 0x0001
2390 #define LVNI_SELECTED 0x0002
2391 #define LVNI_CUT 0x0004
2392 #define LVNI_DROPHILITED 0x0008
2394 #define LVNI_ABOVE 0x0100
2395 #define LVNI_BELOW 0x0200
2396 #define LVNI_TOLEFT 0x0400
2397 #define LVNI_TORIGHT 0x0800
2399 #define LVHT_NOWHERE 0x0001
2400 #define LVHT_ONITEMICON 0x0002
2401 #define LVHT_ONITEMLABEL 0x0004
2402 #define LVHT_ONITEMSTATEICON 0x0008
2403 #define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
2405 #define LVHT_ABOVE 0x0008
2406 #define LVHT_BELOW 0x0010
2407 #define LVHT_TORIGHT 0x0020
2408 #define LVHT_TOLEFT 0x0040
2410 #define LVM_FIRST 0x1000
2411 #define LVM_GETBKCOLOR (LVM_FIRST+0)
2412 #define LVM_SETBKCOLOR (LVM_FIRST+1)
2413 #define LVM_GETIMAGELIST (LVM_FIRST+2)
2414 #define LVM_SETIMAGELIST (LVM_FIRST+3)
2415 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
2416 #define LVM_GETITEMA (LVM_FIRST+5)
2417 #define LVM_GETITEMW (LVM_FIRST+75)
2418 #define LVM_GETITEM WINELIB_NAME_AW(LVM_GETITEM)
2419 #define LVM_SETITEMA (LVM_FIRST+6)
2420 #define LVM_SETITEMW (LVM_FIRST+76)
2421 #define LVM_SETITEM WINELIB_NAME_AW(LVM_SETITEM)
2422 #define LVM_INSERTITEMA (LVM_FIRST+7)
2423 #define LVM_INSERTITEMW (LVM_FIRST+77)
2424 #define LVM_INSERTITEM WINELIB_NAME_AW(LVM_INSERTITEM)
2425 #define LVM_DELETEITEM (LVM_FIRST+8)
2426 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
2427 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
2428 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
2429 #define LVM_GETNEXTITEM (LVM_FIRST+12)
2430 #define LVM_FINDITEMA (LVM_FIRST+13)
2431 #define LVM_FINDITEMW (LVM_FIRST+83)
2432 #define LVM_FINDITEM WINELIB_NAME_AW(LVM_FINDITEM)
2433 #define LVM_GETITEMRECT (LVM_FIRST+14)
2434 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
2435 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
2436 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
2437 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
2438 #define LVM_GETSTRINGWIDTH WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
2439 #define LVM_HITTEST (LVM_FIRST+18)
2440 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
2441 #define LVM_SCROLL (LVM_FIRST+20)
2442 #define LVM_REDRAWITEMS (LVM_FIRST+21)
2443 #define LVM_ARRANGE (LVM_FIRST+22)
2444 #define LVM_EDITLABELA (LVM_FIRST+23)
2445 #define LVM_EDITLABELW (LVM_FIRST+118)
2446 #define LVM_EDITLABEL WINELIB_NAME_AW(LVM_EDITLABEL)
2447 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
2448 #define LVM_GETCOLUMNA (LVM_FIRST+25)
2449 #define LVM_GETCOLUMNW (LVM_FIRST+95)
2450 #define LVM_GETCOLUMN WINELIB_NAME_AW(LVM_GETCOLUMN)
2451 #define LVM_SETCOLUMNA (LVM_FIRST+26)
2452 #define LVM_SETCOLUMNW (LVM_FIRST+96)
2453 #define LVM_SETCOLUMN WINELIB_NAME_AW(LVM_SETCOLUMN)
2454 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
2455 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
2456 #define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
2457 #define LVM_DELETECOLUMN (LVM_FIRST+28)
2458 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
2459 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
2460 #define LVM_GETHEADER (LVM_FIRST+31)
2462 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
2463 #define LVM_GETVIEWRECT (LVM_FIRST+34)
2464 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
2465 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
2466 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
2467 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
2468 #define LVM_GETTOPINDEX (LVM_FIRST+39)
2469 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
2470 #define LVM_GETORIGIN (LVM_FIRST+41)
2471 #define LVM_UPDATE (LVM_FIRST+42)
2472 #define LVM_SETITEMSTATE (LVM_FIRST+43)
2473 #define LVM_GETITEMSTATE (LVM_FIRST+44)
2474 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
2475 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
2476 #define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
2477 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
2478 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
2479 #define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
2480 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
2481 #define LVM_SORTITEMS (LVM_FIRST+48)
2482 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
2483 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
2484 #define LVM_GETITEMSPACING (LVM_FIRST+51)
2485 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
2486 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
2487 #define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
2488 #define LVM_SETICONSPACING (LVM_FIRST+53)
2489 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
2490 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
2491 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
2492 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
2493 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
2494 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
2495 #define LVM_SETHOTITEM (LVM_FIRST+60)
2496 #define LVM_GETHOTITEM (LVM_FIRST+61)
2497 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
2498 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
2499 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
2500 #define LVM_SETWORKAREAS (LVM_FIRST+65)
2501 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
2502 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
2503 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
2504 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
2505 #define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
2506 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
2507 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
2508 #define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
2509 #define LVM_GETWORKAREAS (LVM_FIRST+70)
2510 #define LVM_SETHOVERTIME (LVM_FIRST+71)
2511 #define LVM_GETHOVERTIME (LVM_FIRST+72)
2512 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
2513 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
2515 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
2517 #define LVN_FIRST (0U-100U)
2518 #define LVN_LAST (0U-199U)
2519 #define LVN_ITEMCHANGING (LVN_FIRST-0)
2520 #define LVN_ITEMCHANGED (LVN_FIRST-1)
2521 #define LVN_INSERTITEM (LVN_FIRST-2)
2522 #define LVN_DELETEITEM (LVN_FIRST-3)
2523 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
2524 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
2525 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
2526 #define LVN_BEGINLABELEDIT WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
2527 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
2528 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
2529 #define LVN_ENDLABELEDIT WINELIB_NAME_AW(LVN_ENDLABELEDIT)
2530 #define LVN_COLUMNCLICK (LVN_FIRST-8)
2531 #define LVN_BEGINDRAG (LVN_FIRST-9)
2532 #define LVN_BEGINRDRAG (LVN_FIRST-11)
2533 #define LVN_ODCACHEHINT (LVN_FIRST-13)
2534 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
2535 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
2536 #define LVN_HOTTRACK (LVN_FIRST-21)
2537 #define LVN_ODFINDITEMA (LVN_FIRST-52)
2538 #define LVN_ODFINDITEMW (LVN_FIRST-79)
2539 #define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
2540 #define LVN_GETDISPINFOA (LVN_FIRST-50)
2541 #define LVN_GETDISPINFOW (LVN_FIRST-77)
2542 #define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
2543 #define LVN_SETDISPINFOA (LVN_FIRST-51)
2544 #define LVN_SETDISPINFOW (LVN_FIRST-78)
2545 #define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
2546 #define LVN_KEYDOWN (LVN_FIRST-55)
2548 #define LVA_ALIGNLEFT 0x0000
2549 #define LVA_DEFAULT 0x0001
2550 #define LVA_ALIGNTOP 0x0002
2551 #define LVA_SNAPTOGRID 0x0005
2553 typedef struct tagLVITEMA
2555 UINT mask;
2556 INT iItem;
2557 INT iSubItem;
2558 UINT state;
2559 UINT stateMask;
2560 LPSTR pszText;
2561 INT cchTextMax;
2562 INT iImage;
2563 LPARAM lParam;
2564 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2565 } LVITEMA, *LPLVITEMA;
2567 typedef struct tagLVITEMW
2569 UINT mask;
2570 INT iItem;
2571 INT iSubItem;
2572 UINT state;
2573 UINT stateMask;
2574 LPWSTR pszText;
2575 INT cchTextMax;
2576 INT iImage;
2577 LPARAM lParam;
2578 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2579 } LVITEMW, *LPLVITEMW;
2581 /* ListView background image structs and constants
2582 For _WIN32_IE version 0x400 and later. */
2584 typedef struct tagLVBKIMAGEA
2586 ULONG ulFlags;
2587 HBITMAP hbm;
2588 LPSTR pszImage;
2589 UINT cchImageMax;
2590 int xOffsetPercent;
2591 int yOffsetPercent;
2592 } LVBKIMAGEA, *LPLVBKIMAGEA;
2594 typedef struct tagLVBKIMAGEW
2596 ULONG ulFlags;
2597 HBITMAP hbm;
2598 LPWSTR pszImage;
2599 UINT cchImageMax;
2600 int xOffsetPercent;
2601 int yOffsetPercent;
2602 } LVBKIMAGEW, *LPLVBKIMAGEW;
2604 #define LVBKIMAGE WINELIB_NAME_AW(LVBKIMAGE)
2606 #define LVBKIF_SOURCE_NONE 0x00000000
2607 #define LVBKIF_SOURCE_HBITMAP 0x00000001
2608 #define LVBKIF_SOURCE_URL 0x00000002
2609 #define LVBKIF_SOURCE_MASK 0x00000003
2610 #define LVBKIF_STYLE_NORMAL 0x00000000
2611 #define LVBKIF_STYLE_TILE 0x00000010
2612 #define LVBKIF_STYLE_MASK 0x00000010
2614 #define ListView_SetBkImage(hwnd, plvbki) \
2615 (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)plvbki)
2617 #define ListView_GetBkImage(hwnd, plvbki) \
2618 (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)plvbki)
2620 #define LVITEM WINELIB_NAME_AW(LVITEM)
2621 #define LPLVITEM WINELIB_NAME_AW(LPLVITEM)
2623 #define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
2624 #define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
2625 #define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
2627 #define LV_ITEM LVITEM
2629 typedef struct tagLVCOLUMNA
2631 UINT mask;
2632 INT fmt;
2633 INT cx;
2634 LPSTR pszText;
2635 INT cchTextMax;
2636 INT iSubItem;
2637 INT iImage; /* (_WIN32_IE >= 0x0300) */
2638 INT iOrder; /* (_WIN32_IE >= 0x0300) */
2639 } LVCOLUMNA, *LPLVCOLUMNA;
2641 typedef struct tagLVCOLUMNW
2643 UINT mask;
2644 INT fmt;
2645 INT cx;
2646 LPWSTR pszText;
2647 INT cchTextMax;
2648 INT iSubItem;
2649 INT iImage; /* (_WIN32_IE >= 0x0300) */
2650 INT iOrder; /* (_WIN32_IE >= 0x0300) */
2651 } LVCOLUMNW, *LPLVCOLUMNW;
2653 #define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
2654 #define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)
2656 #define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
2657 #define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
2658 #define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)
2660 #define LV_COLUMN LVCOLUMN
2663 typedef struct tagNMLISTVIEW
2665 NMHDR hdr;
2666 INT iItem;
2667 INT iSubItem;
2668 UINT uNewState;
2669 UINT uOldState;
2670 UINT uChanged;
2671 POINT ptAction;
2672 LPARAM lParam;
2673 } NMLISTVIEW, *LPNMLISTVIEW;
2675 #define LPNM_LISTVIEW LPNMLISTVIEW
2676 #define NM_LISTVIEW NMLISTVIEW
2679 typedef struct tagLVDISPINFO
2681 NMHDR hdr;
2682 LVITEMA item;
2683 } NMLVDISPINFOA, *LPNMLVDISPINFOA;
2685 typedef struct tagLVDISPINFOW
2687 NMHDR hdr;
2688 LVITEMW item;
2689 } NMLVDISPINFOW, *LPNMLVDISPINFOW;
2691 #define NMLVDISPINFO WINELIB_NAME_AW(NMLVDISPINFO)
2692 #define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
2694 #define LV_DISPINFO NMLVDISPINFO
2696 typedef struct tagLVKEYDOWN
2698 NMHDR hdr;
2699 WORD wVKey;
2700 UINT flags;
2701 } NMLVKEYDOWN, *LPNMLVKEYDOWN;
2703 #define LV_KEYDOWN NMLVKEYDOWN
2705 typedef struct tagLVHITTESTINFO
2707 POINT pt;
2708 UINT flags;
2709 INT iItem;
2710 INT iSubItem;
2711 } LVHITTESTINFO, *LPLVHITTESTINFO;
2713 #define LV_HITTESTINFO LVHITTESTINFO
2714 #define _LV_HITTESTINFO tagLVHITTESTINFO
2715 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
2717 typedef struct tagLVFINDINFO
2719 UINT flags;
2720 LPCSTR psz;
2721 LPARAM lParam;
2722 POINT pt;
2723 UINT vkDirection;
2724 } LVFINDINFO, *LPLVFINDINFO;
2726 #define LV_FINDINFO LVFINDINFO
2728 typedef struct tagTCHITTESTINFO
2730 POINT pt;
2731 UINT flags;
2732 } TCHITTESTINFO, *LPTCHITTESTINFO;
2734 #define TC_HITTESTINFO TCHITTESTINFO
2736 typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
2738 typedef struct tagNMLVCACHEHINT
2740 NMHDR hdr;
2741 INT iFrom;
2742 INT iTo;
2743 } NMLVCACHEHINT, *LPNMLVCACHEHINT;
2745 #define LPNM_CACHEHINT LPNMLVCACHEHINT
2746 #define PNM_CACHEHINT LPNMLVCACHEHINT
2747 #define NM_CACHEHINT NMLVCACHEHINT
2749 #define ListView_GetNextItem(hwnd,nItem,flags) \
2750 (INT)SendMessageA((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
2751 #define ListView_FindItem(hwnd,nItem,plvfi) \
2752 (INT)SendMessageA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFO*)(plvfi))
2753 #define ListView_Arrange(hwnd,code) \
2754 (INT)SendMessageA((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
2755 #define ListView_GetItemPosition(hwnd,i,ppt) \
2756 (INT)SendMessageA((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
2757 #define ListView_GetItemRect(hwnd,i,prc) \
2758 (INT)SendMessageA((hwnd),LVM_GETITEMRECT,(WPARAM)(INT)(i),(LPARAM)(LPRECT)(prc))
2759 #define ListView_SetItemA(hwnd,pitem) \
2760 (INT)SendMessageA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
2761 #define ListView_SetItemState(hwnd,i,pitem) \
2762 (BOOL)SendMessageA((hwnd),LVM_SETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(LPLVITEMA)(pitem))
2763 #define ListView_GetItemState(hwnd,i,mask) \
2764 (BOOL)SendMessageA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
2765 #define ListView_GetCountPerPage(hwnd) \
2766 (BOOL)SendMessageW((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
2767 #define ListView_GetImageList(hwnd,iImageList) \
2768 (HIMAGELIST)SendMessageA((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
2769 #define ListView_GetStringWidthA(hwnd,pstr) \
2770 (INT)SendMessageA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
2771 #define ListView_GetTopIndex(hwnd) \
2772 (BOOL)SendMessageA((hwnd),LVM_GETTOPINDEX,0,0L)
2773 #define ListView_Scroll(hwnd,dx,dy) \
2774 (BOOL)SendMessageA((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
2775 #define ListView_EnsureVisible(hwnd,i,fPartialOk) \
2776 (BOOL)SendMessageA((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
2777 #define ListView_SetBkColor(hwnd,clrBk) \
2778 (BOOL)SendMessageA((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
2779 #define ListView_SetImageList(hwnd,himl,iImageList) \
2780 (HIMAGELIST)(UINT)SendMessageA((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(UINT)(HIMAGELIST)(himl))
2781 #define ListView_GetItemCount(hwnd) \
2782 (INT)SendMessageA((hwnd),LVM_GETITEMCOUNT,0,0L)
2784 #define ListView_GetItemA(hwnd,pitem) \
2785 (BOOL)SendMessageA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
2786 #define ListView_GetItemW(hwnd,pitem) \
2787 (BOOL)SendMessageW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
2788 #define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
2790 #define ListView_HitTest(hwnd,pinfo) \
2791 (INT)SendMessageA((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
2793 #define ListView_InsertItemA(hwnd,pitem) \
2794 (INT)SendMessageA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
2795 #define ListView_InsertItemW(hwnd,pitem) \
2796 (INT)SendMessageW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
2797 #define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
2799 #define ListView_DeleteAllItems(hwnd) \
2800 (BOOL)SendMessageA((hwnd),LVM_DELETEALLITEMS,0,0L)
2802 #define ListView_InsertColumnA(hwnd,iCol,pcol) \
2803 (INT)SendMessageA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
2804 #define ListView_InsertColumnW(hwnd,iCol,pcol) \
2805 (INT)SendMessageW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
2806 #define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
2808 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
2809 (BOOL)SendMessageA((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
2810 #define ListView_SetItemPosition(hwndLV, i, x, y) \
2811 (BOOL)SendMessageA((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
2812 #define ListView_GetSelectedCount(hwndLV) \
2813 (UINT)SendMessageA((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
2815 #define ListView_EditLabelA(hwndLV, i) \
2816 (HWND)SendMessageA((hwndLV),LVM_EDITLABELA,(WPARAM)(int)(i), 0L)
2817 #define ListView_EditLabelW(hwndLV, i) \
2818 (HWND)SendMessageW((hwndLV),LVM_EDITLABELW,(WPARAM)(int)(i), 0L)
2819 #define ListView_EditLabel WINELIB_NAME_AW(ListView_EditLabel)
2821 #define ListView_SetItemTextA(hwndLV, i, _iSubItem, _pszText) \
2822 { LVITEMA _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
2823 SendMessageA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}
2824 #define ListView_SetItemTextW(hwndLV, i, _iSubItem, _pszText) \
2825 { LVITEMW _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
2826 SendMessageW(hwndLV, LVM_SETITEMTEXTW, (WPARAM)i, (LPARAM) (LVITEMW*)& _LVi);}
2827 #define ListView_SetItemText WINELIB_NAME_AW(ListView_SetItemText)
2829 #define ListView_DeleteItem(hwndLV, i) \
2830 (BOOL)SendMessageA(hwndLV, LVM_DELETEITEM, (WPARAM)(int)(i), 0L)
2831 #define ListView_Update(hwndLV, i) \
2832 (BOOL)SendMessageA((hwndLV), LVM_UPDATE, (WPARAM)(i), 0L)
2835 /* Tab Control */
2837 #define WC_TABCONTROL16 "SysTabControl"
2838 #define WC_TABCONTROLA "SysTabControl32"
2839 #define WC_TABCONTROLW L"SysTabControl32"
2841 #define WC_TABCONTROL WINELIB_NAME_AW(WC_TABCONTROL)
2843 /* tab control styles */
2844 #define TCS_SCROLLOPPOSITE 0x0001 /* assumes multiline tab */
2845 #define TCS_BOTTOM 0x0002
2846 #define TCS_RIGHT 0x0002
2847 #define TCS_MULTISELECT 0x0004 /* allow multi-select in button mode */
2848 #define TCS_FLATBUTTONS 0x0008
2849 #define TCS_FORCEICONLEFT 0x0010
2850 #define TCS_FORCELABELLEFT 0x0020
2851 #define TCS_HOTTRACK 0x0040
2852 #define TCS_VERTICAL 0x0080
2853 #define TCS_TABS 0x0000
2854 #define TCS_BUTTONS 0x0100
2855 #define TCS_SINGLELINE 0x0000
2856 #define TCS_MULTILINE 0x0200
2857 #define TCS_RIGHTJUSTIFY 0x0000
2858 #define TCS_FIXEDWIDTH 0x0400
2859 #define TCS_RAGGEDRIGHT 0x0800
2860 #define TCS_FOCUSONBUTTONDOWN 0x1000
2861 #define TCS_OWNERDRAWFIXED 0x2000
2862 #define TCS_TOOLTIPS 0x4000
2863 #define TCS_FOCUSNEVER 0x8000
2864 #define TCS_EX_FLATSEPARATORS 0x00000001 /* to be used with */
2865 #define TCS_EX_REGISTERDROP 0x00000002 /* TCM_SETEXTENDEDSTYLE */
2868 #define TCM_FIRST 0x1300
2870 #define TCM_GETIMAGELIST (TCM_FIRST + 2)
2871 #define TCM_SETIMAGELIST (TCM_FIRST + 3)
2872 #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
2873 #define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
2874 #define TCM_GETITEMA (TCM_FIRST + 5)
2875 #define TCM_GETITEMW (TCM_FIRST + 60)
2876 #define TCM_SETITEMA (TCM_FIRST + 6)
2877 #define TCM_SETITEMW (TCM_FIRST + 61)
2878 #define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
2879 #define TCM_INSERTITEMA (TCM_FIRST + 7)
2880 #define TCM_INSERTITEMW (TCM_FIRST + 62)
2881 #define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
2882 #define TCM_DELETEITEM (TCM_FIRST + 8)
2883 #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
2884 #define TCM_GETITEMRECT (TCM_FIRST + 10)
2885 #define TCM_GETCURSEL (TCM_FIRST + 11)
2886 #define TCM_SETCURSEL (TCM_FIRST + 12)
2887 #define TCM_HITTEST (TCM_FIRST + 13)
2888 #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
2889 #define TCM_ADJUSTRECT (TCM_FIRST + 40)
2890 #define TCM_SETITEMSIZE (TCM_FIRST + 41)
2891 #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
2892 #define TCM_SETPADDING (TCM_FIRST + 43)
2893 #define TCM_GETROWCOUNT (TCM_FIRST + 44)
2894 #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
2895 #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
2896 #define TCM_GETCURFOCUS (TCM_FIRST + 47)
2897 #define TCM_SETCURFOCUS (TCM_FIRST + 48)
2898 #define TCM_SETMINTABWIDTH (TCM_FIRST + 49)
2899 #define TCM_DESELECTALL (TCM_FIRST + 50)
2900 #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
2901 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
2902 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
2903 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2904 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2907 #define TCIF_TEXT 0x0001
2908 #define TCIF_IMAGE 0x0002
2909 #define TCIF_RTLREADING 0x0004
2910 #define TCIF_PARAM 0x0008
2911 #define TCIF_STATE 0x0010
2913 #define TCIS_BUTTONPRESSED 0x0001
2914 #define TCIS_HIGHLIGHTED 0x0002
2916 /* TabCtrl Macros */
2917 #define TabCtrl_GetImageList(hwnd) \
2918 (HIMAGELIST)SendMessageA((hwnd), TCM_GETIMAGELIST, 0, 0L)
2919 #define TabCtrl_SetImageList(hwnd, himl) \
2920 (HIMAGELIST)SendMessageA((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
2921 #define TabCtrl_GetItemCount(hwnd) \
2922 (int)SendMessageA((hwnd), TCM_GETITEMCOUNT, 0, 0L)
2923 #define TabCtrl_GetItemA(hwnd, iItem, pitem) \
2924 (BOOL)SendMessageA((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2925 #define TabCtrl_GetItemW(hwnd, iItem, pitem) \
2926 (BOOL)SendMessageW((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2927 #define TabCtrl_GetItem WINELIB_NAME_AW(TabCtrl_GetItem)
2928 #define TabCtrl_SetItemA(hwnd, iItem, pitem) \
2929 (BOOL)SendMessageA((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2930 #define TabCtrl_SetItemW(hwnd, iItem, pitem) \
2931 (BOOL)SendMessageW((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2932 #define TabCtrl_SetItem WINELIB_NAME_AW(TabCtrl_GetItem)
2933 #define TabCtrl_InsertItemA(hwnd, iItem, pitem) \
2934 (int)SendMessageA((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
2935 #define TabCtrl_InsertItemW(hwnd, iItem, pitem) \
2936 (int)SendMessageW((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
2937 #define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
2938 #define TabCtrl_DeleteItem(hwnd, i) \
2939 (BOOL)SendMessageA((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
2940 #define TabCtrl_DeleteAllItems(hwnd) \
2941 (BOOL)SendMessageA((hwnd), TCM_DELETEALLITEMS, 0, 0L)
2942 #define TabCtrl_GetItemRect(hwnd, i, prc) \
2943 (BOOL)SendMessageA((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
2944 #define TabCtrl_GetCurSel(hwnd) \
2945 (int)SendMessageA((hwnd), TCM_GETCURSEL, 0, 0)
2946 #define TabCtrl_SetCurSel(hwnd, i) \
2947 (int)SendMessageA((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
2948 #define TabCtrl_HitTest(hwndTC, pinfo) \
2949 (int)SendMessageA((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
2950 #define TabCtrl_SetItemExtra(hwndTC, cb) \
2951 (BOOL)SendMessageA((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
2952 #define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
2953 (int)SendMessageA(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
2954 #define TabCtrl_SetItemSize(hwnd, x, y) \
2955 (DWORD)SendMessageA((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
2956 #define TabCtrl_RemoveImage(hwnd, i) \
2957 (void)SendMessageA((hwnd), TCM_REMOVEIMAGE, i, 0L)
2958 #define TabCtrl_SetPadding(hwnd, cx, cy) \
2959 (void)SendMessageA((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
2960 #define TabCtrl_GetRowCount(hwnd) \
2961 (int)SendMessageA((hwnd), TCM_GETROWCOUNT, 0, 0L)
2962 #define TabCtrl_GetToolTips(hwnd) \
2963 (HWND)SendMessageA((hwnd), TCM_GETTOOLTIPS, 0, 0L)
2964 #define TabCtrl_SetToolTips(hwnd, hwndTT) \
2965 (void)SendMessageA((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
2966 #define TabCtrl_GetCurFocus(hwnd) \
2967 (int)SendMessageA((hwnd), TCM_GETCURFOCUS, 0, 0)
2968 #define TabCtrl_SetCurFocus(hwnd, i) \
2969 SendMessageA((hwnd),TCM_SETCURFOCUS, i, 0)
2970 #define TabCtrl_SetMinTabWidth(hwnd, x) \
2971 (int)SendMessageA((hwnd), TCM_SETMINTABWIDTH, 0, x)
2972 #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
2973 (void)SendMessageA((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
2976 /* constants for TCHITTESTINFO */
2978 #define TCHT_NOWHERE 0x01
2979 #define TCHT_ONITEMICON 0x02
2980 #define TCHT_ONITEMLABEL 0x04
2981 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
2984 typedef struct tagTCITEMA {
2985 UINT mask;
2986 UINT dwState;
2987 UINT dwStateMask;
2988 LPSTR pszText;
2989 INT cchTextMax;
2990 INT iImage;
2991 LPARAM lParam;
2992 } TCITEMA, *LPTCITEMA;
2994 typedef struct tagTCITEMW
2996 UINT mask;
2997 DWORD dwState;
2998 DWORD dwStateMask;
2999 LPWSTR pszText;
3000 INT cchTextMax;
3001 INT iImage;
3002 LPARAM lParam;
3003 } TCITEMW, *LPTCITEMW;
3005 #define TCITEM WINELIB_NAME_AW(TCITEM)
3006 #define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
3007 #define TC_ITEM TCITEM
3009 #define TCN_FIRST (0U-550U)
3010 #define TCN_LAST (0U-580U)
3011 #define TCN_KEYDOWN (TCN_FIRST - 0)
3012 #define TCN_SELCHANGE (TCN_FIRST - 1)
3013 #define TCN_SELCHANGING (TCN_FIRST - 2)
3014 #define TCN_GETOBJECT (TCN_FIRST - 3)
3017 /* ComboBoxEx control */
3019 #define WC_COMBOBOXEXA "ComboBoxEx32"
3020 #define WC_COMBOBOXEXW L"ComboBoxEx32"
3021 #define WC_COMBOBOXEX WINELIB_NAME_AW(WC_COMBOBOXEX)
3023 #define CBEM_INSERTITEMA (WM_USER+1)
3024 #define CBEM_INSERTITEMW (WM_USER+11)
3025 #define CBEM_INSERTITEM WINELIB_NAME_AW(CBEM_INSERTITEM)
3026 #define CBEM_SETIMAGELIST (WM_USER+2)
3027 #define CBEM_GETIMAGELIST (WM_USER+3)
3028 #define CBEM_GETITEMA (WM_USER+4)
3029 #define CBEM_GETITEMW (WM_USER+13)
3030 #define CBEM_GETITEM WINELIB_NAME_AW(CBEM_GETITEM)
3031 #define CBEM_SETITEMA (WM_USER+5)
3032 #define CBEM_SETITEMW (WM_USER+12)
3033 #define CBEM_SETITEM WINELIB_NAME_AW(CBEM_SETITEM)
3034 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
3035 #define CBEM_GETEDITCONTROL (WM_USER+7)
3036 #define CBEM_SETEXSTYLE (WM_USER+8)
3037 #define CBEM_GETEXSTYLE (WM_USER+9)
3038 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
3039 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
3040 #define CBEM_HASEDITCHANGED (WM_USER+10)
3041 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3042 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3044 #define CBEN_FIRST (0U-800U)
3045 #define CBEN_LAST (0U-830U)
3047 typedef struct tagCOMBOBOXEXITEMA
3049 UINT mask;
3050 int iItem;
3051 LPSTR pszText;
3052 int cchTextMax;
3053 int iImage;
3054 int iSelectedImage;
3055 int iOverlay;
3056 int iIndent;
3057 LPARAM lParam;
3058 } COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
3059 typedef COMBOBOXEXITEMA CONST *PCCOMBOEXITEMA;
3062 typedef struct tagCOMBOBOXEXITEMW
3064 UINT mask;
3065 int iItem;
3066 LPWSTR pszText;
3067 int cchTextMax;
3068 int iImage;
3069 int iSelectedImage;
3070 int iOverlay;
3071 int iIndent;
3072 LPARAM lParam;
3073 } COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
3075 #define COMBOBOXEXITEM WINELIB_NAME_AW(COMBOBOXEXITEM)
3077 /* Hotkey control */
3079 #define HOTKEY_CLASS16 "msctls_hotkey"
3080 #define HOTKEY_CLASSA "msctls_hotkey32"
3081 #define HOTKEY_CLASSW L"msctls_hotkey32"
3082 #define HOTKEY_CLASS WINELIB_NAME_AW(HOTKEY_CLASS)
3084 #define HOTKEYF_SHIFT 0x01
3085 #define HOTKEYF_CONTROL 0x02
3086 #define HOTKEYF_ALT 0x04
3087 #define HOTKEYF_EXT 0x08
3089 #define HKCOMB_NONE 0x0001
3090 #define HKCOMB_S 0x0002
3091 #define HKCOMB_C 0x0004
3092 #define HKCOMB_A 0x0008
3093 #define HKCOMB_SC 0x0010
3094 #define HKCOMB_SA 0x0020
3095 #define HKCOMB_CA 0x0040
3096 #define HKCOMB_SCA 0x0080
3098 #define HKM_SETHOTKEY (WM_USER+1)
3099 #define HKM_GETHOTKEY (WM_USER+2)
3100 #define HKM_SETRULES (WM_USER+3)
3103 /* animate control */
3105 #define ANIMATE_CLASSA "SysAnimate32"
3106 #define ANIMATE_CLASSW L"SysAnimate32"
3107 #define ANIMATE_CLASS WINELIB_NAME_AW(ANIMATE_CLASS)
3109 #define ACS_CENTER 0x0001
3110 #define ACS_TRANSPARENT 0x0002
3111 #define ACS_AUTOPLAY 0x0004
3112 #define ACS_TIMER 0x0008 /* no threads, just timers */
3114 #define ACM_OPENA (WM_USER+100)
3115 #define ACM_OPENW (WM_USER+103)
3116 #define ACM_OPEN WINELIB_NAME_AW(ACM_OPEN)
3117 #define ACM_PLAY (WM_USER+101)
3118 #define ACM_STOP (WM_USER+102)
3120 #define ACN_START 1
3121 #define ACN_STOP 2
3123 #define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
3124 CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
3125 #define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
3126 CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
3127 #define Animate_Create WINELIB_NAME_AW(Animate_Create)
3128 #define Animate_OpenA(hwnd,szName) \
3129 (BOOL)SendMessageA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
3130 #define Animate_OpenW(hwnd,szName) \
3131 (BOOL)SendMessageW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
3132 #define Animate_Open WINELIB_NAME_AW(Animate_Open)
3133 #define Animate_OpenExA(hwnd,hInst,szName) \
3134 (BOOL)SendMessageA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
3135 #define Animate_OpenExW(hwnd,hInst,szName) \
3136 (BOOL)SendMessageW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
3137 #define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
3138 #define Animate_Play(hwnd,from,to,rep) \
3139 (BOOL)SendMessageA(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
3140 #define Animate_Stop(hwnd) \
3141 (BOOL)SendMessageA(hwnd,ACM_STOP,0,0)
3142 #define Animate_Close(hwnd) \
3143 (BOOL)SendMessageA(hwnd,ACM_OPENA,0,0)
3144 #define Animate_Seek(hwnd,frame) \
3145 (BOOL)SendMessageA(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
3148 /**************************************************************************
3149 * IP Address control
3152 #define WC_IPADDRESSA "SysIPAddress32"
3153 #define WC_IPADDRESSW L"SysIPAddress32"
3154 #define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
3156 #define IPM_CLEARADDRESS (WM_USER+100)
3157 #define IPM_SETADDRESS (WM_USER+101)
3158 #define IPM_GETADDRESS (WM_USER+102)
3159 #define IPM_SETRANGE (WM_USER+103)
3160 #define IPM_SETFOCUS (WM_USER+104)
3161 #define IPM_ISBLANK (WM_USER+105)
3163 #define IPN_FIRST (0U-860U)
3164 #define IPN_LAST (0U-879U)
3165 #define IPN_FIELDCHANGED (IPN_FIRST-0)
3167 typedef struct tagNMIPADDRESS
3169 NMHDR hdr;
3170 INT iField;
3171 INT iValue;
3172 } NMIPADDRESS, *LPNMIPADDRESS;
3174 #define MAKEIPRANGE(low,high) \
3175 ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
3176 #define MAKEIPADDRESS(b1,b2,b3,b4) \
3177 ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
3179 #define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
3180 #define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
3181 #define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
3182 #define FOURTH_IPADDRESS(x) ((x)&0xff)
3185 /**************************************************************************
3186 * Native Font control
3189 #define WC_NATIVEFONTCTLA "NativeFontCtl"
3190 #define WC_NATIVEFONTCTLW L"NativeFontCtl"
3191 #define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
3193 #define NFS_EDIT 0x0001
3194 #define NFS_STATIC 0x0002
3195 #define NFS_LISTCOMBO 0x0004
3196 #define NFS_BUTTON 0x0008
3197 #define NFS_ALL 0x0010
3200 /**************************************************************************
3201 * Month calendar control
3205 #define MONTHCAL_CLASSA "SysMonthCal32"
3206 #define MONTHCAL_CLASSW L"SysMonthCal32"
3207 #define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
3209 #define MCM_FIRST 0x1000
3210 #define MCN_FIRST (0U-750U)
3211 #define MCN_LAST (0U-759U)
3214 #define MCM_GETCURSEL (MCM_FIRST + 1)
3215 #define MCM_SETCURSEL (MCM_FIRST + 2)
3216 #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
3217 #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
3218 #define MCM_GETSELRANGE (MCM_FIRST + 5)
3219 #define MCM_SETSELRANGE (MCM_FIRST + 6)
3220 #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
3221 #define MCM_SETDAYSTATE (MCM_FIRST + 8)
3222 #define MCM_GETMINREQRECT (MCM_FIRST + 9)
3223 #define MCM_SETCOLOR (MCM_FIRST + 10)
3224 #define MCM_GETCOLOR (MCM_FIRST + 11)
3225 #define MCM_SETTODAY (MCM_FIRST + 12)
3226 #define MCM_GETTODAY (MCM_FIRST + 13)
3227 #define MCM_HITTEST (MCM_FIRST + 14)
3228 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
3229 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
3230 #define MCM_GETRANGE (MCM_FIRST + 17)
3231 #define MCM_SETRANGE (MCM_FIRST + 18)
3232 #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
3233 #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
3234 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
3235 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3236 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3239 /* Notifications */
3241 #define MCN_SELCHANGE (MCN_FIRST + 1)
3242 #define MCN_GETDAYSTATE (MCN_FIRST + 3)
3243 #define MCN_SELECT (MCN_FIRST + 4)
3245 #define MCSC_BACKGROUND 0
3246 #define MCSC_TEXT 1
3247 #define MCSC_TITLEBK 2
3248 #define MCSC_TITLETEXT 3
3249 #define MCSC_MONTHBK 4
3250 #define MCSC_TRAILINGTEXT 5
3252 #define MCS_DAYSTATE 0x0001
3253 #define MCS_MULTISELECT 0x0002
3254 #define MCS_WEEKNUMBERS 0x0004
3255 #define MCS_NOTODAY 0x0010
3256 #define MCS_NOTODAYCIRCLE 0x0008
3258 #define MCHT_TITLE 0x00010000
3259 #define MCHT_CALENDAR 0x00020000
3260 #define MCHT_TODAYLINK 0x00030000
3262 #define MCHT_NEXT 0x01000000
3263 #define MCHT_PREV 0x02000000
3264 #define MCHT_NOWHERE 0x00000000
3265 #define MCHT_TITLEBK (MCHT_TITLE)
3266 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
3267 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
3268 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
3269 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
3271 #define MCHT_CALENDARBK (MCHT_CALENDAR)
3272 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
3273 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
3274 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
3275 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
3276 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
3280 #define GMR_VISIBLE 0
3281 #define GMR_DAYSTATE 1
3284 /* Month calendar's structures */
3287 typedef struct {
3288 UINT cbSize;
3289 POINT pt;
3290 UINT uHit;
3291 SYSTEMTIME st;
3292 } MCHITTESTINFO, *PMCHITTESTINFO;
3294 typedef struct tagNMSELCHANGE
3296 NMHDR nmhdr;
3297 SYSTEMTIME stSelStart;
3298 SYSTEMTIME stSelEnd;
3299 } NMSELCHANGE, *LPNMSELCHANGE;
3301 typedef NMSELCHANGE NMSELECT, *LPNMSELECT;
3302 typedef DWORD MONTHDAYSTATE, *LPMONTHDAYSTATE;
3304 typedef struct tagNMDAYSTATE
3306 NMHDR nmhdr;
3307 SYSTEMTIME stStart;
3308 int cDayState;
3309 LPMONTHDAYSTATE prgDayState;
3310 } NMDAYSTATE, *LPNMDAYSTATE;
3313 /* macros */
3315 #define MonthCal_GetCurSel(hmc, pst) \
3316 (BOOL)SendMessageA(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
3317 #define MonthCal_SetCurSel(hmc, pst) \
3318 (BOOL)SendMessageA(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
3319 #define MonthCal_GetMaxSelCount(hmc) \
3320 (DWORD)SendMessageA(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
3321 #define MonthCal_SetMaxSelCount(hmc, n) \
3322 (BOOL)SendMessageA(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
3323 #define MonthCal_GetSelRange(hmc, rgst) \
3324 SendMessageA(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst))
3325 #define MonthCal_SetSelRange(hmc, rgst) \
3326 SendMessageA(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst))
3327 #define MonthCal_GetMonthRange(hmc, gmr, rgst) \
3328 (DWORD)SendMessageA(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
3329 #define MonthCal_SetDayState(hmc, cbds, rgds) \
3330 SendMessageA(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
3331 #define MonthCal_GetMinReqRect(hmc, prc) \
3332 SendMessageA(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
3333 #define MonthCal_SetColor(hmc, iColor, clr)\
3334 SendMessageA(hmc, MCM_SETCOLOR, iColor, clr
3335 #define MonthCal_GetColor(hmc, iColor) \
3336 SendMessageA(hmc, MCM_SETCOLOR, iColor, 0)
3337 #define MonthCal_GetToday(hmc, pst)\
3338 (BOOL)SendMessageA(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
3339 #define MonthCal_SetToday(hmc, pst)\
3340 SendMessageA(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
3341 #define MonthCal_HitTest(hmc, pinfo) \
3342 SendMessageA(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
3343 #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
3344 SendMessageA(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
3345 #define MonthCal_GetFirstDayOfWeek(hmc) \
3346 (DWORD)SendMessageA(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
3347 #define MonthCal_GetRange(hmc, rgst) \
3348 (DWORD)SendMessageA(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
3349 #define MonthCal_SetRange(hmc, gd, rgst) \
3350 (BOOL)SendMessageA(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
3351 #define MonthCal_GetMonthDelta(hmc) \
3352 (int)SendMessageA(hmc, MCM_GETMONTHDELTA, 0, 0)
3353 #define MonthCal_SetMonthDelta(hmc, n) \
3354 (int)SendMessageA(hmc, MCM_SETMONTHDELTA, n, 0)
3355 #define MonthCal_GetMaxTodayWidth(hmc) \
3356 (DWORD)SendMessageA(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
3357 #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
3358 (BOOL)SendMessageA((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
3359 #define MonthCal_GetUnicodeFormat(hwnd) \
3360 (BOOL)SendMessageA((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
3363 /**************************************************************************
3364 * Date and time picker control
3367 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
3368 #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
3369 #define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
3371 #define DTM_FIRST 0x1000
3372 #define DTN_FIRST (0U-760U)
3373 #define DTN_LAST (0U-799U)
3376 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
3377 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
3378 #define DTM_GETRANGE (DTM_FIRST+3)
3379 #define DTM_SETRANGE (DTM_FIRST+4)
3380 #define DTM_SETFORMATA (DTM_FIRST+5)
3381 #define DTM_SETFORMATW (DTM_FIRST + 50)
3382 #define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
3383 #define DTM_SETMCCOLOR (DTM_FIRST+6)
3384 #define DTM_GETMCCOLOR (DTM_FIRST+7)
3385 #define DTM_GETMONTHCAL (DTM_FIRST+8)
3386 #define DTM_SETMCFONT (DTM_FIRST+9)
3387 #define DTM_GETMCFONT (DTM_FIRST+10)
3390 /* Datetime Notifications */
3392 #define DTN_DATETIMECHANGE (DTN_FIRST + 1)
3393 #define DTN_USERSTRINGA (DTN_FIRST + 2)
3394 #define DTN_WMKEYDOWNA (DTN_FIRST + 3)
3395 #define DTN_FORMATA (DTN_FIRST + 4)
3396 #define DTN_FORMATQUERYA (DTN_FIRST + 5)
3397 #define DTN_DROPDOWN (DTN_FIRST + 6)
3398 #define DTN_CLOSEUP (DTN_FIRST + 7)
3399 #define DTN_USERSTRINGW (DTN_FIRST + 15)
3400 #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
3401 #define DTN_FORMATW (DTN_FIRST + 17)
3402 #define DTN_FORMATQUERYW (DTN_FIRST + 18)
3405 #define DTS_SHORTDATEFORMAT 0x0000
3406 #define DTS_UPDOWN 0x0001
3407 #define DTS_SHOWNONE 0x0002
3408 #define DTS_LONGDATEFORMAT 0x0004
3409 #define DTS_TIMEFORMAT 0x0009
3410 #define DTS_APPCANPARSE 0x0010
3411 #define DTS_RIGHTALIGN 0x0020
3413 typedef struct tagNMDATETIMECHANGE
3415 NMHDR nmhdr;
3416 DWORD dwFlags;
3417 SYSTEMTIME st;
3418 } NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
3420 typedef struct tagNMDATETIMESTRINGA
3422 NMHDR nmhdr;
3423 LPCSTR pszUserString;
3424 SYSTEMTIME st;
3425 DWORD dwFlags;
3426 } NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;
3428 typedef struct tagNMDATETIMESTRINGW
3430 NMHDR nmhdr;
3431 LPCWSTR pszUserString;
3432 SYSTEMTIME st;
3433 DWORD dwFlags;
3434 } NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
3437 typedef struct tagNMDATETIMEWMKEYDOWNA
3439 NMHDR nmhdr;
3440 int nVirtKey;
3441 LPCSTR pszFormat;
3442 SYSTEMTIME st;
3443 } NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;
3445 typedef struct tagNMDATETIMEWMKEYDOWNW
3447 NMHDR nmhdr;
3448 int nVirtKey;
3449 LPCWSTR pszFormat;
3450 SYSTEMTIME st;
3451 } NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;
3455 typedef struct tagNMDATETIMEFORMATA
3457 NMHDR nmhdr;
3458 LPCSTR pszFormat;
3459 SYSTEMTIME st;
3460 LPCSTR pszDisplay;
3461 CHAR szDisplay[64];
3462 } NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;
3465 typedef struct tagNMDATETIMEFORMATW
3467 NMHDR nmhdr;
3468 LPCWSTR pszFormat;
3469 SYSTEMTIME st;
3470 LPCWSTR pszDisplay;
3471 WCHAR szDisplay[64];
3472 } NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;
3476 typedef struct tagNMDATETIMEFORMATQUERYA
3478 NMHDR nmhdr;
3479 LPCSTR pszFormat;
3480 SIZE szMax;
3481 } NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;
3483 typedef struct tagNMDATETIMEFORMATQUERYW
3485 NMHDR nmhdr;
3486 LPCWSTR pszFormat;
3487 SIZE szMax;
3488 } NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;
3491 #define NMDATETIMESTRING WINELIB_NAME_AW(NMDATETIMESTRING)
3492 #define NMDATETIMEWMKEYDOWN WINELIB_NAME_AW(NMDATETIMEWMKEYDOWN)
3493 #define NMDATETIMEFORMAT WINELIB_NAME_AW(NMDATETIMEFORMAT)
3494 #define NMDATETIMEFORMATQUERY WINELIB_NAME_AW(NMDATETIMEFORMATQUERY)
3500 #define GDT_ERROR -1
3501 #define GDT_VALID 0
3502 #define GDT_NONE 1
3504 #define GDTR_MIN 0x0001
3505 #define GDTR_MAX 0x0002
3508 #define DateTime_GetSystemtime(hdp, pst) \
3509 (DWORD)SendMessageA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
3510 #define DateTime_SetSystemtime(hdp, gd, pst) \
3511 (BOOL)SendMessageA (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
3512 #define DateTime_GetRange(hdp, rgst) \
3513 (DWORD)SendMessageA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
3514 #define DateTime_SetRange(hdp, gd, rgst) \
3515 (BOOL)SendMessageA (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
3516 #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
3517 #define DateTime_SetFormatA(hdp, sz) \
3518 (BOOL)SendMessageA (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
3519 #define DateTime_SetFormatW(hdp, sz) \
3520 (BOOL)SendMessageW (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
3521 #define DateTime_GetMonthCalColor(hdp, iColor) \
3522 SendMessageA (hdp, DTM_GETMCCOLOR, iColor, 0)
3523 #define DateTime_GetMonthCal(hdp) \
3524 (HWND) SendMessageA (hdp, DTM_GETMONTHCAL, 0, 0)
3525 #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \
3526 SendMessageA (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
3527 #define DateTime_GetMonthCalFont(hdp) \
3528 SendMessageA (hdp, DTM_GETMCFONT, 0, 0)
3535 /**************************************************************************
3536 * UNDOCUMENTED functions
3539 /* private heap memory functions */
3541 LPVOID WINAPI COMCTL32_Alloc (DWORD);
3542 LPVOID WINAPI COMCTL32_ReAlloc (LPVOID, DWORD);
3543 BOOL WINAPI COMCTL32_Free (LPVOID);
3544 DWORD WINAPI COMCTL32_GetSize (LPVOID);
3547 INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
3548 BOOL WINAPI Str_SetPtrA (LPSTR *, LPCSTR);
3549 INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
3550 BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
3551 #define Str_GetPtr WINELIB_NAME_AW(Str_GetPtr)
3552 #define Str_SetPtr WINELIB_NAME_AW(Str_SetPtr)
3555 /* Dynamic Storage Array */
3557 typedef struct _DSA
3559 INT nItemCount;
3560 LPVOID pData;
3561 INT nMaxCount;
3562 INT nItemSize;
3563 INT nGrow;
3564 } DSA, *HDSA;
3566 HDSA WINAPI DSA_Create (INT, INT);
3567 BOOL WINAPI DSA_DeleteAllItems (const HDSA);
3568 INT WINAPI DSA_DeleteItem (const HDSA, INT);
3569 BOOL WINAPI DSA_Destroy (const HDSA);
3570 BOOL WINAPI DSA_GetItem (const HDSA, INT, LPVOID);
3571 LPVOID WINAPI DSA_GetItemPtr (const HDSA, INT);
3572 INT WINAPI DSA_InsertItem (const HDSA, INT, LPVOID);
3573 BOOL WINAPI DSA_SetItem (const HDSA, INT, LPVOID);
3575 typedef INT (CALLBACK *DSAENUMPROC)(LPVOID, DWORD);
3576 VOID WINAPI DSA_EnumCallback (const HDSA, DSAENUMPROC, LPARAM);
3577 BOOL WINAPI DSA_DestroyCallback (const HDSA, DSAENUMPROC, LPARAM);
3580 /* Dynamic Pointer Array */
3582 typedef struct _DPA
3584 INT nItemCount;
3585 LPVOID *ptrs;
3586 HANDLE hHeap;
3587 INT nGrow;
3588 INT nMaxCount;
3589 } DPA, *HDPA;
3591 HDPA WINAPI DPA_Create (INT);
3592 HDPA WINAPI DPA_CreateEx (INT, HANDLE);
3593 BOOL WINAPI DPA_Destroy (const HDPA);
3594 HDPA WINAPI DPA_Clone (const HDPA, const HDPA);
3595 LPVOID WINAPI DPA_GetPtr (const HDPA, INT);
3596 INT WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);
3597 BOOL WINAPI DPA_Grow (const HDPA, INT);
3598 BOOL WINAPI DPA_SetPtr (const HDPA, INT, LPVOID);
3599 INT WINAPI DPA_InsertPtr (const HDPA, INT, LPVOID);
3600 LPVOID WINAPI DPA_DeletePtr (const HDPA, INT);
3601 BOOL WINAPI DPA_DeleteAllPtrs (const HDPA);
3603 typedef INT (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
3604 BOOL WINAPI DPA_Sort (const HDPA, PFNDPACOMPARE, LPARAM);
3606 #define DPAS_SORTED 0x0001
3607 #define DPAS_INSERTBEFORE 0x0002
3608 #define DPAS_INSERTAFTER 0x0004
3610 INT WINAPI DPA_Search (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
3612 #define DPAM_SORT 0x0001
3614 typedef PVOID(CALLBACK *PFNDPAMERGE)(DWORD,PVOID,PVOID,LPARAM);
3615 BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
3617 typedef INT (CALLBACK *DPAENUMPROC)(LPVOID, DWORD);
3618 VOID WINAPI DPA_EnumCallback (const HDPA, DPAENUMPROC, LPARAM);
3619 BOOL WINAPI DPA_DestroyCallback (const HDPA, DPAENUMPROC, LPARAM);
3622 #define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
3623 #define DPA_GetPtrPtr(hdpa) (*((LPVOID**)((BYTE*)(hdpa)+sizeof(INT))))
3624 #define DPA_FastGetPtr(hdpa,i) (DPA_GetPtrPtr(hdpa)[i])
3627 /* notification helper functions */
3629 LRESULT WINAPI COMCTL32_SendNotify (HWND, HWND, UINT, LPNMHDR);
3631 /* type and functionality of last parameter is still unknown */
3632 LRESULT WINAPI COMCTL32_SendNotifyEx (HWND, HWND, UINT, LPNMHDR, DWORD);
3634 #ifdef __cplusplus
3636 #endif
3638 #endif /* __WINE_COMMCTRL_H */