Check if the window is managed before trying to give it focus.
[wine/hacks.git] / include / commctrl.h
blob5795383f06406be735ec543ffea8f8838fa3bc63
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 "winuser.h"
11 #include "imagelist.h"
12 #include "prsht.h"
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
18 BOOL WINAPI ShowHideMenuCtl (HWND, UINT, LPINT);
19 VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, LPINT);
20 VOID WINAPI InitCommonControls (VOID);
22 typedef struct tagINITCOMMONCONTROLSEX {
23 DWORD dwSize;
24 DWORD dwICC;
25 } INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
27 BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
29 #define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
30 #define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
31 #define ICC_BAR_CLASSES 0x00000004 /* toolbar, statusbar, trackbar, tooltips */
32 #define ICC_TAB_CLASSES 0x00000008 /* tab, tooltips */
33 #define ICC_UPDOWN_CLASS 0x00000010 /* updown */
34 #define ICC_PROGRESS_CLASS 0x00000020 /* progress */
35 #define ICC_HOTKEY_CLASS 0x00000040 /* hotkey */
36 #define ICC_ANIMATE_CLASS 0x00000080 /* animate */
37 #define ICC_WIN95_CLASSES 0x000000FF
38 #define ICC_DATE_CLASSES 0x00000100 /* month picker, date picker, time picker, updown */
39 #define ICC_USEREX_CLASSES 0x00000200 /* comboex */
40 #define ICC_COOL_CLASSES 0x00000400 /* rebar (coolbar) */
41 #define ICC_INTERNET_CLASSES 0x00000800 /* IP address, ... */
42 #define ICC_PAGESCROLLER_CLASS 0x00001000 /* page scroller */
43 #define ICC_NATIVEFNTCTL_CLASS 0x00002000 /* native font control ???*/
46 /* common control styles */
47 #define CCS_TOP 0x00000001L
48 #define CCS_NOMOVEY 0x00000002L
49 #define CCS_BOTTOM 0x00000003L
50 #define CCS_NORESIZE 0x00000004L
51 #define CCS_NOPARENTALIGN 0x00000008L
52 #define CCS_ADJUSTABLE 0x00000020L
53 #define CCS_NODIVIDER 0x00000040L
54 #define CCS_VERT 0x00000080L
55 #define CCS_LEFT (CCS_VERT|CCS_TOP)
56 #define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
57 #define CCS_NOMOVEX (CCS_VERT|CCS_NOMOVEY)
60 /* common control shared messages */
61 #define CCM_FIRST 0x2000
63 #define CCM_SETBKCOLOR (CCM_FIRST+1) /* lParam = bkColor */
64 #define CCM_SETCOLORSCHEME (CCM_FIRST+2)
65 #define CCM_GETCOLORSCHEME (CCM_FIRST+3)
66 #define CCM_GETDROPTARGET (CCM_FIRST+4)
67 #define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
68 #define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
71 /* common notification codes (WM_NOTIFY)*/
72 #define NM_FIRST (0U- 0U)
73 #define NM_LAST (0U- 99U)
74 #define NM_OUTOFMEMORY (NM_FIRST-1)
75 #define NM_CLICK (NM_FIRST-2)
76 #define NM_DBLCLK (NM_FIRST-3)
77 #define NM_RETURN (NM_FIRST-4)
78 #define NM_RCLICK (NM_FIRST-5)
79 #define NM_RDBLCLK (NM_FIRST-6)
80 #define NM_SETFOCUS (NM_FIRST-7)
81 #define NM_KILLFOCUS (NM_FIRST-8)
82 #define NM_CUSTOMDRAW (NM_FIRST-12)
83 #define NM_HOVER (NM_FIRST-13)
84 #define NM_NCHITTEST (NM_FIRST-14)
85 #define NM_KEYDOWN (NM_FIRST-15)
86 #define NM_RELEASEDCAPTURE (NM_FIRST-16)
87 #define NM_SETCURSOR (NM_FIRST-17)
88 #define NM_CHAR (NM_FIRST-18)
89 #define NM_TOOLTIPSCREATED (NM_FIRST-19)
90 #define NM_UPDOWN NMUPDOWN
92 /* callback constants */
93 #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
94 #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
95 #define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
97 #define I_IMAGECALLBACK (-1)
98 #define I_INDENTCALLBACK (-1)
99 #define I_CHILDRENCALLBACK (-1)
102 /* owner drawn types */
103 #define ODT_HEADER 100
104 #define ODT_TAB 101
105 #define ODT_LISTVIEW 102
107 /* common notification structures */
108 typedef struct tagNMTOOLTIPSCREATED
110 NMHDR hdr;
111 HWND hwndToolTips;
112 } NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;
115 #ifndef CCSIZEOF_STRUCT
116 #define CCSIZEOF_STRUCT(name, member) \
117 (((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
118 sizeof(((name*)0)->member))
119 #endif
122 /* This is only for Winelib applications. DON't use it wine itself!!! */
123 #define SNDMSG WINELIB_NAME_AW(SendMessage)
127 /* Custom Draw messages */
129 #define CDRF_DODEFAULT 0x0
130 #define CDRF_NEWFONT 0x00000002
131 #define CDRF_SKIPDEFAULT 0x00000004
132 #define CDRF_NOTIFYPOSTPAINT 0x00000010
133 #define CDRF_NOTIFYITEMDRAW 0x00000020
134 #define CDRF_NOTIFYSUBITEMDRAW 0x00000020
135 #define CDRF_NOTIFYPOSTERASE 0x00000040
136 #define CDRF_NOTIFYITEMERASE 0x00000080 /* obsolete ??? */
139 /* drawstage flags */
141 #define CDDS_PREPAINT 1
142 #define CDDS_POSTPAINT 2
143 #define CDDS_PREERASE 3
144 #define CDDS_POSTERASE 4
146 #define CDDS_ITEM 0x00010000
147 #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
148 #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
149 #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
150 #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
151 #define CDDS_SUBITEM 0x00020000
153 /* itemState flags */
155 #define CDIS_SELECTED 0x0001
156 #define CDIS_GRAYED 0x0002
157 #define CDIS_DISABLED 0x0004
158 #define CDIS_CHECKED 0x0008
159 #define CDIS_FOCUS 0x0010
160 #define CDIS_DEFAULT 0x0020
161 #define CDIS_HOT 0x0040
162 #define CDIS_MARKED 0x0080
163 #define CDIS_INDETERMINATE 0x0100
166 typedef struct tagNMCUSTOMDRAWINFO
168 NMHDR hdr;
169 DWORD dwDrawStage;
170 HDC hdc;
171 RECT rc;
172 DWORD dwItemSpec;
173 UINT uItemState;
174 LPARAM lItemlParam;
175 } NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
177 typedef struct tagNMTTCUSTOMDRAW
179 NMCUSTOMDRAW nmcd;
180 UINT uDrawFlags;
181 } NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
186 /* StatusWindow */
188 #define STATUSCLASSNAME16 "msctls_statusbar"
189 #define STATUSCLASSNAMEA "msctls_statusbar32"
190 /* Does not work. gcc creates 4 byte wide strings.
191 * #define STATUSCLASSNAME32W L"msctls_statusbar32"
193 static const WCHAR _scn32w[] = {
194 'm','s','c','t','l','s','_','s','t','a','t','u','s','b','a','r','3','2',0
196 #define STATUSCLASSNAMEW _scn32w
197 #define STATUSCLASSNAME WINELIB_NAME_AW(STATUSCLASSNAME)
199 #define SBT_NOBORDERS 0x0100
200 #define SBT_POPOUT 0x0200
201 #define SBT_RTLREADING 0x0400 /* not supported */
202 #define SBT_TOOLTIPS 0x0800
203 #define SBT_OWNERDRAW 0x1000
205 #define SBARS_SIZEGRIP 0x0100
207 #define SB_SETTEXTA (WM_USER+1)
208 #define SB_SETTEXTW (WM_USER+11)
209 #define SB_SETTEXT WINELIB_NAME_AW(SB_SETTEXT)
210 #define SB_GETTEXTA (WM_USER+2)
211 #define SB_GETTEXTW (WM_USER+13)
212 #define SB_GETTEXT WINELIB_NAME_AW(SB_GETTEXT)
213 #define SB_GETTEXTLENGTHA (WM_USER+3)
214 #define SB_GETTEXTLENGTHW (WM_USER+12)
215 #define SB_GETTEXTLENGTH WINELIB_NAME_AW(SB_GETTEXTLENGTH)
216 #define SB_SETPARTS (WM_USER+4)
217 #define SB_GETPARTS (WM_USER+6)
218 #define SB_GETBORDERS (WM_USER+7)
219 #define SB_SETMINHEIGHT (WM_USER+8)
220 #define SB_SIMPLE (WM_USER+9)
221 #define SB_GETRECT (WM_USER+10)
222 #define SB_ISSIMPLE (WM_USER+14)
223 #define SB_SETICON (WM_USER+15)
224 #define SB_SETTIPTEXTA (WM_USER+16)
225 #define SB_SETTIPTEXTW (WM_USER+17)
226 #define SB_SETTIPTEXT WINELIB_NAME_AW(SB_SETTIPTEXT)
227 #define SB_GETTIPTEXTA (WM_USER+18)
228 #define SB_GETTIPTEXTW (WM_USER+19)
229 #define SB_GETTIPTEXT WINELIB_NAME_AW(SB_GETTIPTEXT)
230 #define SB_GETICON (WM_USER+20)
231 #define SB_SETBKCOLOR CCM_SETBKCOLOR /* lParam = bkColor */
232 #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
233 #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
235 #define SBN_FIRST (0U-880U)
236 #define SBN_LAST (0U-899U)
237 #define SBN_SIMPLEMODECHANGE (SBN_FIRST-0)
239 HWND WINAPI CreateStatusWindowA (INT, LPCSTR, HWND, UINT);
240 HWND WINAPI CreateStatusWindowW (INT, LPCWSTR, HWND, UINT);
241 #define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
242 VOID WINAPI DrawStatusTextA (HDC, LPRECT, LPCSTR, UINT);
243 VOID WINAPI DrawStatusTextW (HDC, LPRECT, LPCWSTR, UINT);
244 #define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
245 VOID WINAPI MenuHelp (UINT, WPARAM, LPARAM, HMENU,
246 HINSTANCE, HWND, LPUINT);
248 /**************************************************************************
249 * Drag List control
252 typedef struct tagDRAGLISTINFO
254 UINT uNotification;
255 HWND hWnd;
256 POINT ptCursor;
257 } DRAGLISTINFO, *LPDRAGLISTINFO;
259 #define DL_BEGINDRAG (WM_USER+133)
260 #define DL_DRAGGING (WM_USER+134)
261 #define DL_DROPPED (WM_USER+135)
262 #define DL_CANCELDRAG (WM_USER+136)
264 #define DL_CURSORSET 0
265 #define DL_STOPCURSOR 1
266 #define DL_COPYCURSOR 2
267 #define DL_MOVECURSOR 3
269 #define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
271 BOOL WINAPI MakeDragList (HWND);
272 VOID WINAPI DrawInsert (HWND, HWND, INT);
273 INT WINAPI LBItemFromPt (HWND, POINT, BOOL);
276 /* UpDown */
278 #define UPDOWN_CLASS16 "msctls_updown"
279 #define UPDOWN_CLASSA "msctls_updown32"
280 #define UPDOWN_CLASSW L"msctls_updown32"
281 #define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
283 typedef struct tagUDACCEL
285 UINT nSec;
286 UINT nInc;
287 } UDACCEL;
289 #define UD_MAXVAL 0x7fff
290 #define UD_MINVAL 0x8001
292 #define UDS_WRAP 0x0001
293 #define UDS_SETBUDDYINT 0x0002
294 #define UDS_ALIGNRIGHT 0x0004
295 #define UDS_ALIGNLEFT 0x0008
296 #define UDS_AUTOBUDDY 0x0010
297 #define UDS_ARROWKEYS 0x0020
298 #define UDS_HORZ 0x0040
299 #define UDS_NOTHOUSANDS 0x0080
301 #define UDN_FIRST (0U-721)
302 #define UDN_LAST (0U-740)
303 #define UDN_DELTAPOS (UDN_FIRST-1)
305 #define UDM_SETRANGE (WM_USER+101)
306 #define UDM_GETRANGE (WM_USER+102)
307 #define UDM_SETPOS (WM_USER+103)
308 #define UDM_GETPOS (WM_USER+104)
309 #define UDM_SETBUDDY (WM_USER+105)
310 #define UDM_GETBUDDY (WM_USER+106)
311 #define UDM_SETACCEL (WM_USER+107)
312 #define UDM_GETACCEL (WM_USER+108)
313 #define UDM_SETBASE (WM_USER+109)
314 #define UDM_GETBASE (WM_USER+110)
315 #define UDM_SETRANGE32 (WM_USER+111)
316 #define UDM_GETRANGE32 (WM_USER+112)
318 HWND WINAPI CreateUpDownControl (DWORD, INT, INT, INT, INT,
319 HWND, INT, HINSTANCE, HWND,
320 INT, INT, INT);
322 /* Progress Bar */
324 #define PROGRESS_CLASSA "msctls_progress32"
325 #define PROGRESS_CLASSW L"msctls_progress32"
326 #define PROGRESS_CLASS16 "msctls_progress"
327 #define PROGRESS_CLASS WINELIB_NAME_AW(PROGRESS_CLASS)
329 #define PBM_SETRANGE (WM_USER+1)
330 #define PBM_SETPOS (WM_USER+2)
331 #define PBM_DELTAPOS (WM_USER+3)
332 #define PBM_SETSTEP (WM_USER+4)
333 #define PBM_STEPIT (WM_USER+5)
334 #define PBM_SETRANGE32 (WM_USER+6)
335 #define PBM_GETRANGE (WM_USER+7)
336 #define PBM_GETPOS (WM_USER+8)
337 #define PBM_SETBARCOLOR (WM_USER+9)
338 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
340 #define PBS_SMOOTH 0x01
341 #define PBS_VERTICAL 0x04
343 typedef struct
345 INT iLow;
346 INT iHigh;
347 } PBRANGE, *PPBRANGE;
350 /* ImageList */
352 #if !defined(__WINE__) || !defined(__WINE_IMAGELIST_C)
353 struct _IMAGELIST;
354 typedef struct _IMAGELIST *HIMAGELIST;
355 #endif */ /* __WINE__ */
357 #define CLR_NONE 0xFFFFFFFF
358 #define CLR_DEFAULT 0xFF000000
359 #define CLR_HILIGHT CLR_DEFAULT
361 #define ILC_MASK 0x0001
362 #define ILC_COLOR 0x0000
363 #define ILC_COLORDDB 0x00FE
364 #define ILC_COLOR4 0x0004
365 #define ILC_COLOR8 0x0008
366 #define ILC_COLOR16 0x0010
367 #define ILC_COLOR24 0x0018
368 #define ILC_COLOR32 0x0020
369 #define ILC_PALETTE 0x0800 /* no longer supported by M$ */
371 #define ILD_NORMAL 0x0000
372 #define ILD_TRANSPARENT 0x0001
373 #define ILD_BLEND25 0x0002
374 #define ILD_BLEND50 0x0004
375 #define ILD_MASK 0x0010
376 #define ILD_IMAGE 0x0020
377 #define ILD_ROP 0x0040
378 #define ILD_OVERLAYMASK 0x0F00
380 #define ILD_SELECTED ILD_BLEND50
381 #define ILD_FOCUS ILD_BLEND25
382 #define ILD_BLEND ILD_BLEND50
384 #define INDEXTOOVERLAYMASK(i) ((i)<<8)
386 #define ILCF_MOVE (0x00000000)
387 #define ILCF_SWAP (0x00000001)
390 typedef struct _IMAGEINFO
392 HBITMAP hbmImage;
393 HBITMAP hbmMask;
394 INT Unused1;
395 INT Unused2;
396 RECT rcImage;
397 } IMAGEINFO;
400 typedef struct _IMAGELISTDRAWPARAMS
402 DWORD cbSize;
403 HIMAGELIST himl;
404 INT i;
405 HDC hdcDst;
406 INT x;
407 INT y;
408 INT cx;
409 INT cy;
410 INT xBitmap; /* x offest from the upperleft of bitmap */
411 INT yBitmap; /* y offset from the upperleft of bitmap */
412 COLORREF rgbBk;
413 COLORREF rgbFg;
414 UINT fStyle;
415 DWORD dwRop;
416 } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
419 INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
420 INT WINAPI ImageList_AddIcon (HIMAGELIST, HICON);
421 INT WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
422 BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT);
423 BOOL WINAPI ImageList_Copy(HIMAGELIST,INT,HIMAGELIST,INT,INT);
424 HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
425 BOOL WINAPI ImageList_Destroy(HIMAGELIST);
426 BOOL WINAPI ImageList_DragEnter(HWND,INT,INT);
427 BOOL WINAPI ImageList_DragLeave(HWND);
428 BOOL WINAPI ImageList_DragMove(INT,INT);
429 BOOL WINAPI ImageList_DragShowNolock (BOOL);
430 BOOL WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
431 BOOL WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
432 INT,COLORREF,COLORREF,UINT);
433 BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
434 HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
435 BOOL WINAPI ImageList_EndDrag(VOID);
436 COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
437 HIMAGELIST WINAPI ImageList_GetDragImage(POINT*,POINT*);
438 HICON WINAPI ImageList_GetIcon(HIMAGELIST,INT,UINT);
439 BOOL WINAPI ImageList_GetIconSize(HIMAGELIST,INT*,INT*);
440 INT WINAPI ImageList_GetImageCount(HIMAGELIST);
441 BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST,INT,IMAGEINFO*);
442 BOOL WINAPI ImageList_GetImageRect(HIMAGELIST,INT,LPRECT);
443 HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,INT,INT,
444 COLORREF,UINT,UINT);
445 HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,INT,INT,
446 COLORREF,UINT,UINT);
447 #define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
448 HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
449 #ifdef __IStream_INTREFACE_DEFINED__
450 HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
451 #endif
452 BOOL WINAPI ImageList_Remove(HIMAGELIST,INT);
453 BOOL WINAPI ImageList_Replace(HIMAGELIST,INT,HBITMAP,HBITMAP);
454 INT WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT,HICON);
455 COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
456 BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT,INT,INT);
458 BOOL WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
459 BOOL WINAPI ImageList_SetImageCount(HIMAGELIST,INT);
460 BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
461 #ifdef __IStream_INTREFACE_DEFINED__
462 BOOL WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
463 #endif
465 #ifndef __WINE__
466 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
467 #endif
468 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
469 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
470 ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
471 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
474 /* Flat Scrollbar control */
476 #define FLATSB_CLASS16 "flatsb_class"
477 #define FLATSB_CLASSA "flatsb_class32"
478 #define FLATSB_CLASSW L"flatsb_class32"
479 #define FLATSB_CLASS WINELIB_NAME_AW(FLATSB_CLASS)
481 #define WSB_PROP_CYVSCROLL 0x00000001L
482 #define WSB_PROP_CXHSCROLL 0x00000002L
483 #define WSB_PROP_CYHSCROLL 0x00000004L
484 #define WSB_PROP_CXVSCROLL 0x00000008L
485 #define WSB_PROP_CXHTHUMB 0x00000010L
486 #define WSB_PROP_CYVTHUMB 0x00000020L
487 #define WSB_PROP_VBKGCOLOR 0x00000040L
488 #define WSB_PROP_HBKGCOLOR 0x00000080L
489 #define WSB_PROP_VSTYLE 0x00000100L
490 #define WSB_PROP_HSTYLE 0x00000200L
491 #define WSB_PROP_WINSTYLE 0x00000400L
492 #define WSB_PROP_PALETTE 0x00000800L
493 #define WSB_PROP_MASK 0x00000FFFL
495 #define FSB_REGULAR_MODE 0
496 #define FSB_ENCARTA_MODE 1
497 #define FSB_FLAT_MODE 2
500 BOOL WINAPI FlatSB_EnableScrollBar(HWND, INT, UINT);
501 BOOL WINAPI FlatSB_ShowScrollBar(HWND, INT, BOOL);
502 BOOL WINAPI FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
503 BOOL WINAPI FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
504 INT WINAPI FlatSB_GetScrollPos(HWND, INT);
505 BOOL WINAPI FlatSB_GetScrollProp(HWND, INT, LPINT);
506 INT WINAPI FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
507 INT WINAPI FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
508 INT WINAPI FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
509 BOOL WINAPI FlatSB_SetScrollProp(HWND, UINT, INT, BOOL);
510 BOOL WINAPI InitializeFlatSB(HWND);
511 HRESULT WINAPI UninitializeFlatSB(HWND);
514 /* Header control */
516 #define WC_HEADER16 "SysHeader"
517 #define WC_HEADERA "SysHeader32"
518 #define WC_HEADERW L"SysHeader32"
519 #define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
521 #define HDS_HORZ 0x0000
522 #define HDS_BUTTONS 0x0002
523 #define HDS_HOTTRACK 0x0004
524 #define HDS_HIDDEN 0x0008
525 #define HDS_DRAGDROP 0x0040
526 #define HDS_FULLDRAG 0x0080
528 #define HDI_WIDTH 0x0001
529 #define HDI_HEIGHT HDI_WIDTH
530 #define HDI_TEXT 0x0002
531 #define HDI_FORMAT 0x0004
532 #define HDI_LPARAM 0x0008
533 #define HDI_BITMAP 0x0010
534 #define HDI_IMAGE 0x0020
535 #define HDI_DI_SETITEM 0x0040
536 #define HDI_ORDER 0x0080
538 #define HDF_LEFT 0x0000
539 #define HDF_RIGHT 0x0001
540 #define HDF_CENTER 0x0002
541 #define HDF_JUSTIFYMASK 0x0003
543 #define HDF_IMAGE 0x0800
544 #define HDF_BITMAP_ON_RIGHT 0x1000
545 #define HDF_BITMAP 0x2000
546 #define HDF_STRING 0x4000
547 #define HDF_OWNERDRAW 0x8000
549 #define HHT_NOWHERE 0x0001
550 #define HHT_ONHEADER 0x0002
551 #define HHT_ONDIVIDER 0x0004
552 #define HHT_ONDIVOPEN 0x0008
553 #define HHT_ABOVE 0x0100
554 #define HHT_BELOW 0x0200
555 #define HHT_TORIGHT 0x0400
556 #define HHT_TOLEFT 0x0800
558 #define HDM_FIRST 0x1200
559 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
560 #define HDM_INSERTITEMA (HDM_FIRST+1)
561 #define HDM_INSERTITEMW (HDM_FIRST+10)
562 #define HDM_INSERTITEM WINELIB_NAME_AW(HDM_INSERTITEM)
563 #define HDM_DELETEITEM (HDM_FIRST+2)
564 #define HDM_GETITEMA (HDM_FIRST+3)
565 #define HDM_GETITEMW (HDM_FIRST+11)
566 #define HDM_GETITEM WINELIB_NAME_AW(HDM_GETITEM)
567 #define HDM_SETITEMA (HDM_FIRST+4)
568 #define HDM_SETITEMW (HDM_FIRST+12)
569 #define HDM_SETITEM WINELIB_NAME_AW(HDM_SETITEM)
570 #define HDM_LAYOUT (HDM_FIRST+5)
571 #define HDM_HITTEST (HDM_FIRST+6)
572 #define HDM_GETITEMRECT (HDM_FIRST+7)
573 #define HDM_SETIMAGELIST (HDM_FIRST+8)
574 #define HDM_GETIMAGELIST (HDM_FIRST+9)
576 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
577 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
578 #define HDM_GETORDERARRAY (HDM_FIRST+17)
579 #define HDM_SETORDERARRAY (HDM_FIRST+18)
580 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
581 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
582 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
584 #define HDN_FIRST (0U-300U)
585 #define HDN_LAST (0U-399U)
586 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
587 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
588 #define HDN_ITEMCHANGING WINELIB_NAME_AW(HDN_ITEMCHANGING)
589 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
590 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
591 #define HDN_ITEMCHANGED WINELIB_NAME_AW(HDN_ITEMCHANGED)
592 #define HDN_ITEMCLICKA (HDN_FIRST-2)
593 #define HDN_ITEMCLICKW (HDN_FIRST-22)
594 #define HDN_ITEMCLICK WINELIB_NAME_AW(HDN_ITEMCLICK)
595 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
596 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
597 #define HDN_ITEMDBLCLICK WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
598 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
599 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
600 #define HDN_DIVIDERDBLCLICK WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
601 #define HDN_BEGINTRACKA (HDN_FIRST-6)
602 #define HDN_BEGINTRACKW (HDN_FIRST-26)
603 #define HDN_BEGINTRACK WINELIB_NAME_AW(HDN_BEGINTRACK)
604 #define HDN_ENDTRACKA (HDN_FIRST-7)
605 #define HDN_ENDTRACKW (HDN_FIRST-27)
606 #define HDN_ENDTRACK WINELIB_NAME_AW(HDN_ENDTRACK)
607 #define HDN_TRACKA (HDN_FIRST-8)
608 #define HDN_TRACKW (HDN_FIRST-28)
609 #define HDN_TRACK WINELIB_NAME_AW(HDN_TRACK)
610 #define HDN_GETDISPINFOA (HDN_FIRST-9)
611 #define HDN_GETDISPINFOW (HDN_FIRST-29)
612 #define HDN_GETDISPINFO WINELIB_NAME_AW(HDN_GETDISPINFO)
613 #define HDN_BEGINDRACK (HDN_FIRST-10)
614 #define HDN_ENDDRACK (HDN_FIRST-11)
616 typedef struct _HD_LAYOUT
618 RECT *prc;
619 WINDOWPOS *pwpos;
620 } HDLAYOUT, *LPHDLAYOUT;
622 #define HD_LAYOUT HDLAYOUT
624 typedef struct _HD_ITEMA
626 UINT mask;
627 INT cxy;
628 LPSTR pszText;
629 HBITMAP hbm;
630 INT cchTextMax;
631 INT fmt;
632 LPARAM lParam;
633 INT iImage;
634 INT iOrder;
635 } HDITEMA, *LPHDITEMA;
637 typedef struct _HD_ITEMW
639 UINT mask;
640 INT cxy;
641 LPWSTR pszText;
642 HBITMAP hbm;
643 INT cchTextMax;
644 INT fmt;
645 LPARAM lParam;
646 INT iImage;
647 INT iOrder;
648 } HDITEMW, *LPHDITEMW;
650 #define HDITEM WINELIB_NAME_AW(HDITEM)
651 #define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
652 #define HD_ITEM HDITEM
654 #define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
655 #define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
656 #define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
658 typedef struct _HD_HITTESTINFO
660 POINT pt;
661 UINT flags;
662 INT iItem;
663 } HDHITTESTINFO, *LPHDHITTESTINFO;
665 #define HD_HITTESTINFO HDHITTESTINFO
667 typedef struct tagNMHEADERA
669 NMHDR hdr;
670 INT iItem;
671 INT iButton;
672 HDITEMA *pitem;
673 } NMHEADERA, *LPNMHEADERA;
675 typedef struct tagNMHEADERW
677 NMHDR hdr;
678 INT iItem;
679 INT iButton;
680 HDITEMW *pitem;
681 } NMHEADERW, *LPNMHEADERW;
683 #define NMHEADER WINELIB_NAME_AW(NMHEADER)
684 #define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
685 #define HD_NOTIFY NMHEADER
687 typedef struct tagNMHDDISPINFOA
689 NMHDR hdr;
690 INT iItem;
691 UINT mask;
692 LPSTR pszText;
693 INT cchTextMax;
694 INT iImage;
695 LPARAM lParam;
696 } NMHDDISPINFOA, *LPNMHDDISPINFOA;
698 typedef struct tagNMHDDISPINFOW
700 NMHDR hdr;
701 INT iItem;
702 UINT mask;
703 LPWSTR pszText;
704 INT cchTextMax;
705 INT iImage;
706 LPARAM lParam;
707 } NMHDDISPINFOW, *LPNMHDDISPINFOW;
709 #define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
710 #define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
712 #define Header_GetItemCount(hwndHD) \
713 (INT)SendMessageA((hwndHD),HDM_GETITEMCOUNT,0,0L)
714 #define Header_InsertItemA(hwndHD,i,phdi) \
715 (INT)SendMessageA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
716 #define Header_InsertItemW(hwndHD,i,phdi) \
717 (INT)SendMessageW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
718 #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
719 #define Header_DeleteItem(hwndHD,i) \
720 (BOOL)SendMessageA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
721 #define Header_GetItemA(hwndHD,i,phdi) \
722 (BOOL)SendMessageA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
723 #define Header_GetItemW(hwndHD,i,phdi) \
724 (BOOL)SendMessageW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
725 #define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
726 #define Header_SetItemA(hwndHD,i,phdi) \
727 (BOOL)SendMessageA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
728 #define Header_SetItemW(hwndHD,i,phdi) \
729 (BOOL)SendMessageW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
730 #define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
731 #define Header_Layout(hwndHD,playout) \
732 (BOOL)SendMessageA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
733 #define Header_GetItemRect(hwnd,iItem,lprc) \
734 (BOOL)SendMessageA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
735 #define Header_SetImageList(hwnd,himl) \
736 (HIMAGELIST)SendMessageA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
737 #define Header_GetImageList(hwnd) \
738 (HIMAGELIST)SendMessageA((hwnd),HDM_GETIMAGELIST,0,0)
739 #define Header_OrderToIndex(hwnd,i) \
740 (INT)SendMessageA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
741 #define Header_CreateDragImage(hwnd,i) \
742 (HIMAGELIST)SendMessageA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
743 #define Header_GetOrderArray(hwnd,iCount,lpi) \
744 (BOOL)SendMessageA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
745 #define Header_SetOrderArray(hwnd,iCount,lpi) \
746 (BOOL)SendMessageA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
747 #define Header_SetHotDivider(hwnd,fPos,dw) \
748 (INT)SendMessageA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
749 #define Header_SetUnicodeFormat(hwnd,fUnicode) \
750 (BOOL)SendMessageA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
751 #define Header_GetUnicodeFormat(hwnd) \
752 (BOOL)SendMessageA((hwnd),HDM_GETUNICODEFORMAT,0,0)
755 /* Toolbar */
757 #define TOOLBARCLASSNAME16 "ToolbarWindow"
758 #define TOOLBARCLASSNAMEW "ToolbarWindow32"
759 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
760 #define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
762 #define CMB_MASKED 0x02
764 #define TBSTATE_CHECKED 0x01
765 #define TBSTATE_PRESSED 0x02
766 #define TBSTATE_ENABLED 0x04
767 #define TBSTATE_HIDDEN 0x08
768 #define TBSTATE_INDETERMINATE 0x10
769 #define TBSTATE_WRAP 0x20
770 #define TBSTATE_ELLIPSES 0x40
771 #define TBSTATE_MARKED 0x80
773 #define TBSTYLE_BUTTON 0x00
774 #define TBSTYLE_SEP 0x01
775 #define TBSTYLE_CHECK 0x02
776 #define TBSTYLE_GROUP 0x04
777 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
778 #define TBSTYLE_DROPDOWN 0x08
780 #define TBSTYLE_TOOLTIPS 0x0100
781 #define TBSTYLE_WRAPABLE 0x0200
782 #define TBSTYLE_ALTDRAG 0x0400
783 #define TBSTYLE_FLAT 0x0800
784 #define TBSTYLE_LIST 0x1000
785 #define TBSTYLE_CUSTOMERASE 0x2000
787 #define TBIF_IMAGE 0x00000001
788 #define TBIF_TEXT 0x00000002
789 #define TBIF_STATE 0x00000004
790 #define TBIF_STYLE 0x00000008
791 #define TBIF_LPARAM 0x00000010
792 #define TBIF_COMMAND 0x00000020
793 #define TBIF_SIZE 0x00000040
795 #define TBBF_LARGE 0x0001
797 #define TB_ENABLEBUTTON (WM_USER+1)
798 #define TB_CHECKBUTTON (WM_USER+2)
799 #define TB_PRESSBUTTON (WM_USER+3)
800 #define TB_HIDEBUTTON (WM_USER+4)
801 #define TB_INDETERMINATE (WM_USER+5)
802 #define TB_ISBUTTONENABLED (WM_USER+9)
803 #define TB_ISBUTTONCHECKED (WM_USER+10)
804 #define TB_ISBUTTONPRESSED (WM_USER+11)
805 #define TB_ISBUTTONHIDDEN (WM_USER+12)
806 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
807 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
808 #define TB_SETSTATE (WM_USER+17)
809 #define TB_GETSTATE (WM_USER+18)
810 #define TB_ADDBITMAP (WM_USER+19)
811 #define TB_ADDBUTTONSA (WM_USER+20)
812 #define TB_ADDBUTTONSW (WM_USER+68)
813 #define TB_ADDBUTTONS WINELIB_NAME_AW(TB_ADDBUTTONS)
814 #define TB_HITTEST (WM_USER+69)
815 #define TB_INSERTBUTTONA (WM_USER+21)
816 #define TB_INSERTBUTTONW (WM_USER+67)
817 #define TB_INSERTBUTTON WINELIB_NAME_AW(TB_INSERTBUTTON)
818 #define TB_DELETEBUTTON (WM_USER+22)
819 #define TB_GETBUTTON (WM_USER+23)
820 #define TB_BUTTONCOUNT (WM_USER+24)
821 #define TB_COMMANDTOINDEX (WM_USER+25)
822 #define TB_SAVERESTOREA (WM_USER+26)
823 #define TB_SAVERESTOREW (WM_USER+76)
824 #define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
825 #define TB_CUSTOMIZE (WM_USER+27)
826 #define TB_ADDSTRINGA (WM_USER+28)
827 #define TB_ADDSTRINGW (WM_USER+77)
828 #define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
829 #define TB_GETITEMRECT (WM_USER+29)
830 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
831 #define TB_SETBUTTONSIZE (WM_USER+31)
832 #define TB_SETBITMAPSIZE (WM_USER+32)
833 #define TB_AUTOSIZE (WM_USER+33)
834 #define TB_GETTOOLTIPS (WM_USER+35)
835 #define TB_SETTOOLTIPS (WM_USER+36)
836 #define TB_SETPARENT (WM_USER+37)
837 #define TB_SETROWS (WM_USER+39)
838 #define TB_GETROWS (WM_USER+40)
839 #define TB_GETBITMAPFLAGS (WM_USER+41)
840 #define TB_SETCMDID (WM_USER+42)
841 #define TB_CHANGEBITMAP (WM_USER+43)
842 #define TB_GETBITMAP (WM_USER+44)
843 #define TB_GETBUTTONTEXTA (WM_USER+45)
844 #define TB_GETBUTTONTEXTW (WM_USER+75)
845 #define TB_GETBUTTONTEXT WINELIB_NAME_AW(TB_GETBUTTONTEXT)
846 #define TB_REPLACEBITMAP (WM_USER+46)
847 #define TB_SETINDENT (WM_USER+47)
848 #define TB_SETIMAGELIST (WM_USER+48)
849 #define TB_GETIMAGELIST (WM_USER+49)
850 #define TB_LOADIMAGES (WM_USER+50)
851 #define TB_GETRECT (WM_USER+51) /* wParam is the Cmd instead of index */
852 #define TB_SETHOTIMAGELIST (WM_USER+52)
853 #define TB_GETHOTIMAGELIST (WM_USER+53)
854 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
855 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
856 #define TB_SETSTYLE (WM_USER+56)
857 #define TB_GETSTYLE (WM_USER+57)
858 #define TB_GETBUTTONSIZE (WM_USER+58)
859 #define TB_SETBUTTONWIDTH (WM_USER+59)
860 #define TB_SETMAXTEXTROWS (WM_USER+60)
861 #define TB_GETTEXTROWS (WM_USER+61)
862 #define TB_GETOBJECT (WM_USER+62)
863 #define TB_GETBUTTONINFOW (WM_USER+63)
864 #define TB_GETBUTTONINFOA (WM_USER+65)
865 #define TB_GETBUTTONINFO WINELIB_NAME_AW(TB_GETBUTTONINFO)
866 #define TB_SETBUTTONINFOW (WM_USER+64)
867 #define TB_SETBUTTONINFOA (WM_USER+66)
868 #define TB_SETBUTTONINFO WINELIB_NAME_AW(TB_SETBUTTONINFO)
869 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
870 #define TB_GETHOTITEM (WM_USER+71)
871 #define TB_SETHOTITEM (WM_USER+72)
872 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
873 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
874 #define TB_MAPACCELERATORA (WM_USER+78)
875 #define TB_MAPACCELERATORW (WM_USER+90)
876 #define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
877 #define TB_GETINSERTMARK (WM_USER+79)
878 #define TB_SETINSERTMARK (WM_USER+80)
879 #define TB_INSERTMARKHITTEST (WM_USER+81)
880 #define TB_MOVEBUTTON (WM_USER+82)
881 #define TB_GETMAXSIZE (WM_USER+83)
882 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
883 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
884 #define TB_GETPADDING (WM_USER+86)
885 #define TB_SETPADDING (WM_USER+87)
886 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
887 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
888 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
889 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
890 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
891 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
893 #define TBN_FIRST (0U-700U)
894 #define TBN_LAST (0U-720U)
895 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
896 #define TBN_GETBUTTONINFOW (TBN_FIRST-20)
897 #define TBN_GETBUTTONINFO WINELIB_NAME_AW(TBN_GETBUTTONINFO)
898 #define TBN_BEGINDRAG (TBN_FIRST-1)
899 #define TBN_ENDDRAG (TBN_FIRST-2)
900 #define TBN_BEGINADJUST (TBN_FIRST-3)
901 #define TBN_ENDADJUST (TBN_FIRST-4)
902 #define TBN_RESET (TBN_FIRST-5)
903 #define TBN_QUERYINSERT (TBN_FIRST-6)
904 #define TBN_QUERYDELETE (TBN_FIRST-7)
905 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
906 #define TBN_CUSTHELP (TBN_FIRST-9)
907 #define TBN_DROPDOWN (TBN_FIRST-10)
908 #define TBN_GETOBJECT (TBN_FIRST-12)
909 #define TBN_HOTITEMCHANGE (TBN_FIRST-13)
910 #define TBN_DRAGOUT (TBN_FIRST-14)
911 #define TBN_DELETINGBUTTON (TBN_FIRST-15)
912 #define TBN_GETDISPINFOA (TBN_FIRST-16)
913 #define TBN_GETDISPINFOW (TBN_FIRST-17)
914 #define TBN_GETDISPINFO WINELIB_NAME_AW(TBN_GETDISPINFO)
915 #define TBN_GETINFOTIPA (TBN_FIRST-18)
916 #define TBN_GETINFOTIPW (TBN_FIRST-19)
917 #define TBN_GETINFOTIP WINELIB_NAME_AW(TBN_GETINFOTIP)
920 /* This is just for old CreateToolbar. */
921 /* Don't use it in new programs. */
922 typedef struct _OLDTBBUTTON {
923 INT iBitmap;
924 INT idCommand;
925 BYTE fsState;
926 BYTE fsStyle;
927 BYTE bReserved[2];
928 DWORD dwData;
929 } OLDTBBUTTON, *POLDTBBUTTON, *LPOLDTBBUTTON;
930 typedef const OLDTBBUTTON *LPCOLDTBBUTTON;
933 typedef struct _TBBUTTON {
934 INT iBitmap;
935 INT idCommand;
936 BYTE fsState;
937 BYTE fsStyle;
938 BYTE bReserved[2];
939 DWORD dwData;
940 INT iString;
941 } TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
942 typedef const TBBUTTON *LPCTBBUTTON;
945 typedef struct _COLORMAP {
946 COLORREF from;
947 COLORREF to;
948 } COLORMAP, *LPCOLORMAP;
950 typedef struct tagTBADDBITMAP {
951 HINSTANCE hInst;
952 UINT nID;
953 } TBADDBITMAP, *LPTBADDBITMAP;
955 #define HINST_COMMCTRL ((HINSTANCE)-1)
956 #define IDB_STD_SMALL_COLOR 0
957 #define IDB_STD_LARGE_COLOR 1
958 #define IDB_VIEW_SMALL_COLOR 4
959 #define IDB_VIEW_LARGE_COLOR 5
960 #define IDB_HIST_SMALL_COLOR 8
961 #define IDB_HIST_LARGE_COLOR 9
963 #define STD_CUT 0
964 #define STD_COPY 1
965 #define STD_PASTE 2
966 #define STD_UNDO 3
967 #define STD_REDOW 4
968 #define STD_DELETE 5
969 #define STD_FILENEW 6
970 #define STD_FILEOPEN 7
971 #define STD_FILESAVE 8
972 #define STD_PRINTPRE 9
973 #define STD_PROPERTIES 10
974 #define STD_HELP 11
975 #define STD_FIND 12
976 #define STD_REPLACE 13
977 #define STD_PRINT 14
979 #define VIEW_LARGEICONS 0
980 #define VIEW_SMALLICONS 1
981 #define VIEW_LIST 2
982 #define VIEW_DETAILS 3
983 #define VIEW_SORTNAME 4
984 #define VIEW_SORTSIZE 5
985 #define VIEW_SORTDATE 6
986 #define VIEW_SORTTYPE 7
987 #define VIEW_PARENTFOLDER 8
988 #define VIEW_NETCONNECT 9
989 #define VIEW_NETDISCONNECT 10
990 #define VIEW_NEWFOLDER 11
992 typedef struct tagTBSAVEPARAMSA {
993 HKEY hkr;
994 LPCSTR pszSubKey;
995 LPCSTR pszValueName;
996 } TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
998 typedef struct tagTBSAVEPARAMSW {
999 HKEY hkr;
1000 LPCWSTR pszSubKey;
1001 LPCWSTR pszValueName;
1002 } TBSAVEPARAMSAW, *LPTBSAVEPARAMSAW;
1004 #define TBSAVEPARAMS WINELIB_NAME_AW(TBSAVEPARAMS)
1005 #define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
1007 typedef struct
1009 UINT cbSize;
1010 DWORD dwMask;
1011 INT idCommand;
1012 INT iImage;
1013 BYTE fsState;
1014 BYTE fsStyle;
1015 WORD cx;
1016 DWORD lParam;
1017 LPSTR pszText;
1018 INT cchText;
1019 } TBBUTTONINFOA, *LPTBBUTTONINFOA;
1021 typedef struct
1023 UINT cbSize;
1024 DWORD dwMask;
1025 INT idCommand;
1026 INT iImage;
1027 BYTE fsState;
1028 BYTE fsStyle;
1029 WORD cx;
1030 DWORD lParam;
1031 LPWSTR pszText;
1032 INT cchText;
1033 } TBBUTTONINFOW, *LPTBBUTTONINFOW;
1035 #define TBBUTTONINFO WINELIB_NAME_AW(TBBUTTONINFO)
1036 #define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
1038 typedef struct tagNMTBGETINFOTIPA
1040 NMHDR hdr;
1041 LPSTR pszText;
1042 INT cchTextMax;
1043 INT iItem;
1044 LPARAM lParam;
1045 } NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
1047 typedef struct tagNMTBGETINFOTIPW
1049 NMHDR hdr;
1050 LPWSTR pszText;
1051 INT cchTextMax;
1052 INT iItem;
1053 LPARAM lParam;
1054 } NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
1056 #define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOFTIP)
1057 #define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
1059 typedef struct
1061 HINSTANCE hInstOld;
1062 UINT nIDOld;
1063 HINSTANCE hInstNew;
1064 UINT nIDNew;
1065 INT nButtons;
1066 } TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
1068 HWND WINAPI
1069 CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
1070 UINT, LPCOLDTBBUTTON, INT);
1072 HWND WINAPI
1073 CreateToolbarEx(HWND, DWORD, UINT, INT,
1074 HINSTANCE, UINT, LPCTBBUTTON,
1075 INT, INT, INT, INT, INT, UINT);
1077 HBITMAP WINAPI
1078 CreateMappedBitmap (HINSTANCE, INT, UINT, LPCOLORMAP, INT);
1081 /* Tool tips */
1083 #define TOOLTIPS_CLASS16 "tooltips_class"
1084 #define TOOLTIPS_CLASSA "tooltips_class32"
1085 #define TOOLTIPS_CLASS32W L"tooltips_class32"
1086 #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
1088 #define INFOTIPSIZE 1024
1090 #define TTS_ALWAYSTIP 0x01
1091 #define TTS_NOPREFIX 0x02
1093 #define TTF_IDISHWND 0x0001
1094 #define TTF_CENTERTIP 0x0002
1095 #define TTF_RTLREADING 0x0004
1096 #define TTF_SUBCLASS 0x0010
1097 #define TTF_TRACK 0x0020
1098 #define TTF_ABSOLUTE 0x0080
1099 #define TTF_TRANSPARENT 0x0100
1100 #define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
1103 #define TTDT_AUTOMATIC 0
1104 #define TTDT_RESHOW 1
1105 #define TTDT_AUTOPOP 2
1106 #define TTDT_INITIAL 3
1109 #define TTM_ACTIVATE (WM_USER+1)
1110 #define TTM_SETDELAYTIME (WM_USER+3)
1111 #define TTM_ADDTOOLA (WM_USER+4)
1112 #define TTM_ADDTOOLW (WM_USER+50)
1113 #define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
1114 #define TTM_DELTOOLA (WM_USER+5)
1115 #define TTM_DELTOOLW (WM_USER+51)
1116 #define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
1117 #define TTM_NEWTOOLRECTA (WM_USER+6)
1118 #define TTM_NEWTOOLRECTW (WM_USER+52)
1119 #define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
1120 #define TTM_RELAYEVENT (WM_USER+7)
1121 #define TTM_GETTOOLINFOA (WM_USER+8)
1122 #define TTM_GETTOOLINFOW (WM_USER+53)
1123 #define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
1124 #define TTM_SETTOOLINFOA (WM_USER+9)
1125 #define TTM_SETTOOLINFOW (WM_USER+54)
1126 #define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
1127 #define TTM_HITTESTA (WM_USER+10)
1128 #define TTM_HITTESTW (WM_USER+55)
1129 #define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
1130 #define TTM_GETTEXTA (WM_USER+11)
1131 #define TTM_GETTEXTW (WM_USER+56)
1132 #define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
1133 #define TTM_UPDATETIPTEXTA (WM_USER+12)
1134 #define TTM_UPDATETIPTEXTW (WM_USER+57)
1135 #define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
1136 #define TTM_GETTOOLCOUNT (WM_USER+13)
1137 #define TTM_ENUMTOOLSA (WM_USER+14)
1138 #define TTM_ENUMTOOLSW (WM_USER+58)
1139 #define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
1140 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1141 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1142 #define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
1143 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1144 #define TTM_TRACKACTIVATE (WM_USER+17)
1145 #define TTM_TRACKPOSITION (WM_USER+18)
1146 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1147 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1148 #define TTM_GETDELAYTIME (WM_USER+21)
1149 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1150 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1151 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1152 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1153 #define TTM_SETMARGIN (WM_USER+26)
1154 #define TTM_GETMARGIN (WM_USER+27)
1155 #define TTM_POP (WM_USER+28)
1156 #define TTM_UPDATE (WM_USER+29)
1159 #define TTN_FIRST (0U-520U)
1160 #define TTN_LAST (0U-549U)
1161 #define TTN_GETDISPINFOA (TTN_FIRST-0)
1162 #define TTN_GETDISPINFOW (TTN_FIRST-10)
1163 #define TTN_GETDISPINFO WINELIB_NAME_AW(TTN_GETDISPINFO)
1164 #define TTN_SHOW (TTN_FIRST-1)
1165 #define TTN_POP (TTN_FIRST-2)
1167 #define TTN_NEEDTEXT TTN_GETDISPINFO
1168 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1169 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1171 typedef struct tagTOOLINFOA {
1172 UINT cbSize;
1173 UINT uFlags;
1174 HWND hwnd;
1175 UINT uId;
1176 RECT rect;
1177 HINSTANCE hinst;
1178 LPSTR lpszText;
1179 LPARAM lParam;
1180 } TTTOOLINFOA, *LPTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
1182 typedef struct tagTOOLINFOW {
1183 UINT cbSize;
1184 UINT uFlags;
1185 HWND hwnd;
1186 UINT uId;
1187 RECT rect;
1188 HINSTANCE hinst;
1189 LPWSTR lpszText;
1190 LPARAM lParam;
1191 } TTTOOLINFOW, *LPTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW;
1193 #define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1194 #define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1195 #define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
1196 #define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
1197 #define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
1199 #define TTTOOLINFO_V1_SIZEA CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
1200 #define TTTOOLINFO_V1_SIZEW CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
1201 #define TTTOOLINFO_V1_SIZE WINELIB_NAME_AW(TTTOOLINFO_V1_SIZE)
1203 typedef struct _TT_HITTESTINFOA
1205 HWND hwnd;
1206 POINT pt;
1207 TTTOOLINFOA ti;
1208 } TTHITTESTINFOA, *LPTTHITTESTINFOA;
1210 typedef struct _TT_HITTESTINFOW
1212 HWND hwnd;
1213 POINT pt;
1214 TTTOOLINFOW ti;
1215 } TTHITTESTINFOW, *LPTTHITTESTINFOW;
1217 #define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
1218 #define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
1220 typedef struct tagNMTTDISPINFOA
1222 NMHDR hdr;
1223 LPSTR lpszText;
1224 CHAR szText[80];
1225 HINSTANCE hinst;
1226 UINT uFlags;
1227 LPARAM lParam;
1228 } NMTTDISPINFOA, *LPNMTTDISPINFOA;
1230 typedef struct tagNMTTDISPINFOW
1232 NMHDR hdr;
1233 LPWSTR lpszText;
1234 WCHAR szText[80];
1235 HINSTANCE hinst;
1236 UINT uFlags;
1237 LPARAM lParam;
1238 } NMTTDISPINFOW, *LPNMTTDISPINFOW;
1240 #define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
1241 #define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
1243 #define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
1244 #define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
1245 #define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)
1247 #define TOOLTIPTEXTW NMTTDISPINFOW
1248 #define TOOLTIPTEXTA NMTTDISPINFOA
1249 #define TOOLTIPTEXT NMTTDISPINFO
1250 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1251 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1252 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1255 /* Rebar control */
1257 #define REBARCLASSNAME16 "ReBarWindow"
1258 #define REBARCLASSNAMEA "ReBarWindow32"
1259 #define REBARCLASSNAMEW L"ReBarWindow32"
1260 #define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
1262 #define RBS_TOOLTIPS 0x0100
1263 #define RBS_VARHEIGHT 0x0200
1264 #define RBS_BANDBORDERS 0x0400
1265 #define RBS_FIXEDORDER 0x0800
1266 #define RBS_REGISTERDROP 0x1000
1267 #define RBS_AUTOSIZE 0x2000
1268 #define RBS_VERTICALGRIPPER 0x4000
1269 #define RBS_DBLCLKTOGGLE 0x8000
1271 #define RBIM_IMAGELIST 0x00000001
1273 #define RBBIM_STYLE 0x00000001
1274 #define RBBIM_COLORS 0x00000002
1275 #define RBBIM_TEXT 0x00000004
1276 #define RBBIM_IMAGE 0x00000008
1277 #define RBBIM_CHILD 0x00000010
1278 #define RBBIM_CHILDSIZE 0x00000020
1279 #define RBBIM_SIZE 0x00000040
1280 #define RBBIM_BACKGROUND 0x00000080
1281 #define RBBIM_ID 0x00000100
1282 #define RBBIM_IDEALSIZE 0x00000200
1283 #define RBBIM_LPARAM 0x00000400
1284 #define RBBIM_HEADERSIZE 0x00000800
1286 #define RBBS_BREAK 0x00000001
1287 #define RBBS_FIXEDSIZE 0x00000002
1288 #define RBBS_CHILDEDGE 0x00000004
1289 #define RBBS_HIDDEN 0x00000008
1290 #define RBBS_NOVERT 0x00000010
1291 #define RBBS_FIXEDBMP 0x00000020
1292 #define RBBS_VARIABLEHEIGHT 0x00000040
1293 #define RBBS_GRIPPERALWAYS 0x00000080
1294 #define RBBS_NOGRIPPER 0x00000100
1296 #define RBNM_ID 0x00000001
1297 #define RBNM_STYLE 0x00000002
1298 #define RBNM_LPARAM 0x00000004
1300 #define RBHT_NOWHERE 0x0001
1301 #define RBHT_CAPTION 0x0002
1302 #define RBHT_CLIENT 0x0003
1303 #define RBHT_GRABBER 0x0004
1305 #define RB_INSERTBANDA (WM_USER+1)
1306 #define RB_INSERTBANDW (WM_USER+10)
1307 #define RB_INSERTBAND WINELIB_NAME_AW(RB_INSERTBAND)
1308 #define RB_DELETEBAND (WM_USER+2)
1309 #define RB_GETBARINFO (WM_USER+3)
1310 #define RB_SETBARINFO (WM_USER+4)
1311 #define RB_GETBANDINFO (WM_USER+5) /* just for compatibility */
1312 #define RB_SETBANDINFOA (WM_USER+6)
1313 #define RB_SETBANDINFOW (WM_USER+11)
1314 #define RB_SETBANDINFO WINELIB_NAME_AW(RB_SETBANDINFO)
1315 #define RB_SETPARENT (WM_USER+7)
1316 #define RB_HITTEST (WM_USER+8)
1317 #define RB_GETRECT (WM_USER+9)
1318 #define RB_GETBANDCOUNT (WM_USER+12)
1319 #define RB_GETROWCOUNT (WM_USER+13)
1320 #define RB_GETROWHEIGHT (WM_USER+14)
1321 #define RB_IDTOINDEX (WM_USER+16)
1322 #define RB_GETTOOLTIPS (WM_USER+17)
1323 #define RB_SETTOOLTIPS (WM_USER+18)
1324 #define RB_SETBKCOLOR (WM_USER+19)
1325 #define RB_GETBKCOLOR (WM_USER+20)
1326 #define RB_SETTEXTCOLOR (WM_USER+21)
1327 #define RB_GETTEXTCOLOR (WM_USER+22)
1328 #define RB_SIZETORECT (WM_USER+23)
1329 #define RB_BEGINDRAG (WM_USER+24)
1330 #define RB_ENDDRAG (WM_USER+25)
1331 #define RB_DRAGMOVE (WM_USER+26)
1332 #define RB_GETBARHEIGHT (WM_USER+27)
1333 #define RB_GETBANDINFOW (WM_USER+28)
1334 #define RB_GETBANDINFOA (WM_USER+29)
1335 #define RB_GETBANDINFO16 WINELIB_NAME_AW(RB_GETBANDINFO16)
1336 #define RB_MINIMIZEBAND (WM_USER+30)
1337 #define RB_MAXIMIZEBAND (WM_USER+31)
1338 #define RB_GETBANDBORDERS (WM_USER+34)
1339 #define RB_SHOWBAND (WM_USER+35)
1340 #define RB_SETPALETTE (WM_USER+37)
1341 #define RB_GETPALETTE (WM_USER+38)
1342 #define RB_MOVEBAND (WM_USER+39)
1343 #define RB_GETDROPTARGET CCM_GETDROPTARGET
1344 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1345 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1346 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1347 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1349 #define RBN_FIRST (0U-831U)
1350 #define RBN_LAST (0U-859U)
1351 #define RBN_HEIGHTCHANGE (RBN_FIRST-0)
1352 #define RBN_GETOBJECT (RBN_FIRST-1)
1353 #define RBN_LAYOUTCHANGED (RBN_FIRST-2)
1354 #define RBN_AUTOSIZE (RBN_FIRST-3)
1355 #define RBN_BEGINDRAG (RBN_FIRST-4)
1356 #define RBN_ENDDRAG (RBN_FIRST-5)
1357 #define RBN_DELETINGBAND (RBN_FIRST-6)
1358 #define RBN_DELETEDBAND (RBN_FIRST-7)
1359 #define RBN_CHILDSIZE (RBN_FIRST-8)
1361 typedef struct tagREBARINFO
1363 UINT cbSize;
1364 UINT fMask;
1365 HIMAGELIST himl;
1366 } REBARINFO, *LPREBARINFO;
1368 typedef struct tagREBARBANDINFOA
1370 UINT cbSize;
1371 UINT fMask;
1372 UINT fStyle;
1373 COLORREF clrFore;
1374 COLORREF clrBack;
1375 LPSTR lpText;
1376 UINT cch;
1377 INT iImage;
1378 HWND hwndChild;
1379 UINT cxMinChild;
1380 UINT cyMinChild;
1381 UINT cx;
1382 HBITMAP hbmBack;
1383 UINT wID;
1384 UINT cyChild;
1385 UINT cyMaxChild;
1386 UINT cyIntegral;
1387 UINT cxIdeal;
1388 LPARAM lParam;
1389 UINT cxHeader;
1390 } REBARBANDINFOA, *LPREBARBANDINFOA;
1392 typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
1394 typedef struct tagREBARBANDINFOW
1396 UINT cbSize;
1397 UINT fMask;
1398 UINT fStyle;
1399 COLORREF clrFore;
1400 COLORREF clrBack;
1401 LPWSTR lpText;
1402 UINT cch;
1403 INT iImage;
1404 HWND hwndChild;
1405 UINT cxMinChild;
1406 UINT cyMinChild;
1407 UINT cx;
1408 HBITMAP hbmBack;
1409 UINT wID;
1410 UINT cyChild;
1411 UINT cyMaxChild;
1412 UINT cyIntegral;
1413 UINT cxIdeal;
1414 LPARAM lParam;
1415 UINT cxHeader;
1416 } REBARBANDINFOW, *LPREBARBANDINFOW;
1418 typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
1420 #define REBARBANDINFO WINELIB_NAME_AW(REBARBANDINFO)
1421 #define LPREBARBANDINFO WINELIB_NAME_AW(LPREBARBANDINFO)
1422 #define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
1424 #define REBARBANDINFO_V3_SIZEA CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
1425 #define REBARBANDINFO_V3_SIZEW CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
1426 #define REBARBANDINFO_V3_SIZE WINELIB_NAME_AW(REBARBANDINFO_V3_SIZE)
1428 typedef struct tagNMREBARCHILDSIZE
1430 NMHDR hdr;
1431 UINT uBand;
1432 UINT wID;
1433 RECT rcChild;
1434 RECT rcBand;
1435 } NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;
1437 typedef struct tagNMREBAR
1439 NMHDR hdr;
1440 DWORD dwMask;
1441 UINT uBand;
1442 UINT fStyle;
1443 UINT wID;
1444 LPARAM lParam;
1445 } NMREBAR, *LPNMREBAR;
1447 typedef struct tagNMRBAUTOSIZE
1449 NMHDR hdr;
1450 BOOL fChanged;
1451 RECT rcTarget;
1452 RECT rcActual;
1453 } NMRBAUTOSIZE, *LPNMRBAUTOSIZE;
1455 typedef struct _RB_HITTESTINFO
1457 POINT pt;
1458 UINT flags;
1459 INT iBand;
1460 } RBHITTESTINFO, *LPRBHITTESTINFO;
1463 /* Trackbar control */
1465 #define TRACKBAR_CLASS16 "msctls_trackbar"
1466 #define TRACKBAR_CLASSA "msctls_trackbar32"
1467 #define TRACKBAR_CLASSW L"msctls_trackbar32"
1468 #define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
1470 #define TBS_AUTOTICKS 0x0001
1471 #define TBS_VERT 0x0002
1472 #define TBS_HORZ 0x0000
1473 #define TBS_TOP 0x0004
1474 #define TBS_BOTTOM 0x0000
1475 #define TBS_LEFT 0x0004
1476 #define TBS_RIGHT 0x0000
1477 #define TBS_BOTH 0x0008
1478 #define TBS_NOTICKS 0x0010
1479 #define TBS_ENABLESELRANGE 0x0020
1480 #define TBS_FIXEDLENGTH 0x0040
1481 #define TBS_NOTHUMB 0x0080
1482 #define TBS_TOOLTIPS 0x0100
1483 #define TBS_REVERSED 0x0200
1485 #define TBTS_TOP 0
1486 #define TBTS_LEFT 1
1487 #define TBTS_BOTTOM 2
1488 #define TBTS_RIGHT 3
1490 #define TB_LINEUP 0
1491 #define TB_LINEDOWN 1
1492 #define TB_PAGEUP 2
1493 #define TB_PAGEDOWN 3
1494 #define TB_THUMBPOSITION 4
1495 #define TB_THUMBTRACK 5
1496 #define TB_TOP 6
1497 #define TB_BOTTOM 7
1498 #define TB_ENDTRACK 8
1500 #define TBCD_TICS 0x0001
1501 #define TBCD_THUMB 0x0002
1502 #define TBCD_CHANNEL 0x0003
1504 #define TBM_GETPOS (WM_USER)
1505 #define TBM_GETRANGEMIN (WM_USER+1)
1506 #define TBM_GETRANGEMAX (WM_USER+2)
1507 #define TBM_GETTIC (WM_USER+3)
1508 #define TBM_SETTIC (WM_USER+4)
1509 #define TBM_SETPOS (WM_USER+5)
1510 #define TBM_SETRANGE (WM_USER+6)
1511 #define TBM_SETRANGEMIN (WM_USER+7)
1512 #define TBM_SETRANGEMAX (WM_USER+8)
1513 #define TBM_CLEARTICS (WM_USER+9)
1514 #define TBM_SETSEL (WM_USER+10)
1515 #define TBM_SETSELSTART (WM_USER+11)
1516 #define TBM_SETSELEND (WM_USER+12)
1517 #define TBM_GETPTICS (WM_USER+14)
1518 #define TBM_GETTICPOS (WM_USER+15)
1519 #define TBM_GETNUMTICS (WM_USER+16)
1520 #define TBM_GETSELSTART (WM_USER+17)
1521 #define TBM_GETSELEND (WM_USER+18)
1522 #define TBM_CLEARSEL (WM_USER+19)
1523 #define TBM_SETTICFREQ (WM_USER+20)
1524 #define TBM_SETPAGESIZE (WM_USER+21)
1525 #define TBM_GETPAGESIZE (WM_USER+22)
1526 #define TBM_SETLINESIZE (WM_USER+23)
1527 #define TBM_GETLINESIZE (WM_USER+24)
1528 #define TBM_GETTHUMBRECT (WM_USER+25)
1529 #define TBM_GETCHANNELRECT (WM_USER+26)
1530 #define TBM_SETTHUMBLENGTH (WM_USER+27)
1531 #define TBM_GETTHUMBLENGTH (WM_USER+28)
1532 #define TBM_SETTOOLTIPS (WM_USER+29)
1533 #define TBM_GETTOOLTIPS (WM_USER+30)
1534 #define TBM_SETTIPSIDE (WM_USER+31)
1535 #define TBM_SETBUDDY (WM_USER+32)
1536 #define TBM_GETBUDDY (WM_USER+33)
1537 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1538 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1541 /* Pager control */
1543 #define WC_PAGESCROLLERA "SysPager"
1544 #define WC_PAGESCROLLERW L"SysPager"
1545 #define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
1547 #define PGS_VERT 0x00000000
1548 #define PGS_HORZ 0x00000001
1549 #define PGS_AUTOSCROLL 0x00000002
1550 #define PGS_DRAGNDROP 0x00000004
1552 #define PGF_INVISIBLE 0
1553 #define PGF_NORMAL 1
1554 #define PGF_GRAYED 2
1555 #define PGF_DEPRESSED 4
1556 #define PGF_HOT 8
1558 #define PGB_TOPORLEFT 0
1559 #define PGB_BOTTOMORRIGHT 1
1561 /* only used with PGN_SCROLL */
1562 #define PGF_SCROLLUP 1
1563 #define PGF_SCROLLDOWN 2
1564 #define PGF_SCROLLLEFT 4
1565 #define PGF_SCROLLRIGHT 8
1567 #define PGK_SHIFT 1
1568 #define PGK_CONTROL 2
1569 #define PGK_MENU 4
1571 /* only used with PGN_CALCSIZE */
1572 #define PGF_CALCWIDTH 1
1573 #define PGF_CALCHEIGHT 2
1575 #define PGM_FIRST 0x1400
1576 #define PGM_SETCHILD (PGM_FIRST+1)
1577 #define PGM_RECALCSIZE (PGM_FIRST+2)
1578 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
1579 #define PGM_SETBKCOLOR (PGM_FIRST+4)
1580 #define PGM_GETBKCOLOR (PGM_FIRST+5)
1581 #define PGM_SETBORDER (PGM_FIRST+6)
1582 #define PGM_GETBORDER (PGM_FIRST+7)
1583 #define PGM_SETPOS (PGM_FIRST+8)
1584 #define PGM_GETPOS (PGM_FIRST+9)
1585 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
1586 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
1587 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
1588 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
1590 #define PGN_FIRST (0U-900U)
1591 #define PGN_LAST (0U-950U)
1592 #define PGN_SCROLL (PGN_FIRST-1)
1593 #define PGN_CALCSIZE (PGN_FIRST-2)
1595 typedef struct
1597 NMHDR hdr;
1598 WORD fwKeys;
1599 RECT rcParent;
1600 INT iDir;
1601 INT iXpos;
1602 INT iYpos;
1603 INT iScroll;
1604 } NMPGSCROLL, *LPNMPGSCROLL;
1606 typedef struct
1608 NMHDR hdr;
1609 DWORD dwFlag;
1610 INT iWidth;
1611 INT iHeight;
1612 } NMPGCALCSIZE, *LPNMPGCALCSIZE;
1615 /* Treeview control */
1617 #define WC_TREEVIEWA "SysTreeView32"
1618 #define WC_TREEVIEWW L"SysTreeView32"
1619 #define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
1621 #define TVSIL_NORMAL 0
1622 #define TVSIL_STATE 2
1624 #define TV_FIRST 0x1100
1625 #define TVM_INSERTITEMA (TV_FIRST+0)
1626 #define TVM_INSERTITEMW (TV_FIRST+50)
1627 #define TVM_INSERTITEM WINELIB_NAME_AW(TVM_INSERTITEM)
1628 #define TVM_DELETEITEM (TV_FIRST+1)
1629 #define TVM_EXPAND (TV_FIRST+2)
1630 #define TVM_GETITEMRECT (TV_FIRST+4)
1631 #define TVM_GETCOUNT (TV_FIRST+5)
1632 #define TVM_GETINDENT (TV_FIRST+6)
1633 #define TVM_SETINDENT (TV_FIRST+7)
1634 #define TVM_GETIMAGELIST (TV_FIRST+8)
1635 #define TVM_SETIMAGELIST (TV_FIRST+9)
1636 #define TVM_GETNEXTITEM (TV_FIRST+10)
1637 #define TVM_SELECTITEM (TV_FIRST+11)
1638 #define TVM_GETITEMA (TV_FIRST+12)
1639 #define TVM_GETITEMW (TV_FIRST+62)
1640 #define TVM_GETITEM WINELIB_NAME_AW(TVM_GETITEM)
1641 #define TVM_SETITEMA (TV_FIRST+13)
1642 #define TVM_SETITEMW (TV_FIRST+63)
1643 #define TVM_SETITEM WINELIB_NAME_AW(TVM_SETITEM)
1644 #define TVM_EDITLABELA (TV_FIRST+14)
1645 #define TVM_EDITLABELW (TV_FIRST+65)
1646 #define TVM_EDITLABEL WINELIB_NAME_AW(TVM_EDITLABEL)
1647 #define TVM_GETEDITCONTROL (TV_FIRST+15)
1648 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
1649 #define TVM_HITTEST (TV_FIRST+17)
1650 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
1651 #define TVM_SORTCHILDREN (TV_FIRST+19)
1652 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
1653 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
1654 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
1655 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
1656 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
1657 #define TVM_GETISEARCHSTRING WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
1658 #define TVM_SETTOOLTIPS (TV_FIRST+24)
1659 #define TVM_GETTOOLTIPS (TV_FIRST+25)
1660 #define TVM_SETINSERTMARK (TV_FIRST+26)
1661 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
1662 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
1663 #define TVM_SETBKCOLOR (TV_FIRST+29)
1664 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
1665 #define TVM_GETBKCOLOR (TV_FIRST+31)
1666 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
1667 #define TVM_SETSCROLLTIME (TV_FIRST+33)
1668 #define TVM_GETSCROLLTIME (TV_FIRST+34)
1669 #define TVM_UNKNOWN35 (TV_FIRST+35)
1670 #define TVM_UNKNOWN36 (TV_FIRST+36)
1671 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
1672 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
1673 #define TVM_GETITEMSTATE (TV_FIRST+39)
1674 #define TVM_SETLINECOLOR (TV_FIRST+40)
1675 #define TVM_GETLINECOLOR (TV_FIRST+41)
1676 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1677 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1679 #define TreeView_GetItemState(hwndTV, hti, mask) \
1680 (UINT)SendMessageA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
1681 #define TreeView_GetCheckState(hwndTV, hti) \
1682 ((((UINT)(SendMessageA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
1683 TVIS_STATEIMAGEMASK))) >> 12) -1)
1684 #define TreeView_SetLineColor(hwnd, clr) \
1685 (COLORREF)SendMessageA((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
1686 #define TreeView_GetLineColor(hwnd) \
1687 (COLORREF)SendMessageA((hwnd), TVM_GETLINECOLOR, 0, 0)
1688 #define TreeView_SetItemState(hwndTV, hti, data, _mask) \
1689 { TVITEM _TVi; \
1690 _TVi.mask = TVIF_STATE; \
1691 _TVi.hItem = hti; \
1692 _TVi.stateMask = _mask; \
1693 _TVi.state = data; \
1694 SendMessageA((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_TVi); \
1701 #define TVN_FIRST (0U-400U)
1702 #define TVN_LAST (0U-499U)
1704 #define TVN_SELCHANGING (TVN_FIRST-1)
1705 #define TVN_SELCHANGED (TVN_FIRST-2)
1706 #define TVN_GETDISPINFO (TVN_FIRST-3)
1707 #define TVN_SETDISPINFO (TVN_FIRST-4)
1708 #define TVN_ITEMEXPANDING (TVN_FIRST-5)
1709 #define TVN_ITEMEXPANDED (TVN_FIRST-6)
1710 #define TVN_BEGINDRAG (TVN_FIRST-7)
1711 #define TVN_BEGINRDRAG (TVN_FIRST-8)
1712 #define TVN_DELETEITEM (TVN_FIRST-9)
1713 #define TVN_BEGINLABELEDIT (TVN_FIRST-10)
1714 #define TVN_ENDLABELEDIT (TVN_FIRST-11)
1715 #define TVN_KEYDOWN (TVN_FIRST-12)
1716 #define TVN_GETINFOTIPA (TVN_FIRST-13)
1717 #define TVN_GETINFOTIPW (TVN_FIRST-14)
1718 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
1721 #define TVN_SELCHANGINGW (TVN_FIRST-50)
1722 #define TVN_SELCHANGEDW (TVN_FIRST-51)
1723 #define TVN_GETDISPINFOW (TVN_FIRST-52)
1724 #define TVN_SETDISPINFOW (TVN_FIRST-53)
1725 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
1726 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
1727 #define TVN_BEGINDRAGW (TVN_FIRST-56)
1728 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
1729 #define TVN_DELETEITEMW (TVN_FIRST-58)
1730 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
1731 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
1735 #define TVIF_TEXT 0x0001
1736 #define TVIF_IMAGE 0x0002
1737 #define TVIF_PARAM 0x0004
1738 #define TVIF_STATE 0x0008
1739 #define TVIF_HANDLE 0x0010
1740 #define TVIF_SELECTEDIMAGE 0x0020
1741 #define TVIF_CHILDREN 0x0040
1742 #define TVIF_INTEGRAL 0x0080
1743 #define TVIF_DI_SETITEM 0x1000
1745 #define TVI_ROOT ((HTREEITEM)0xffff0000) /* -65536 */
1746 #define TVI_FIRST ((HTREEITEM)0xffff0001) /* -65535 */
1747 #define TVI_LAST ((HTREEITEM)0xffff0002) /* -65534 */
1748 #define TVI_SORT ((HTREEITEM)0xffff0003) /* -65533 */
1750 #define TVIS_FOCUSED 0x0001
1751 #define TVIS_SELECTED 0x0002
1752 #define TVIS_CUT 0x0004
1753 #define TVIS_DROPHILITED 0x0008
1754 #define TVIS_BOLD 0x0010
1755 #define TVIS_EXPANDED 0x0020
1756 #define TVIS_EXPANDEDONCE 0x0040
1757 #define TVIS_OVERLAYMASK 0x0f00
1758 #define TVIS_STATEIMAGEMASK 0xf000
1759 #define TVIS_USERMASK 0xf000
1761 #define TVHT_NOWHERE 0x0001
1762 #define TVHT_ONITEMICON 0x0002
1763 #define TVHT_ONITEMLABEL 0x0004
1764 #define TVHT_ONITEMINDENT 0x0008
1765 #define TVHT_ONITEMBUTTON 0x0010
1766 #define TVHT_ONITEMRIGHT 0x0020
1767 #define TVHT_ONITEMSTATEICON 0x0040
1768 #define TVHT_ONITEM 0x0046
1769 #define TVHT_ABOVE 0x0100
1770 #define TVHT_BELOW 0x0200
1771 #define TVHT_TORIGHT 0x0400
1772 #define TVHT_TOLEFT 0x0800
1774 #define TVS_HASBUTTONS 0x0001
1775 #define TVS_HASLINES 0x0002
1776 #define TVS_LINESATROOT 0x0004
1777 #define TVS_EDITLABELS 0x0008
1778 #define TVS_DISABLEDRAGDROP 0x0010
1779 #define TVS_SHOWSELALWAYS 0x0020
1780 #define TVS_RTLREADING 0x0040
1781 #define TVS_NOTOOLTIPS 0x0080
1782 #define TVS_CHECKBOXES 0x0100
1783 #define TVS_TRACKSELECT 0x0200
1784 #define TVS_SINGLEEXPAND 0x0400
1785 #define TVS_INFOTIP 0x0800
1786 #define TVS_FULLROWSELECT 0x1000
1787 #define TVS_NOSCROLL 0x2000
1788 #define TVS_NONEVENHEIGHT 0x4000
1790 #define TVS_SHAREDIMAGELISTS 0x0000
1791 #define TVS_PRIVATEIMAGELISTS 0x0400
1794 #define TVE_COLLAPSE 0x0001
1795 #define TVE_EXPAND 0x0002
1796 #define TVE_TOGGLE 0x0003
1797 #define TVE_EXPANDPARTIAL 0x4000
1798 #define TVE_COLLAPSERESET 0x8000
1800 #define TVGN_ROOT 0
1801 #define TVGN_NEXT 1
1802 #define TVGN_PREVIOUS 2
1803 #define TVGN_PARENT 3
1804 #define TVGN_CHILD 4
1805 #define TVGN_FIRSTVISIBLE 5
1806 #define TVGN_NEXTVISIBLE 6
1807 #define TVGN_PREVIOUSVISIBLE 7
1808 #define TVGN_DROPHILITE 8
1809 #define TVGN_CARET 9
1810 #define TVGN_LASTVISIBLE 10
1812 #define TVC_UNKNOWN 0x00
1813 #define TVC_BYMOUSE 0x01
1814 #define TVC_BYKEYBOARD 0x02
1817 typedef struct _TREEITEM *HTREEITEM;
1819 typedef struct {
1820 UINT mask;
1821 HTREEITEM hItem;
1822 UINT state;
1823 UINT stateMask;
1824 LPSTR pszText;
1825 INT cchTextMax;
1826 INT iImage;
1827 INT iSelectedImage;
1828 INT cChildren;
1829 LPARAM lParam;
1830 } TVITEMA, *LPTVITEMA;
1832 typedef struct {
1833 UINT mask;
1834 HTREEITEM hItem;
1835 UINT state;
1836 UINT stateMask;
1837 LPWSTR pszText;
1838 INT cchTextMax;
1839 INT iImage;
1840 INT iSelectedImage;
1841 INT cChildren;
1842 LPARAM lParam;
1843 } TVITEMW, *LPTVITEMW;
1845 #define TVITEM WINELIB_NAME_AW(TVITEM)
1846 #define LPTVITEM WINELIB_NAME_AW(LPTVITEM)
1847 #define TV_ITEM TVITEM
1849 typedef struct {
1850 UINT mask;
1851 HTREEITEM hItem;
1852 UINT state;
1853 UINT stateMask;
1854 LPSTR pszText;
1855 INT cchTextMax;
1856 INT iImage;
1857 INT iSelectedImage;
1858 INT cChildren;
1859 LPARAM lParam;
1860 INT iIntegral;
1861 } TVITEMEXA, *LPTVITEMEXA;
1863 typedef struct {
1864 UINT mask;
1865 HTREEITEM hItem;
1866 UINT state;
1867 UINT stateMask;
1868 LPWSTR pszText;
1869 INT cchTextMax;
1870 INT iImage;
1871 INT iSelectedImage;
1872 INT cChildren;
1873 LPARAM lParam;
1874 INT iIntegral;
1875 } TVITEMEXW, *LPTVITEMEXW;
1877 #define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
1878 #define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
1880 typedef struct tagTVINSERTSTRUCTA {
1881 HTREEITEM hParent;
1882 HTREEITEM hInsertAfter;
1883 union {
1884 TVITEMEXA itemex;
1885 TVITEMA item;
1886 } DUMMYUNIONNAME;
1887 } TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
1889 typedef struct tagTVINSERTSTRUCTW {
1890 HTREEITEM hParent;
1891 HTREEITEM hInsertAfter;
1892 union {
1893 TVITEMEXW itemex;
1894 TVITEMW item;
1895 } DUMMYUNIONNAME;
1896 } TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
1898 #define TV_INSERTSTRUCT WINELIB_NAME_AW(TVINSERTSTRUCT)
1899 #define LPTV_INSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
1901 #define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
1902 #define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
1903 #define TVINSERTSTRUCT_V1_SIZE WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)
1907 typedef struct tagNMTREEVIEWA {
1908 NMHDR hdr;
1909 UINT action;
1910 TVITEMA itemOld;
1911 TVITEMA itemNew;
1912 POINT ptDrag;
1913 } NMTREEVIEWA, *LPNMTREEVIEWA;
1915 typedef struct tagNMTREEVIEWW {
1916 NMHDR hdr;
1917 UINT action;
1918 TVITEMW itemOld;
1919 TVITEMW itemNew;
1920 POINT ptDrag;
1921 } NMTREEVIEWW, *LPNMTREEVIEWW;
1923 #define NMTREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
1924 #define NM_TREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
1925 #define LPNMTREEVIEW WINELIB_NAME_AW(LPNMTREEVIEW)
1927 typedef struct tagTVDISPINFOA {
1928 NMHDR hdr;
1929 TVITEMA item;
1930 } NMTVDISPINFOA, *LPNMTVDISPINFOA;
1932 typedef struct tagTVDISPINFOW {
1933 NMHDR hdr;
1934 TVITEMW item;
1935 } NMTVDISPINFOW, *LPNMTVDISPINFOW;
1937 #define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
1938 #define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
1939 #define TV_DISPINFO NMTVDISPINFO
1941 typedef INT (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
1943 typedef struct tagTVSORTCB
1945 HTREEITEM hParent;
1946 PFNTVCOMPARE lpfnCompare;
1947 LPARAM lParam;
1948 } TVSORTCB, *LPTVSORTCB;
1950 #define TV_SORTCB TVSORTCB
1951 #define LPTV_SORTCB LPTVSORTCB
1953 typedef struct tagTVHITTESTINFO {
1954 POINT pt;
1955 UINT flags;
1956 HTREEITEM hItem;
1957 } TVHITTESTINFO, *LPTVHITTESTINFO;
1959 #define TV_HITTESTINFO TVHITTESTINFO
1962 /* Custom Draw Treeview */
1964 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
1966 #define TVCDRF_NOIMAGES 0x00010000
1968 typedef struct tagNMTVCUSTOMDRAW
1970 NMCUSTOMDRAW nmcd;
1971 COLORREF clrText;
1972 COLORREF clrTextBk;
1973 INT iLevel; /* IE>0x0400 */
1974 } NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
1976 /* Treeview tooltips */
1978 typedef struct tagNMTVGETINFOTIPA
1980 NMHDR hdr;
1981 LPSTR pszText;
1982 INT cchTextMax;
1983 HTREEITEM hItem;
1984 LPARAM lParam;
1985 } NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
1987 typedef struct tagNMTVGETINFOTIPW
1989 NMHDR hdr;
1990 LPWSTR pszText;
1991 INT cchTextMax;
1992 HTREEITEM hItem;
1993 LPARAM lParam;
1994 } NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
1998 #define TreeView_InsertItemA(hwnd, phdi) \
1999 (INT)SendMessageA((hwnd), TVM_INSERTITEMA, 0, \
2000 (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
2001 #define TreeView_InsertItemW(hwnd,phdi) \
2002 (INT)SendMessageW((hwnd), TVM_INSERTITEMW, 0, \
2003 (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
2004 #define TreeView_DeleteItem(hwnd, hItem) \
2005 (BOOL)SendMessageA((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
2006 #define TreeView_DeleteAllItems(hwnd) \
2007 (BOOL)SendMessageA((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
2008 #define TreeView_Expand(hwnd, hitem, code) \
2009 (BOOL)SendMessageA((hwnd), TVM_EXPAND, (WPARAM)code, \
2010 (LPARAM)(HTREEITEM)(hitem))
2012 #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
2013 (*(HTREEITEM *)prc = (hitem), (BOOL)SendMessageA((hwnd), \
2014 TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
2016 #define TreeView_GetCount(hwnd) \
2017 (UINT)SendMessageA((hwnd), TVM_GETCOUNT, 0, 0)
2018 #define TreeView_GetIndent(hwnd) \
2019 (UINT)SendMessageA((hwnd), TVM_GETINDENT, 0, 0)
2020 #define TreeView_SetIndent(hwnd, indent) \
2021 (BOOL)SendMessageA((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
2023 #define TreeView_GetImageList(hwnd, iImage) \
2024 (HIMAGELIST)SendMessageA((hwnd), TVM_GETIMAGELIST, iImage, 0)
2026 #define TreeView_SetImageList(hwnd, himl, iImage) \
2027 (HIMAGELIST)SendMessageA((hwnd), TVM_SETIMAGELIST, iImage, \
2028 (LPARAM)(UINT)(HIMAGELIST)(himl))
2030 #define TreeView_GetNextItem(hwnd, hitem, code) \
2031 (HTREEITEM)SendMessageA((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
2032 (LPARAM)(HTREEITEM) (hitem))
2034 #define TreeView_GetChild(hwnd, hitem) \
2035 TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
2036 #define TreeView_GetNextSibling(hwnd, hitem) \
2037 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
2038 #define TreeView_GetPrevSibling(hwnd, hitem) \
2039 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
2040 #define TreeView_GetParent(hwnd, hitem) \
2041 TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
2042 #define TreeView_GetFirstVisible(hwnd) \
2043 TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
2044 #define TreeView_GetLastVisible(hwnd) \
2045 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2046 #define TreeView_GetNextVisible(hwnd, hitem) \
2047 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
2048 #define TreeView_GetPrevVisible(hwnd, hitem) \
2049 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
2050 #define TreeView_GetSelection(hwnd) \
2051 TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
2052 #define TreeView_GetDropHilight(hwnd) \
2053 TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
2054 #define TreeView_GetRoot(hwnd) \
2055 TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
2056 #define TreeView_GetLastVisible(hwnd) \
2057 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2060 #define TreeView_Select(hwnd, hitem, code) \
2061 (UINT)SendMessageA((hwnd), TVM_SELECTITEM, (WPARAM)code, \
2062 (LPARAM)(UINT)(hitem))
2065 #define TreeView_SelectItem(hwnd, hitem) \
2066 TreeView_Select(hwnd, hitem, TVGN_CARET)
2067 #define TreeView_SelectDropTarget(hwnd, hitem) \
2068 TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
2069 /* FIXME
2070 #define TreeView_SelectSetFirstVisible(hwnd, hitem) \
2071 TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
2074 #define TreeView_GetItemA(hwnd, pitem) \
2075 (BOOL)SendMessageA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2077 #define TreeView_SetItemA(hwnd, pitem) \
2078 (BOOL)SendMessageA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2080 #define TreeView_EditLabel(hwnd, hitem) \
2081 (HWND)SendMessageA((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
2084 #define TreeView_GetEditControl(hwnd) \
2085 (HWND)SendMessageA((hwnd), TVM_GETEDITCONTROL, 0, 0)
2087 #define TreeView_GetVisibleCount(hwnd) \
2088 (UINT)SendMessageA((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
2090 #define TreeView_HitTest(hwnd, lpht) \
2091 (HTREEITEM)SendMessageA((hwnd), TVM_HITTEST, 0,\
2092 (LPARAM)(LPTVHITTESTINFO)(lpht))
2094 #define TreeView_CreateDragImage(hwnd, hitem) \
2095 (HIMAGELIST)SendMessageA((hwnd), TVM_CREATEDRAGIMAGE, 0,\
2096 (LPARAM)(HTREEITEM)(hitem))
2098 #define TreeView_SortChildren(hwnd, hitem, recurse) \
2099 (BOOL)SendMessageA((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
2100 (LPARAM)(HTREEITEM)(hitem))
2102 #define TreeView_EnsureVisible(hwnd, hitem) \
2103 (BOOL)SendMessageA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
2105 #define TreeView_SortChildrenCB(hwnd, psort, recurse) \
2106 (BOOL)SendMessageA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
2107 (LPARAM)(LPTV_SORTCB)(psort))
2109 #define TreeView_EndEditLabelNow(hwnd, fCancel) \
2110 (BOOL)SendMessageA((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
2112 #define TreeView_GetISearchString(hwndTV, lpsz) \
2113 (BOOL)SendMessageA((hwndTV), TVM_GETISEARCHSTRING, 0, \
2114 (LPARAM)(LPTSTR)lpsz)
2116 #define TreeView_SetItemHeight(hwnd, iHeight) \
2117 (INT)SendMessageA((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
2118 #define TreeView_GetItemHeight(hwnd) \
2119 (INT)SendMessageA((hwnd), TVM_GETITEMHEIGHT, 0, 0)
2121 #define TreeView_SetBkColor(hwnd, clr) \
2122 (COLORREF)SendMessageA((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
2124 #define TreeView_SetTextColor(hwnd, clr) \
2125 (COLORREF)SendMessageA((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
2127 #define TreeView_GetBkColor(hwnd) \
2128 (COLORREF)SendMessageA((hwnd), TVM_GETBKCOLOR, 0, 0)
2130 #define TreeView_GetTextColor(hwnd) \
2131 (COLORREF)SendMessageA((hwnd), TVM_GETTEXTCOLOR, 0, 0)
2133 #define TreeView_SetScrollTime(hwnd, uTime) \
2134 (UINT)SendMessageA((hwnd), TVM_SETSCROLLTIME, uTime, 0)
2136 #define TreeView_GetScrollTime(hwnd) \
2137 (UINT)SendMessageA((hwnd), TVM_GETSCROLLTIME, 0, 0)
2139 #define TreeView_SetInsertMarkColor(hwnd, clr) \
2140 (COLORREF)SendMessageA((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
2141 #define TreeView_GetInsertMarkColor(hwnd) \
2142 (COLORREF)SendMessageA((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
2152 /* Listview control */
2154 #define WC_LISTVIEWA "SysListView32"
2155 #define WC_LISTVIEWW L"SysListView32"
2156 #define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
2158 #define LVS_ICON 0x0000
2159 #define LVS_REPORT 0x0001
2160 #define LVS_SMALLICON 0x0002
2161 #define LVS_LIST 0x0003
2162 #define LVS_TYPEMASK 0x0003
2163 #define LVS_SINGLESEL 0x0004
2164 #define LVS_SHOWSELALWAYS 0x0008
2165 #define LVS_SORTASCENDING 0x0010
2166 #define LVS_SORTDESCENDING 0x0020
2167 #define LVS_SHAREIMAGELISTS 0x0040
2168 #define LVS_NOLABELWRAP 0x0080
2169 #define LVS_AUTOARRANGE 0x0100
2170 #define LVS_EDITLABELS 0x0200
2171 #define LVS_OWNERDATA 0x1000
2172 #define LVS_NOSCROLL 0x2000
2173 #define LVS_TYPESTYLEMASK 0xfc00
2174 #define LVS_ALIGNTOP 0x0000
2175 #define LVS_ALIGNLEFT 0x0800
2176 #define LVS_ALIGNMASK 0x0c00
2177 #define LVS_OWNERDRAWFIXED 0x0400
2178 #define LVS_NOCOLUMNHEADER 0x4000
2179 #define LVS_NOSORTHEADER 0x8000
2181 #define LVCF_FMT 0x0001
2182 #define LVCF_WIDTH 0x0002
2183 #define LVCF_TEXT 0x0004
2184 #define LVCF_SUBITEM 0x0008
2185 #define LVCF_IMAGE 0x0010
2186 #define LVCF_ORDER 0x0020
2188 #define LVCFMT_LEFT 0x0000
2189 #define LVCFMT_RIGHT 0x0001
2190 #define LVCFMT_CENTER 0x0002
2191 #define LVCFMT_JUSTIFYMASK 0x0003
2192 #define LVCFMT_IMAGE 0x0800
2193 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2194 #define LVCFMT_COL_HAS_IMAGES 0x8000
2196 #define LVSIL_NORMAL 0
2197 #define LVSIL_SMALL 1
2198 #define LVSIL_STATE 2
2200 #define LVFI_PARAM 0X0001
2201 #define LVFI_STRING 0X0002
2202 #define LVFI_PARTIAL 0X0008
2203 #define LVFI_WRAP 0X0020
2204 #define LVFI_NEARESTXY 0X0040
2206 #define LVIF_TEXT 0x0001
2207 #define LVIF_IMAGE 0x0002
2208 #define LVIF_PARAM 0x0004
2209 #define LVIF_STATE 0x0008
2210 #define LVIF_INDENT 0x0010
2211 #define LVIF_NORECOMPUTE 0x0800
2212 #define LVIF_DI_SETITEM 0x1000
2214 #define LVIR_BOUNDS 0x0000
2215 #define LVIR_LABEL 0x0002
2216 #define LVIR_ICON 0x0001
2217 #define LVIR_SELECTBOUNDS 0x0003
2219 #define LVIS_FOCUSED 0x0001
2220 #define LVIS_SELECTED 0x0002
2221 #define LVIS_CUT 0x0004
2222 #define LVIS_DROPHILITED 0x0008
2223 #define LVIS_ACTIVATING 0x0020
2225 #define LVIS_OVERLAYMASK 0x0F00
2226 #define LVIS_STATEIMAGEMASK 0xF000
2228 #define LVNI_ALL 0x0000
2229 #define LVNI_FOCUSED 0x0001
2230 #define LVNI_SELECTED 0x0002
2231 #define LVNI_CUT 0x0004
2232 #define LVNI_DROPHILITED 0x0008
2234 #define LVNI_ABOVE 0x0100
2235 #define LVNI_BELOW 0x0200
2236 #define LVNI_TOLEFT 0x0400
2237 #define LVNI_TORIGHT 0x0800
2239 #define LVHT_NOWHERE 0x0001
2240 #define LVHT_ONITEMICON 0x0002
2241 #define LVHT_ONITEMLABEL 0x0004
2242 #define LVHT_ONITEMSTATEICON 0x0008
2243 #define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
2245 #define LVHT_ABOVE 0x0008
2246 #define LVHT_BELOW 0x0010
2247 #define LVHT_TORIGHT 0x0020
2248 #define LVHT_TOLEFT 0x0040
2250 #define LVM_FIRST 0x1000
2251 #define LVM_GETBKCOLOR (LVM_FIRST+0)
2252 #define LVM_SETBKCOLOR (LVM_FIRST+1)
2253 #define LVM_GETIMAGELIST (LVM_FIRST+2)
2254 #define LVM_SETIMAGELIST (LVM_FIRST+3)
2255 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
2256 #define LVM_GETITEMA (LVM_FIRST+5)
2257 #define LVM_GETITEMW (LVM_FIRST+75)
2258 #define LVM_GETITEM WINELIB_NAME_AW(LVM_GETITEM)
2259 #define LVM_SETITEMA (LVM_FIRST+6)
2260 #define LVM_SETITEMW (LVM_FIRST+76)
2261 #define LVM_SETITEM WINELIB_NAME_AW(LVM_SETITEM)
2262 #define LVM_INSERTITEMA (LVM_FIRST+7)
2263 #define LVM_INSERTITEMW (LVM_FIRST+77)
2264 #define LVM_INSERTITEM WINELIB_NAME_AW(LVM_INSERTITEM)
2265 #define LVM_DELETEITEM (LVM_FIRST+8)
2266 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
2267 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
2268 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
2269 #define LVM_GETNEXTITEM (LVM_FIRST+12)
2270 #define LVM_FINDITEMA (LVM_FIRST+13)
2271 #define LVM_FINDITEMW (LVM_FIRST+83)
2272 #define LVM_FINDITEM WINELIB_NAME_AW(LVM_FINDITEM)
2273 #define LVM_GETITEMRECT (LVM_FIRST+14)
2274 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
2275 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
2276 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
2277 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
2278 #define LVM_GETSTRINGWIDTH WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
2279 #define LVM_HITTEST (LVM_FIRST+18)
2280 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
2281 #define LVM_SCROLL (LVM_FIRST+20)
2282 #define LVM_REDRAWITEMS (LVM_FIRST+21)
2283 #define LVM_ARRANGE (LVM_FIRST+22)
2284 #define LVM_EDITLABELA (LVM_FIRST+23)
2285 #define LVM_EDITLABELW (LVM_FIRST+118)
2286 #define LVM_EDITLABEL WINELIB_NAME_AW(LVM_EDITLABEL)
2287 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
2288 #define LVM_GETCOLUMNA (LVM_FIRST+25)
2289 #define LVM_GETCOLUMNW (LVM_FIRST+95)
2290 #define LVM_GETCOLUMN WINELIB_NAME_AW(LVM_GETCOLUMN)
2291 #define LVM_SETCOLUMNA (LVM_FIRST+26)
2292 #define LVM_SETCOLUMNW (LVM_FIRST+96)
2293 #define LVM_SETCOLUMN WINELIB_NAME_AW(LVM_SETCOLUMN)
2294 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
2295 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
2296 #define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
2297 #define LVM_DELETECOLUMN (LVM_FIRST+28)
2298 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
2299 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
2300 #define LVM_GETHEADER (LVM_FIRST+31)
2302 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
2303 #define LVM_GETVIEWRECT (LVM_FIRST+34)
2304 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
2305 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
2306 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
2307 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
2308 #define LVM_GETTOPINDEX (LVM_FIRST+39)
2309 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
2310 #define LVM_GETORIGIN (LVM_FIRST+41)
2311 #define LVM_UPDATE (LVM_FIRST+42)
2312 #define LVM_SETITEMSTATE (LVM_FIRST+43)
2313 #define LVM_GETITEMSTATE (LVM_FIRST+44)
2314 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
2315 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
2316 #define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
2317 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
2318 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
2319 #define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
2320 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
2321 #define LVM_SORTITEMS (LVM_FIRST+48)
2322 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
2323 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
2324 #define LVM_GETITEMSPACING (LVM_FIRST+51)
2325 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
2326 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
2327 #define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
2328 #define LVM_SETICONSPACING (LVM_FIRST+53)
2329 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
2330 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
2331 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
2332 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
2333 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
2334 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
2335 #define LVM_SETHOTITEM (LVM_FIRST+60)
2336 #define LVM_GETHOTITEM (LVM_FIRST+61)
2337 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
2338 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
2339 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
2340 #define LVM_SETWORKAREAS (LVM_FIRST+65)
2341 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
2342 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
2343 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
2344 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
2345 #define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
2346 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
2347 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
2348 #define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
2349 #define LVM_GETWORKAREAS (LVM_FIRST+70)
2350 #define LVM_SETHOVERTIME (LVM_FIRST+71)
2351 #define LVM_GETHOVERTIME (LVM_FIRST+72)
2352 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
2353 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
2355 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
2357 #define LVN_FIRST (0U-100U)
2358 #define LVN_LAST (0U-199U)
2359 #define LVN_ITEMCHANGING (LVN_FIRST-0)
2360 #define LVN_ITEMCHANGED (LVN_FIRST-1)
2361 #define LVN_INSERTITEM (LVN_FIRST-2)
2362 #define LVN_DELETEITEM (LVN_FIRST-3)
2363 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
2364 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
2365 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
2366 #define LVN_BEGINLABELEDIT WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
2367 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
2368 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
2369 #define LVN_ENDLABELEDIT WINELIB_NAME_AW(LVN_ENDLABELEDIT)
2370 #define LVN_COLUMNCLICK (LVN_FIRST-8)
2371 #define LVN_BEGINDRAG (LVN_FIRST-9)
2372 #define LVN_BEGINRDRAG (LVN_FIRST-11)
2373 #define LVN_ODCACHEHINT (LVN_FIRST-13)
2374 #define LVN_ODFINDITEMA (LVN_FIRST-52)
2375 #define LVN_ODFINDITEMW (LVN_FIRST-79)
2376 #define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
2377 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
2378 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
2379 #define LVN_HOTTRACK (LVN_FIRST-21)
2380 #define LVN_GETDISPINFOA (LVN_FIRST-50)
2381 #define LVN_GETDISPINFOW (LVN_FIRST-77)
2382 #define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
2383 #define LVN_SETDISPINFOA (LVN_FIRST-51)
2384 #define LVN_SETDISPINFOW (LVN_FIRST-78)
2385 #define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
2387 #define LVA_ALIGNLEFT 0x0000
2388 #define LVA_DEFAULT 0x0001
2389 #define LVA_ALIGNTOP 0x0002
2390 #define LVA_SNAPTOGRID 0x0005
2392 typedef struct tagLVITEMA
2394 UINT mask;
2395 INT iItem;
2396 INT iSubItem;
2397 UINT state;
2398 UINT stateMask;
2399 LPSTR pszText;
2400 INT cchTextMax;
2401 INT iImage;
2402 LPARAM lParam;
2403 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2404 } LVITEMA, *LPLVITEMA;
2406 typedef struct tagLVITEMW
2408 UINT mask;
2409 INT iItem;
2410 INT iSubItem;
2411 UINT state;
2412 UINT stateMask;
2413 LPWSTR pszText;
2414 INT cchTextMax;
2415 INT iImage;
2416 LPARAM lParam;
2417 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2418 } LVITEMW, *LPLVITEMW;
2420 #define LVITEM WINELIB_NAME_AW(LVITEM)
2421 #define LPLVITEM WINELIB_NAME_AW(LPLVITEM)
2423 #define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
2424 #define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
2425 #define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
2427 #define LV_ITEM LVITEM
2429 typedef struct tagLVCOLUMNA
2431 UINT mask;
2432 INT fmt;
2433 INT cx;
2434 LPSTR pszText;
2435 INT cchTextMax;
2436 INT iSubItem;
2437 INT iImage; /* (_WIN32_IE >= 0x0300) */
2438 INT iOrder; /* (_WIN32_IE >= 0x0300) */
2439 } LVCOLUMNA, *LPLVCOLUMNA;
2441 typedef struct tagLVCOLUMNW
2443 UINT mask;
2444 INT fmt;
2445 INT cx;
2446 LPWSTR pszText;
2447 INT cchTextMax;
2448 INT iSubItem;
2449 INT iImage; /* (_WIN32_IE >= 0x0300) */
2450 INT iOrder; /* (_WIN32_IE >= 0x0300) */
2451 } LVCOLUMNW, *LPLVCOLUMNW;
2453 #define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
2454 #define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)
2456 #define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
2457 #define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
2458 #define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)
2460 #define LV_COLUMN LVCOLUMN
2463 typedef struct tagNMLISTVIEW
2465 NMHDR hdr;
2466 INT iItem;
2467 INT iSubItem;
2468 UINT uNewState;
2469 UINT uOldState;
2470 UINT uChanged;
2471 POINT ptAction;
2472 LPARAM lParam;
2473 } NMLISTVIEW, *LPNMLISTVIEW;
2475 #define LPNM_LISTVIEW LPNMLISTVIEW
2476 #define NM_LISTVIEW NMLISTVIEW
2479 typedef struct tagLVDISPINFO
2481 NMHDR hdr;
2482 LVITEMA item;
2483 } NMLVDISPINFOA, *LPNMLVDISPINFOA;
2485 typedef struct tagLVDISPINFOW
2487 NMHDR hdr;
2488 LVITEMW item;
2489 } NMLVDISPINFOW, *LPNMLVDISPINFOW;
2491 #define NMLVDISPINFO WINELIB_NAME_AW(NMLVDISPINFO)
2492 #define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
2494 #define LV_DISPINFO NMLVDISPINFO
2496 #define LVN_KEYDOWN (LVN_FIRST-55)
2498 typedef struct tagLVKEYDOWN
2500 NMHDR hdr;
2501 WORD wVKey;
2502 UINT flags;
2503 } NMLVKEYDOWN, *LPNMLVKEYDOWN;
2505 #define LV_KEYDOWN NMLVKEYDOWN
2507 typedef struct tagLVHITTESTINFO
2509 POINT pt;
2510 UINT flags;
2511 INT iItem;
2512 INT iSubItem;
2513 } LVHITTESTINFO, *LPLVHITTESTINFO;
2515 #define LV_HITTESTINFO LVHITTESTINFO
2516 #define _LV_HITTESTINFO tagLVHITTESTINFO
2517 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
2519 typedef struct tagLVFINDINFO
2521 UINT flags;
2522 LPCSTR psz;
2523 LPARAM lParam;
2524 POINT pt;
2525 UINT vkDirection;
2526 } LVFINDINFO, *LPLVFINDINFO;
2528 #define LV_FINDINFO LVFINDINFO
2530 typedef struct tagTCHITTESTINFO
2532 POINT pt;
2533 UINT flags;
2534 } TCHITTESTINFO, *LPTCHITTESTINFO;
2536 #define TC_HITTESTINFO TCHITTESTINFO
2538 typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
2540 #define ListView_GetNextItem(hwnd,nItem,flags) \
2541 (INT)SendMessageA((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
2542 #define ListView_FindItem(hwnd,nItem,plvfi) \
2543 (INT)SendMessageA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFO*)(plvfi))
2544 #define ListView_Arrange(hwnd,code) \
2545 (INT)SendMessageA((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
2546 #define ListView_GetItemPosition(hwnd,i,ppt) \
2547 (INT)SendMessageA((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
2548 #define ListView_GetItemRect(hwnd,i,prc) \
2549 (INT)SendMessageA((hwnd),LVM_GETITEMRECT,(WPARAM)(INT)(i),(LPARAM)(LPRECT)(prc))
2550 #define ListView_SetItemA(hwnd,pitem) \
2551 (INT)SendMessageA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
2552 #define ListView_SetItemState(hwnd,i,pitem) \
2553 (BOOL)SendMessageA((hwnd),LVM_SETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(LPLVITEMA)(pitem))
2554 #define ListView_GetItemState(hwnd,i,mask) \
2555 (BOOL)SendMessageA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
2556 #define ListView_GetCountPerPage(hwnd) \
2557 (BOOL)SendMessageW((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
2558 #define ListView_GetImageList(hwnd,iImageList) \
2559 (HIMAGELIST)SendMessageA((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
2560 #define ListView_GetStringWidthA(hwnd,pstr) \
2561 (INT)SendMessageA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
2562 #define ListView_GetTopIndex(hwnd) \
2563 (BOOL)SendMessageA((hwnd),LVM_GETTOPINDEX,0,0L)
2564 #define ListView_Scroll(hwnd,dx,dy) \
2565 (BOOL)SendMessageA((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
2566 #define ListView_EnsureVisible(hwnd,i,fPartialOk) \
2567 (BOOL)SendMessageA((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
2568 #define ListView_SetBkColor(hwnd,clrBk) \
2569 (BOOL)SendMessageA((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
2570 #define ListView_SetImageList(hwnd,himl,iImageList) \
2571 (HIMAGELIST)(UINT)SendMessageA((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(UINT)(HIMAGELIST)(himl))
2572 #define ListView_GetItemCount(hwnd) \
2573 (INT)SendMessageA((hwnd),LVM_GETITEMCOUNT,0,0L)
2574 #define ListView_GetItemA(hwnd,pitem) \
2575 (BOOL)SendMessageA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
2576 #define ListView_GetItemW(hwnd,pitem) \
2577 (BOOL)SendMessageW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
2578 #define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
2579 #define ListView_HitTest(hwnd,pinfo) \
2580 (INT)SendMessageA((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
2581 #define ListView_InsertItemA(hwnd,pitem) \
2582 (INT)SendMessageA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
2583 #define ListView_InsertItemW(hwnd,pitem) \
2584 (INT)SendMessageW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
2585 #define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
2586 #define ListView_DeleteAllItems(hwnd) \
2587 (BOOL)SendMessageA((hwnd),LVM_DELETEALLITEMS,0,0L)
2588 #define ListView_InsertColumnA(hwnd,iCol,pcol) \
2589 (INT)SendMessageA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
2590 #define ListView_InsertColumnW(hwnd,iCol,pcol) \
2591 (INT)SendMessageW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
2592 #define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
2593 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
2594 (BOOL)SendMessageA((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
2595 #define ListView_SetItemPosition(hwndLV, i, x, y) \
2596 (BOOL)SendMessageA((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
2597 #define ListView_GetSelectedCount(hwndLV) \
2598 (UINT)SendMessageA((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
2601 /* Tab Control */
2603 #define WC_TABCONTROL16 "SysTabControl"
2604 #define WC_TABCONTROLA "SysTabControl32"
2605 #define WC_TABCONTROLW L"SysTabControl32"
2607 #define WC_TABCONTROL WINELIB_NAME_AW(WC_TABCONTROL)
2609 /* tab control styles */
2610 #define TCS_SCROLLOPPOSITE 0x0001 /* assumes multiline tab */
2611 #define TCS_BOTTOM 0x0002
2612 #define TCS_RIGHT 0x0002
2613 #define TCS_MULTISELECT 0x0004 /* allow multi-select in button mode */
2614 #define TCS_FLATBUTTONS 0x0008
2615 #define TCS_FORCEICONLEFT 0x0010
2616 #define TCS_FORCELABELLEFT 0x0020
2617 #define TCS_HOTTRACK 0x0040
2618 #define TCS_VERTICAL 0x0080
2619 #define TCS_TABS 0x0000
2620 #define TCS_BUTTONS 0x0100
2621 #define TCS_SINGLELINE 0x0000
2622 #define TCS_MULTILINE 0x0200
2623 #define TCS_RIGHTJUSTIFY 0x0000
2624 #define TCS_FIXEDWIDTH 0x0400
2625 #define TCS_RAGGEDRIGHT 0x0800
2626 #define TCS_FOCUSONBUTTONDOWN 0x1000
2627 #define TCS_OWNERDRAWFIXED 0x2000
2628 #define TCS_TOOLTIPS 0x4000
2629 #define TCS_FOCUSNEVER 0x8000
2630 #define TCS_EX_FLATSEPARATORS 0x00000001 /* to be used with */
2631 #define TCS_EX_REGISTERDROP 0x00000002 /* TCM_SETEXTENDEDSTYLE */
2634 #define TCM_FIRST 0x1300
2636 #define TCM_GETIMAGELIST (TCM_FIRST + 2)
2637 #define TCM_SETIMAGELIST (TCM_FIRST + 3)
2638 #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
2639 #define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
2640 #define TCM_GETITEMA (TCM_FIRST + 5)
2641 #define TCM_GETITEMW (TCM_FIRST + 60)
2642 #define TCM_SETITEMA (TCM_FIRST + 6)
2643 #define TCM_SETITEMW (TCM_FIRST + 61)
2644 #define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
2645 #define TCM_INSERTITEMA (TCM_FIRST + 7)
2646 #define TCM_INSERTITEMW (TCM_FIRST + 62)
2647 #define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
2648 #define TCM_DELETEITEM (TCM_FIRST + 8)
2649 #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
2650 #define TCM_GETITEMRECT (TCM_FIRST + 10)
2651 #define TCM_GETCURSEL (TCM_FIRST + 11)
2652 #define TCM_SETCURSEL (TCM_FIRST + 12)
2653 #define TCM_HITTEST (TCM_FIRST + 13)
2654 #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
2655 #define TCM_ADJUSTRECT (TCM_FIRST + 40)
2656 #define TCM_SETITEMSIZE (TCM_FIRST + 41)
2657 #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
2658 #define TCM_SETPADDING (TCM_FIRST + 43)
2659 #define TCM_GETROWCOUNT (TCM_FIRST + 44)
2660 #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
2661 #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
2662 #define TCM_GETCURFOCUS (TCM_FIRST + 47)
2663 #define TCM_SETCURFOCUS (TCM_FIRST + 48)
2664 #define TCM_SETMINTTABWIDTH (TCM_FIRST + 49)
2665 #define TCM_DESELECTALL (TCM_FIRST + 50)
2666 #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
2667 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
2668 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
2669 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2670 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2673 #define TCIF_TEXT 0x0001
2674 #define TCIF_IMAGE 0x0002
2675 #define TCIF_RTLREADING 0x0004
2676 #define TCIF_PARAM 0x0008
2677 #define TCIF_STATE 0x0010
2679 #define TCIS_BUTTONPRESSED 0x0001
2680 #define TCIS_HIGHLIGHTED 0x0002
2682 /* TabCtrl Macros */
2683 #define TabCtrl_GetImageList(hwnd) \
2684 (HIMAGELIST)SendMessageA((hwnd), TCM_GETIMAGELIST, 0, 0L)
2685 #define TabCtrl_SetImageList(hwnd, himl) \
2686 (HIMAGELIST)SendMessageA((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
2687 #define TabCtrl_GetItemCount(hwnd) \
2688 (int)SendMessageA((hwnd), TCM_GETITEMCOUNT, 0, 0L)
2689 #define TabCtrl_GetItemA(hwnd, iItem, pitem) \
2690 (BOOL)SendMessageA((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2691 #define TabCtrl_GetItemW(hwnd, iItem, pitem) \
2692 (BOOL)SendMessageW((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2693 #define TabCtrl_GetItem WINELIB_NAME_AW(TabCtrl_GetItem)
2694 #define TabCtrl_SetItemA(hwnd, iItem, pitem) \
2695 (BOOL)SendMessageA((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2696 #define TabCtrl_SetItemW(hwnd, iItem, pitem) \
2697 (BOOL)SendMessageW((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
2698 #define TabCtrl_SetItem WINELIB_NAME_AW(TabCtrl_GetItem)
2699 #define TabCtrl_InsertItemA(hwnd, iItem, pitem) \
2700 (int)SendMessageA((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
2701 #define TabCtrl_InsertItemW(hwnd, iItem, pitem) \
2702 (int)SendMessageW((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
2703 #define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
2704 #define TabCtrl_DeleteItem(hwnd, i) \
2705 (BOOL)SendMessageA((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
2706 #define TabCtrl_DeleteAllItems(hwnd) \
2707 (BOOL)SendMessageA((hwnd), TCM_DELETEALLITEMS, 0, 0L)
2708 #define TabCtrl_GetItemRect(hwnd, i, prc) \
2709 (BOOL)SendMessageA((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
2710 #define TabCtrl_GetCurSel(hwnd) \
2711 (int)SendMessageA((hwnd), TCM_GETCURSEL, 0, 0)
2712 #define TabCtrl_SetCurSel(hwnd, i) \
2713 (int)SendMessageA((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
2714 #define TabCtrl_HitTest(hwndTC, pinfo) \
2715 (int)SendMessageA((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
2716 #define TabCtrl_SetItemExtra(hwndTC, cb) \
2717 (BOOL)SendMessageA((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
2718 #define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
2719 (int)SendMessageA(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
2720 #define TabCtrl_SetItemSize(hwnd, x, y) \
2721 (DWORD)SendMessageA((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
2722 #define TabCtrl_RemoveImage(hwnd, i) \
2723 (void)SendMessageA((hwnd), TCM_REMOVEIMAGE, i, 0L)
2724 #define TabCtrl_SetPadding(hwnd, cx, cy) \
2725 (void)SendMessageA((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
2726 #define TabCtrl_GetRowCount(hwnd) \
2727 (int)SendMessageA((hwnd), TCM_GETROWCOUNT, 0, 0L)
2728 #define TabCtrl_GetToolTips(hwnd) \
2729 (HWND)SendMessageA((hwnd), TCM_GETTOOLTIPS, 0, 0L)
2730 #define TabCtrl_SetToolTips(hwnd, hwndTT) \
2731 (void)SendMessageA((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
2732 #define TabCtrl_GetCurFocus(hwnd) \
2733 (int)SendMessageA((hwnd), TCM_GETCURFOCUS, 0, 0)
2734 #define TabCtrl_SetCurFocus(hwnd, i) \
2735 SendMessageA((hwnd),TCM_SETCURFOCUS, i, 0)
2736 #define TabCtrl_SetMinTabWidth(hwnd, x) \
2737 (int)SendMessageA((hwnd), TCM_SETMINTABWIDTH, 0, x)
2738 #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
2739 (void)SendMessageA((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
2742 /* constants for TCHITTESTINFO */
2744 #define TCHT_NOWHERE 0x01
2745 #define TCHT_ONITEMICON 0x02
2746 #define TCHT_ONITEMLABEL 0x04
2747 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
2750 typedef struct tagTCITEMA {
2751 UINT mask;
2752 UINT dwState;
2753 UINT dwStateMask;
2754 LPSTR pszText;
2755 INT cchTextMax;
2756 INT iImage;
2757 LPARAM lParam;
2758 } TCITEMA, *LPTCITEMA;
2760 typedef struct tagTCITEMW
2762 UINT mask;
2763 DWORD dwState;
2764 DWORD dwStateMask;
2765 LPWSTR pszText;
2766 INT cchTextMax;
2767 INT iImage;
2768 LPARAM lParam;
2769 } TCITEMW, *LPTCITEMW;
2771 #define TCITEM WINELIB_NAME_AW(TCITEM)
2772 #define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
2773 #define TC_ITEM TCITEM
2775 #define TCN_FIRST (0U-550U)
2776 #define TCN_LAST (0U-580U)
2777 #define TCN_KEYDOWN (TCN_FIRST - 0)
2778 #define TCN_SELCHANGE (TCN_FIRST - 1)
2779 #define TCN_SELCHANGING (TCN_FIRST - 2)
2780 #define TCN_GETOBJECT (TCN_FIRST - 3)
2783 /* ComboBoxEx control */
2785 #define WC_COMBOBOXEXA "ComboBoxEx32"
2786 #define WC_COMBOBOXEXW L"ComboBoxEx32"
2787 #define WC_COMBOBOXEX WINELIB_NAME_AW(WC_COMBOBOXEX)
2789 #define CBEM_INSERTITEMA (WM_USER+1)
2790 #define CBEM_INSERTITEMW (WM_USER+11)
2791 #define CBEM_INSERTITEM WINELIB_NAME_AW(CBEM_INSERTITEM)
2792 #define CBEM_SETIMAGELIST (WM_USER+2)
2793 #define CBEM_GETIMAGELIST (WM_USER+3)
2794 #define CBEM_GETITEMA (WM_USER+4)
2795 #define CBEM_GETITEMW (WM_USER+13)
2796 #define CBEM_GETITEM WINELIB_NAME_AW(CBEM_GETITEM)
2797 #define CBEM_SETITEMA (WM_USER+5)
2798 #define CBEM_SETITEMW (WM_USER+12)
2799 #define CBEM_SETITEM WINELIB_NAME_AW(CBEM_SETITEM)
2800 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
2801 #define CBEM_GETEDITCONTROL (WM_USER+7)
2802 #define CBEM_SETEXSTYLE (WM_USER+8)
2803 #define CBEM_GETEXSTYLE (WM_USER+9)
2804 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
2805 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
2806 #define CBEM_HASEDITCHANGED (WM_USER+10)
2807 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2808 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2810 #define CBEN_FIRST (0U-800U)
2811 #define CBEN_LAST (0U-830U)
2814 /* Hotkey control */
2816 #define HOTKEY_CLASS16 "msctls_hotkey"
2817 #define HOTKEY_CLASSA "msctls_hotkey32"
2818 #define HOTKEY_CLASSW L"msctls_hotkey32"
2819 #define HOTKEY_CLASS WINELIB_NAME_AW(HOTKEY_CLASS)
2821 #define HOTKEYF_SHIFT 0x01
2822 #define HOTKEYF_CONTROL 0x02
2823 #define HOTKEYF_ALT 0x04
2824 #define HOTKEYF_EXT 0x08
2826 #define HKCOMB_NONE 0x0001
2827 #define HKCOMB_S 0x0002
2828 #define HKCOMB_C 0x0004
2829 #define HKCOMB_A 0x0008
2830 #define HKCOMB_SC 0x0010
2831 #define HKCOMB_SA 0x0020
2832 #define HKCOMB_CA 0x0040
2833 #define HKCOMB_SCA 0x0080
2835 #define HKM_SETHOTKEY (WM_USER+1)
2836 #define HKM_GETHOTKEY (WM_USER+2)
2837 #define HKM_SETRULES (WM_USER+3)
2840 /* animate control */
2842 #define ANIMATE_CLASSA "SysAnimate32"
2843 #define ANIMATE_CLASSW L"SysAnimate32"
2844 #define ANIMATE_CLASS WINELIB_NAME_AW(ANIMATE_CLASS)
2846 #define ACS_CENTER 0x0001
2847 #define ACS_TRANSPARENT 0x0002
2848 #define ACS_AUTOPLAY 0x0004
2849 #define ACS_TIMER 0x0008 /* no threads, just timers */
2851 #define ACM_OPENA (WM_USER+100)
2852 #define ACM_OPENW (WM_USER+103)
2853 #define ACM_OPEN WINELIB_NAME_AW(ACM_OPEN)
2854 #define ACM_PLAY (WM_USER+101)
2855 #define ACM_STOP (WM_USER+102)
2857 #define ACN_START 1
2858 #define ACN_STOP 2
2860 #define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
2861 CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
2862 #define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
2863 CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
2864 #define Animate_Create WINELIB_NAME_AW(Animate_Create)
2865 #define Animate_OpenA(hwnd,szName) \
2866 (BOOL)SendMessageA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
2867 #define Animate_OpenW(hwnd,szName) \
2868 (BOOL)SendMessageW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
2869 #define Animate_Open WINELIB_NAME_AW(Animate_Open)
2870 #define Animate_OpenExA(hwnd,hInst,szName) \
2871 (BOOL)SendMessageA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
2872 #define Animate_OpenExW(hwnd,hInst,szName) \
2873 (BOOL)SendMessageW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
2874 #define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
2875 #define Animate_Play(hwnd,from,to,rep) \
2876 (BOOL)SendMessageA(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
2877 #define Animate_Stop(hwnd) \
2878 (BOOL)SendMessageA(hwnd,ACM_STOP,0,0)
2879 #define Animate_Close(hwnd) \
2880 (BOOL)SendMessageA(hwnd,ACM_OPENA,0,0)
2881 #define Animate_Seek(hwnd,frame) \
2882 (BOOL)SendMessageA(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
2885 /**************************************************************************
2886 * IP Address control
2889 #define WC_IPADDRESSA "SysIPAddress32"
2890 #define WC_IPADDRESSW L"SysIPAddress32"
2891 #define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
2893 #define IPM_CLEARADDRESS (WM_USER+100)
2894 #define IPM_SETADDRESS (WM_USER+101)
2895 #define IPM_GETADDRESS (WM_USER+102)
2896 #define IPM_SETRANGE (WM_USER+103)
2897 #define IPM_SETFOCUS (WM_USER+104)
2898 #define IPM_ISBLANK (WM_USER+105)
2900 #define IPN_FIRST (0U-860U)
2901 #define IPN_LAST (0U-879U)
2902 #define IPN_FIELDCHANGED (IPN_FIRST-0)
2904 typedef struct tagNMIPADDRESS
2906 NMHDR hdr;
2907 INT iField;
2908 INT iValue;
2909 } NMIPADDRESS, *LPNMIPADDRESS;
2911 #define MAKEIPRANGE(low,high) \
2912 ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
2913 #define MAKEIPADDRESS(b1,b2,b3,b4) \
2914 ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
2916 #define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
2917 #define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
2918 #define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
2919 #define FOURTH_IPADDRESS(x) ((x)&0xff)
2922 /**************************************************************************
2923 * Native Font control
2926 #define WC_NATIVEFONTCTLA "NativeFontCtl"
2927 #define WC_NATIVEFONTCTLW L"NativeFontCtl"
2928 #define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
2930 #define NFS_EDIT 0x0001
2931 #define NFS_STATIC 0x0002
2932 #define NFS_LISTCOMBO 0x0004
2933 #define NFS_BUTTON 0x0008
2934 #define NFS_ALL 0x0010
2937 /**************************************************************************
2938 * Month calendar control
2942 #define MONTHCAL_CLASSA "SysMonthCal32"
2943 #define MONTHCAL_CLASSW L"SysMonthCal32"
2944 #define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
2946 #define MCM_FIRST 0x1000
2947 #define MCN_FIRST (0U-750U)
2948 #define MCN_LAST (0U-759U)
2951 #define MCM_GETCURSEL (MCM_FIRST + 1)
2952 #define MCM_SETCURSEL (MCM_FIRST + 2)
2953 #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
2954 #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
2955 #define MCM_GETSELRANGE (MCM_FIRST + 5)
2956 #define MCM_SETSELRANGE (MCM_FIRST + 6)
2957 #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
2958 #define MCM_SETDAYSTATE (MCM_FIRST + 8)
2959 #define MCM_GETMINREQRECT (MCM_FIRST + 9)
2960 #define MCM_SETCOLOR (MCM_FIRST + 10)
2961 #define MCM_GETCOLOR (MCM_FIRST + 11)
2962 #define MCM_SETTODAY (MCM_FIRST + 12)
2963 #define MCM_GETTODAY (MCM_FIRST + 13)
2964 #define MCM_HITTEST (MCM_FIRST + 14)
2965 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
2966 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
2967 #define MCM_GETRANGE (MCM_FIRST + 17)
2968 #define MCM_SETRANGE (MCM_FIRST + 18)
2969 #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
2970 #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
2971 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
2972 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2973 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2976 /* Notifications */
2978 #define MCN_SELCHANGE (MCN_FIRST + 1)
2979 #define MCN_GETDAYSTATE (MCN_FIRST + 3)
2980 #define MCN_SELECT (MCN_FIRST + 4)
2982 #define MCSC_BACKGROUND 0
2983 #define MCSC_TEXT 1
2984 #define MCSC_TITLEBK 2
2985 #define MCSC_TITLETEXT 3
2986 #define MCSC_MONTHBK 4
2987 #define MCSC_TRAILINGTEXT 5
2989 #define MCS_DAYSTATE 0x0001
2990 #define MCS_MULTISELECT 0x0002
2991 #define MCS_WEEKNUMBERS 0x0004
2992 #define MCS_NOTODAY 0x0010
2993 #define MCS_NOTODAYCIRCLE 0x0008
2995 #define MCHT_TITLE 0x00010000
2996 #define MCHT_CALENDAR 0x00020000
2997 #define MCHT_TODAYLINK 0x00030000
2999 #define MCHT_NEXT 0x01000000
3000 #define MCHT_PREV 0x02000000
3001 #define MCHT_NOWHERE 0x00000000
3002 #define MCHT_TITLEBK (MCHT_TITLE)
3003 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
3004 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
3005 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
3006 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
3008 #define MCHT_CALENDARBK (MCHT_CALENDAR)
3009 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
3010 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
3011 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
3012 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
3013 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
3017 #define GMR_VISIBLE 0
3018 #define GMR_DAYSTATE 1
3021 /* Month calendar's structures */
3024 typedef struct {
3025 UINT cbSize;
3026 POINT pt;
3027 UINT uHit;
3028 SYSTEMTIME st;
3029 } MCHITTESTINFO, *PMCHITTESTINFO;
3031 typedef struct tagNMSELCHANGE
3033 NMHDR nmhdr;
3034 SYSTEMTIME stSelStart;
3035 SYSTEMTIME stSelEnd;
3036 } NMSELCHANGE, *LPNMSELCHANGE;
3038 typedef NMSELCHANGE NMSELECT, *LPNMSELECT;
3039 typedef DWORD MONTHDAYSTATE, *LPMONTHDAYSTATE;
3041 typedef struct tagNMDAYSTATE
3043 NMHDR nmhdr;
3044 SYSTEMTIME stStart;
3045 int cDayState;
3046 LPMONTHDAYSTATE prgDayState;
3047 } NMDAYSTATE, *LPNMDAYSTATE;
3050 /* macros */
3052 #define MonthCal_GetCurSel(hmc, pst) \
3053 (BOOL)SendMessageA(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
3054 #define MonthCal_SetCurSel(hmc, pst) \
3055 (BOOL)SendMessageA(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
3056 #define MonthCal_GetMaxSelCount(hmc) \
3057 (DWORD)SendMessageA(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
3058 #define MonthCal_SetMaxSelCount(hmc, n) \
3059 (BOOL)SendMessageA(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
3060 #define MonthCal_GetSelRange(hmc, rgst) \
3061 SendMessageA(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst))
3062 #define MonthCal_SetSelRange(hmc, rgst) \
3063 SendMessageA(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst))
3064 #define MonthCal_GetMonthRange(hmc, gmr, rgst) \
3065 (DWORD)SendMessageA(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
3066 #define MonthCal_SetDayState(hmc, cbds, rgds) \
3067 SendMessageA(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
3068 #define MonthCal_GetMinReqRect(hmc, prc) \
3069 SendMessageA(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
3070 #define MonthCal_SetColor(hmc, iColor, clr)\
3071 SendMessageA(hmc, MCM_SETCOLOR, iColor, clr
3072 #define MonthCal_GetColor(hmc, iColor) \
3073 SendMessageA(hmc, MCM_SETCOLOR, iColor, 0)
3074 #define MonthCal_GetToday(hmc, pst)\
3075 (BOOL)SendMessageA(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
3076 #define MonthCal_SetToday(hmc, pst)\
3077 SendMessageA(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
3078 #define MonthCal_HitTest(hmc, pinfo) \
3079 SendMessageA(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
3080 #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
3081 SendMessageA(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
3082 #define MonthCal_GetFirstDayOfWeek(hmc) \
3083 (DWORD)SendMessageA(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
3084 #define MonthCal_GetRange(hmc, rgst) \
3085 (DWORD)SendMessageA(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
3086 #define MonthCal_SetRange(hmc, gd, rgst) \
3087 (BOOL)SendMessageA(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
3088 #define MonthCal_GetMonthDelta(hmc) \
3089 (int)SendMessageA(hmc, MCM_GETMONTHDELTA, 0, 0)
3090 #define MonthCal_SetMonthDelta(hmc, n) \
3091 (int)SendMessageA(hmc, MCM_SETMONTHDELTA, n, 0)
3092 #define MonthCal_GetMaxTodayWidth(hmc) \
3093 (DWORD)SendMessageA(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
3094 #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
3095 (BOOL)SendMessageA((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
3096 #define MonthCal_GetUnicodeFormat(hwnd) \
3097 (BOOL)SendMessageA((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
3100 /**************************************************************************
3101 * Date and time picker control
3104 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
3105 #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
3106 #define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
3108 #define DTM_FIRST 0x1000
3109 #define DTN_FIRST (0U-760U)
3110 #define DTN_LAST (0U-799U)
3113 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
3114 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
3115 #define DTM_GETRANGE (DTM_FIRST+3)
3116 #define DTM_SETRANGE (DTM_FIRST+4)
3117 #define DTM_SETFORMATA (DTM_FIRST+5)
3118 #define DTM_SETFORMATW (DTM_FIRST + 50)
3119 #define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
3120 #define DTM_SETMCCOLOR (DTM_FIRST+6)
3121 #define DTM_GETMCCOLOR (DTM_FIRST+7)
3122 #define DTM_GETMONTHCAL (DTM_FIRST+8)
3123 #define DTM_SETMCFONT (DTM_FIRST+9)
3124 #define DTM_GETMCFONT (DTM_FIRST+10)
3127 /* Datetime Notifications */
3129 #define DTN_DATETIMECHANGE (DTN_FIRST + 1)
3130 #define DTN_USERSTRINGA (DTN_FIRST + 2)
3131 #define DTN_WMKEYDOWNA (DTN_FIRST + 3)
3132 #define DTN_FORMATA (DTN_FIRST + 4)
3133 #define DTN_FORMATQUERYA (DTN_FIRST + 5)
3134 #define DTN_DROPDOWN (DTN_FIRST + 6)
3135 #define DTN_CLOSEUP (DTN_FIRST + 7)
3136 #define DTN_USERSTRINGW (DTN_FIRST + 15)
3137 #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
3138 #define DTN_FORMATW (DTN_FIRST + 17)
3139 #define DTN_FORMATQUERYW (DTN_FIRST + 18)
3142 #define DTS_SHORTDATEFORMAT 0x0000
3143 #define DTS_UPDOWN 0x0001
3144 #define DTS_SHOWNONE 0x0002
3145 #define DTS_LONGDATEFORMAT 0x0004
3146 #define DTS_TIMEFORMAT 0x0009
3147 #define DTS_APPCANPARSE 0x0010
3148 #define DTS_RIGHTALIGN 0x0020
3150 typedef struct tagNMDATETIMECHANGE
3152 NMHDR nmhdr;
3153 DWORD dwFlags;
3154 SYSTEMTIME st;
3155 } NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
3157 typedef struct tagNMDATETIMESTRINGA
3159 NMHDR nmhdr;
3160 LPCSTR pszUserString;
3161 SYSTEMTIME st;
3162 DWORD dwFlags;
3163 } NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;
3165 typedef struct tagNMDATETIMESTRINGW
3167 NMHDR nmhdr;
3168 LPCWSTR pszUserString;
3169 SYSTEMTIME st;
3170 DWORD dwFlags;
3171 } NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
3174 typedef struct tagNMDATETIMEWMKEYDOWNA
3176 NMHDR nmhdr;
3177 int nVirtKey;
3178 LPCSTR pszFormat;
3179 SYSTEMTIME st;
3180 } NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;
3182 typedef struct tagNMDATETIMEWMKEYDOWNW
3184 NMHDR nmhdr;
3185 int nVirtKey;
3186 LPCWSTR pszFormat;
3187 SYSTEMTIME st;
3188 } NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;
3192 typedef struct tagNMDATETIMEFORMATA
3194 NMHDR nmhdr;
3195 LPCSTR pszFormat;
3196 SYSTEMTIME st;
3197 LPCSTR pszDisplay;
3198 CHAR szDisplay[64];
3199 } NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;
3202 typedef struct tagNMDATETIMEFORMATW
3204 NMHDR nmhdr;
3205 LPCWSTR pszFormat;
3206 SYSTEMTIME st;
3207 LPCWSTR pszDisplay;
3208 WCHAR szDisplay[64];
3209 } NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;
3213 typedef struct tagNMDATETIMEFORMATQUERYA
3215 NMHDR nmhdr;
3216 LPCSTR pszFormat;
3217 SIZE szMax;
3218 } NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;
3220 typedef struct tagNMDATETIMEFORMATQUERYW
3222 NMHDR nmhdr;
3223 LPCWSTR pszFormat;
3224 SIZE szMax;
3225 } NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;
3228 #define NMDATETIMESTRING WINELIB_NAME_AW(NMDATETIMESTRING)
3229 #define NMDATETIMEWMKEYDOWN WINELIB_NAME_AW(NMDATETIMEWMKEYDOWN)
3230 #define NMDATETIMEFORMAT WINELIB_NAME_AW(NMDATETIMEFORMAT)
3231 #define NMDATETIMEFORMATQUERY WINELIB_NAME_AW(NMDATETIMEFORMATQUERY)
3237 #define GDT_ERROR -1
3238 #define GDT_VALID 0
3239 #define GDT_NONE 1
3241 #define GDTR_MIN 0x0001
3242 #define GDTR_MAX 0x0002
3245 #define DateTime_GetSystemtime(hdp, pst) \
3246 (DWORD)SendMessageA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
3247 #define DateTime_SetSystemtime(hdp, gd, pst) \
3248 (BOOL)SendMessageA (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
3249 #define DateTime_GetRange(hdp, rgst) \
3250 (DWORD)SendMessageA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
3251 #define DateTime_SetRange(hdp, gd, rgst) \
3252 (BOOL)SendMessageA (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
3253 #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
3254 #define DateTime_SetFormatA(hdp, sz) \
3255 (BOOL)SendMessageA (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
3256 #define DateTime_SetFormatW(hdp, sz) \
3257 (BOOL)SendMessageW (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
3258 #define DateTime_GetMonthCalColor(hdp, iColor) \
3259 SendMessageA (hdp, DTM_GETMCCOLOR, iColor, 0)
3260 #define DateTime_GetMonthCal(hdp) \
3261 (HWND) SendMessageA (hdp, DTM_GETMONTHCAL, 0, 0)
3262 #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \
3263 SendMessageA (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
3264 #define DateTime_GetMonthCalFont(hdp) \
3265 SendMessageA (hdp, DTM_GETMCFONT, 0, 0)
3272 /**************************************************************************
3273 * UNDOCUMENTED functions
3276 /* private heap memory functions */
3278 LPVOID WINAPI COMCTL32_Alloc (DWORD);
3279 LPVOID WINAPI COMCTL32_ReAlloc (LPVOID, DWORD);
3280 BOOL WINAPI COMCTL32_Free (LPVOID);
3281 DWORD WINAPI COMCTL32_GetSize (LPVOID);
3284 INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
3285 BOOL WINAPI Str_SetPtrA (LPSTR *, LPCSTR);
3286 INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
3287 BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
3288 #define Str_GetPtr WINELIB_NAME_AW(Str_GetPtr)
3289 #define Str_SetPtr WINELIB_NAME_AW(Str_SetPtr)
3292 /* Dynamic Storage Array */
3294 typedef struct _DSA
3296 INT nItemCount;
3297 LPVOID pData;
3298 INT nMaxCount;
3299 INT nItemSize;
3300 INT nGrow;
3301 } DSA, *HDSA;
3303 HDSA WINAPI DSA_Create (INT, INT);
3304 BOOL WINAPI DSA_DeleteAllItems (const HDSA);
3305 INT WINAPI DSA_DeleteItem (const HDSA, INT);
3306 BOOL WINAPI DSA_Destroy (const HDSA);
3307 BOOL WINAPI DSA_GetItem (const HDSA, INT, LPVOID);
3308 LPVOID WINAPI DSA_GetItemPtr (const HDSA, INT);
3309 INT WINAPI DSA_InsertItem (const HDSA, INT, LPVOID);
3310 BOOL WINAPI DSA_SetItem (const HDSA, INT, LPVOID);
3312 typedef INT (CALLBACK *DSAENUMPROC)(LPVOID, DWORD);
3313 VOID WINAPI DSA_EnumCallback (const HDSA, DSAENUMPROC, LPARAM);
3314 BOOL WINAPI DSA_DestroyCallback (const HDSA, DSAENUMPROC, LPARAM);
3317 /* Dynamic Pointer Array */
3319 typedef struct _DPA
3321 INT nItemCount;
3322 LPVOID *ptrs;
3323 HANDLE hHeap;
3324 INT nGrow;
3325 INT nMaxCount;
3326 } DPA, *HDPA;
3328 HDPA WINAPI DPA_Create (INT);
3329 HDPA WINAPI DPA_CreateEx (INT, HANDLE);
3330 BOOL WINAPI DPA_Destroy (const HDPA);
3331 HDPA WINAPI DPA_Clone (const HDPA, const HDPA);
3332 LPVOID WINAPI DPA_GetPtr (const HDPA, INT);
3333 INT WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);
3334 BOOL WINAPI DPA_Grow (const HDPA, INT);
3335 BOOL WINAPI DPA_SetPtr (const HDPA, INT, LPVOID);
3336 INT WINAPI DPA_InsertPtr (const HDPA, INT, LPVOID);
3337 LPVOID WINAPI DPA_DeletePtr (const HDPA, INT);
3338 BOOL WINAPI DPA_DeleteAllPtrs (const HDPA);
3340 typedef INT (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
3341 BOOL WINAPI DPA_Sort (const HDPA, PFNDPACOMPARE, LPARAM);
3343 #define DPAS_SORTED 0x0001
3344 #define DPAS_INSERTBEFORE 0x0002
3345 #define DPAS_INSERTAFTER 0x0004
3347 INT WINAPI DPA_Search (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
3349 #define DPAM_SORT 0x0001
3351 typedef PVOID(CALLBACK *PFNDPAMERGE)(DWORD,PVOID,PVOID,LPARAM);
3352 BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
3354 typedef INT (CALLBACK *DPAENUMPROC)(LPVOID, DWORD);
3355 VOID WINAPI DPA_EnumCallback (const HDPA, DPAENUMPROC, LPARAM);
3356 BOOL WINAPI DPA_DestroyCallback (const HDPA, DPAENUMPROC, LPARAM);
3359 #define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
3360 #define DPA_GetPtrPtr(hdpa) (*((LPVOID**)((BYTE*)(hdpa)+sizeof(INT))))
3361 #define DPA_FastGetPtr(hdpa,i) (DPA_GetPtrPtr(hdpa)[i])
3364 /* notification helper functions */
3366 LRESULT WINAPI COMCTL32_SendNotify (HWND, HWND, UINT, LPNMHDR);
3368 /* type and functionality of last parameter is still unknown */
3369 LRESULT WINAPI COMCTL32_SendNotifyEx (HWND, HWND, UINT, LPNMHDR, DWORD);
3371 #ifdef __cplusplus
3373 #endif
3375 #endif /* __WINE_COMMCTRL_H */