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