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