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