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