Tweak 'Will there be a Windows version of Wine?':
[wine.git] / include / commctrl.h
blob7ba661401752076daacca33719f6748f2f013cf4
1 /*
2 * Common controls definitions
4 * Copyright (C) the Wine project
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_COMMCTRL_H
22 #define __WINE_COMMCTRL_H
24 #include "windef.h"
25 #include "winbase.h"
26 #include "wingdi.h"
27 #include "winuser.h"
28 #include "winnls.h"
29 #include "prsht.h"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
35 BOOL WINAPI ShowHideMenuCtl (HWND, UINT, LPINT);
36 VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, LPINT);
37 VOID WINAPI InitCommonControls (VOID);
39 typedef struct tagINITCOMMONCONTROLSEX {
40 DWORD dwSize;
41 DWORD dwICC;
42 } INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
44 BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
46 LANGID WINAPI GetMUILanguage (VOID);
47 VOID WINAPI InitMUILanguage (LANGID uiLang);
50 #define COMCTL32_VERSION 5 /* dll version */
52 #ifndef _WIN32_IE
53 #define _WIN32_IE 0x0400
54 #endif
56 #define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
57 #define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
58 #define ICC_BAR_CLASSES 0x00000004 /* toolbar, statusbar, trackbar, tooltips */
59 #define ICC_TAB_CLASSES 0x00000008 /* tab, tooltips */
60 #define ICC_UPDOWN_CLASS 0x00000010 /* updown */
61 #define ICC_PROGRESS_CLASS 0x00000020 /* progress */
62 #define ICC_HOTKEY_CLASS 0x00000040 /* hotkey */
63 #define ICC_ANIMATE_CLASS 0x00000080 /* animate */
64 #define ICC_WIN95_CLASSES 0x000000FF
65 #define ICC_DATE_CLASSES 0x00000100 /* month picker, date picker, time picker, updown */
66 #define ICC_USEREX_CLASSES 0x00000200 /* comboex */
67 #define ICC_COOL_CLASSES 0x00000400 /* rebar (coolbar) */
68 #define ICC_INTERNET_CLASSES 0x00000800 /* IP address, ... */
69 #define ICC_PAGESCROLLER_CLASS 0x00001000 /* page scroller */
70 #define ICC_NATIVEFNTCTL_CLASS 0x00002000 /* native font control ???*/
73 /* common control styles */
74 #define CCS_TOP 0x00000001L
75 #define CCS_NOMOVEY 0x00000002L
76 #define CCS_BOTTOM 0x00000003L
77 #define CCS_NORESIZE 0x00000004L
78 #define CCS_NOPARENTALIGN 0x00000008L
79 #define CCS_ADJUSTABLE 0x00000020L
80 #define CCS_NODIVIDER 0x00000040L
81 #define CCS_VERT 0x00000080L
82 #define CCS_LEFT (CCS_VERT|CCS_TOP)
83 #define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
84 #define CCS_NOMOVEX (CCS_VERT|CCS_NOMOVEY)
87 /* common control shared messages */
88 #define CCM_FIRST 0x2000
90 #define CCM_SETBKCOLOR (CCM_FIRST+1) /* lParam = bkColor */
91 #define CCM_SETCOLORSCHEME (CCM_FIRST+2) /* lParam = COLORSCHEME struct ptr */
92 #define CCM_GETCOLORSCHEME (CCM_FIRST+3) /* lParam = COLORSCHEME struct ptr */
93 #define CCM_GETDROPTARGET (CCM_FIRST+4)
94 #define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
95 #define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
96 #define CCM_SETVERSION (CCM_FIRST+7)
97 #define CCM_GETVERSION (CCM_FIRST+8)
98 #define CCM_SETNOTIFYWINDOW (CCM_FIRST+9) /* wParam = hwndParent */
101 /* common notification codes (WM_NOTIFY)*/
102 #define NM_FIRST (0U- 0U)
103 #define NM_LAST (0U- 99U)
104 #define NM_OUTOFMEMORY (NM_FIRST-1)
105 #define NM_CLICK (NM_FIRST-2)
106 #define NM_DBLCLK (NM_FIRST-3)
107 #define NM_RETURN (NM_FIRST-4)
108 #define NM_RCLICK (NM_FIRST-5)
109 #define NM_RDBLCLK (NM_FIRST-6)
110 #define NM_SETFOCUS (NM_FIRST-7)
111 #define NM_KILLFOCUS (NM_FIRST-8)
112 #define NM_CUSTOMDRAW (NM_FIRST-12)
113 #define NM_HOVER (NM_FIRST-13)
114 #define NM_NCHITTEST (NM_FIRST-14)
115 #define NM_KEYDOWN (NM_FIRST-15)
116 #define NM_RELEASEDCAPTURE (NM_FIRST-16)
117 #define NM_SETCURSOR (NM_FIRST-17)
118 #define NM_CHAR (NM_FIRST-18)
119 #define NM_TOOLTIPSCREATED (NM_FIRST-19)
121 #define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) \
122 (fn)((hwnd), (int)(wParam), (NMHDR*)(lParam))
123 #define FORWARD_WM_NOTIFY(hwnd, idFrom, pnmhdr, fn) \
124 (LRESULT)(fn)((hwnd), WM_NOTIFY, (WPARAM)(int)(idFrom), (LPARAM)(NMHDR*)(pnmhdr))
127 /* callback constants */
128 #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
129 #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
130 #define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
132 #define I_IMAGECALLBACK (-1)
133 #define I_IMAGENONE (-2)
134 #define I_INDENTCALLBACK (-1)
135 #define I_CHILDRENCALLBACK (-1)
137 /* owner drawn types */
138 #define ODT_HEADER 100
139 #define ODT_TAB 101
140 #define ODT_LISTVIEW 102
142 /* common notification structures */
143 typedef struct tagNMTOOLTIPSCREATED
145 NMHDR hdr;
146 HWND hwndToolTips;
147 } NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;
149 typedef struct tagNMMOUSE
151 NMHDR hdr;
152 DWORD dwItemSpec;
153 DWORD dwItemData;
154 POINT pt;
155 DWORD dwHitInfo; /* info where on item or control the mouse is */
156 } NMMOUSE, *LPNMMOUSE;
158 typedef struct tagNMOBJECTNOTIFY
160 NMHDR hdr;
161 int iItem;
162 #ifdef __IID_DEFINED__
163 const IID *piid;
164 #else
165 const void *piid;
166 #endif
167 void *pObject;
168 HRESULT hResult;
169 DWORD dwFlags;
170 } NMOBJECTNOTIFY, *LPNMOBJECTNOTIFY;
172 typedef struct tagNMKEY
174 NMHDR hdr;
175 UINT nVKey;
176 UINT uFlags;
177 } NMKEY, *LPNMKEY;
179 typedef struct tagNMCHAR
181 NMHDR hdr;
182 UINT ch;
183 DWORD dwItemPrev; /* Item previously selected */
184 DWORD dwItemNext; /* Item to be selected */
185 } NMCHAR, *LPNMCHAR;
187 #ifndef CCSIZEOF_STRUCT
188 #define CCSIZEOF_STRUCT(name, member) \
189 (((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
190 sizeof(((name*)0)->member))
191 #endif
194 /* This is only for Winelib applications. DON't use it wine itself!!! */
195 #ifndef SNDMSG
196 #ifdef __cplusplus
197 #define SNDMSG ::SendMessage
198 #else /* __cplusplus */
199 #define SNDMSG SendMessage
200 #endif /* __cplusplus */
201 #endif /* SNDMSG */
204 #ifdef __cplusplus
205 #define SNDMSGA ::SendMessageA
206 #define SNDMSGW ::SendMessageW
207 #else
208 #define SNDMSGA SendMessageA
209 #define SNDMSGW SendMessageW
210 #endif
212 /* Custom Draw messages */
214 #define CDRF_DODEFAULT 0x0
215 #define CDRF_NEWFONT 0x00000002
216 #define CDRF_SKIPDEFAULT 0x00000004
217 #define CDRF_NOTIFYPOSTPAINT 0x00000010
218 #define CDRF_NOTIFYITEMDRAW 0x00000020
219 #define CDRF_NOTIFYSUBITEMDRAW 0x00000020
220 #define CDRF_NOTIFYPOSTERASE 0x00000040
221 #define CDRF_NOTIFYITEMERASE 0x00000080 /* obsolete ??? */
224 /* drawstage flags */
226 #define CDDS_PREPAINT 1
227 #define CDDS_POSTPAINT 2
228 #define CDDS_PREERASE 3
229 #define CDDS_POSTERASE 4
231 #define CDDS_ITEM 0x00010000
232 #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
233 #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
234 #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
235 #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
236 #define CDDS_SUBITEM 0x00020000
238 /* itemState flags */
240 #define CDIS_SELECTED 0x0001
241 #define CDIS_GRAYED 0x0002
242 #define CDIS_DISABLED 0x0004
243 #define CDIS_CHECKED 0x0008
244 #define CDIS_FOCUS 0x0010
245 #define CDIS_DEFAULT 0x0020
246 #define CDIS_HOT 0x0040
247 #define CDIS_MARKED 0x0080
248 #define CDIS_INDETERMINATE 0x0100
251 typedef struct tagNMCUSTOMDRAWINFO
253 NMHDR hdr;
254 DWORD dwDrawStage;
255 HDC hdc;
256 RECT rc;
257 DWORD dwItemSpec;
258 UINT uItemState;
259 LPARAM lItemlParam;
260 } NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
262 typedef struct tagNMTTCUSTOMDRAW
264 NMCUSTOMDRAW nmcd;
265 UINT uDrawFlags;
266 } NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
271 /* StatusWindow */
273 #define STATUSCLASSNAME16 "msctls_statusbar"
274 #define STATUSCLASSNAMEA "msctls_statusbar32"
275 #if defined(__GNUC__)
276 # define STATUSCLASSNAMEW (const WCHAR []){ 'm','s','c','t','l','s','_', \
277 's','t','a','t','u','s','b','a','r','3','2',0 }
278 #elif defined(_MSC_VER)
279 # define STATUSCLASSNAMEW L"msctls_statusbar32"
280 #else
281 static const WCHAR STATUSCLASSNAMEW[] = { 'm','s','c','t','l','s','_',
282 's','t','a','t','u','s','b','a','r','3','2',0 };
283 #endif
284 #define STATUSCLASSNAME WINELIB_NAME_AW(STATUSCLASSNAME)
286 #define SBT_NOBORDERS 0x0100
287 #define SBT_POPOUT 0x0200
288 #define SBT_RTLREADING 0x0400 /* not supported */
289 #define SBT_TOOLTIPS 0x0800
290 #define SBT_OWNERDRAW 0x1000
292 #define SBARS_SIZEGRIP 0x0100
294 #define SB_SETTEXTA (WM_USER+1)
295 #define SB_SETTEXTW (WM_USER+11)
296 #define SB_SETTEXT WINELIB_NAME_AW(SB_SETTEXT)
297 #define SB_GETTEXTA (WM_USER+2)
298 #define SB_GETTEXTW (WM_USER+13)
299 #define SB_GETTEXT WINELIB_NAME_AW(SB_GETTEXT)
300 #define SB_GETTEXTLENGTHA (WM_USER+3)
301 #define SB_GETTEXTLENGTHW (WM_USER+12)
302 #define SB_GETTEXTLENGTH WINELIB_NAME_AW(SB_GETTEXTLENGTH)
303 #define SB_SETPARTS (WM_USER+4)
304 #define SB_SETBORDERS (WM_USER+5)
305 #define SB_GETPARTS (WM_USER+6)
306 #define SB_GETBORDERS (WM_USER+7)
307 #define SB_SETMINHEIGHT (WM_USER+8)
308 #define SB_SIMPLE (WM_USER+9)
309 #define SB_GETRECT (WM_USER+10)
310 #define SB_ISSIMPLE (WM_USER+14)
311 #define SB_SETICON (WM_USER+15)
312 #define SB_SETTIPTEXTA (WM_USER+16)
313 #define SB_SETTIPTEXTW (WM_USER+17)
314 #define SB_SETTIPTEXT WINELIB_NAME_AW(SB_SETTIPTEXT)
315 #define SB_GETTIPTEXTA (WM_USER+18)
316 #define SB_GETTIPTEXTW (WM_USER+19)
317 #define SB_GETTIPTEXT WINELIB_NAME_AW(SB_GETTIPTEXT)
318 #define SB_GETICON (WM_USER+20)
319 #define SB_SETBKCOLOR CCM_SETBKCOLOR /* lParam = bkColor */
320 #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
321 #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
323 #define SBN_FIRST (0U-880U)
324 #define SBN_LAST (0U-899U)
325 #define SBN_SIMPLEMODECHANGE (SBN_FIRST-0)
327 HWND WINAPI CreateStatusWindowA (INT, LPCSTR, HWND, UINT);
328 HWND WINAPI CreateStatusWindowW (INT, LPCWSTR, HWND, UINT);
329 #define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
330 VOID WINAPI DrawStatusTextA (HDC, LPRECT, LPCSTR, UINT);
331 VOID WINAPI DrawStatusTextW (HDC, LPRECT, LPCWSTR, UINT);
332 #define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
333 VOID WINAPI MenuHelp (UINT, WPARAM, LPARAM, HMENU,
334 HINSTANCE, HWND, UINT*);
336 typedef struct tagCOLORSCHEME
338 DWORD dwSize;
339 COLORREF clrBtnHighlight; /* highlight color */
340 COLORREF clrBtnShadow; /* shadow color */
341 } COLORSCHEME, *LPCOLORSCHEME;
343 /**************************************************************************
344 * Drag List control
347 typedef struct tagDRAGLISTINFO
349 UINT uNotification;
350 HWND hWnd;
351 POINT ptCursor;
352 } DRAGLISTINFO, *LPDRAGLISTINFO;
354 #define DL_BEGINDRAG (WM_USER+133)
355 #define DL_DRAGGING (WM_USER+134)
356 #define DL_DROPPED (WM_USER+135)
357 #define DL_CANCELDRAG (WM_USER+136)
359 #define DL_CURSORSET 0
360 #define DL_STOPCURSOR 1
361 #define DL_COPYCURSOR 2
362 #define DL_MOVECURSOR 3
364 #define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
366 BOOL WINAPI MakeDragList (HWND);
367 VOID WINAPI DrawInsert (HWND, HWND, INT);
368 INT WINAPI LBItemFromPt (HWND, POINT, BOOL);
371 /* UpDown */
373 #define UPDOWN_CLASS16 "msctls_updown"
374 #define UPDOWN_CLASSA "msctls_updown32"
375 #if defined(__GNUC__)
376 # define UPDOWN_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
377 'u','p','d','o','w','n','3','2',0 }
378 #elif defined(_MSC_VER)
379 # define UPDOWN_CLASSW L"msctls_updown32"
380 #else
381 static const WCHAR UPDOWN_CLASSW[] = { 'm','s','c','t','l','s','_',
382 'u','p','d','o','w','n','3','2',0 };
383 #endif
384 #define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
386 typedef struct tagUDACCEL
388 UINT nSec;
389 UINT nInc;
390 } UDACCEL, *LPUDACCEL;
392 #define UD_MAXVAL 0x7fff
393 #define UD_MINVAL 0x8001
395 #define UDS_WRAP 0x0001
396 #define UDS_SETBUDDYINT 0x0002
397 #define UDS_ALIGNRIGHT 0x0004
398 #define UDS_ALIGNLEFT 0x0008
399 #define UDS_AUTOBUDDY 0x0010
400 #define UDS_ARROWKEYS 0x0020
401 #define UDS_HORZ 0x0040
402 #define UDS_NOTHOUSANDS 0x0080
403 #define UDS_HOTTRACK 0x0100
405 #define UDN_FIRST (0U-721)
406 #define UDN_LAST (0U-740)
407 #define UDN_DELTAPOS (UDN_FIRST-1)
409 #define UDM_SETRANGE (WM_USER+101)
410 #define UDM_GETRANGE (WM_USER+102)
411 #define UDM_SETPOS (WM_USER+103)
412 #define UDM_GETPOS (WM_USER+104)
413 #define UDM_SETBUDDY (WM_USER+105)
414 #define UDM_GETBUDDY (WM_USER+106)
415 #define UDM_SETACCEL (WM_USER+107)
416 #define UDM_GETACCEL (WM_USER+108)
417 #define UDM_SETBASE (WM_USER+109)
418 #define UDM_GETBASE (WM_USER+110)
419 #define UDM_SETRANGE32 (WM_USER+111)
420 #define UDM_GETRANGE32 (WM_USER+112)
421 #define UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
422 #define UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
423 #define UDM_SETPOS32 (WM_USER+113)
424 #define UDM_GETPOS32 (WM_USER+114)
427 #define NMUPDOWN NM_UPDOWN
428 #define LPNMUPDOWN LPNM_UPDOWN
430 typedef struct tagNM_UPDOWN
432 NMHDR hdr;
433 int iPos;
434 int iDelta;
435 } NM_UPDOWN, *LPNM_UPDOWN;
437 HWND WINAPI CreateUpDownControl (DWORD, INT, INT, INT, INT,
438 HWND, INT, HINSTANCE, HWND,
439 INT, INT, INT);
441 /* Progress Bar */
443 #define PROGRESS_CLASS16 "msctls_progress"
444 #define PROGRESS_CLASSA "msctls_progress32"
445 #if defined(__GNUC__)
446 # define PROGRESS_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
447 'p','r','o','g','r','e','s','s','3','2',0 }
448 #elif defined(_MSC_VER)
449 # define PROGRESS_CLASSW L"msctls_progress32"
450 #else
451 static const WCHAR PROGRESS_CLASSW[] = { 'm','s','c','t','l','s','_',
452 'p','r','o','g','r','e','s','s','3','2',0 };
453 #endif
454 #define PROGRESS_CLASS WINELIB_NAME_AW(PROGRESS_CLASS)
456 #define PBM_SETRANGE (WM_USER+1)
457 #define PBM_SETPOS (WM_USER+2)
458 #define PBM_DELTAPOS (WM_USER+3)
459 #define PBM_SETSTEP (WM_USER+4)
460 #define PBM_STEPIT (WM_USER+5)
461 #define PBM_SETRANGE32 (WM_USER+6)
462 #define PBM_GETRANGE (WM_USER+7)
463 #define PBM_GETPOS (WM_USER+8)
464 #define PBM_SETBARCOLOR (WM_USER+9)
465 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
467 #define PBS_SMOOTH 0x01
468 #define PBS_VERTICAL 0x04
470 typedef struct
472 INT iLow;
473 INT iHigh;
474 } PBRANGE, *PPBRANGE;
477 /* ImageList */
479 struct _IMAGELIST;
480 typedef struct _IMAGELIST *HIMAGELIST;
482 #define CLR_NONE 0xFFFFFFFF
483 #define CLR_DEFAULT 0xFF000000
484 #define CLR_HILIGHT CLR_DEFAULT
486 #define ILC_MASK 0x0001
487 #define ILC_COLOR 0x0000
488 #define ILC_COLORDDB 0x00FE
489 #define ILC_COLOR4 0x0004
490 #define ILC_COLOR8 0x0008
491 #define ILC_COLOR16 0x0010
492 #define ILC_COLOR24 0x0018
493 #define ILC_COLOR32 0x0020
494 #define ILC_PALETTE 0x0800 /* no longer supported by M$ */
496 #define ILD_NORMAL 0x0000
497 #define ILD_TRANSPARENT 0x0001
498 #define ILD_BLEND25 0x0002
499 #define ILD_BLEND50 0x0004
500 #define ILD_MASK 0x0010
501 #define ILD_IMAGE 0x0020
502 #define ILD_ROP 0x0040
503 #define ILD_OVERLAYMASK 0x0F00
504 #define ILD_PRESERVEALPHA 0x1000
505 #define ILD_SCALE 0x2000
506 #define ILD_DPISCALE 0x4000
508 #define ILD_SELECTED ILD_BLEND50
509 #define ILD_FOCUS ILD_BLEND25
510 #define ILD_BLEND ILD_BLEND50
512 #define INDEXTOOVERLAYMASK(i) ((i)<<8)
513 #define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
515 #define ILCF_MOVE (0x00000000)
516 #define ILCF_SWAP (0x00000001)
518 #define ILS_NORMAL 0x0000
519 #define ILS_GLOW 0x0001
520 #define ILS_SHADOW 0x0002
521 #define ILS_SATURATE 0x0004
522 #define ILS_ALPHA 0x0008
524 typedef struct _IMAGEINFO
526 HBITMAP hbmImage;
527 HBITMAP hbmMask;
528 INT Unused1;
529 INT Unused2;
530 RECT rcImage;
531 } IMAGEINFO, *LPIMAGEINFO;
534 typedef struct _IMAGELISTDRAWPARAMS
536 DWORD cbSize;
537 HIMAGELIST himl;
538 INT i;
539 HDC hdcDst;
540 INT x;
541 INT y;
542 INT cx;
543 INT cy;
544 INT xBitmap; /* x offest from the upperleft of bitmap */
545 INT yBitmap; /* y offset from the upperleft of bitmap */
546 COLORREF rgbBk;
547 COLORREF rgbFg;
548 UINT fStyle;
549 DWORD dwRop;
550 DWORD fState;
551 DWORD Frame;
552 DWORD crEffect;
553 } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
556 INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
557 INT WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
558 BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT);
559 BOOL WINAPI ImageList_Copy(HIMAGELIST,INT,HIMAGELIST,INT,INT);
560 HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
561 BOOL WINAPI ImageList_Destroy(HIMAGELIST);
562 BOOL WINAPI ImageList_DragEnter(HWND,INT,INT);
563 BOOL WINAPI ImageList_DragLeave(HWND);
564 BOOL WINAPI ImageList_DragMove(INT,INT);
565 BOOL WINAPI ImageList_DragShowNolock (BOOL);
566 BOOL WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
567 BOOL WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
568 INT,COLORREF,COLORREF,UINT);
569 BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
570 HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
571 BOOL WINAPI ImageList_EndDrag(VOID);
572 COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
573 HIMAGELIST WINAPI ImageList_GetDragImage(POINT*,POINT*);
574 HICON WINAPI ImageList_GetIcon(HIMAGELIST,INT,UINT);
575 BOOL WINAPI ImageList_GetIconSize(HIMAGELIST,INT*,INT*);
576 INT WINAPI ImageList_GetImageCount(HIMAGELIST);
577 BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST,INT,IMAGEINFO*);
578 BOOL WINAPI ImageList_GetImageRect(HIMAGELIST,INT,LPRECT);
579 HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,INT,INT,
580 COLORREF,UINT,UINT);
581 HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,INT,INT,
582 COLORREF,UINT,UINT);
583 #define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
584 HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
585 #ifdef IStream_METHODS
586 HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
587 #endif
588 BOOL WINAPI ImageList_Remove(HIMAGELIST,INT);
589 BOOL WINAPI ImageList_Replace(HIMAGELIST,INT,HBITMAP,HBITMAP);
590 INT WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT,HICON);
591 COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
592 BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT,INT,INT);
594 BOOL WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
595 BOOL WINAPI ImageList_SetImageCount(HIMAGELIST,INT);
596 BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
597 #ifdef IStream_METHODS
598 BOOL WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
599 #endif
601 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
602 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
603 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
604 ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
605 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
608 #ifndef WM_MOUSEHOVER
609 #define WM_MOUSEHOVER 0x02A1
610 #define WM_MOUSELEAVE 0x02A3
611 #endif
613 #ifndef TME_HOVER
615 #define TME_HOVER 0x00000001
616 #define TME_LEAVE 0x00000002
617 #define TME_QUERY 0x40000000
618 #define TME_CANCEL 0x80000000
621 #define HOVER_DEFAULT 0xFFFFFFFF
623 typedef struct tagTRACKMOUSEEVENT {
624 DWORD cbSize;
625 DWORD dwFlags;
626 HWND hwndTrack;
627 DWORD dwHoverTime;
628 } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
630 #endif
632 BOOL
633 WINAPI
634 _TrackMouseEvent(
635 LPTRACKMOUSEEVENT lpEventTrack);
637 /* Flat Scrollbar control */
639 #define FLATSB_CLASS16 "flatsb_class"
640 #define FLATSB_CLASSA "flatsb_class32"
641 #if defined(__GNUC__)
642 # define FLATSB_CLASSW (const WCHAR []){ 'f','l','a','t','s','b','_', \
643 'c','l','a','s','s','3','2',0 }
644 #elif defined(_MSC_VER)
645 # define FLATSB_CLASSW L"flatsb_class32"
646 #else
647 static const WCHAR FLATSB_CLASSW[] = { 'f','l','a','t','s','b','_',
648 'c','l','a','s','s','3','2',0 };
649 #endif
650 #define FLATSB_CLASS WINELIB_NAME_AW(FLATSB_CLASS)
652 #define WSB_PROP_CYVSCROLL 0x00000001L
653 #define WSB_PROP_CXHSCROLL 0x00000002L
654 #define WSB_PROP_CYHSCROLL 0x00000004L
655 #define WSB_PROP_CXVSCROLL 0x00000008L
656 #define WSB_PROP_CXHTHUMB 0x00000010L
657 #define WSB_PROP_CYVTHUMB 0x00000020L
658 #define WSB_PROP_VBKGCOLOR 0x00000040L
659 #define WSB_PROP_HBKGCOLOR 0x00000080L
660 #define WSB_PROP_VSTYLE 0x00000100L
661 #define WSB_PROP_HSTYLE 0x00000200L
662 #define WSB_PROP_WINSTYLE 0x00000400L
663 #define WSB_PROP_PALETTE 0x00000800L
664 #define WSB_PROP_MASK 0x00000FFFL
666 #define FSB_REGULAR_MODE 0
667 #define FSB_ENCARTA_MODE 1
668 #define FSB_FLAT_MODE 2
671 BOOL WINAPI FlatSB_EnableScrollBar(HWND, INT, UINT);
672 BOOL WINAPI FlatSB_ShowScrollBar(HWND, INT, BOOL);
673 BOOL WINAPI FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
674 BOOL WINAPI FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
675 INT WINAPI FlatSB_GetScrollPos(HWND, INT);
676 BOOL WINAPI FlatSB_GetScrollProp(HWND, INT, LPINT);
677 INT WINAPI FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
678 INT WINAPI FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
679 INT WINAPI FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
680 BOOL WINAPI FlatSB_SetScrollProp(HWND, UINT, INT, BOOL);
681 BOOL WINAPI InitializeFlatSB(HWND);
682 HRESULT WINAPI UninitializeFlatSB(HWND);
684 /* Subclassing stuff */
685 typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR);
686 BOOL WINAPI SetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
687 BOOL WINAPI GetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR*);
688 BOOL WINAPI RemoveWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR);
689 LRESULT WINAPI DefSubclassProc(HWND, UINT, WPARAM, LPARAM);
691 /* Header control */
693 #define WC_HEADER16 "SysHeader"
694 #define WC_HEADERA "SysHeader32"
695 #if defined(__GNUC__)
696 # define WC_HEADERW (const WCHAR []){ 'S','y','s','H','e','a','d','e','r','3','2',0 }
697 #elif defined(_MSC_VER)
698 # define WC_HEADERW L"SysHeader32"
699 #else
700 static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',0 };
701 #endif
702 #define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
704 #define HDS_HORZ 0x0000
705 #define HDS_BUTTONS 0x0002
706 #define HDS_HOTTRACK 0x0004
707 #define HDS_HIDDEN 0x0008
708 #define HDS_DRAGDROP 0x0040
709 #define HDS_FULLDRAG 0x0080
711 #define HDI_WIDTH 0x0001
712 #define HDI_HEIGHT HDI_WIDTH
713 #define HDI_TEXT 0x0002
714 #define HDI_FORMAT 0x0004
715 #define HDI_LPARAM 0x0008
716 #define HDI_BITMAP 0x0010
717 #define HDI_IMAGE 0x0020
718 #define HDI_DI_SETITEM 0x0040
719 #define HDI_ORDER 0x0080
721 #define HDF_LEFT 0x0000
722 #define HDF_RIGHT 0x0001
723 #define HDF_CENTER 0x0002
724 #define HDF_JUSTIFYMASK 0x0003
725 #define HDF_RTLREADING 0x0004
727 #define HDF_IMAGE 0x0800
728 #define HDF_BITMAP_ON_RIGHT 0x1000
729 #define HDF_BITMAP 0x2000
730 #define HDF_STRING 0x4000
731 #define HDF_OWNERDRAW 0x8000
733 #define HHT_NOWHERE 0x0001
734 #define HHT_ONHEADER 0x0002
735 #define HHT_ONDIVIDER 0x0004
736 #define HHT_ONDIVOPEN 0x0008
737 #define HHT_ABOVE 0x0100
738 #define HHT_BELOW 0x0200
739 #define HHT_TORIGHT 0x0400
740 #define HHT_TOLEFT 0x0800
742 #define HDM_FIRST 0x1200
743 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
744 #define HDM_INSERTITEMA (HDM_FIRST+1)
745 #define HDM_INSERTITEMW (HDM_FIRST+10)
746 #define HDM_INSERTITEM WINELIB_NAME_AW(HDM_INSERTITEM)
747 #define HDM_DELETEITEM (HDM_FIRST+2)
748 #define HDM_GETITEMA (HDM_FIRST+3)
749 #define HDM_GETITEMW (HDM_FIRST+11)
750 #define HDM_GETITEM WINELIB_NAME_AW(HDM_GETITEM)
751 #define HDM_SETITEMA (HDM_FIRST+4)
752 #define HDM_SETITEMW (HDM_FIRST+12)
753 #define HDM_SETITEM WINELIB_NAME_AW(HDM_SETITEM)
754 #define HDM_LAYOUT (HDM_FIRST+5)
755 #define HDM_HITTEST (HDM_FIRST+6)
756 #define HDM_GETITEMRECT (HDM_FIRST+7)
757 #define HDM_SETIMAGELIST (HDM_FIRST+8)
758 #define HDM_GETIMAGELIST (HDM_FIRST+9)
760 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
761 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
762 #define HDM_GETORDERARRAY (HDM_FIRST+17)
763 #define HDM_SETORDERARRAY (HDM_FIRST+18)
764 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
765 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
766 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
768 #define HDN_FIRST (0U-300U)
769 #define HDN_LAST (0U-399U)
770 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
771 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
772 #define HDN_ITEMCHANGING WINELIB_NAME_AW(HDN_ITEMCHANGING)
773 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
774 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
775 #define HDN_ITEMCHANGED WINELIB_NAME_AW(HDN_ITEMCHANGED)
776 #define HDN_ITEMCLICKA (HDN_FIRST-2)
777 #define HDN_ITEMCLICKW (HDN_FIRST-22)
778 #define HDN_ITEMCLICK WINELIB_NAME_AW(HDN_ITEMCLICK)
779 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
780 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
781 #define HDN_ITEMDBLCLICK WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
782 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
783 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
784 #define HDN_DIVIDERDBLCLICK WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
785 #define HDN_BEGINTRACKA (HDN_FIRST-6)
786 #define HDN_BEGINTRACKW (HDN_FIRST-26)
787 #define HDN_BEGINTRACK WINELIB_NAME_AW(HDN_BEGINTRACK)
788 #define HDN_ENDTRACKA (HDN_FIRST-7)
789 #define HDN_ENDTRACKW (HDN_FIRST-27)
790 #define HDN_ENDTRACK WINELIB_NAME_AW(HDN_ENDTRACK)
791 #define HDN_TRACKA (HDN_FIRST-8)
792 #define HDN_TRACKW (HDN_FIRST-28)
793 #define HDN_TRACK WINELIB_NAME_AW(HDN_TRACK)
794 #define HDN_GETDISPINFOA (HDN_FIRST-9)
795 #define HDN_GETDISPINFOW (HDN_FIRST-29)
796 #define HDN_GETDISPINFO WINELIB_NAME_AW(HDN_GETDISPINFO)
797 #define HDN_BEGINDRAG (HDN_FIRST-10)
798 #define HDN_ENDDRAG (HDN_FIRST-11)
800 typedef struct _HD_LAYOUT
802 RECT *prc;
803 WINDOWPOS *pwpos;
804 } HDLAYOUT, *LPHDLAYOUT;
806 #define HD_LAYOUT HDLAYOUT
808 typedef struct _HD_ITEMA
810 UINT mask;
811 INT cxy;
812 LPSTR pszText;
813 HBITMAP hbm;
814 INT cchTextMax;
815 INT fmt;
816 LPARAM lParam;
817 INT iImage;
818 INT iOrder;
819 UINT type;
820 LPVOID pvFilter;
821 } HDITEMA, *LPHDITEMA;
823 typedef struct _HD_ITEMW
825 UINT mask;
826 INT cxy;
827 LPWSTR pszText;
828 HBITMAP hbm;
829 INT cchTextMax;
830 INT fmt;
831 LPARAM lParam;
832 INT iImage;
833 INT iOrder;
834 UINT type;
835 LPVOID pvFilter;
836 } HDITEMW, *LPHDITEMW;
838 #define HDITEM WINELIB_NAME_AW(HDITEM)
839 #define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
840 #define HD_ITEM HDITEM
842 #define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
843 #define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
844 #define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
846 typedef struct _HD_HITTESTINFO
848 POINT pt;
849 UINT flags;
850 INT iItem;
851 } HDHITTESTINFO, *LPHDHITTESTINFO;
853 #define HD_HITTESTINFO HDHITTESTINFO
855 typedef struct tagNMHEADERA
857 NMHDR hdr;
858 INT iItem;
859 INT iButton;
860 HDITEMA *pitem;
861 } NMHEADERA, *LPNMHEADERA;
863 typedef struct tagNMHEADERW
865 NMHDR hdr;
866 INT iItem;
867 INT iButton;
868 HDITEMW *pitem;
869 } NMHEADERW, *LPNMHEADERW;
871 #define NMHEADER WINELIB_NAME_AW(NMHEADER)
872 #define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
873 #define HD_NOTIFY NMHEADER
875 typedef struct tagNMHDDISPINFOA
877 NMHDR hdr;
878 INT iItem;
879 UINT mask;
880 LPSTR pszText;
881 INT cchTextMax;
882 INT iImage;
883 LPARAM lParam;
884 } NMHDDISPINFOA, *LPNMHDDISPINFOA;
886 typedef struct tagNMHDDISPINFOW
888 NMHDR hdr;
889 INT iItem;
890 UINT mask;
891 LPWSTR pszText;
892 INT cchTextMax;
893 INT iImage;
894 LPARAM lParam;
895 } NMHDDISPINFOW, *LPNMHDDISPINFOW;
897 #define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
898 #define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
900 #define Header_GetItemCount(hwndHD) \
901 (INT)SNDMSGA((hwndHD),HDM_GETITEMCOUNT,0,0L)
902 #define Header_InsertItemA(hwndHD,i,phdi) \
903 (INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
904 #define Header_InsertItemW(hwndHD,i,phdi) \
905 (INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
906 #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
907 #define Header_DeleteItem(hwndHD,i) \
908 (BOOL)SNDMSGA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
909 #define Header_GetItemA(hwndHD,i,phdi) \
910 (BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
911 #define Header_GetItemW(hwndHD,i,phdi) \
912 (BOOL)SNDMSGW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
913 #define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
914 #define Header_SetItemA(hwndHD,i,phdi) \
915 (BOOL)SNDMSGA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
916 #define Header_SetItemW(hwndHD,i,phdi) \
917 (BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
918 #define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
919 #define Header_Layout(hwndHD,playout) \
920 (BOOL)SNDMSGA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
921 #define Header_GetItemRect(hwnd,iItem,lprc) \
922 (BOOL)SNDMSGA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
923 #define Header_SetImageList(hwnd,himl) \
924 (HIMAGELIST)SNDMSGA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
925 #define Header_GetImageList(hwnd) \
926 (HIMAGELIST)SNDMSGA((hwnd),HDM_GETIMAGELIST,0,0)
927 #define Header_OrderToIndex(hwnd,i) \
928 (INT)SNDMSGA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
929 #define Header_CreateDragImage(hwnd,i) \
930 (HIMAGELIST)SNDMSGA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
931 #define Header_GetOrderArray(hwnd,iCount,lpi) \
932 (BOOL)SNDMSGA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
933 #define Header_SetOrderArray(hwnd,iCount,lpi) \
934 (BOOL)SNDMSGA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
935 #define Header_SetHotDivider(hwnd,fPos,dw) \
936 (INT)SNDMSGA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
937 #define Header_SetUnicodeFormat(hwnd,fUnicode) \
938 (BOOL)SNDMSGA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
939 #define Header_GetUnicodeFormat(hwnd) \
940 (BOOL)SNDMSGA((hwnd),HDM_GETUNICODEFORMAT,0,0)
943 /* Toolbar */
945 #define TOOLBARCLASSNAME16 "ToolbarWindow"
946 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
947 #if defined(__GNUC__)
948 # define TOOLBARCLASSNAMEW (const WCHAR []){ 'T','o','o','l','b','a','r', \
949 'W','i','n','d','o','w','3','2',0 }
950 #elif defined(_MSC_VER)
951 # define TOOLBARCLASSNAMEW L"ToolbarWindow32"
952 #else
953 static const WCHAR TOOLBARCLASSNAMEW[] = { 'T','o','o','l','b','a','r',
954 'W','i','n','d','o','w','3','2',0 };
955 #endif
956 #define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
958 #define CMB_MASKED 0x02
960 #define TBSTATE_CHECKED 0x01
961 #define TBSTATE_PRESSED 0x02
962 #define TBSTATE_ENABLED 0x04
963 #define TBSTATE_HIDDEN 0x08
964 #define TBSTATE_INDETERMINATE 0x10
965 #define TBSTATE_WRAP 0x20
966 #define TBSTATE_ELLIPSES 0x40
967 #define TBSTATE_MARKED 0x80
970 /* as of _WIN32_IE >= 0x0500 the following symbols are obsolete,
971 * "everyone" should use the BTNS_... stuff below
973 #define TBSTYLE_BUTTON 0x00
974 #define TBSTYLE_SEP 0x01
975 #define TBSTYLE_CHECK 0x02
976 #define TBSTYLE_GROUP 0x04
977 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
978 #define TBSTYLE_DROPDOWN 0x08
979 #define TBSTYLE_AUTOSIZE 0x10
980 #define TBSTYLE_NOPREFIX 0x20
981 #define BTNS_BUTTON TBSTYLE_BUTTON
982 #define BTNS_SEP TBSTYLE_SEP
983 #define BTNS_CHECK TBSTYLE_CHECK
984 #define BTNS_GROUP TBSTYLE_GROUP
985 #define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP
986 #define BTNS_DROPDOWN TBSTYLE_DROPDOWN
987 #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE
988 #define BTNS_NOPREFIX TBSTYLE_NOPREFIX
989 #define BTNS_SHOWTEXT 0x40 /* ignored unless TBSTYLE_EX_MIXEDB set */
990 #define BTNS_WHOLEDROPDOWN 0x80 /* draw dropdown arrow, but without split arrow section */
992 #define TBSTYLE_TOOLTIPS 0x0100
993 #define TBSTYLE_WRAPABLE 0x0200
994 #define TBSTYLE_ALTDRAG 0x0400
995 #define TBSTYLE_FLAT 0x0800
996 #define TBSTYLE_LIST 0x1000
997 #define TBSTYLE_CUSTOMERASE 0x2000
998 #define TBSTYLE_REGISTERDROP 0x4000
999 #define TBSTYLE_TRANSPARENT 0x8000
1000 #define TBSTYLE_EX_DRAWDDARROWS 0x00000001
1001 #define TBSTYLE_EX_UNDOC1 0x00000004 /* similar to TBSTYLE_WRAPABLE */
1002 #define TBSTYLE_EX_MIXEDBUTTONS 0x00000008
1003 #define TBSTYLE_EX_HIDECLIPPEDBUTTONS 0x00000010 /* don't show partially obscured buttons */
1004 #define TBSTYLE_EX_DOUBLEBUFFER 0x00000080 /* Double Buffer the toolbar ??? */
1006 #define TBIF_IMAGE 0x00000001
1007 #define TBIF_TEXT 0x00000002
1008 #define TBIF_STATE 0x00000004
1009 #define TBIF_STYLE 0x00000008
1010 #define TBIF_LPARAM 0x00000010
1011 #define TBIF_COMMAND 0x00000020
1012 #define TBIF_SIZE 0x00000040
1014 #define TBBF_LARGE 0x0001
1016 #define TB_ENABLEBUTTON (WM_USER+1)
1017 #define TB_CHECKBUTTON (WM_USER+2)
1018 #define TB_PRESSBUTTON (WM_USER+3)
1019 #define TB_HIDEBUTTON (WM_USER+4)
1020 #define TB_INDETERMINATE (WM_USER+5)
1021 #define TB_MARKBUTTON (WM_USER+6)
1022 #define TB_ISBUTTONENABLED (WM_USER+9)
1023 #define TB_ISBUTTONCHECKED (WM_USER+10)
1024 #define TB_ISBUTTONPRESSED (WM_USER+11)
1025 #define TB_ISBUTTONHIDDEN (WM_USER+12)
1026 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
1027 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
1028 #define TB_SETSTATE (WM_USER+17)
1029 #define TB_GETSTATE (WM_USER+18)
1030 #define TB_ADDBITMAP (WM_USER+19)
1031 #define TB_ADDBUTTONSA (WM_USER+20)
1032 #define TB_ADDBUTTONSW (WM_USER+68)
1033 #define TB_ADDBUTTONS WINELIB_NAME_AW(TB_ADDBUTTONS)
1034 #define TB_HITTEST (WM_USER+69)
1035 #define TB_INSERTBUTTONA (WM_USER+21)
1036 #define TB_INSERTBUTTONW (WM_USER+67)
1037 #define TB_INSERTBUTTON WINELIB_NAME_AW(TB_INSERTBUTTON)
1038 #define TB_DELETEBUTTON (WM_USER+22)
1039 #define TB_GETBUTTON (WM_USER+23)
1040 #define TB_BUTTONCOUNT (WM_USER+24)
1041 #define TB_COMMANDTOINDEX (WM_USER+25)
1042 #define TB_SAVERESTOREA (WM_USER+26)
1043 #define TB_SAVERESTOREW (WM_USER+76)
1044 #define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
1045 #define TB_CUSTOMIZE (WM_USER+27)
1046 #define TB_ADDSTRINGA (WM_USER+28)
1047 #define TB_ADDSTRINGW (WM_USER+77)
1048 #define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
1049 #define TB_GETITEMRECT (WM_USER+29)
1050 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
1051 #define TB_SETBUTTONSIZE (WM_USER+31)
1052 #define TB_SETBITMAPSIZE (WM_USER+32)
1053 #define TB_AUTOSIZE (WM_USER+33)
1054 #define TB_GETTOOLTIPS (WM_USER+35)
1055 #define TB_SETTOOLTIPS (WM_USER+36)
1056 #define TB_SETPARENT (WM_USER+37)
1057 #define TB_SETROWS (WM_USER+39)
1058 #define TB_GETROWS (WM_USER+40)
1059 #define TB_GETBITMAPFLAGS (WM_USER+41)
1060 #define TB_SETCMDID (WM_USER+42)
1061 #define TB_CHANGEBITMAP (WM_USER+43)
1062 #define TB_GETBITMAP (WM_USER+44)
1063 #define TB_GETBUTTONTEXTA (WM_USER+45)
1064 #define TB_GETBUTTONTEXTW (WM_USER+75)
1065 #define TB_GETBUTTONTEXT WINELIB_NAME_AW(TB_GETBUTTONTEXT)
1066 #define TB_REPLACEBITMAP (WM_USER+46)
1067 #define TB_SETINDENT (WM_USER+47)
1068 #define TB_SETIMAGELIST (WM_USER+48)
1069 #define TB_GETIMAGELIST (WM_USER+49)
1070 #define TB_LOADIMAGES (WM_USER+50)
1071 #define TB_GETRECT (WM_USER+51) /* wParam is the Cmd instead of index */
1072 #define TB_SETHOTIMAGELIST (WM_USER+52)
1073 #define TB_GETHOTIMAGELIST (WM_USER+53)
1074 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
1075 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
1076 #define TB_SETSTYLE (WM_USER+56)
1077 #define TB_GETSTYLE (WM_USER+57)
1078 #define TB_GETBUTTONSIZE (WM_USER+58)
1079 #define TB_SETBUTTONWIDTH (WM_USER+59)
1080 #define TB_SETMAXTEXTROWS (WM_USER+60)
1081 #define TB_GETTEXTROWS (WM_USER+61)
1082 #define TB_GETOBJECT (WM_USER+62)
1083 #define TB_GETBUTTONINFOW (WM_USER+63)
1084 #define TB_GETBUTTONINFOA (WM_USER+65)
1085 #define TB_GETBUTTONINFO WINELIB_NAME_AW(TB_GETBUTTONINFO)
1086 #define TB_SETBUTTONINFOW (WM_USER+64)
1087 #define TB_SETBUTTONINFOA (WM_USER+66)
1088 #define TB_SETBUTTONINFO WINELIB_NAME_AW(TB_SETBUTTONINFO)
1089 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
1090 #define TB_GETHOTITEM (WM_USER+71)
1091 #define TB_SETHOTITEM (WM_USER+72)
1092 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
1093 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
1094 #define TB_MAPACCELERATORA (WM_USER+78)
1095 #define TB_MAPACCELERATORW (WM_USER+90)
1096 #define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
1097 #define TB_GETINSERTMARK (WM_USER+79)
1098 #define TB_SETINSERTMARK (WM_USER+80)
1099 #define TB_INSERTMARKHITTEST (WM_USER+81)
1100 #define TB_MOVEBUTTON (WM_USER+82)
1101 #define TB_GETMAXSIZE (WM_USER+83)
1102 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
1103 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
1104 #define TB_GETPADDING (WM_USER+86)
1105 #define TB_SETPADDING (WM_USER+87)
1106 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
1107 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
1108 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1109 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1110 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1111 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1112 #define TB_GETSTRINGW (WM_USER+91)
1113 #define TB_GETSTRINGA (WM_USER+92)
1114 #define TB_GETSTRING WINELIB_NAME_AW(TB_GETSTRING)
1116 /* undocumented messages in Toolbar */
1117 #define TB_UNKWN45D (WM_USER+93)
1118 #define TB_UNKWN45E (WM_USER+94)
1119 #define TB_UNKWN460 (WM_USER+96)
1120 #define TB_UNKWN463 (WM_USER+99)
1121 #define TB_UNKWN464 (WM_USER+100)
1124 #define TBN_FIRST (0U-700U)
1125 #define TBN_LAST (0U-720U)
1126 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
1127 #define TBN_GETBUTTONINFOW (TBN_FIRST-20)
1128 #define TBN_GETBUTTONINFO WINELIB_NAME_AW(TBN_GETBUTTONINFO)
1129 #define TBN_BEGINDRAG (TBN_FIRST-1)
1130 #define TBN_ENDDRAG (TBN_FIRST-2)
1131 #define TBN_BEGINADJUST (TBN_FIRST-3)
1132 #define TBN_ENDADJUST (TBN_FIRST-4)
1133 #define TBN_RESET (TBN_FIRST-5)
1134 #define TBN_QUERYINSERT (TBN_FIRST-6)
1135 #define TBN_QUERYDELETE (TBN_FIRST-7)
1136 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
1137 #define TBN_CUSTHELP (TBN_FIRST-9)
1138 #define TBN_DROPDOWN (TBN_FIRST-10)
1139 #define TBN_GETOBJECT (TBN_FIRST-12)
1140 #define TBN_HOTITEMCHANGE (TBN_FIRST-13)
1141 #define TBN_DRAGOUT (TBN_FIRST-14)
1142 #define TBN_DELETINGBUTTON (TBN_FIRST-15)
1143 #define TBN_GETDISPINFOA (TBN_FIRST-16)
1144 #define TBN_GETDISPINFOW (TBN_FIRST-17)
1145 #define TBN_GETDISPINFO WINELIB_NAME_AW(TBN_GETDISPINFO)
1146 #define TBN_GETINFOTIPA (TBN_FIRST-18)
1147 #define TBN_GETINFOTIPW (TBN_FIRST-19)
1148 #define TBN_GETINFOTIP WINELIB_NAME_AW(TBN_GETINFOTIP)
1149 #define TBN_INITCUSTOMIZE (TBN_FIRST-23)
1150 #define TBNRF_HIDEHELP 0x00000001
1153 /* Return values from TBN_DROPDOWN */
1154 #define TBDDRET_DEFAULT 0
1155 #define TBDDRET_NODEFAULT 1
1156 #define TBDDRET_TREATPRESSED 2
1158 typedef struct _NMTBCUSTOMDRAW
1160 NMCUSTOMDRAW nmcd;
1161 HBRUSH hbrMonoDither;
1162 HBRUSH hbrLines;
1163 HPEN hpenLines;
1164 COLORREF clrText;
1165 COLORREF clrMark;
1166 COLORREF clrTextHighlight;
1167 COLORREF clrBtnFace;
1168 COLORREF clrBtnHighlight;
1169 COLORREF clrHighlightHotTrack;
1170 RECT rcText;
1171 int nStringBkMode;
1172 int nHLStringBkMode;
1173 } NMTBCUSTOMDRAW, *LPNMTBCUSTOMDRAW;
1175 /* return flags for Toolbar NM_CUSTOMDRAW notifications */
1176 #define TBCDRF_NOEDGES 0x00010000 /* Don't draw button edges */
1177 #define TBCDRF_HILITEHOTTRACK 0x00020000 /* Use color of the button bkgnd */
1178 /* when hottracked */
1179 #define TBCDRF_NOOFFSET 0x00040000 /* No offset button if pressed */
1180 #define TBCDRF_NOMARK 0x00080000 /* Don't draw default highlight */
1181 /* for TBSTATE_MARKED */
1182 #define TBCDRF_NOETCHEDEFFECT 0x00100000 /* No etched effect for */
1183 /* disabled items */
1184 #define TBCDRF_BLENDICON 0x00200000 /* ILD_BLEND50 on the icon image */
1185 #define TBCDRF_NOBACKGROUND 0x00400000 /* ILD_BLEND50 on the icon image */
1188 /* This is just for old CreateToolbar. */
1189 /* Don't use it in new programs. */
1190 typedef struct _OLDTBBUTTON {
1191 INT iBitmap;
1192 INT idCommand;
1193 BYTE fsState;
1194 BYTE fsStyle;
1195 BYTE bReserved[2];
1196 DWORD dwData;
1197 } OLDTBBUTTON, *POLDTBBUTTON, *LPOLDTBBUTTON;
1198 typedef const OLDTBBUTTON *LPCOLDTBBUTTON;
1201 typedef struct _TBBUTTON {
1202 INT iBitmap;
1203 INT idCommand;
1204 BYTE fsState;
1205 BYTE fsStyle;
1206 BYTE bReserved[2];
1207 DWORD dwData;
1208 INT iString;
1209 } TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
1210 typedef const TBBUTTON *LPCTBBUTTON;
1213 typedef struct _COLORMAP {
1214 COLORREF from;
1215 COLORREF to;
1216 } COLORMAP, *LPCOLORMAP;
1219 typedef struct tagTBADDBITMAP {
1220 HINSTANCE hInst;
1221 UINT nID;
1222 } TBADDBITMAP, *LPTBADDBITMAP;
1224 #define HINST_COMMCTRL ((HINSTANCE)-1)
1225 #define IDB_STD_SMALL_COLOR 0
1226 #define IDB_STD_LARGE_COLOR 1
1227 #define IDB_VIEW_SMALL_COLOR 4
1228 #define IDB_VIEW_LARGE_COLOR 5
1229 #define IDB_HIST_SMALL_COLOR 8
1230 #define IDB_HIST_LARGE_COLOR 9
1232 #define STD_CUT 0
1233 #define STD_COPY 1
1234 #define STD_PASTE 2
1235 #define STD_UNDO 3
1236 #define STD_REDOW 4
1237 #define STD_DELETE 5
1238 #define STD_FILENEW 6
1239 #define STD_FILEOPEN 7
1240 #define STD_FILESAVE 8
1241 #define STD_PRINTPRE 9
1242 #define STD_PROPERTIES 10
1243 #define STD_HELP 11
1244 #define STD_FIND 12
1245 #define STD_REPLACE 13
1246 #define STD_PRINT 14
1248 #define VIEW_LARGEICONS 0
1249 #define VIEW_SMALLICONS 1
1250 #define VIEW_LIST 2
1251 #define VIEW_DETAILS 3
1252 #define VIEW_SORTNAME 4
1253 #define VIEW_SORTSIZE 5
1254 #define VIEW_SORTDATE 6
1255 #define VIEW_SORTTYPE 7
1256 #define VIEW_PARENTFOLDER 8
1257 #define VIEW_NETCONNECT 9
1258 #define VIEW_NETDISCONNECT 10
1259 #define VIEW_NEWFOLDER 11
1260 #define VIEW_VIEWMENU 12
1262 #define HIST_BACK 0
1263 #define HIST_FORWARD 1
1264 #define HIST_FAVORITES 2
1265 #define HIST_ADDTOFAVORITES 3
1266 #define HIST_VIEWTREE 4
1268 typedef struct tagTBSAVEPARAMSA {
1269 HKEY hkr;
1270 LPCSTR pszSubKey;
1271 LPCSTR pszValueName;
1272 } TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
1274 typedef struct tagTBSAVEPARAMSW {
1275 HKEY hkr;
1276 LPCWSTR pszSubKey;
1277 LPCWSTR pszValueName;
1278 } TBSAVEPARAMSW, *LPTBSAVEPARAMSW;
1280 #define TBSAVEPARAMS WINELIB_NAME_AW(TBSAVEPARAMS)
1281 #define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
1283 typedef struct
1285 UINT cbSize;
1286 DWORD dwMask;
1287 INT idCommand;
1288 INT iImage;
1289 BYTE fsState;
1290 BYTE fsStyle;
1291 WORD cx;
1292 DWORD lParam;
1293 LPSTR pszText;
1294 INT cchText;
1295 } TBBUTTONINFOA, *LPTBBUTTONINFOA;
1297 typedef struct
1299 UINT cbSize;
1300 DWORD dwMask;
1301 INT idCommand;
1302 INT iImage;
1303 BYTE fsState;
1304 BYTE fsStyle;
1305 WORD cx;
1306 DWORD lParam;
1307 LPWSTR pszText;
1308 INT cchText;
1309 } TBBUTTONINFOW, *LPTBBUTTONINFOW;
1311 #define TBBUTTONINFO WINELIB_NAME_AW(TBBUTTONINFO)
1312 #define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
1314 typedef struct tagNMTBHOTITEM
1316 NMHDR hdr;
1317 int idOld;
1318 int idNew;
1319 DWORD dwFlags;
1320 } NMTBHOTITEM, *LPNMTBHOTITEM;
1322 typedef struct tagNMTBGETINFOTIPA
1324 NMHDR hdr;
1325 LPSTR pszText;
1326 INT cchTextMax;
1327 INT iItem;
1328 LPARAM lParam;
1329 } NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
1331 typedef struct tagNMTBGETINFOTIPW
1333 NMHDR hdr;
1334 LPWSTR pszText;
1335 INT cchTextMax;
1336 INT iItem;
1337 LPARAM lParam;
1338 } NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
1340 #define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOFTIP)
1341 #define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
1343 typedef struct
1345 NMHDR hdr;
1346 DWORD dwMask;
1347 int idCommand;
1348 DWORD lParam;
1349 int iImage;
1350 LPSTR pszText;
1351 int cchText;
1352 } NMTBDISPINFOA, *LPNMTBDISPINFOA;
1354 typedef struct
1356 NMHDR hdr;
1357 DWORD dwMask;
1358 int idCommand;
1359 DWORD lParam;
1360 int iImage;
1361 LPWSTR pszText;
1362 int cchText;
1363 } NMTBDISPINFOW, *LPNMTBDISPINFOW;
1365 #define NMTBDISPINFO WINELIB_NAME_AW(NMTBDISPINFO)
1366 #define LPNMTBDISPINFO WINELIB_NAME_AW(LPNMTBDISPINFO)
1368 /* contents of dwMask in the NMTBDISPINFO structure */
1369 #define TBNF_IMAGE 0x00000001
1370 #define TBNF_TEXT 0x00000002
1371 #define TBNF_DI_SETITEM 0x10000000
1374 typedef struct tagNMTOOLBARA
1376 NMHDR hdr;
1377 INT iItem;
1378 TBBUTTON tbButton;
1379 INT cchText;
1380 LPSTR pszText;
1381 RECT rcButton; /* Version 5.80 */
1382 } NMTOOLBARA, *LPNMTOOLBARA, TBNOTIFYA, *LPTBNOTIFYA;
1384 typedef struct tagNMTOOLBARW
1386 NMHDR hdr;
1387 INT iItem;
1388 TBBUTTON tbButton;
1389 INT cchText;
1390 LPWSTR pszText;
1391 RECT rcButton; /* Version 5.80 */
1392 } NMTOOLBARW, *LPNMTOOLBARW, TBNOTIFYW, *LPTBNOTIFYW;
1394 #define NMTOOLBAR WINELIB_NAME_AW(NMTOOLBAR)
1395 #define LPNMTOOLBAR WINELIB_NAME_AW(LPNMTOOLBAR)
1396 #define TBNOTIFY WINELIB_NAME_AW(TBNOTIFY)
1397 #define LPTBNOTIFY WINELIB_NAME_AW(LPTBNOTIFY)
1399 typedef struct
1401 HINSTANCE hInstOld;
1402 UINT nIDOld;
1403 HINSTANCE hInstNew;
1404 UINT nIDNew;
1405 INT nButtons;
1406 } TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
1408 #define HICF_OTHER 0x00000000
1409 #define HICF_MOUSE 0x00000001 /* Triggered by mouse */
1410 #define HICF_ARROWKEYS 0x00000002 /* Triggered by arrow keys */
1411 #define HICF_ACCELERATOR 0x00000004 /* Triggered by accelerator */
1412 #define HICF_DUPACCEL 0x00000008 /* This accelerator is not unique */
1413 #define HICF_ENTERING 0x00000010 /* idOld is invalid */
1414 #define HICF_LEAVING 0x00000020 /* idNew is invalid */
1415 #define HICF_RESELECT 0x00000040 /* hot item reselected */
1416 #define HICF_LMOUSE 0x00000080 /* left mouse button selected */
1417 #define HICF_TOGGLEDROPDOWN 0x00000100 /* Toggle button's dropdown state */
1419 typedef struct
1421 int iButton;
1422 DWORD dwFlags;
1423 } TBINSERTMARK, *LPTBINSERTMARK;
1424 #define TBIMHT_AFTER 0x00000001 /* TRUE = insert After iButton, otherwise before */
1425 #define TBIMHT_BACKGROUND 0x00000002 /* TRUE if and only if missed buttons completely */
1427 HWND WINAPI
1428 CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
1429 UINT, LPCOLDTBBUTTON, INT);
1431 HWND WINAPI
1432 CreateToolbarEx(HWND, DWORD, UINT, INT,
1433 HINSTANCE, UINT, LPCTBBUTTON,
1434 INT, INT, INT, INT, INT, UINT);
1436 HBITMAP WINAPI
1437 CreateMappedBitmap (HINSTANCE, INT, UINT, LPCOLORMAP, INT);
1440 /* Tool tips */
1442 #define TOOLTIPS_CLASS16 "tooltips_class"
1443 #define TOOLTIPS_CLASSA "tooltips_class32"
1444 #if defined(__GNUC__)
1445 # define TOOLTIPS_CLASSW (const WCHAR []){ 't','o','o','l','t','i','p','s','_', \
1446 'c','l','a','s','s','3','2',0 }
1447 #elif defined(_MSC_VER)
1448 # define TOOLTIPS_CLASSW L"tooltips_class32"
1449 #else
1450 static const WCHAR TOOLTIPS_CLASSW[] = { 't','o','o','l','t','i','p','s','_',
1451 'c','l','a','s','s','3','2',0 };
1452 #endif
1453 #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
1455 #define INFOTIPSIZE 1024
1457 #define TTS_ALWAYSTIP 0x01
1458 #define TTS_NOPREFIX 0x02
1460 #define TTF_IDISHWND 0x0001
1461 #define TTF_CENTERTIP 0x0002
1462 #define TTF_RTLREADING 0x0004
1463 #define TTF_SUBCLASS 0x0010
1464 #define TTF_TRACK 0x0020
1465 #define TTF_ABSOLUTE 0x0080
1466 #define TTF_TRANSPARENT 0x0100
1467 #define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
1470 #define TTDT_AUTOMATIC 0
1471 #define TTDT_RESHOW 1
1472 #define TTDT_AUTOPOP 2
1473 #define TTDT_INITIAL 3
1476 #define TTM_ACTIVATE (WM_USER+1)
1477 #define TTM_SETDELAYTIME (WM_USER+3)
1478 #define TTM_ADDTOOLA (WM_USER+4)
1479 #define TTM_ADDTOOLW (WM_USER+50)
1480 #define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
1481 #define TTM_DELTOOLA (WM_USER+5)
1482 #define TTM_DELTOOLW (WM_USER+51)
1483 #define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
1484 #define TTM_NEWTOOLRECTA (WM_USER+6)
1485 #define TTM_NEWTOOLRECTW (WM_USER+52)
1486 #define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
1487 #define TTM_RELAYEVENT (WM_USER+7)
1488 #define TTM_GETTOOLINFOA (WM_USER+8)
1489 #define TTM_GETTOOLINFOW (WM_USER+53)
1490 #define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
1491 #define TTM_SETTOOLINFOA (WM_USER+9)
1492 #define TTM_SETTOOLINFOW (WM_USER+54)
1493 #define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
1494 #define TTM_HITTESTA (WM_USER+10)
1495 #define TTM_HITTESTW (WM_USER+55)
1496 #define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
1497 #define TTM_GETTEXTA (WM_USER+11)
1498 #define TTM_GETTEXTW (WM_USER+56)
1499 #define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
1500 #define TTM_UPDATETIPTEXTA (WM_USER+12)
1501 #define TTM_UPDATETIPTEXTW (WM_USER+57)
1502 #define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
1503 #define TTM_GETTOOLCOUNT (WM_USER+13)
1504 #define TTM_ENUMTOOLSA (WM_USER+14)
1505 #define TTM_ENUMTOOLSW (WM_USER+58)
1506 #define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
1507 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1508 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1509 #define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
1510 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1511 #define TTM_TRACKACTIVATE (WM_USER+17)
1512 #define TTM_TRACKPOSITION (WM_USER+18)
1513 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1514 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1515 #define TTM_GETDELAYTIME (WM_USER+21)
1516 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1517 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1518 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1519 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1520 #define TTM_SETMARGIN (WM_USER+26)
1521 #define TTM_GETMARGIN (WM_USER+27)
1522 #define TTM_POP (WM_USER+28)
1523 #define TTM_UPDATE (WM_USER+29)
1524 #define TTM_GETBUBBLESIZE (WM_USER+30)
1527 #define TTN_FIRST (0U-520U)
1528 #define TTN_LAST (0U-549U)
1529 #define TTN_GETDISPINFOA (TTN_FIRST-0)
1530 #define TTN_GETDISPINFOW (TTN_FIRST-10)
1531 #define TTN_GETDISPINFO WINELIB_NAME_AW(TTN_GETDISPINFO)
1532 #define TTN_SHOW (TTN_FIRST-1)
1533 #define TTN_POP (TTN_FIRST-2)
1535 #define TTN_NEEDTEXT TTN_GETDISPINFO
1536 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1537 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1539 typedef struct tagTOOLINFOA {
1540 UINT cbSize;
1541 UINT uFlags;
1542 HWND hwnd;
1543 UINT uId;
1544 RECT rect;
1545 HINSTANCE hinst;
1546 LPSTR lpszText;
1547 LPARAM lParam;
1548 } TTTOOLINFOA, *LPTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
1550 typedef struct tagTOOLINFOW {
1551 UINT cbSize;
1552 UINT uFlags;
1553 HWND hwnd;
1554 UINT uId;
1555 RECT rect;
1556 HINSTANCE hinst;
1557 LPWSTR lpszText;
1558 LPARAM lParam;
1559 } TTTOOLINFOW, *LPTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW;
1561 #define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1562 #define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1563 #define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
1564 #define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
1565 #define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
1567 #define TTTOOLINFO_V1_SIZEA CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
1568 #define TTTOOLINFO_V1_SIZEW CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
1569 #define TTTOOLINFO_V1_SIZE WINELIB_NAME_AW(TTTOOLINFO_V1_SIZE)
1571 typedef struct _TT_HITTESTINFOA
1573 HWND hwnd;
1574 POINT pt;
1575 TTTOOLINFOA ti;
1576 } TTHITTESTINFOA, *LPTTHITTESTINFOA;
1577 #define LPHITTESTINFOA LPTTHITTESTINFOA
1579 typedef struct _TT_HITTESTINFOW
1581 HWND hwnd;
1582 POINT pt;
1583 TTTOOLINFOW ti;
1584 } TTHITTESTINFOW, *LPTTHITTESTINFOW;
1585 #define LPHITTESTINFOW LPTTHITTESTINFOW
1587 #define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
1588 #define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
1589 #define LPHITTESTINFO WINELIB_NAME_AW(LPHITTESTINFO)
1591 typedef struct tagNMTTDISPINFOA
1593 NMHDR hdr;
1594 LPSTR lpszText;
1595 CHAR szText[80];
1596 HINSTANCE hinst;
1597 UINT uFlags;
1598 LPARAM lParam;
1599 } NMTTDISPINFOA, *LPNMTTDISPINFOA;
1601 typedef struct tagNMTTDISPINFOW
1603 NMHDR hdr;
1604 LPWSTR lpszText;
1605 WCHAR szText[80];
1606 HINSTANCE hinst;
1607 UINT uFlags;
1608 LPARAM lParam;
1609 } NMTTDISPINFOW, *LPNMTTDISPINFOW;
1611 #define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
1612 #define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
1614 #define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
1615 #define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
1616 #define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)
1618 #define TOOLTIPTEXTW NMTTDISPINFOW
1619 #define TOOLTIPTEXTA NMTTDISPINFOA
1620 #define TOOLTIPTEXT NMTTDISPINFO
1621 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1622 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1623 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1626 /* Rebar control */
1628 #define REBARCLASSNAME16 "ReBarWindow"
1629 #define REBARCLASSNAMEA "ReBarWindow32"
1630 #if defined(__GNUC__)
1631 # define REBARCLASSNAMEW (const WCHAR []){ 'R','e','B','a','r', \
1632 'W','i','n','d','o','w','3','2',0 }
1633 #elif defined(_MSC_VER)
1634 # define REBARCLASSNAMEW L"ReBarWindow32"
1635 #else
1636 static const WCHAR REBARCLASSNAMEW[] = { 'R','e','B','a','r',
1637 'W','i','n','d','o','w','3','2',0 };
1638 #endif
1639 #define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
1641 #define RBS_TOOLTIPS 0x0100
1642 #define RBS_VARHEIGHT 0x0200
1643 #define RBS_BANDBORDERS 0x0400
1644 #define RBS_FIXEDORDER 0x0800
1645 #define RBS_REGISTERDROP 0x1000
1646 #define RBS_AUTOSIZE 0x2000
1647 #define RBS_VERTICALGRIPPER 0x4000
1648 #define RBS_DBLCLKTOGGLE 0x8000
1650 #define RBIM_IMAGELIST 0x00000001
1652 #define RBBIM_STYLE 0x00000001
1653 #define RBBIM_COLORS 0x00000002
1654 #define RBBIM_TEXT 0x00000004
1655 #define RBBIM_IMAGE 0x00000008
1656 #define RBBIM_CHILD 0x00000010
1657 #define RBBIM_CHILDSIZE 0x00000020
1658 #define RBBIM_SIZE 0x00000040
1659 #define RBBIM_BACKGROUND 0x00000080
1660 #define RBBIM_ID 0x00000100
1661 #define RBBIM_IDEALSIZE 0x00000200
1662 #define RBBIM_LPARAM 0x00000400
1663 #define RBBIM_HEADERSIZE 0x00000800
1665 #define RBBS_BREAK 0x00000001
1666 #define RBBS_FIXEDSIZE 0x00000002
1667 #define RBBS_CHILDEDGE 0x00000004
1668 #define RBBS_HIDDEN 0x00000008
1669 #define RBBS_NOVERT 0x00000010
1670 #define RBBS_FIXEDBMP 0x00000020
1671 #define RBBS_VARIABLEHEIGHT 0x00000040
1672 #define RBBS_GRIPPERALWAYS 0x00000080
1673 #define RBBS_NOGRIPPER 0x00000100
1675 #define RBNM_ID 0x00000001
1676 #define RBNM_STYLE 0x00000002
1677 #define RBNM_LPARAM 0x00000004
1679 #define RBHT_NOWHERE 0x0001
1680 #define RBHT_CAPTION 0x0002
1681 #define RBHT_CLIENT 0x0003
1682 #define RBHT_GRABBER 0x0004
1684 #define RB_INSERTBANDA (WM_USER+1)
1685 #define RB_INSERTBANDW (WM_USER+10)
1686 #define RB_INSERTBAND WINELIB_NAME_AW(RB_INSERTBAND)
1687 #define RB_DELETEBAND (WM_USER+2)
1688 #define RB_GETBARINFO (WM_USER+3)
1689 #define RB_SETBARINFO (WM_USER+4)
1690 #define RB_GETBANDINFO (WM_USER+5) /* just for compatibility */
1691 #define RB_SETBANDINFOA (WM_USER+6)
1692 #define RB_SETBANDINFOW (WM_USER+11)
1693 #define RB_SETBANDINFO WINELIB_NAME_AW(RB_SETBANDINFO)
1694 #define RB_SETPARENT (WM_USER+7)
1695 #define RB_HITTEST (WM_USER+8)
1696 #define RB_GETRECT (WM_USER+9)
1697 #define RB_GETBANDCOUNT (WM_USER+12)
1698 #define RB_GETROWCOUNT (WM_USER+13)
1699 #define RB_GETROWHEIGHT (WM_USER+14)
1700 #define RB_IDTOINDEX (WM_USER+16)
1701 #define RB_GETTOOLTIPS (WM_USER+17)
1702 #define RB_SETTOOLTIPS (WM_USER+18)
1703 #define RB_SETBKCOLOR (WM_USER+19)
1704 #define RB_GETBKCOLOR (WM_USER+20)
1705 #define RB_SETTEXTCOLOR (WM_USER+21)
1706 #define RB_GETTEXTCOLOR (WM_USER+22)
1707 #define RB_SIZETORECT (WM_USER+23)
1708 #define RB_BEGINDRAG (WM_USER+24)
1709 #define RB_ENDDRAG (WM_USER+25)
1710 #define RB_DRAGMOVE (WM_USER+26)
1711 #define RB_GETBARHEIGHT (WM_USER+27)
1712 #define RB_GETBANDINFOW (WM_USER+28)
1713 #define RB_GETBANDINFOA (WM_USER+29)
1714 #define RB_GETBANDINFO16 WINELIB_NAME_AW(RB_GETBANDINFO16)
1715 #define RB_MINIMIZEBAND (WM_USER+30)
1716 #define RB_MAXIMIZEBAND (WM_USER+31)
1717 #define RB_GETBANDBORDERS (WM_USER+34)
1718 #define RB_SHOWBAND (WM_USER+35)
1719 #define RB_SETPALETTE (WM_USER+37)
1720 #define RB_GETPALETTE (WM_USER+38)
1721 #define RB_MOVEBAND (WM_USER+39)
1722 #define RB_GETDROPTARGET CCM_GETDROPTARGET
1723 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1724 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1725 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1726 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1728 #define RBN_FIRST (0U-831U)
1729 #define RBN_LAST (0U-859U)
1730 #define RBN_HEIGHTCHANGE (RBN_FIRST-0)
1731 #define RBN_GETOBJECT (RBN_FIRST-1)
1732 #define RBN_LAYOUTCHANGED (RBN_FIRST-2)
1733 #define RBN_AUTOSIZE (RBN_FIRST-3)
1734 #define RBN_BEGINDRAG (RBN_FIRST-4)
1735 #define RBN_ENDDRAG (RBN_FIRST-5)
1736 #define RBN_DELETINGBAND (RBN_FIRST-6)
1737 #define RBN_DELETEDBAND (RBN_FIRST-7)
1738 #define RBN_CHILDSIZE (RBN_FIRST-8)
1740 typedef struct tagREBARINFO
1742 UINT cbSize;
1743 UINT fMask;
1744 HIMAGELIST himl;
1745 } REBARINFO, *LPREBARINFO;
1747 typedef struct tagREBARBANDINFOA
1749 UINT cbSize;
1750 UINT fMask;
1751 UINT fStyle;
1752 COLORREF clrFore;
1753 COLORREF clrBack;
1754 LPSTR lpText;
1755 UINT cch;
1756 INT iImage;
1757 HWND hwndChild;
1758 UINT cxMinChild;
1759 UINT cyMinChild;
1760 UINT cx;
1761 HBITMAP hbmBack;
1762 UINT wID;
1763 UINT cyChild;
1764 UINT cyMaxChild;
1765 UINT cyIntegral;
1766 UINT cxIdeal;
1767 LPARAM lParam;
1768 UINT cxHeader;
1769 } REBARBANDINFOA, *LPREBARBANDINFOA;
1771 typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
1773 typedef struct tagREBARBANDINFOW
1775 UINT cbSize;
1776 UINT fMask;
1777 UINT fStyle;
1778 COLORREF clrFore;
1779 COLORREF clrBack;
1780 LPWSTR lpText;
1781 UINT cch;
1782 INT iImage;
1783 HWND hwndChild;
1784 UINT cxMinChild;
1785 UINT cyMinChild;
1786 UINT cx;
1787 HBITMAP hbmBack;
1788 UINT wID;
1789 UINT cyChild;
1790 UINT cyMaxChild;
1791 UINT cyIntegral;
1792 UINT cxIdeal;
1793 LPARAM lParam;
1794 UINT cxHeader;
1795 } REBARBANDINFOW, *LPREBARBANDINFOW;
1797 typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
1799 #define REBARBANDINFO WINELIB_NAME_AW(REBARBANDINFO)
1800 #define LPREBARBANDINFO WINELIB_NAME_AW(LPREBARBANDINFO)
1801 #define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
1803 #define REBARBANDINFO_V3_SIZEA CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
1804 #define REBARBANDINFO_V3_SIZEW CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
1805 #define REBARBANDINFO_V3_SIZE WINELIB_NAME_AW(REBARBANDINFO_V3_SIZE)
1807 typedef struct tagNMREBARCHILDSIZE
1809 NMHDR hdr;
1810 UINT uBand;
1811 UINT wID;
1812 RECT rcChild;
1813 RECT rcBand;
1814 } NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;
1816 typedef struct tagNMREBAR
1818 NMHDR hdr;
1819 DWORD dwMask;
1820 UINT uBand;
1821 UINT fStyle;
1822 UINT wID;
1823 LPARAM lParam;
1824 } NMREBAR, *LPNMREBAR;
1826 typedef struct tagNMRBAUTOSIZE
1828 NMHDR hdr;
1829 BOOL fChanged;
1830 RECT rcTarget;
1831 RECT rcActual;
1832 } NMRBAUTOSIZE, *LPNMRBAUTOSIZE;
1834 typedef struct _RB_HITTESTINFO
1836 POINT pt;
1837 UINT flags;
1838 INT iBand;
1839 } RBHITTESTINFO, *LPRBHITTESTINFO;
1842 /* Trackbar control */
1844 #define TRACKBAR_CLASS16 "msctls_trackbar"
1845 #define TRACKBAR_CLASSA "msctls_trackbar32"
1846 #if defined(__GNUC__)
1847 # define TRACKBAR_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
1848 't','r','a','c','k','b','a','r','3','2',0 }
1849 #elif defined(_MSC_VER)
1850 # define TRACKBAR_CLASSW L"msctls_trackbar32"
1851 #else
1852 static const WCHAR TRACKBAR_CLASSW[] = { 'm','s','c','t','l','s','_',
1853 't','r','a','c','k','b','a','r','3','2',0 };
1854 #endif
1855 #define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
1857 #define TBS_AUTOTICKS 0x0001
1858 #define TBS_VERT 0x0002
1859 #define TBS_HORZ 0x0000
1860 #define TBS_TOP 0x0004
1861 #define TBS_BOTTOM 0x0000
1862 #define TBS_LEFT 0x0004
1863 #define TBS_RIGHT 0x0000
1864 #define TBS_BOTH 0x0008
1865 #define TBS_NOTICKS 0x0010
1866 #define TBS_ENABLESELRANGE 0x0020
1867 #define TBS_FIXEDLENGTH 0x0040
1868 #define TBS_NOTHUMB 0x0080
1869 #define TBS_TOOLTIPS 0x0100
1870 #define TBS_REVERSED 0x0200
1871 #define TBS_DOWNISLEFT 0x0400
1873 #define TBTS_TOP 0
1874 #define TBTS_LEFT 1
1875 #define TBTS_BOTTOM 2
1876 #define TBTS_RIGHT 3
1878 #define TB_LINEUP 0
1879 #define TB_LINEDOWN 1
1880 #define TB_PAGEUP 2
1881 #define TB_PAGEDOWN 3
1882 #define TB_THUMBPOSITION 4
1883 #define TB_THUMBTRACK 5
1884 #define TB_TOP 6
1885 #define TB_BOTTOM 7
1886 #define TB_ENDTRACK 8
1888 #define TBCD_TICS 0x0001
1889 #define TBCD_THUMB 0x0002
1890 #define TBCD_CHANNEL 0x0003
1892 #define TBM_GETPOS (WM_USER)
1893 #define TBM_GETRANGEMIN (WM_USER+1)
1894 #define TBM_GETRANGEMAX (WM_USER+2)
1895 #define TBM_GETTIC (WM_USER+3)
1896 #define TBM_SETTIC (WM_USER+4)
1897 #define TBM_SETPOS (WM_USER+5)
1898 #define TBM_SETRANGE (WM_USER+6)
1899 #define TBM_SETRANGEMIN (WM_USER+7)
1900 #define TBM_SETRANGEMAX (WM_USER+8)
1901 #define TBM_CLEARTICS (WM_USER+9)
1902 #define TBM_SETSEL (WM_USER+10)
1903 #define TBM_SETSELSTART (WM_USER+11)
1904 #define TBM_SETSELEND (WM_USER+12)
1905 #define TBM_GETPTICS (WM_USER+14)
1906 #define TBM_GETTICPOS (WM_USER+15)
1907 #define TBM_GETNUMTICS (WM_USER+16)
1908 #define TBM_GETSELSTART (WM_USER+17)
1909 #define TBM_GETSELEND (WM_USER+18)
1910 #define TBM_CLEARSEL (WM_USER+19)
1911 #define TBM_SETTICFREQ (WM_USER+20)
1912 #define TBM_SETPAGESIZE (WM_USER+21)
1913 #define TBM_GETPAGESIZE (WM_USER+22)
1914 #define TBM_SETLINESIZE (WM_USER+23)
1915 #define TBM_GETLINESIZE (WM_USER+24)
1916 #define TBM_GETTHUMBRECT (WM_USER+25)
1917 #define TBM_GETCHANNELRECT (WM_USER+26)
1918 #define TBM_SETTHUMBLENGTH (WM_USER+27)
1919 #define TBM_GETTHUMBLENGTH (WM_USER+28)
1920 #define TBM_SETTOOLTIPS (WM_USER+29)
1921 #define TBM_GETTOOLTIPS (WM_USER+30)
1922 #define TBM_SETTIPSIDE (WM_USER+31)
1923 #define TBM_SETBUDDY (WM_USER+32)
1924 #define TBM_GETBUDDY (WM_USER+33)
1925 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1926 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1929 /* Pager control */
1931 #define WC_PAGESCROLLERA "SysPager"
1932 #if defined(__GNUC__)
1933 # define WC_PAGESCROLLERW (const WCHAR []){ 'S','y','s','P','a','g','e','r',0 }
1934 #elif defined(_MSC_VER)
1935 # define WC_PAGESCROLLERW L"SysPager"
1936 #else
1937 static const WCHAR WC_PAGESCROLLERW[] = { 'S','y','s','P','a','g','e','r',0 };
1938 #endif
1939 #define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
1941 #define PGS_VERT 0x00000000
1942 #define PGS_HORZ 0x00000001
1943 #define PGS_AUTOSCROLL 0x00000002
1944 #define PGS_DRAGNDROP 0x00000004
1946 #define PGF_INVISIBLE 0
1947 #define PGF_NORMAL 1
1948 #define PGF_GRAYED 2
1949 #define PGF_DEPRESSED 4
1950 #define PGF_HOT 8
1952 #define PGB_TOPORLEFT 0
1953 #define PGB_BOTTOMORRIGHT 1
1955 /* only used with PGN_SCROLL */
1956 #define PGF_SCROLLUP 1
1957 #define PGF_SCROLLDOWN 2
1958 #define PGF_SCROLLLEFT 4
1959 #define PGF_SCROLLRIGHT 8
1961 #define PGK_SHIFT 1
1962 #define PGK_CONTROL 2
1963 #define PGK_MENU 4
1965 /* only used with PGN_CALCSIZE */
1966 #define PGF_CALCWIDTH 1
1967 #define PGF_CALCHEIGHT 2
1969 #define PGM_FIRST 0x1400
1970 #define PGM_SETCHILD (PGM_FIRST+1)
1971 #define PGM_RECALCSIZE (PGM_FIRST+2)
1972 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
1973 #define PGM_SETBKCOLOR (PGM_FIRST+4)
1974 #define PGM_GETBKCOLOR (PGM_FIRST+5)
1975 #define PGM_SETBORDER (PGM_FIRST+6)
1976 #define PGM_GETBORDER (PGM_FIRST+7)
1977 #define PGM_SETPOS (PGM_FIRST+8)
1978 #define PGM_GETPOS (PGM_FIRST+9)
1979 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
1980 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
1981 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
1982 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
1984 #define PGN_FIRST (0U-900U)
1985 #define PGN_LAST (0U-950U)
1986 #define PGN_SCROLL (PGN_FIRST-1)
1987 #define PGN_CALCSIZE (PGN_FIRST-2)
1989 #include "pshpack1.h"
1991 typedef struct
1993 NMHDR hdr;
1994 WORD fwKeys;
1995 RECT rcParent;
1996 INT iDir;
1997 INT iXpos;
1998 INT iYpos;
1999 INT iScroll;
2000 } NMPGSCROLL, *LPNMPGSCROLL;
2002 #include "poppack.h"
2004 typedef struct
2006 NMHDR hdr;
2007 DWORD dwFlag;
2008 INT iWidth;
2009 INT iHeight;
2010 } NMPGCALCSIZE, *LPNMPGCALCSIZE;
2013 /* Treeview control */
2015 #define WC_TREEVIEWA "SysTreeView32"
2016 #if defined(__GNUC__)
2017 # define WC_TREEVIEWW (const WCHAR []){ 'S','y','s', \
2018 'T','r','e','e','V','i','e','w','3','2',0 }
2019 #elif defined(_MSC_VER)
2020 # define WC_TREEVIEWW L"SysTreeView32"
2021 #else
2022 static const WCHAR WC_TREEVIEWW[] = { 'S','y','s',
2023 'T','r','e','e','V','i','e','w','3','2',0 };
2024 #endif
2025 #define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
2027 #define TVSIL_NORMAL 0
2028 #define TVSIL_STATE 2
2030 #define TV_FIRST 0x1100
2031 #define TVM_INSERTITEMA (TV_FIRST+0)
2032 #define TVM_INSERTITEMW (TV_FIRST+50)
2033 #define TVM_INSERTITEM WINELIB_NAME_AW(TVM_INSERTITEM)
2034 #define TVM_DELETEITEM (TV_FIRST+1)
2035 #define TVM_EXPAND (TV_FIRST+2)
2036 #define TVM_GETITEMRECT (TV_FIRST+4)
2037 #define TVM_GETCOUNT (TV_FIRST+5)
2038 #define TVM_GETINDENT (TV_FIRST+6)
2039 #define TVM_SETINDENT (TV_FIRST+7)
2040 #define TVM_GETIMAGELIST (TV_FIRST+8)
2041 #define TVM_SETIMAGELIST (TV_FIRST+9)
2042 #define TVM_GETNEXTITEM (TV_FIRST+10)
2043 #define TVM_SELECTITEM (TV_FIRST+11)
2044 #define TVM_GETITEMA (TV_FIRST+12)
2045 #define TVM_GETITEMW (TV_FIRST+62)
2046 #define TVM_GETITEM WINELIB_NAME_AW(TVM_GETITEM)
2047 #define TVM_SETITEMA (TV_FIRST+13)
2048 #define TVM_SETITEMW (TV_FIRST+63)
2049 #define TVM_SETITEM WINELIB_NAME_AW(TVM_SETITEM)
2050 #define TVM_EDITLABELA (TV_FIRST+14)
2051 #define TVM_EDITLABELW (TV_FIRST+65)
2052 #define TVM_EDITLABEL WINELIB_NAME_AW(TVM_EDITLABEL)
2053 #define TVM_GETEDITCONTROL (TV_FIRST+15)
2054 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
2055 #define TVM_HITTEST (TV_FIRST+17)
2056 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
2057 #define TVM_SORTCHILDREN (TV_FIRST+19)
2058 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
2059 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
2060 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
2061 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
2062 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
2063 #define TVM_GETISEARCHSTRING WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
2064 #define TVM_SETTOOLTIPS (TV_FIRST+24)
2065 #define TVM_GETTOOLTIPS (TV_FIRST+25)
2066 #define TVM_SETINSERTMARK (TV_FIRST+26)
2067 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
2068 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
2069 #define TVM_SETBKCOLOR (TV_FIRST+29)
2070 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
2071 #define TVM_GETBKCOLOR (TV_FIRST+31)
2072 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
2073 #define TVM_SETSCROLLTIME (TV_FIRST+33)
2074 #define TVM_GETSCROLLTIME (TV_FIRST+34)
2075 #define TVM_UNKNOWN35 (TV_FIRST+35)
2076 #define TVM_UNKNOWN36 (TV_FIRST+36)
2077 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
2078 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
2079 #define TVM_GETITEMSTATE (TV_FIRST+39)
2080 #define TVM_SETLINECOLOR (TV_FIRST+40)
2081 #define TVM_GETLINECOLOR (TV_FIRST+41)
2082 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2083 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2087 #define TVN_FIRST (0U-400U)
2088 #define TVN_LAST (0U-499U)
2090 #define TVN_SELCHANGINGA (TVN_FIRST-1)
2091 #define TVN_SELCHANGINGW (TVN_FIRST-50)
2092 #define TVN_SELCHANGING WINELIB_NAME_AW(TVN_SELCHANGING)
2094 #define TVN_SELCHANGEDA (TVN_FIRST-2)
2095 #define TVN_SELCHANGEDW (TVN_FIRST-51)
2096 #define TVN_SELCHANGED WINELIB_NAME_AW(TVN_SELCHANGED)
2098 #define TVN_GETDISPINFOA (TVN_FIRST-3)
2099 #define TVN_GETDISPINFOW (TVN_FIRST-52)
2100 #define TVN_GETDISPINFO WINELIB_NAME_AW(TVN_GETDISPINFO)
2102 #define TVN_SETDISPINFOA (TVN_FIRST-4)
2103 #define TVN_SETDISPINFOW (TVN_FIRST-53)
2104 #define TVN_SETDISPINFO WINELIB_NAME_AW(TVN_SETDISPINFO)
2106 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
2107 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
2108 #define TVN_ITEMEXPANDING WINELIB_NAME_AW(TVN_ITEMEXPANDING)
2110 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
2111 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
2112 #define TVN_ITEMEXPANDED WINELIB_NAME_AW(TVN_ITEMEXPANDED)
2114 #define TVN_BEGINDRAGA (TVN_FIRST-7)
2115 #define TVN_BEGINDRAGW (TVN_FIRST-56)
2116 #define TVN_BEGINDRAG WINELIB_NAME_AW(TVN_BEGINDRAG)
2118 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
2119 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
2120 #define TVN_BEGINRDRAG WINELIB_NAME_AW(TVN_BEGINRDRAG)
2122 #define TVN_DELETEITEMA (TVN_FIRST-9)
2123 #define TVN_DELETEITEMW (TVN_FIRST-58)
2124 #define TVN_DELETEITEM WINELIB_NAME_AW(TVN_DELETEITEM)
2126 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
2127 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
2128 #define TVN_BEGINLABELEDIT WINELIB_NAME_AW(TVN_BEGINLABELEDIT)
2130 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
2131 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
2132 #define TVN_ENDLABELEDIT WINELIB_NAME_AW(TVN_ENDLABELEDIT)
2134 #define TVN_KEYDOWN (TVN_FIRST-12)
2136 #define TVN_GETINFOTIPA (TVN_FIRST-13)
2137 #define TVN_GETINFOTIPW (TVN_FIRST-14)
2138 #define TVN_GETINFOTIP WINELIB_NAME_AW(TVN_GETINFOTIP)
2140 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
2146 #define TVIF_TEXT 0x0001
2147 #define TVIF_IMAGE 0x0002
2148 #define TVIF_PARAM 0x0004
2149 #define TVIF_STATE 0x0008
2150 #define TVIF_HANDLE 0x0010
2151 #define TVIF_SELECTEDIMAGE 0x0020
2152 #define TVIF_CHILDREN 0x0040
2153 #define TVIF_INTEGRAL 0x0080
2154 #define TVIF_DI_SETITEM 0x1000
2156 #define TVI_ROOT ((HTREEITEM)0xffff0000) /* -65536 */
2157 #define TVI_FIRST ((HTREEITEM)0xffff0001) /* -65535 */
2158 #define TVI_LAST ((HTREEITEM)0xffff0002) /* -65534 */
2159 #define TVI_SORT ((HTREEITEM)0xffff0003) /* -65533 */
2161 #define TVIS_FOCUSED 0x0001
2162 #define TVIS_SELECTED 0x0002
2163 #define TVIS_CUT 0x0004
2164 #define TVIS_DROPHILITED 0x0008
2165 #define TVIS_BOLD 0x0010
2166 #define TVIS_EXPANDED 0x0020
2167 #define TVIS_EXPANDEDONCE 0x0040
2168 #define TVIS_EXPANDPARTIAL 0x0080
2169 #define TVIS_OVERLAYMASK 0x0f00
2170 #define TVIS_STATEIMAGEMASK 0xf000
2171 #define TVIS_USERMASK 0xf000
2173 #define TVHT_NOWHERE 0x0001
2174 #define TVHT_ONITEMICON 0x0002
2175 #define TVHT_ONITEMLABEL 0x0004
2176 #define TVHT_ONITEMINDENT 0x0008
2177 #define TVHT_ONITEMBUTTON 0x0010
2178 #define TVHT_ONITEMRIGHT 0x0020
2179 #define TVHT_ONITEMSTATEICON 0x0040
2180 #define TVHT_ONITEM 0x0046
2181 #define TVHT_ABOVE 0x0100
2182 #define TVHT_BELOW 0x0200
2183 #define TVHT_TORIGHT 0x0400
2184 #define TVHT_TOLEFT 0x0800
2186 #define TVS_HASBUTTONS 0x0001
2187 #define TVS_HASLINES 0x0002
2188 #define TVS_LINESATROOT 0x0004
2189 #define TVS_EDITLABELS 0x0008
2190 #define TVS_DISABLEDRAGDROP 0x0010
2191 #define TVS_SHOWSELALWAYS 0x0020
2192 #define TVS_RTLREADING 0x0040
2193 #define TVS_NOTOOLTIPS 0x0080
2194 #define TVS_CHECKBOXES 0x0100
2195 #define TVS_TRACKSELECT 0x0200
2196 #define TVS_SINGLEEXPAND 0x0400
2197 #define TVS_INFOTIP 0x0800
2198 #define TVS_FULLROWSELECT 0x1000
2199 #define TVS_NOSCROLL 0x2000
2200 #define TVS_NONEVENHEIGHT 0x4000
2201 #define TVS_NOHSCROLL 0x8000
2203 #define TVS_SHAREDIMAGELISTS 0x0000
2204 #define TVS_PRIVATEIMAGELISTS 0x0400
2207 #define TVE_COLLAPSE 0x0001
2208 #define TVE_EXPAND 0x0002
2209 #define TVE_TOGGLE 0x0003
2210 #define TVE_EXPANDPARTIAL 0x4000
2211 #define TVE_COLLAPSERESET 0x8000
2213 #define TVGN_ROOT 0
2214 #define TVGN_NEXT 1
2215 #define TVGN_PREVIOUS 2
2216 #define TVGN_PARENT 3
2217 #define TVGN_CHILD 4
2218 #define TVGN_FIRSTVISIBLE 5
2219 #define TVGN_NEXTVISIBLE 6
2220 #define TVGN_PREVIOUSVISIBLE 7
2221 #define TVGN_DROPHILITE 8
2222 #define TVGN_CARET 9
2223 #define TVGN_LASTVISIBLE 10
2225 #define TVC_UNKNOWN 0x00
2226 #define TVC_BYMOUSE 0x01
2227 #define TVC_BYKEYBOARD 0x02
2230 typedef struct _TREEITEM *HTREEITEM;
2232 typedef struct {
2233 UINT mask;
2234 HTREEITEM hItem;
2235 UINT state;
2236 UINT stateMask;
2237 LPSTR pszText;
2238 INT cchTextMax;
2239 INT iImage;
2240 INT iSelectedImage;
2241 INT cChildren;
2242 LPARAM lParam;
2243 } TVITEMA, *LPTVITEMA;
2245 typedef struct {
2246 UINT mask;
2247 HTREEITEM hItem;
2248 UINT state;
2249 UINT stateMask;
2250 LPWSTR pszText;
2251 INT cchTextMax;
2252 INT iImage;
2253 INT iSelectedImage;
2254 INT cChildren;
2255 LPARAM lParam;
2256 } TVITEMW, *LPTVITEMW;
2258 #define TV_ITEMA TVITEMA
2259 #define TV_ITEMW TVITEMW
2260 #define LPTV_ITEMA LPTVITEMA
2261 #define LPTV_ITEMW LPTVITEMW
2263 #define TVITEM WINELIB_NAME_AW(TVITEM)
2264 #define LPTVITEM WINELIB_NAME_AW(LPTVITEM)
2265 #define TV_ITEM WINELIB_NAME_AW(TV_ITEM)
2266 #define LPTV_ITEM WINELIB_NAME_AW(LPTV_ITEM)
2268 typedef struct {
2269 UINT mask;
2270 HTREEITEM hItem;
2271 UINT state;
2272 UINT stateMask;
2273 LPSTR pszText;
2274 INT cchTextMax;
2275 INT iImage;
2276 INT iSelectedImage;
2277 INT cChildren;
2278 LPARAM lParam;
2279 INT iIntegral;
2280 } TVITEMEXA, *LPTVITEMEXA;
2282 typedef struct {
2283 UINT mask;
2284 HTREEITEM hItem;
2285 UINT state;
2286 UINT stateMask;
2287 LPWSTR pszText;
2288 INT cchTextMax;
2289 INT iImage;
2290 INT iSelectedImage;
2291 INT cChildren;
2292 LPARAM lParam;
2293 INT iIntegral;
2294 } TVITEMEXW, *LPTVITEMEXW;
2296 #define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
2297 #define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
2299 typedef struct tagTVINSERTSTRUCTA {
2300 HTREEITEM hParent;
2301 HTREEITEM hInsertAfter;
2302 union {
2303 TVITEMEXA itemex;
2304 TVITEMA item;
2305 } DUMMYUNIONNAME;
2306 } TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
2308 typedef struct tagTVINSERTSTRUCTW {
2309 HTREEITEM hParent;
2310 HTREEITEM hInsertAfter;
2311 union {
2312 TVITEMEXW itemex;
2313 TVITEMW item;
2314 } DUMMYUNIONNAME;
2315 } TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
2317 #define TVINSERTSTRUCT WINELIB_NAME_AW(TVINSERTSTRUCT)
2318 #define LPTVINSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
2320 #define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
2321 #define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
2322 #define TVINSERTSTRUCT_V1_SIZE WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)
2324 #define TV_INSERTSTRUCT TVINSERTSTRUCT
2325 #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
2326 #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
2327 #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
2328 #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
2329 #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
2333 typedef struct tagNMTREEVIEWA {
2334 NMHDR hdr;
2335 UINT action;
2336 TVITEMA itemOld;
2337 TVITEMA itemNew;
2338 POINT ptDrag;
2339 } NMTREEVIEWA, *LPNMTREEVIEWA;
2341 typedef struct tagNMTREEVIEWW {
2342 NMHDR hdr;
2343 UINT action;
2344 TVITEMW itemOld;
2345 TVITEMW itemNew;
2346 POINT ptDrag;
2347 } NMTREEVIEWW, *LPNMTREEVIEWW;
2349 #define NMTREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2350 #define NM_TREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2351 #define NM_TREEVIEWA NMTREEVIEWA
2352 #define NM_TREEVIEWW NMTREEVIEWW
2353 #define LPNMTREEVIEW WINELIB_NAME_AW(LPNMTREEVIEW)
2355 #define LPNM_TREEVIEW LPNMTREEVIEW
2356 #define LPNM_TREEVIEWA LPNMTREEVIEWA
2357 #define LPNM_TREEVIEWW LPNMTREEVIEWW
2359 typedef struct tagTVDISPINFOA {
2360 NMHDR hdr;
2361 TVITEMA item;
2362 } NMTVDISPINFOA, *LPNMTVDISPINFOA;
2364 typedef struct tagTVDISPINFOW {
2365 NMHDR hdr;
2366 TVITEMW item;
2367 } NMTVDISPINFOW, *LPNMTVDISPINFOW;
2369 #define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
2370 #define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
2371 #define TV_DISPINFO NMTVDISPINFO
2373 typedef INT (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
2375 typedef struct tagTVSORTCB
2377 HTREEITEM hParent;
2378 PFNTVCOMPARE lpfnCompare;
2379 LPARAM lParam;
2380 } TVSORTCB, *LPTVSORTCB;
2382 #define TV_SORTCB TVSORTCB
2383 #define LPTV_SORTCB LPTVSORTCB
2385 typedef struct tagTVHITTESTINFO {
2386 POINT pt;
2387 UINT flags;
2388 HTREEITEM hItem;
2389 } TVHITTESTINFO, *LPTVHITTESTINFO;
2391 #define TV_HITTESTINFO TVHITTESTINFO
2394 /* Custom Draw Treeview */
2396 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
2398 #define TVCDRF_NOIMAGES 0x00010000
2400 typedef struct tagNMTVCUSTOMDRAW
2402 NMCUSTOMDRAW nmcd;
2403 COLORREF clrText;
2404 COLORREF clrTextBk;
2405 INT iLevel; /* IE>0x0400 */
2406 } NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
2408 /* Treeview tooltips */
2410 typedef struct tagNMTVGETINFOTIPA
2412 NMHDR hdr;
2413 LPSTR pszText;
2414 INT cchTextMax;
2415 HTREEITEM hItem;
2416 LPARAM lParam;
2417 } NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
2419 typedef struct tagNMTVGETINFOTIPW
2421 NMHDR hdr;
2422 LPWSTR pszText;
2423 INT cchTextMax;
2424 HTREEITEM hItem;
2425 LPARAM lParam;
2426 } NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
2428 #define NMTVGETINFOTIP WINELIB_NAME_AW(NMTVGETINFOTIP)
2429 #define LPNMTVGETINFOTIP WINELIB_NAME_AW(LPNMTVGETINFOTIP)
2431 #include "pshpack1.h"
2432 typedef struct tagTVKEYDOWN
2434 NMHDR hdr;
2435 WORD wVKey;
2436 UINT flags;
2437 } NMTVKEYDOWN, *LPNMTVKEYDOWN;
2438 #include "poppack.h"
2440 #define TV_KEYDOWN NMTVKEYDOWN
2442 #define TreeView_InsertItemA(hwnd, phdi) \
2443 (HTREEITEM)SNDMSGA((hwnd), TVM_INSERTITEMA, 0, \
2444 (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
2445 #define TreeView_InsertItemW(hwnd,phdi) \
2446 (HTREEITEM)SNDMSGW((hwnd), TVM_INSERTITEMW, 0, \
2447 (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
2448 #define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem)
2450 #define TreeView_DeleteItem(hwnd, hItem) \
2451 (BOOL)SNDMSGA((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
2452 #define TreeView_DeleteAllItems(hwnd) \
2453 (BOOL)SNDMSGA((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
2454 #define TreeView_Expand(hwnd, hitem, code) \
2455 (BOOL)SNDMSGA((hwnd), TVM_EXPAND, (WPARAM)code, \
2456 (LPARAM)(HTREEITEM)(hitem))
2458 #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
2459 (*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSGA((hwnd), \
2460 TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
2462 #define TreeView_GetCount(hwnd) \
2463 (UINT)SNDMSGA((hwnd), TVM_GETCOUNT, 0, 0)
2464 #define TreeView_GetIndent(hwnd) \
2465 (UINT)SNDMSGA((hwnd), TVM_GETINDENT, 0, 0)
2466 #define TreeView_SetIndent(hwnd, indent) \
2467 (BOOL)SNDMSGA((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
2469 #define TreeView_GetImageList(hwnd, iImage) \
2470 (HIMAGELIST)SNDMSGA((hwnd), TVM_GETIMAGELIST, iImage, 0)
2472 #define TreeView_SetImageList(hwnd, himl, iImage) \
2473 (HIMAGELIST)SNDMSGA((hwnd), TVM_SETIMAGELIST, iImage, \
2474 (LPARAM)(UINT)(HIMAGELIST)(himl))
2476 #define TreeView_GetNextItem(hwnd, hitem, code) \
2477 (HTREEITEM)SNDMSGA((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
2478 (LPARAM)(HTREEITEM) (hitem))
2480 #define TreeView_GetChild(hwnd, hitem) \
2481 TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
2482 #define TreeView_GetNextSibling(hwnd, hitem) \
2483 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
2484 #define TreeView_GetPrevSibling(hwnd, hitem) \
2485 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
2486 #define TreeView_GetParent(hwnd, hitem) \
2487 TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
2488 #define TreeView_GetFirstVisible(hwnd) \
2489 TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
2490 #define TreeView_GetLastVisible(hwnd) \
2491 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2492 #define TreeView_GetNextVisible(hwnd, hitem) \
2493 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
2494 #define TreeView_GetPrevVisible(hwnd, hitem) \
2495 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
2496 #define TreeView_GetSelection(hwnd) \
2497 TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
2498 #define TreeView_GetDropHilight(hwnd) \
2499 TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
2500 #define TreeView_GetRoot(hwnd) \
2501 TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
2502 #define TreeView_GetLastVisible(hwnd) \
2503 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2506 #define TreeView_Select(hwnd, hitem, code) \
2507 (UINT)SNDMSGA((hwnd), TVM_SELECTITEM, (WPARAM)code, \
2508 (LPARAM)(UINT)(hitem))
2511 #define TreeView_SelectItem(hwnd, hitem) \
2512 TreeView_Select(hwnd, hitem, TVGN_CARET)
2513 #define TreeView_SelectDropTarget(hwnd, hitem) \
2514 TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
2515 #define TreeView_SelectSetFirstVisible(hwnd, hitem) \
2516 TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
2519 #define TreeView_GetItemA(hwnd, pitem) \
2520 (BOOL)SNDMSGA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2521 #define TreeView_GetItemW(hwnd, pitem) \
2522 (BOOL)SNDMSGW((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2523 #define TreeView_GetItem WINELIB_NAME_AW(TreeView_GetItem)
2525 #define TreeView_SetItemA(hwnd, pitem) \
2526 (BOOL)SNDMSGA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2527 #define TreeView_SetItemW(hwnd, pitem) \
2528 (BOOL)SNDMSGW((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2529 #define TreeView_SetItem WINELIB_NAME_AW(TreeView_SetItem)
2531 #define TreeView_EditLabel(hwnd, hitem) \
2532 (HWND)SNDMSGA((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
2534 #define TreeView_GetEditControl(hwnd) \
2535 (HWND)SNDMSGA((hwnd), TVM_GETEDITCONTROL, 0, 0)
2537 #define TreeView_GetVisibleCount(hwnd) \
2538 (UINT)SNDMSGA((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
2540 #define TreeView_HitTest(hwnd, lpht) \
2541 (HTREEITEM)SNDMSGA((hwnd), TVM_HITTEST, 0,\
2542 (LPARAM)(LPTVHITTESTINFO)(lpht))
2544 #define TreeView_CreateDragImage(hwnd, hitem) \
2545 (HIMAGELIST)SNDMSGA((hwnd), TVM_CREATEDRAGIMAGE, 0,\
2546 (LPARAM)(HTREEITEM)(hitem))
2548 #define TreeView_SortChildren(hwnd, hitem, recurse) \
2549 (BOOL)SNDMSGA((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
2550 (LPARAM)(HTREEITEM)(hitem))
2552 #define TreeView_EnsureVisible(hwnd, hitem) \
2553 (BOOL)SNDMSGA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
2555 #define TreeView_SortChildrenCB(hwnd, psort, recurse) \
2556 (BOOL)SNDMSGA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
2557 (LPARAM)(LPTV_SORTCB)(psort))
2559 #define TreeView_EndEditLabelNow(hwnd, fCancel) \
2560 (BOOL)SNDMSGA((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
2562 #define TreeView_GetISearchString(hwnd, lpsz) \
2563 (BOOL)SNDMSGA((hwnd), TVM_GETISEARCHSTRING, 0, \
2564 (LPARAM)(LPTSTR)lpsz)
2566 #define TreeView_SetToolTips(hwnd, hwndTT) \
2567 (HWND)SNDMSGA((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
2569 #define TreeView_GetToolTips(hwnd) \
2570 (HWND)SNDMSGA((hwnd), TVM_GETTOOLTIPS, 0, 0)
2572 #define TreeView_SetItemHeight(hwnd, iHeight) \
2573 (INT)SNDMSGA((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
2575 #define TreeView_GetItemHeight(hwnd) \
2576 (INT)SNDMSGA((hwnd), TVM_GETITEMHEIGHT, 0, 0)
2578 #define TreeView_SetBkColor(hwnd, clr) \
2579 (COLORREF)SNDMSGA((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
2581 #define TreeView_SetTextColor(hwnd, clr) \
2582 (COLORREF)SNDMSGA((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
2584 #define TreeView_GetBkColor(hwnd) \
2585 (COLORREF)SNDMSGA((hwnd), TVM_GETBKCOLOR, 0, 0)
2587 #define TreeView_GetTextColor(hwnd) \
2588 (COLORREF)SNDMSGA((hwnd), TVM_GETTEXTCOLOR, 0, 0)
2590 #define TreeView_SetScrollTime(hwnd, uTime) \
2591 (UINT)SNDMSGA((hwnd), TVM_SETSCROLLTIME, uTime, 0)
2593 #define TreeView_GetScrollTime(hwnd) \
2594 (UINT)SNDMSGA((hwnd), TVM_GETSCROLLTIME, 0, 0)
2596 #define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
2597 (BOOL)SNDMSGA((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
2598 (LPARAM) (hItem))
2600 #define TreeView_SetInsertMarkColor(hwnd, clr) \
2601 (COLORREF)SNDMSGA((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
2603 #define TreeView_GetInsertMarkColor(hwnd) \
2604 (COLORREF)SNDMSGA((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
2606 #define TreeView_GetItemState(hwndTV, hti, mask) \
2607 (UINT)SNDMSGA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
2608 #define TreeView_GetCheckState(hwndTV, hti) \
2609 ((((UINT)(SNDMSGA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
2610 TVIS_STATEIMAGEMASK))) >> 12) -1)
2612 #define TreeView_SetLineColor(hwnd, clr) \
2613 (COLORREF)SNDMSGA((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
2615 #define TreeView_GetLineColor(hwnd) \
2616 (COLORREF)SNDMSGA((hwnd), TVM_GETLINECOLOR, 0, 0)
2618 #define TreeView_SetItemState(hwndTV, hti, data, _mask) \
2619 { TVITEM _TVi; \
2620 _TVi.mask = TVIF_STATE; \
2621 _TVi.hItem = hti; \
2622 _TVi.stateMask = _mask; \
2623 _TVi.state = data; \
2624 SNDMSGA((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_TVi); \
2628 /* Listview control */
2630 #define WC_LISTVIEWA "SysListView32"
2631 #if defined(__GNUC__)
2632 # define WC_LISTVIEWW (const WCHAR []){ 'S','y','s', \
2633 'L','i','s','t','V','i','e','w','3','2',0 }
2634 #elif defined(_MSC_VER)
2635 # define WC_LISTVIEWW L"SysListView32"
2636 #else
2637 static const WCHAR WC_LISTVIEWW[] = { 'S','y','s',
2638 'L','i','s','t','V','i','e','w','3','2',0 };
2639 #endif
2640 #define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
2642 #define LVSCW_AUTOSIZE -1
2643 #define LVSCW_AUTOSIZE_USEHEADER -2
2645 #define LVS_ICON 0x0000
2646 #define LVS_REPORT 0x0001
2647 #define LVS_SMALLICON 0x0002
2648 #define LVS_LIST 0x0003
2649 #define LVS_TYPEMASK 0x0003
2650 #define LVS_SINGLESEL 0x0004
2651 #define LVS_SHOWSELALWAYS 0x0008
2652 #define LVS_SORTASCENDING 0x0010
2653 #define LVS_SORTDESCENDING 0x0020
2654 #define LVS_SHAREIMAGELISTS 0x0040
2655 #define LVS_NOLABELWRAP 0x0080
2656 #define LVS_AUTOARRANGE 0x0100
2657 #define LVS_EDITLABELS 0x0200
2658 #define LVS_OWNERDATA 0x1000
2659 #define LVS_NOSCROLL 0x2000
2660 #define LVS_TYPESTYLEMASK 0xfc00
2661 #define LVS_ALIGNTOP 0x0000
2662 #define LVS_ALIGNLEFT 0x0800
2663 #define LVS_ALIGNMASK 0x0c00
2664 #define LVS_OWNERDRAWFIXED 0x0400
2665 #define LVS_NOCOLUMNHEADER 0x4000
2666 #define LVS_NOSORTHEADER 0x8000
2668 #define LVS_EX_GRIDLINES 0x0001
2669 #define LVS_EX_SUBITEMIMAGES 0x0002
2670 #define LVS_EX_CHECKBOXES 0x0004
2671 #define LVS_EX_TRACKSELECT 0x0008
2672 #define LVS_EX_HEADERDRAGDROP 0x0010
2673 #define LVS_EX_FULLROWSELECT 0x0020
2674 #define LVS_EX_ONECLICKACTIVATE 0x0040
2675 #define LVS_EX_TWOCLICKACTIVATE 0x0080
2676 #define LVS_EX_FLATSB 0x0100
2677 #define LVS_EX_REGIONAL 0x0200
2678 #define LVS_EX_INFOTIP 0x0400
2679 #define LVS_EX_UNDERLINEHOT 0x0800
2680 #define LVS_EX_UNDERLINECOLD 0x1000
2681 #define LVS_EX_MULTIWORKAREAS 0x2000
2683 #define LVCF_FMT 0x0001
2684 #define LVCF_WIDTH 0x0002
2685 #define LVCF_TEXT 0x0004
2686 #define LVCF_SUBITEM 0x0008
2687 #define LVCF_IMAGE 0x0010
2688 #define LVCF_ORDER 0x0020
2690 #define LVCFMT_LEFT 0x0000
2691 #define LVCFMT_RIGHT 0x0001
2692 #define LVCFMT_CENTER 0x0002
2693 #define LVCFMT_JUSTIFYMASK 0x0003
2694 #define LVCFMT_IMAGE 0x0800
2695 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2696 #define LVCFMT_COL_HAS_IMAGES 0x8000
2698 #define LVSIL_NORMAL 0
2699 #define LVSIL_SMALL 1
2700 #define LVSIL_STATE 2
2702 /* following 2 flags only for LVS_OWNERDATA listviews */
2703 /* and only in report or list mode */
2704 #define LVSICF_NOINVALIDATEALL 0x0001
2705 #define LVSICF_NOSCROLL 0x0002
2708 #define LVFI_PARAM 0X0001
2709 #define LVFI_STRING 0X0002
2710 #define LVFI_PARTIAL 0X0008
2711 #define LVFI_WRAP 0X0020
2712 #define LVFI_NEARESTXY 0X0040
2714 #define LVIF_TEXT 0x0001
2715 #define LVIF_IMAGE 0x0002
2716 #define LVIF_PARAM 0x0004
2717 #define LVIF_STATE 0x0008
2718 #define LVIF_INDENT 0x0010
2719 #define LVIF_GROUPID 0x0100
2720 #define LVIF_COLUMNS 0x0200
2721 #define LVIF_NORECOMPUTE 0x0800
2722 #define LVIF_DI_SETITEM 0x1000
2724 #define LVIR_BOUNDS 0x0000
2725 #define LVIR_LABEL 0x0002
2726 #define LVIR_ICON 0x0001
2727 #define LVIR_SELECTBOUNDS 0x0003
2729 #define LVIS_FOCUSED 0x0001
2730 #define LVIS_SELECTED 0x0002
2731 #define LVIS_CUT 0x0004
2732 #define LVIS_DROPHILITED 0x0008
2733 #define LVIS_ACTIVATING 0x0020
2735 #define LVIS_OVERLAYMASK 0x0F00
2736 #define LVIS_STATEIMAGEMASK 0xF000
2738 #define LVNI_ALL 0x0000
2739 #define LVNI_FOCUSED 0x0001
2740 #define LVNI_SELECTED 0x0002
2741 #define LVNI_CUT 0x0004
2742 #define LVNI_DROPHILITED 0x0008
2744 #define LVNI_ABOVE 0x0100
2745 #define LVNI_BELOW 0x0200
2746 #define LVNI_TOLEFT 0x0400
2747 #define LVNI_TORIGHT 0x0800
2749 #define LVHT_NOWHERE 0x0001
2750 #define LVHT_ONITEMICON 0x0002
2751 #define LVHT_ONITEMLABEL 0x0004
2752 #define LVHT_ONITEMSTATEICON 0x0008
2753 #define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
2755 #define LVHT_ABOVE 0x0008
2756 #define LVHT_BELOW 0x0010
2757 #define LVHT_TORIGHT 0x0020
2758 #define LVHT_TOLEFT 0x0040
2760 #define LVM_FIRST 0x1000
2761 #define LVM_GETBKCOLOR (LVM_FIRST+0)
2762 #define LVM_SETBKCOLOR (LVM_FIRST+1)
2763 #define LVM_GETIMAGELIST (LVM_FIRST+2)
2764 #define LVM_SETIMAGELIST (LVM_FIRST+3)
2765 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
2766 #define LVM_GETITEMA (LVM_FIRST+5)
2767 #define LVM_GETITEMW (LVM_FIRST+75)
2768 #define LVM_GETITEM WINELIB_NAME_AW(LVM_GETITEM)
2769 #define LVM_SETITEMA (LVM_FIRST+6)
2770 #define LVM_SETITEMW (LVM_FIRST+76)
2771 #define LVM_SETITEM WINELIB_NAME_AW(LVM_SETITEM)
2772 #define LVM_INSERTITEMA (LVM_FIRST+7)
2773 #define LVM_INSERTITEMW (LVM_FIRST+77)
2774 #define LVM_INSERTITEM WINELIB_NAME_AW(LVM_INSERTITEM)
2775 #define LVM_DELETEITEM (LVM_FIRST+8)
2776 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
2777 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
2778 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
2779 #define LVM_GETNEXTITEM (LVM_FIRST+12)
2780 #define LVM_FINDITEMA (LVM_FIRST+13)
2781 #define LVM_FINDITEMW (LVM_FIRST+83)
2782 #define LVM_FINDITEM WINELIB_NAME_AW(LVM_FINDITEM)
2783 #define LVM_GETITEMRECT (LVM_FIRST+14)
2784 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
2785 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
2786 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
2787 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
2788 #define LVM_GETSTRINGWIDTH WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
2789 #define LVM_HITTEST (LVM_FIRST+18)
2790 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
2791 #define LVM_SCROLL (LVM_FIRST+20)
2792 #define LVM_REDRAWITEMS (LVM_FIRST+21)
2793 #define LVM_ARRANGE (LVM_FIRST+22)
2794 #define LVM_EDITLABELA (LVM_FIRST+23)
2795 #define LVM_EDITLABELW (LVM_FIRST+118)
2796 #define LVM_EDITLABEL WINELIB_NAME_AW(LVM_EDITLABEL)
2797 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
2798 #define LVM_GETCOLUMNA (LVM_FIRST+25)
2799 #define LVM_GETCOLUMNW (LVM_FIRST+95)
2800 #define LVM_GETCOLUMN WINELIB_NAME_AW(LVM_GETCOLUMN)
2801 #define LVM_SETCOLUMNA (LVM_FIRST+26)
2802 #define LVM_SETCOLUMNW (LVM_FIRST+96)
2803 #define LVM_SETCOLUMN WINELIB_NAME_AW(LVM_SETCOLUMN)
2804 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
2805 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
2806 #define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
2807 #define LVM_DELETECOLUMN (LVM_FIRST+28)
2808 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
2809 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
2810 #define LVM_GETHEADER (LVM_FIRST+31)
2812 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
2813 #define LVM_GETVIEWRECT (LVM_FIRST+34)
2814 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
2815 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
2816 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
2817 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
2818 #define LVM_GETTOPINDEX (LVM_FIRST+39)
2819 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
2820 #define LVM_GETORIGIN (LVM_FIRST+41)
2821 #define LVM_UPDATE (LVM_FIRST+42)
2822 #define LVM_SETITEMSTATE (LVM_FIRST+43)
2823 #define LVM_GETITEMSTATE (LVM_FIRST+44)
2824 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
2825 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
2826 #define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
2827 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
2828 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
2829 #define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
2830 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
2831 #define LVM_SORTITEMS (LVM_FIRST+48)
2832 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
2833 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
2834 #define LVM_GETITEMSPACING (LVM_FIRST+51)
2835 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
2836 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
2837 #define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
2838 #define LVM_SETICONSPACING (LVM_FIRST+53)
2839 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
2840 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
2841 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
2842 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
2843 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
2844 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
2845 #define LVM_SETHOTITEM (LVM_FIRST+60)
2846 #define LVM_GETHOTITEM (LVM_FIRST+61)
2847 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
2848 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
2849 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
2850 #define LVM_SETWORKAREAS (LVM_FIRST+65)
2851 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
2852 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
2853 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
2854 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
2855 #define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
2856 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
2857 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
2858 #define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
2859 #define LVM_GETWORKAREAS (LVM_FIRST+70)
2860 #define LVM_SETHOVERTIME (LVM_FIRST+71)
2861 #define LVM_GETHOVERTIME (LVM_FIRST+72)
2862 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
2863 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
2864 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
2865 #define LVM_GETUNICODEFORMAT (CCM_GETUNICODEFORMAT)
2866 #define LVM_SETUNICODEFORMAT (CCM_SETUNICODEFORMAT)
2868 #define LVN_FIRST (0U-100U)
2869 #define LVN_LAST (0U-199U)
2870 #define LVN_ITEMCHANGING (LVN_FIRST-0)
2871 #define LVN_ITEMCHANGED (LVN_FIRST-1)
2872 #define LVN_INSERTITEM (LVN_FIRST-2)
2873 #define LVN_DELETEITEM (LVN_FIRST-3)
2874 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
2875 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
2876 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
2877 #define LVN_BEGINLABELEDIT WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
2878 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
2879 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
2880 #define LVN_ENDLABELEDIT WINELIB_NAME_AW(LVN_ENDLABELEDIT)
2881 #define LVN_COLUMNCLICK (LVN_FIRST-8)
2882 #define LVN_BEGINDRAG (LVN_FIRST-9)
2883 #define LVN_BEGINRDRAG (LVN_FIRST-11)
2884 #define LVN_ODCACHEHINT (LVN_FIRST-13)
2885 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
2886 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
2887 #define LVN_HOTTRACK (LVN_FIRST-21)
2888 #define LVN_ODFINDITEMA (LVN_FIRST-52)
2889 #define LVN_ODFINDITEMW (LVN_FIRST-79)
2890 #define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
2891 #define LVN_GETDISPINFOA (LVN_FIRST-50)
2892 #define LVN_GETDISPINFOW (LVN_FIRST-77)
2893 #define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
2894 #define LVN_SETDISPINFOA (LVN_FIRST-51)
2895 #define LVN_SETDISPINFOW (LVN_FIRST-78)
2896 #define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
2897 #define LVN_KEYDOWN (LVN_FIRST-55)
2898 #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
2899 #define LVN_GETINFOTIPA (LVN_FIRST-57)
2900 #define LVN_GETINFOTIPW (LVN_FIRST-58)
2901 #define LVN_GETINFOTIP WINELIB_NAME_AW(LVN_GETINFOTIP)
2903 #define LVA_ALIGNLEFT 0x0000
2904 #define LVA_DEFAULT 0x0001
2905 #define LVA_ALIGNTOP 0x0002
2906 #define LVA_SNAPTOGRID 0x0005
2908 typedef struct tagLVITEMA
2910 UINT mask;
2911 INT iItem;
2912 INT iSubItem;
2913 UINT state;
2914 UINT stateMask;
2915 LPSTR pszText;
2916 INT cchTextMax;
2917 INT iImage;
2918 LPARAM lParam;
2919 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2920 int iGroupId; /* (_WIN32_IE >= 0x560) */
2921 UINT cColumns; /* (_WIN32_IE >= 0x560) */
2922 PUINT puColumns; /* (_WIN32_IE >= 0x560) */
2923 } LVITEMA, *LPLVITEMA;
2925 typedef struct tagLVITEMW
2927 UINT mask;
2928 INT iItem;
2929 INT iSubItem;
2930 UINT state;
2931 UINT stateMask;
2932 LPWSTR pszText;
2933 INT cchTextMax;
2934 INT iImage;
2935 LPARAM lParam;
2936 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2937 int iGroupId; /* (_WIN32_IE >= 0x560) */
2938 UINT cColumns; /* (_WIN32_IE >= 0x560) */
2939 PUINT puColumns; /* (_WIN32_IE >= 0x560) */
2940 } LVITEMW, *LPLVITEMW;
2942 #define LVITEM WINELIB_NAME_AW(LVITEM)
2943 #define LPLVITEM WINELIB_NAME_AW(LPLVITEM)
2945 #define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
2946 #define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
2947 #define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
2949 #define LV_ITEM LVITEM
2950 #define LV_ITEMA LVITEMA
2951 #define LV_ITEMW LVITEMW
2953 typedef struct LVSETINFOTIPA
2955 UINT cbSize;
2956 DWORD dwFlags;
2957 LPSTR pszText;
2958 int iItem;
2959 int iSubItem;
2960 } LVSETINFOTIPA, *PLVSETINFOTIPA;
2962 typedef struct LVSETINFOTIPW
2964 UINT cbSize;
2965 DWORD dwFlags;
2966 LPWSTR pszText;
2967 int iItem;
2968 int iSubItem;
2969 } LVSETINFOTIPW, *PLVSETINFOTIPW;
2971 #define LVSETINFOTIP WINELIB_NAME_AW(LVSETINFOTIP)
2972 #define PLVSETINFOTIP WINELIB_NAME_AW(PLVSETINFOTIP)
2974 /* ListView background image structs and constants
2975 For _WIN32_IE version 0x400 and later. */
2977 typedef struct tagLVBKIMAGEA
2979 ULONG ulFlags;
2980 HBITMAP hbm;
2981 LPSTR pszImage;
2982 UINT cchImageMax;
2983 int xOffsetPercent;
2984 int yOffsetPercent;
2985 } LVBKIMAGEA, *LPLVBKIMAGEA;
2987 typedef struct tagLVBKIMAGEW
2989 ULONG ulFlags;
2990 HBITMAP hbm;
2991 LPWSTR pszImage;
2992 UINT cchImageMax;
2993 int xOffsetPercent;
2994 int yOffsetPercent;
2995 } LVBKIMAGEW, *LPLVBKIMAGEW;
2997 #define LVBKIMAGE WINELIB_NAME_AW(LVBKIMAGE)
2998 #define LPLVBKIMAGE WINELIB_NAME_AW(LPLVBKIMAGE)
3000 #define LVBKIF_SOURCE_NONE 0x00000000
3001 #define LVBKIF_SOURCE_HBITMAP 0x00000001
3002 #define LVBKIF_SOURCE_URL 0x00000002
3003 #define LVBKIF_SOURCE_MASK 0x00000003
3004 #define LVBKIF_STYLE_NORMAL 0x00000000
3005 #define LVBKIF_STYLE_TILE 0x00000010
3006 #define LVBKIF_STYLE_MASK 0x00000010
3008 #define ListView_SetBkImage(hwnd, plvbki) \
3009 (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)plvbki)
3011 #define ListView_GetBkImage(hwnd, plvbki) \
3012 (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)plvbki)
3014 typedef struct tagLVCOLUMNA
3016 UINT mask;
3017 INT fmt;
3018 INT cx;
3019 LPSTR pszText;
3020 INT cchTextMax;
3021 INT iSubItem;
3022 INT iImage; /* (_WIN32_IE >= 0x0300) */
3023 INT iOrder; /* (_WIN32_IE >= 0x0300) */
3024 } LVCOLUMNA, *LPLVCOLUMNA;
3026 typedef struct tagLVCOLUMNW
3028 UINT mask;
3029 INT fmt;
3030 INT cx;
3031 LPWSTR pszText;
3032 INT cchTextMax;
3033 INT iSubItem;
3034 INT iImage; /* (_WIN32_IE >= 0x0300) */
3035 INT iOrder; /* (_WIN32_IE >= 0x0300) */
3036 } LVCOLUMNW, *LPLVCOLUMNW;
3038 #define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
3039 #define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)
3041 #define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
3042 #define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
3043 #define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)
3045 #define LV_COLUMN LVCOLUMN
3048 typedef struct tagNMLISTVIEW
3050 NMHDR hdr;
3051 INT iItem;
3052 INT iSubItem;
3053 UINT uNewState;
3054 UINT uOldState;
3055 UINT uChanged;
3056 POINT ptAction;
3057 LPARAM lParam;
3058 } NMLISTVIEW, *LPNMLISTVIEW;
3060 #define NM_LISTVIEW NMLISTVIEW
3061 #define LPNM_LISTVIEW LPNMLISTVIEW
3063 typedef struct tagNMITEMACTIVATE
3065 NMHDR hdr;
3066 int iItem;
3067 int iSubItem;
3068 UINT uNewState;
3069 UINT uOldState;
3070 UINT uChanged;
3071 POINT ptAction;
3072 LPARAM lParam;
3073 UINT uKeyFlags;
3074 } NMITEMACTIVATE, *LPNMITEMACTIVATE;
3076 typedef struct tagLVDISPINFO
3078 NMHDR hdr;
3079 LVITEMA item;
3080 } NMLVDISPINFOA, *LPNMLVDISPINFOA;
3082 typedef struct tagLVDISPINFOW
3084 NMHDR hdr;
3085 LVITEMW item;
3086 } NMLVDISPINFOW, *LPNMLVDISPINFOW;
3088 #define NMLVDISPINFO WINELIB_NAME_AW(NMLVDISPINFO)
3089 #define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
3091 #define LV_DISPINFO NMLVDISPINFO
3092 #define LV_DISPINFOA NMLVDISPINFOA
3093 #define LV_DISPINFOW NMLVDISPINFOW
3095 #include "pshpack1.h"
3096 typedef struct tagLVKEYDOWN
3098 NMHDR hdr;
3099 WORD wVKey;
3100 UINT flags;
3101 } NMLVKEYDOWN, *LPNMLVKEYDOWN;
3102 #include "poppack.h"
3104 #define LV_KEYDOWN NMLVKEYDOWN
3106 typedef struct tagNMLVGETINFOTIPA
3108 NMHDR hdr;
3109 DWORD dwFlags;
3110 LPSTR pszText;
3111 int cchTextMax;
3112 int iItem;
3113 int iSubItem;
3114 LPARAM lParam;
3115 } NMLVGETINFOTIPA, *LPNMLVGETINFOTIPA;
3117 typedef struct tagNMLVGETINFOTIPW
3119 NMHDR hdr;
3120 DWORD dwFlags;
3121 LPWSTR pszText;
3122 int cchTextMax;
3123 int iItem;
3124 int iSubItem;
3125 LPARAM lParam;
3126 } NMLVGETINFOTIPW, *LPNMLVGETINFOTIPW;
3128 #define NMLVGETINFOTIP WINELIB_NAME_AW(NMLVGETINFOTIP)
3129 #define LPNMLVGETINFOTIP WINELIB_NAME_AW(LPNMLVGETINFOTIP)
3131 typedef struct tagLVHITTESTINFO
3133 POINT pt;
3134 UINT flags;
3135 INT iItem;
3136 INT iSubItem;
3137 } LVHITTESTINFO, *LPLVHITTESTINFO;
3139 #define LV_HITTESTINFO LVHITTESTINFO
3140 #define _LV_HITTESTINFO tagLVHITTESTINFO
3141 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
3143 typedef struct tagLVFINDINFOA
3145 UINT flags;
3146 LPCSTR psz;
3147 LPARAM lParam;
3148 POINT pt;
3149 UINT vkDirection;
3150 } LVFINDINFOA, *LPLVFINDINFOA;
3152 typedef struct tagLVFINDINFOW
3154 UINT flags;
3155 LPCWSTR psz;
3156 LPARAM lParam;
3157 POINT pt;
3158 UINT vkDirection;
3159 } LVFINDINFOW, *LPLVFINDINFOW;
3161 #define LVFINDINFO WINELIB_NAME_AW(LVFINDINFO)
3162 #define LPLVFINDINFO WINELIB_NAME_AW(LPLVFINDINFO)
3164 #define LV_FINDINFO LVFINDINFO
3165 #define LV_FINDINFOA LVFINDINFOA
3166 #define LV_FINDINFOW LVFINDINFOW
3168 /* Groups relates structures */
3170 typedef struct LVGROUPA
3172 UINT cbSize;
3173 UINT mask;
3174 LPSTR pszHeader;
3175 int cchHeader;
3176 int iGroupId;
3177 UINT stateMask;
3178 UINT state;
3179 UINT uAlign;
3180 } LVGROUPA, *PLVGROUPA;
3182 typedef struct LVGROUPW
3184 UINT cbSize;
3185 UINT mask;
3186 LPWSTR pszHeader;
3187 int cchHeader;
3188 int iGroupId;
3189 UINT stateMask;
3190 UINT state;
3191 UINT uAlign;
3192 } LVGROUPW, *PLVGROUPW;
3194 #define LVGROUP WINELIB_NAME_AW(LVGROUP)
3195 #define PLVGROUP WINELIB_NAME_AW(PLVGROUP)
3197 typedef struct LVGROUPMETRICS
3199 UINT cbSize;
3200 UINT mask;
3201 UINT Left;
3202 UINT Top;
3203 UINT Right;
3204 UINT Bottom;
3205 COLORREF crLeft;
3206 COLORREF crTop;
3207 COLORREF crRight;
3208 COLORREF crBottom;
3209 COLORREF crRightHeader;
3210 COLORREF crFooter;
3211 } LVGROUPMETRICS, *PLVGROUPMETRICS;
3213 typedef INT (*PFNLVGROUPCOMPARE)(INT, INT, VOID*);
3215 typedef struct LVINSERTGROUPSORTEDA
3217 PFNLVGROUPCOMPARE pfnGroupCompare;
3218 LPVOID *pvData;
3219 LVGROUPA lvGroup;
3220 } LVINSERTGROUPSORTEDA, *PLVINSERTGROUPSORTEDA;
3222 typedef struct LVINSERTGROUPSORTEDW
3224 PFNLVGROUPCOMPARE pfnGroupCompare;
3225 LPVOID *pvData;
3226 LVGROUPW lvGroup;
3227 } LVINSERTGROUPSORTEDW, *PLVINSERTGROUPSORTEDW;
3229 #define LVINSERTGROUPSORTED WINELIB_NAME_AW(LVINSERTGROUPSORTED)
3230 #define PLVINSERTGROUPSORTED WINELIB_NAME_AW(PLVINSERTGROUPSORTED)
3232 /* Tile related structures */
3234 typedef struct LVTILEINFO
3236 UINT cbSize;
3237 int iItem;
3238 UINT cColumns;
3239 PUINT puColumns;
3240 } LVTILEINFO, *PLVTILEINFO;
3242 typedef struct LVTILEVIEWINFO
3244 UINT cbSize;
3245 DWORD dwMask;
3246 DWORD dwFlags;
3247 SIZE sizeTile;
3248 int cLines;
3249 RECT rcLabelMargin;
3250 } LVTILEVIEWINFO, *PLVTILEVIEWINFO;
3252 typedef struct LVINSERTMARK
3254 UINT cbSize;
3255 DWORD dwFlags;
3256 int iItem;
3257 DWORD dwReserved;
3258 } LVINSERTMARK, *PLVINSERTMARK;
3260 typedef struct tagTCHITTESTINFO
3262 POINT pt;
3263 UINT flags;
3264 } TCHITTESTINFO, *LPTCHITTESTINFO;
3266 #define TC_HITTESTINFO TCHITTESTINFO
3268 typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
3270 #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLCUSTOMDRW, clrTextBk)
3272 typedef struct tagNMLVCUSTOMDRAW
3274 NMCUSTOMDRAW nmcd;
3275 COLORREF clrText;
3276 COLORREF clrTextBk;
3277 int iSubItem; /* (_WIN32_IE >= 0x0400) */
3278 DWORD dwItemType; /* (_WIN32_IE >= 0x560) */
3279 COLORREF clrFace; /* (_WIN32_IE >= 0x560) */
3280 int iIconEffect; /* (_WIN32_IE >= 0x560) */
3281 int iIconPhase; /* (_WIN32_IE >= 0x560) */
3282 int iPartId; /* (_WIN32_IE >= 0x560) */
3283 int iStateId; /* (_WIN32_IE >= 0x560) */
3284 RECT rcText; /* (_WIN32_IE >= 0x560) */
3285 UINT uAlign; /* (_WIN32_IE >= 0x560) */
3286 } NMLVCUSTOMDRAW, *LPNMLVCUSTOMDRAW;
3288 typedef struct tagNMLVCACHEHINT
3290 NMHDR hdr;
3291 INT iFrom;
3292 INT iTo;
3293 } NMLVCACHEHINT, *LPNMLVCACHEHINT;
3295 #define LPNM_CACHEHINT LPNMLVCACHEHINT
3296 #define PNM_CACHEHINT LPNMLVCACHEHINT
3297 #define NM_CACHEHINT NMLVCACHEHINT
3299 typedef struct tagNMLVFINDITEMA
3301 NMHDR hdr;
3302 int iStart;
3303 LVFINDINFOA lvfi;
3304 } NMLVFINDITEMA, *LPNMLVFINDITEMA;
3306 typedef struct tagNMLVFINDITEMW
3308 NMHDR hdr;
3309 int iStart;
3310 LVFINDINFOW lvfi;
3311 } NMLVFINDITEMW, *LPNMLVFINDITEMW;
3313 #define NMLVFINDITEM WINELIB_NAME_AW(NMLVFINDITEM)
3314 #define LPNMLVFINDITEM WINELIB_NAME_AW(LPNMLVFINDITEM)
3315 #define NM_FINDITEM NMLVFINDITEM
3316 #define LPNM_FINDITEM LPNMLVFINDITEM
3317 #define PNM_FINDITEM LPNMLVFINDITEM
3319 typedef struct tagNMLVODSTATECHANGE
3321 NMHDR hdr;
3322 int iFrom;
3323 int iTo;
3324 UINT uNewState;
3325 UINT uOldState;
3326 } NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;
3328 #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3329 #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3330 #define NM_ODSTATECHANGE NMLVODSTATECHANGE
3332 typedef struct NMLVSCROLL
3334 NMHDR hdr;
3335 int dx;
3336 int dy;
3337 } NMLVSCROLL, *LPNMLVSCROLL;
3339 #define ListView_SetItemCount(hwnd,count) \
3340 (BOOL)SNDMSGA((hwnd),LVM_SETITEMCOUNT,(WPARAM)(INT)(count),0)
3341 #define ListView_SetTextBkColor(hwnd,clrBk) \
3342 (BOOL)SNDMSGA((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3343 #define ListView_SetTextColor(hwnd,clrBk) \
3344 (BOOL)SNDMSGA((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3345 #define ListView_DeleteColumn(hwnd,col)\
3346 (LRESULT)SNDMSGA((hwnd),LVM_DELETECOLUMN,0,(LPARAM)(INT)(col))
3347 #define ListView_GetColumnA(hwnd,x,col)\
3348 (LRESULT)SNDMSGA((hwnd),LVM_GETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3349 #define ListView_GetColumnW(hwnd,x,col)\
3350 (LRESULT)SNDMSGW((hwnd),LVM_GETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3351 #define ListView_GetColumn WINELIB_NAME_AW(ListView_GetColumn)
3352 #define ListView_SetColumnA(hwnd,x,col)\
3353 (LRESULT)SNDMSGA((hwnd),LVM_SETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3354 #define ListView_SetColumnW(hwnd,x,col)\
3355 (LRESULT)SNDMSGW((hwnd),LVM_SETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3356 #define ListView_SetColumn WINELIB_NAME_AW(ListView_SetColumn)
3359 #define ListView_GetNextItem(hwnd,nItem,flags) \
3360 (INT)SNDMSGA((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
3361 #define ListView_FindItemA(hwnd,nItem,plvfi) \
3362 (INT)SNDMSGA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOA*)(plvfi))
3363 #define ListView_FindItemW(hwnd,nItem,plvfi) \
3364 (INT)SNDMSGW((hwnd),LVM_FINDITEMW,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOW*)(plvfi))
3365 #define ListView_FindItem WINELIB_NAME_AW(ListView_FindItem)
3367 #define ListView_Arrange(hwnd,code) \
3368 (INT)SNDMSGA((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
3369 #define ListView_GetItemPosition(hwnd,i,ppt) \
3370 (INT)SNDMSGA((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
3371 #define ListView_GetItemRect(hwnd,i,prc,code) \
3372 (BOOL)SNDMSGA((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
3373 ((prc) ? (((RECT*)(prc))->left = (code),(LPARAM)(RECT \
3374 *)(prc)) : (LPARAM)(RECT*)NULL))
3375 #define ListView_SetItemA(hwnd,pitem) \
3376 (INT)SNDMSGA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3377 #define ListView_SetItemW(hwnd,pitem) \
3378 (INT)SNDMSGW((hwnd),LVM_SETITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3379 #define ListView_SetItem WINELIB_NAME_AW(ListView_SetItem)
3380 #define ListView_SetItemState(hwnd,i,data,dataMask) \
3381 { LVITEMA _LVi; _LVi.state = data; _LVi.stateMask = dataMask;\
3382 SNDMSGA(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEMA)&_LVi);}
3383 #define ListView_GetItemState(hwnd,i,mask) \
3384 (BOOL)SNDMSGA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
3385 #define ListView_GetCountPerPage(hwnd) \
3386 (BOOL)SNDMSGW((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
3387 #define ListView_GetImageList(hwnd,iImageList) \
3388 (HIMAGELIST)SNDMSGA((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
3389 #define ListView_GetStringWidthA(hwnd,pstr) \
3390 (INT)SNDMSGA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
3391 #define ListView_GetStringWidthW(hwnd,pstr) \
3392 (INT)SNDMSGW((hwnd),LVM_GETSTRINGWIDTHW,0,(LPARAM)(LPCWSTR)(pstr))
3393 #define ListView_GetStringWidth WINELIB_NAME_AW(ListView_GetStringWidth)
3394 #define ListView_GetTopIndex(hwnd) \
3395 (BOOL)SNDMSGA((hwnd),LVM_GETTOPINDEX,0,0L)
3396 #define ListView_Scroll(hwnd,dx,dy) \
3397 (BOOL)SNDMSGA((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
3398 #define ListView_EnsureVisible(hwnd,i,fPartialOk) \
3399 (BOOL)SNDMSGA((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
3400 #define ListView_SetBkColor(hwnd,clrBk) \
3401 (BOOL)SNDMSGA((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3402 #define ListView_SetImageList(hwnd,himl,iImageList) \
3403 (HIMAGELIST)(UINT)SNDMSGA((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(UINT)(HIMAGELIST)(himl))
3404 #define ListView_GetItemCount(hwnd) \
3405 (INT)SNDMSGA((hwnd),LVM_GETITEMCOUNT,0,0L)
3407 #define ListView_GetItemA(hwnd,pitem) \
3408 (BOOL)SNDMSGA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
3409 #define ListView_GetItemW(hwnd,pitem) \
3410 (BOOL)SNDMSGW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
3411 #define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
3413 #define ListView_HitTest(hwnd,pinfo) \
3414 (INT)SNDMSGA((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
3416 #define ListView_InsertItemA(hwnd,pitem) \
3417 (INT)SNDMSGA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3418 #define ListView_InsertItemW(hwnd,pitem) \
3419 (INT)SNDMSGW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3420 #define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
3422 #define ListView_DeleteAllItems(hwnd) \
3423 (BOOL)SNDMSGA((hwnd),LVM_DELETEALLITEMS,0,0L)
3425 #define ListView_InsertColumnA(hwnd,iCol,pcol) \
3426 (INT)SNDMSGA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
3427 #define ListView_InsertColumnW(hwnd,iCol,pcol) \
3428 (INT)SNDMSGW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
3429 #define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
3431 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
3432 (BOOL)SNDMSGA((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
3433 #define ListView_SetItemPosition(hwndLV, i, x, y) \
3434 (BOOL)SNDMSGA((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
3435 #define ListView_GetSelectedCount(hwndLV) \
3436 (UINT)SNDMSGA((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
3438 #define ListView_EditLabelA(hwndLV, i) \
3439 (HWND)SNDMSGA((hwndLV),LVM_EDITLABELA,(WPARAM)(int)(i), 0L)
3440 #define ListView_EditLabelW(hwndLV, i) \
3441 (HWND)SNDMSGW((hwndLV),LVM_EDITLABELW,(WPARAM)(int)(i), 0L)
3442 #define ListView_EditLabel WINELIB_NAME_AW(ListView_EditLabel)
3444 #define ListView_GetItemTextA(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
3446 LVITEMA _LVi;\
3447 _LVi.iSubItem = _iSubItem;\
3448 _LVi.cchTextMax = _cchTextMax;\
3449 _LVi.pszText = _pszText;\
3450 SNDMSGA(hwndLV, LVM_GETITEMTEXTA, (WPARAM)(i), (LPARAM)&_LVi);\
3452 #define ListView_GetItemTextW(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
3454 LVITEMW _LVi;\
3455 _LVi.iSubItem = _iSubItem;\
3456 _LVi.cchTextMax = _cchTextMax;\
3457 _LVi.pszText = _pszText;\
3458 SNDMSGW(hwndLV, LVM_GETITEMTEXTW, (WPARAM)(i), (LPARAM)&_LVi);\
3460 #define ListView_GetItemText WINELIB_NAME_AW(ListView_GetItemText)
3462 #define ListView_SetItemTextA(hwndLV, i, _iSubItem, _pszText) \
3463 { LVITEMA _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3464 SNDMSGA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}
3465 #define ListView_SetItemTextW(hwndLV, i, _iSubItem, _pszText) \
3466 { LVITEMW _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3467 SNDMSGW(hwndLV, LVM_SETITEMTEXTW, (WPARAM)i, (LPARAM) (LVITEMW*)& _LVi);}
3468 #define ListView_SetItemText WINELIB_NAME_AW(ListView_SetItemText)
3470 #define ListView_DeleteItem(hwndLV, i) \
3471 (BOOL)SNDMSGA(hwndLV, LVM_DELETEITEM, (WPARAM)(int)(i), 0L)
3472 #define ListView_Update(hwndLV, i) \
3473 (BOOL)SNDMSGA((hwndLV), LVM_UPDATE, (WPARAM)(i), 0L)
3474 #define ListView_GetColumnOrderArray(hwndLV, iCount, pi) \
3475 (BOOL)SNDMSGA((hwndLV), LVM_GETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3476 #define ListView_GetExtendedListViewStyle(hwndLV) \
3477 (DWORD)SNDMSGA((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0L)
3478 #define ListView_GetHotCursor(hwndLV) \
3479 (HCURSOR)SNDMSGA((hwndLV), LVM_GETHOTCURSOR, 0, 0L)
3480 #define ListView_GetHotItem(hwndLV) \
3481 (int)SNDMSGA((hwndLV), LVM_GETHOTITEM, 0, 0L)
3482 #define ListView_GetItemSpacing(hwndLV, fSmall) \
3483 (DWORD)SNDMSGA((hwndLV), LVM_GETITEMSPACING, (WPARAM)fSmall, 0L)
3484 #define ListView_GetSubItemRect(hwndLV, iItem, iSubItem, code, prc) \
3485 (BOOL)SNDMSGA((hwndLV), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
3486 ((prc) ? (((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code):0), (LPARAM)prc)
3487 #define ListView_GetToolTips(hwndLV) \
3488 (HWND)SNDMSGA((hwndLV), LVM_GETTOOLTIPS, 0, 0L)
3489 #define ListView_SetColumnOrderArray(hwndLV, iCount, pi) \
3490 (BOOL)SNDMSGA((hwndLV), LVM_SETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3491 #define ListView_SetExtendedListViewStyle(hwndLV, dw) \
3492 (DWORD)SNDMSGA((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dw)
3493 #define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw) \
3494 (DWORD)SNDMSGA((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)dwMask, (LPARAM)dw)
3495 #define ListView_SetHotCursor(hwndLV, hcur) \
3496 (HCURSOR)SNDMSGA((hwndLV), LVM_SETHOTCURSOR, 0, (LPARAM)hcur)
3497 #define ListView_SetHotItem(hwndLV, i) \
3498 (int)SNDMSGA((hwndLV), LVM_SETHOTITEM, (WPARAM)i, 0L)
3499 #define ListView_SetIconSpacing(hwndLV, cx, cy) \
3500 (DWORD)SNDMSGA((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
3501 #define ListView_SetToolTips(hwndLV, hwndNewHwnd) \
3502 (HWND)SNDMSGA((hwndLV), LVM_SETTOOLTIPS, (WPARAM)hwndNewHwnd, 0L)
3503 #define ListView_SubItemHitTest(hwndLV, plvhti) \
3504 (int)SNDMSGA((hwndLV), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
3507 /* Tab Control */
3509 #define WC_TABCONTROL16 "SysTabControl"
3510 #define WC_TABCONTROLA "SysTabControl32"
3511 #if defined(__GNUC__)
3512 # define WC_TABCONTROLW (const WCHAR []){ 'S','y','s', \
3513 'T','a','b','C','o','n','t','r','o','l','3','2',0 }
3514 #elif defined(_MSC_VER)
3515 # define WC_TABCONTROLW L"SysTabControl32"
3516 #else
3517 static const WCHAR WC_TABCONTROLW[] = { 'S','y','s',
3518 'T','a','b','C','o','n','t','r','o','l','3','2',0 };
3519 #endif
3520 #define WC_TABCONTROL WINELIB_NAME_AW(WC_TABCONTROL)
3522 /* tab control styles */
3523 #define TCS_SCROLLOPPOSITE 0x0001 /* assumes multiline tab */
3524 #define TCS_BOTTOM 0x0002
3525 #define TCS_RIGHT 0x0002
3526 #define TCS_MULTISELECT 0x0004 /* allow multi-select in button mode */
3527 #define TCS_FLATBUTTONS 0x0008
3528 #define TCS_FORCEICONLEFT 0x0010
3529 #define TCS_FORCELABELLEFT 0x0020
3530 #define TCS_HOTTRACK 0x0040
3531 #define TCS_VERTICAL 0x0080
3532 #define TCS_TABS 0x0000
3533 #define TCS_BUTTONS 0x0100
3534 #define TCS_SINGLELINE 0x0000
3535 #define TCS_MULTILINE 0x0200
3536 #define TCS_RIGHTJUSTIFY 0x0000
3537 #define TCS_FIXEDWIDTH 0x0400
3538 #define TCS_RAGGEDRIGHT 0x0800
3539 #define TCS_FOCUSONBUTTONDOWN 0x1000
3540 #define TCS_OWNERDRAWFIXED 0x2000
3541 #define TCS_TOOLTIPS 0x4000
3542 #define TCS_FOCUSNEVER 0x8000
3543 #define TCS_EX_FLATSEPARATORS 0x00000001 /* to be used with */
3544 #define TCS_EX_REGISTERDROP 0x00000002 /* TCM_SETEXTENDEDSTYLE */
3547 #define TCM_FIRST 0x1300
3549 #define TCM_GETIMAGELIST (TCM_FIRST + 2)
3550 #define TCM_SETIMAGELIST (TCM_FIRST + 3)
3551 #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
3552 #define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
3553 #define TCM_GETITEMA (TCM_FIRST + 5)
3554 #define TCM_GETITEMW (TCM_FIRST + 60)
3555 #define TCM_SETITEMA (TCM_FIRST + 6)
3556 #define TCM_SETITEMW (TCM_FIRST + 61)
3557 #define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
3558 #define TCM_INSERTITEMA (TCM_FIRST + 7)
3559 #define TCM_INSERTITEMW (TCM_FIRST + 62)
3560 #define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
3561 #define TCM_DELETEITEM (TCM_FIRST + 8)
3562 #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
3563 #define TCM_GETITEMRECT (TCM_FIRST + 10)
3564 #define TCM_GETCURSEL (TCM_FIRST + 11)
3565 #define TCM_SETCURSEL (TCM_FIRST + 12)
3566 #define TCM_HITTEST (TCM_FIRST + 13)
3567 #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
3568 #define TCM_ADJUSTRECT (TCM_FIRST + 40)
3569 #define TCM_SETITEMSIZE (TCM_FIRST + 41)
3570 #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
3571 #define TCM_SETPADDING (TCM_FIRST + 43)
3572 #define TCM_GETROWCOUNT (TCM_FIRST + 44)
3573 #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
3574 #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
3575 #define TCM_GETCURFOCUS (TCM_FIRST + 47)
3576 #define TCM_SETCURFOCUS (TCM_FIRST + 48)
3577 #define TCM_SETMINTABWIDTH (TCM_FIRST + 49)
3578 #define TCM_DESELECTALL (TCM_FIRST + 50)
3579 #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
3580 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
3581 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
3582 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3583 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3586 #define TCIF_TEXT 0x0001
3587 #define TCIF_IMAGE 0x0002
3588 #define TCIF_RTLREADING 0x0004
3589 #define TCIF_PARAM 0x0008
3590 #define TCIF_STATE 0x0010
3592 #define TCIS_BUTTONPRESSED 0x0001
3593 #define TCIS_HIGHLIGHTED 0x0002
3595 /* TabCtrl Macros */
3596 #define TabCtrl_GetImageList(hwnd) \
3597 (HIMAGELIST)SNDMSGA((hwnd), TCM_GETIMAGELIST, 0, 0L)
3598 #define TabCtrl_SetImageList(hwnd, himl) \
3599 (HIMAGELIST)SNDMSGA((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
3600 #define TabCtrl_GetItemCount(hwnd) \
3601 (int)SNDMSGA((hwnd), TCM_GETITEMCOUNT, 0, 0L)
3602 #define TabCtrl_GetItemA(hwnd, iItem, pitem) \
3603 (BOOL)SNDMSGA((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3604 #define TabCtrl_GetItemW(hwnd, iItem, pitem) \
3605 (BOOL)SNDMSGW((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3606 #define TabCtrl_GetItem WINELIB_NAME_AW(TabCtrl_GetItem)
3607 #define TabCtrl_SetItemA(hwnd, iItem, pitem) \
3608 (BOOL)SNDMSGA((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3609 #define TabCtrl_SetItemW(hwnd, iItem, pitem) \
3610 (BOOL)SNDMSGW((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3611 #define TabCtrl_SetItem WINELIB_NAME_AW(TabCtrl_GetItem)
3612 #define TabCtrl_InsertItemA(hwnd, iItem, pitem) \
3613 (int)SNDMSGA((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
3614 #define TabCtrl_InsertItemW(hwnd, iItem, pitem) \
3615 (int)SNDMSGW((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
3616 #define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
3617 #define TabCtrl_DeleteItem(hwnd, i) \
3618 (BOOL)SNDMSGA((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
3619 #define TabCtrl_DeleteAllItems(hwnd) \
3620 (BOOL)SNDMSGA((hwnd), TCM_DELETEALLITEMS, 0, 0L)
3621 #define TabCtrl_GetItemRect(hwnd, i, prc) \
3622 (BOOL)SNDMSGA((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
3623 #define TabCtrl_GetCurSel(hwnd) \
3624 (int)SNDMSGA((hwnd), TCM_GETCURSEL, 0, 0)
3625 #define TabCtrl_SetCurSel(hwnd, i) \
3626 (int)SNDMSGA((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
3627 #define TabCtrl_HitTest(hwndTC, pinfo) \
3628 (int)SNDMSGA((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
3629 #define TabCtrl_SetItemExtra(hwndTC, cb) \
3630 (BOOL)SNDMSGA((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
3631 #define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
3632 (int)SNDMSGA(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
3633 #define TabCtrl_SetItemSize(hwnd, x, y) \
3634 (DWORD)SNDMSGA((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
3635 #define TabCtrl_RemoveImage(hwnd, i) \
3636 (void)SNDMSGA((hwnd), TCM_REMOVEIMAGE, i, 0L)
3637 #define TabCtrl_SetPadding(hwnd, cx, cy) \
3638 (void)SNDMSGA((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
3639 #define TabCtrl_GetRowCount(hwnd) \
3640 (int)SNDMSGA((hwnd), TCM_GETROWCOUNT, 0, 0L)
3641 #define TabCtrl_GetToolTips(hwnd) \
3642 (HWND)SNDMSGA((hwnd), TCM_GETTOOLTIPS, 0, 0L)
3643 #define TabCtrl_SetToolTips(hwnd, hwndTT) \
3644 (void)SNDMSGA((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
3645 #define TabCtrl_GetCurFocus(hwnd) \
3646 (int)SNDMSGA((hwnd), TCM_GETCURFOCUS, 0, 0)
3647 #define TabCtrl_SetCurFocus(hwnd, i) \
3648 SNDMSGA((hwnd),TCM_SETCURFOCUS, i, 0)
3649 #define TabCtrl_SetMinTabWidth(hwnd, x) \
3650 (int)SNDMSGA((hwnd), TCM_SETMINTABWIDTH, 0, x)
3651 #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
3652 (void)SNDMSGA((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
3655 /* constants for TCHITTESTINFO */
3657 #define TCHT_NOWHERE 0x01
3658 #define TCHT_ONITEMICON 0x02
3659 #define TCHT_ONITEMLABEL 0x04
3660 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
3663 typedef struct tagTCITEMA {
3664 UINT mask;
3665 UINT dwState;
3666 UINT dwStateMask;
3667 LPSTR pszText;
3668 INT cchTextMax;
3669 INT iImage;
3670 LPARAM lParam;
3671 } TCITEMA, *LPTCITEMA;
3673 typedef struct tagTCITEMW
3675 UINT mask;
3676 DWORD dwState;
3677 DWORD dwStateMask;
3678 LPWSTR pszText;
3679 INT cchTextMax;
3680 INT iImage;
3681 LPARAM lParam;
3682 } TCITEMW, *LPTCITEMW;
3684 #define TCITEM WINELIB_NAME_AW(TCITEM)
3685 #define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
3686 #define TC_ITEM TCITEM
3688 #define TCN_FIRST (0U-550U)
3689 #define TCN_LAST (0U-580U)
3690 #define TCN_KEYDOWN (TCN_FIRST - 0)
3691 #define TCN_SELCHANGE (TCN_FIRST - 1)
3692 #define TCN_SELCHANGING (TCN_FIRST - 2)
3693 #define TCN_GETOBJECT (TCN_FIRST - 3)
3695 #include "pshpack1.h"
3696 typedef struct tagTCKEYDOWN
3698 NMHDR hdr;
3699 WORD wVKey;
3700 UINT flags;
3701 } NMTCKEYDOWN;
3702 #include "poppack.h"
3704 #define TC_KEYDOWN NMTCKEYDOWN
3706 /* ComboBoxEx control */
3708 #define WC_COMBOBOXEXA "ComboBoxEx32"
3709 #if defined(__GNUC__)
3710 # define WC_COMBOBOXEXW (const WCHAR []){ 'C','o','m','b','o', \
3711 'B','o','x','E','x','3','2',0 }
3712 #elif defined(_MSC_VER)
3713 # define WC_COMBOBOXEXW L"ComboBoxEx32"
3714 #else
3715 static const WCHAR WC_COMBOBOXEXW[] = { 'C','o','m','b','o',
3716 'B','o','x','E','x','3','2',0 };
3717 #endif
3718 #define WC_COMBOBOXEX WINELIB_NAME_AW(WC_COMBOBOXEX)
3720 #define CBEIF_TEXT 0x00000001
3721 #define CBEIF_IMAGE 0x00000002
3722 #define CBEIF_SELECTEDIMAGE 0x00000004
3723 #define CBEIF_OVERLAY 0x00000008
3724 #define CBEIF_INDENT 0x00000010
3725 #define CBEIF_LPARAM 0x00000020
3726 #define CBEIF_DI_SETITEM 0x10000000
3728 #define CBEM_INSERTITEMA (WM_USER+1)
3729 #define CBEM_INSERTITEMW (WM_USER+11)
3730 #define CBEM_INSERTITEM WINELIB_NAME_AW(CBEM_INSERTITEM)
3731 #define CBEM_SETIMAGELIST (WM_USER+2)
3732 #define CBEM_GETIMAGELIST (WM_USER+3)
3733 #define CBEM_GETITEMA (WM_USER+4)
3734 #define CBEM_GETITEMW (WM_USER+13)
3735 #define CBEM_GETITEM WINELIB_NAME_AW(CBEM_GETITEM)
3736 #define CBEM_SETITEMA (WM_USER+5)
3737 #define CBEM_SETITEMW (WM_USER+12)
3738 #define CBEM_SETITEM WINELIB_NAME_AW(CBEM_SETITEM)
3739 #define CBEM_DELETEITEM CB_DELETESTRING
3740 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
3741 #define CBEM_GETEDITCONTROL (WM_USER+7)
3742 #define CBEM_SETEXSTYLE (WM_USER+8)
3743 #define CBEM_GETEXSTYLE (WM_USER+9)
3744 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
3745 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
3746 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3747 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3748 #define CBEM_HASEDITCHANGED (WM_USER+10)
3750 #define CBEIF_TEXT 0x00000001
3751 #define CBEIF_IMAGE 0x00000002
3752 #define CBEIF_SELECTEDIMAGE 0x00000004
3753 #define CBEIF_OVERLAY 0x00000008
3754 #define CBEIF_INDENT 0x00000010
3755 #define CBEIF_LPARAM 0x00000020
3756 #define CBEIF_DI_SETITEM 0x10000000
3758 #define CBEN_FIRST (0U-800U)
3759 #define CBEN_LAST (0U-830U)
3761 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
3762 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
3763 #define CBEN_GETDISPINFO WINELIB_NAME_AW(CBEN_GETDISPINFO)
3764 #define CBEN_INSERTITEM (CBEN_FIRST - 1)
3765 #define CBEN_DELETEITEM (CBEN_FIRST - 2)
3766 #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
3767 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
3768 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
3769 #define CBEN_ENDEDIT WINELIB_NAME_AW(CBEN_ENDEDIT)
3770 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
3771 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
3772 #define CBEN_DRAGBEGIN WINELIB_NAME_AW(CBEN_DRAGBEGIN)
3774 #define CBES_EX_NOEDITIMAGE 0x00000001
3775 #define CBES_EX_NOEDITIMAGEINDENT 0x00000002
3776 #define CBES_EX_PATHWORDBREAKPROC 0x00000004
3777 #define CBES_EX_NOSIZELIMIT 0x00000008
3778 #define CBES_EX_CASESENSITIVE 0x00000010
3781 typedef struct tagCOMBOBOXEXITEMA
3783 UINT mask;
3784 int iItem;
3785 LPSTR pszText;
3786 int cchTextMax;
3787 int iImage;
3788 int iSelectedImage;
3789 int iOverlay;
3790 int iIndent;
3791 LPARAM lParam;
3792 } COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
3793 typedef COMBOBOXEXITEMA const *PCCOMBOEXITEMA; /* Yes, there's a BOX missing */
3795 typedef struct tagCOMBOBOXEXITEMW
3797 UINT mask;
3798 int iItem;
3799 LPWSTR pszText;
3800 int cchTextMax;
3801 int iImage;
3802 int iSelectedImage;
3803 int iOverlay;
3804 int iIndent;
3805 LPARAM lParam;
3806 } COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
3807 typedef COMBOBOXEXITEMW const *PCCOMBOEXITEMW; /* Yes, there's a BOX missing */
3809 #define COMBOBOXEXITEM WINELIB_NAME_AW(COMBOBOXEXITEM)
3810 #define PCOMBOBOXEXITEM WINELIB_NAME_AW(PCOMBOBOXEXITEM)
3811 #define PCCOMBOBOXEXITEM WINELIB_NAME_AW(PCCOMBOEXITEM) /* Yes, there's a BOX missing */
3813 #define CBENF_KILLFOCUS 1
3814 #define CBENF_RETURN 2
3815 #define CBENF_ESCAPE 3
3816 #define CBENF_DROPDOWN 4
3818 #define CBEMAXSTRLEN 260
3820 typedef struct tagNMCBEENDEDITW
3822 NMHDR hdr;
3823 BOOL fChanged;
3824 int iNewSelection;
3825 WCHAR szText[CBEMAXSTRLEN];
3826 int iWhy;
3827 } NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;
3829 typedef struct tagNMCBEENDEDITA
3831 NMHDR hdr;
3832 BOOL fChanged;
3833 int iNewSelection;
3834 char szText[CBEMAXSTRLEN];
3835 int iWhy;
3836 } NMCBEENDEDITA, *LPNMCBEENDEDITA, *PNMCBEENDEDITA;
3838 #define NMCBEENDEDIT WINELIB_NAME_AW(NMCBEENDEDIT)
3839 #define LPNMCBEENDEDIT WINELIB_NAME_AW(LPNMCBEENDEDIT)
3840 #define PNMCBEENDEDIT WINELIB_NAME_AW(PNMCBEENDEDIT)
3842 typedef struct
3844 NMHDR hdr;
3845 COMBOBOXEXITEMA ceItem;
3846 } NMCOMBOBOXEXA, *PNMCOMBOBOXEXA;
3848 typedef struct
3850 NMHDR hdr;
3851 COMBOBOXEXITEMW ceItem;
3852 } NMCOMBOBOXEXW, *PNMCOMBOBOXEXW;
3854 #define NMCOMBOBOXEX WINELIB_NAME_AW(NMCOMBOBOXEX)
3855 #define PNMCOMBOBOXEX WINELIB_NAME_AW(PNMCOMBOBOXEX)
3857 typedef struct
3859 NMHDR hdr;
3860 int iItemid;
3861 char szText[CBEMAXSTRLEN];
3862 } NMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA;
3864 typedef struct
3866 NMHDR hdr;
3867 int iItemid;
3868 WCHAR szText[CBEMAXSTRLEN];
3869 } NMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW;
3871 #define NMCBEDRAGBEGIN WINELIB_NAME_AW(NMCBEDRAGBEGIN)
3872 #define PNMCBEDRAGBEGIN WINELIB_NAME_AW(PNMCBEDRAGBEGIN)
3873 #define LPNMCBEDRAGBEGIN WINELIB_NAME_AW(LPNMCBEDRAGBEGIN)
3876 /* Hotkey control */
3878 #define HOTKEY_CLASS16 "msctls_hotkey"
3879 #define HOTKEY_CLASSA "msctls_hotkey32"
3880 #if defined(__GNUC__)
3881 # define HOTKEY_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
3882 'h','o','t','k','e','y','3','2',0 }
3883 #elif defined(_MSC_VER)
3884 # define HOTKEY_CLASSW L"msctls_hotkey32"
3885 #else
3886 static const WCHAR HOTKEY_CLASSW[] = { 'm','s','c','t','l','s','_',
3887 'h','o','t','k','e','y','3','2',0 };
3888 #endif
3889 #define HOTKEY_CLASS WINELIB_NAME_AW(HOTKEY_CLASS)
3891 #define HOTKEYF_SHIFT 0x01
3892 #define HOTKEYF_CONTROL 0x02
3893 #define HOTKEYF_ALT 0x04
3894 #define HOTKEYF_EXT 0x08
3896 #define HKCOMB_NONE 0x0001
3897 #define HKCOMB_S 0x0002
3898 #define HKCOMB_C 0x0004
3899 #define HKCOMB_A 0x0008
3900 #define HKCOMB_SC 0x0010
3901 #define HKCOMB_SA 0x0020
3902 #define HKCOMB_CA 0x0040
3903 #define HKCOMB_SCA 0x0080
3905 #define HKM_SETHOTKEY (WM_USER+1)
3906 #define HKM_GETHOTKEY (WM_USER+2)
3907 #define HKM_SETRULES (WM_USER+3)
3910 /* animate control */
3912 #define ANIMATE_CLASSA "SysAnimate32"
3913 #if defined(__GNUC__)
3914 # define ANIMATE_CLASSW (const WCHAR []){ 'S','y','s', \
3915 'A','n','i','m','a','t','e','3','2',0 }
3916 #elif defined(_MSC_VER)
3917 # define ANIMATE_CLASSW L"SysAnimate32"
3918 #else
3919 static const WCHAR ANIMATE_CLASSW[] = { 'S','y','s',
3920 'A','n','i','m','a','t','e','3','2',0 };
3921 #endif
3922 #define ANIMATE_CLASS WINELIB_NAME_AW(ANIMATE_CLASS)
3924 #define ACS_CENTER 0x0001
3925 #define ACS_TRANSPARENT 0x0002
3926 #define ACS_AUTOPLAY 0x0004
3927 #define ACS_TIMER 0x0008 /* no threads, just timers */
3929 #define ACM_OPENA (WM_USER+100)
3930 #define ACM_OPENW (WM_USER+103)
3931 #define ACM_OPEN WINELIB_NAME_AW(ACM_OPEN)
3932 #define ACM_PLAY (WM_USER+101)
3933 #define ACM_STOP (WM_USER+102)
3935 #define ACN_START 1
3936 #define ACN_STOP 2
3938 #define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
3939 CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
3940 #define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
3941 CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
3942 #define Animate_Create WINELIB_NAME_AW(Animate_Create)
3943 #define Animate_OpenA(hwnd,szName) \
3944 (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
3945 #define Animate_OpenW(hwnd,szName) \
3946 (BOOL)SNDMSGW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
3947 #define Animate_Open WINELIB_NAME_AW(Animate_Open)
3948 #define Animate_OpenExA(hwnd,hInst,szName) \
3949 (BOOL)SNDMSGA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
3950 #define Animate_OpenExW(hwnd,hInst,szName) \
3951 (BOOL)SNDMSGW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
3952 #define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
3953 #define Animate_Play(hwnd,from,to,rep) \
3954 (BOOL)SNDMSGA(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
3955 #define Animate_Stop(hwnd) \
3956 (BOOL)SNDMSGA(hwnd,ACM_STOP,0,0)
3957 #define Animate_Close(hwnd) \
3958 (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,0)
3959 #define Animate_Seek(hwnd,frame) \
3960 (BOOL)SNDMSGA(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
3963 /**************************************************************************
3964 * IP Address control
3967 #define WC_IPADDRESSA "SysIPAddress32"
3968 #if defined(__GNUC__)
3969 # define WC_IPADDRESSW (const WCHAR []){ 'S','y','s', \
3970 'I','P','A','d','d','r','e','s','s','3','2',0 }
3971 #elif defined(_MSC_VER)
3972 # define WC_IPADDRESSW L"SysIPAddress32"
3973 #else
3974 static const WCHAR WC_IPADDRESSW[] = { 'S','y','s',
3975 'I','P','A','d','d','r','e','s','s','3','2',0 };
3976 #endif
3977 #define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
3979 #define IPM_CLEARADDRESS (WM_USER+100)
3980 #define IPM_SETADDRESS (WM_USER+101)
3981 #define IPM_GETADDRESS (WM_USER+102)
3982 #define IPM_SETRANGE (WM_USER+103)
3983 #define IPM_SETFOCUS (WM_USER+104)
3984 #define IPM_ISBLANK (WM_USER+105)
3986 #define IPN_FIRST (0U-860U)
3987 #define IPN_LAST (0U-879U)
3988 #define IPN_FIELDCHANGED (IPN_FIRST-0)
3990 typedef struct tagNMIPADDRESS
3992 NMHDR hdr;
3993 INT iField;
3994 INT iValue;
3995 } NMIPADDRESS, *LPNMIPADDRESS;
3997 #define MAKEIPRANGE(low,high) \
3998 ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
3999 #define MAKEIPADDRESS(b1,b2,b3,b4) \
4000 ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
4002 #define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
4003 #define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
4004 #define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
4005 #define FOURTH_IPADDRESS(x) ((x)&0xff)
4008 /**************************************************************************
4009 * Native Font control
4012 #define WC_NATIVEFONTCTLA "NativeFontCtl"
4013 #if defined(__GNUC__)
4014 # define WC_NATIVEFONTCTLW (const WCHAR []){ 'N','a','t','i','v','e', \
4015 'F','o','n','t','C','t','l',0 }
4016 #elif defined(_MSC_VER)
4017 # define WC_NATIVEFONTCTLW L"NativeFontCtl"
4018 #else
4019 static const WCHAR WC_NATIVEFONTCTLW[] = { 'N','a','t','i','v','e',
4020 'F','o','n','t','C','t','l',0 };
4021 #endif
4022 #define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
4024 #define NFS_EDIT 0x0001
4025 #define NFS_STATIC 0x0002
4026 #define NFS_LISTCOMBO 0x0004
4027 #define NFS_BUTTON 0x0008
4028 #define NFS_ALL 0x0010
4031 /**************************************************************************
4032 * Month calendar control
4036 #define MONTHCAL_CLASSA "SysMonthCal32"
4037 #if defined(__GNUC__)
4038 # define MONTHCAL_CLASSW (const WCHAR []){ 'S','y','s', \
4039 'M','o','n','t','h','C','a','l','3','2',0 }
4040 #elif defined(_MSC_VER)
4041 # define MONTHCAL_CLASSW L"SysMonthCal32"
4042 #else
4043 static const WCHAR MONTHCAL_CLASSW[] = { 'S','y','s',
4044 'M','o','n','t','h','C','a','l','3','2',0 };
4045 #endif
4046 #define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
4048 #define MCM_FIRST 0x1000
4049 #define MCN_FIRST (0U-750U)
4050 #define MCN_LAST (0U-759U)
4053 #define MCM_GETCURSEL (MCM_FIRST + 1)
4054 #define MCM_SETCURSEL (MCM_FIRST + 2)
4055 #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
4056 #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
4057 #define MCM_GETSELRANGE (MCM_FIRST + 5)
4058 #define MCM_SETSELRANGE (MCM_FIRST + 6)
4059 #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
4060 #define MCM_SETDAYSTATE (MCM_FIRST + 8)
4061 #define MCM_GETMINREQRECT (MCM_FIRST + 9)
4062 #define MCM_SETCOLOR (MCM_FIRST + 10)
4063 #define MCM_GETCOLOR (MCM_FIRST + 11)
4064 #define MCM_SETTODAY (MCM_FIRST + 12)
4065 #define MCM_GETTODAY (MCM_FIRST + 13)
4066 #define MCM_HITTEST (MCM_FIRST + 14)
4067 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
4068 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
4069 #define MCM_GETRANGE (MCM_FIRST + 17)
4070 #define MCM_SETRANGE (MCM_FIRST + 18)
4071 #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
4072 #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
4073 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
4074 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4075 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4078 /* Notifications */
4080 #define MCN_SELCHANGE (MCN_FIRST + 1)
4081 #define MCN_GETDAYSTATE (MCN_FIRST + 3)
4082 #define MCN_SELECT (MCN_FIRST + 4)
4084 #define MCSC_BACKGROUND 0
4085 #define MCSC_TEXT 1
4086 #define MCSC_TITLEBK 2
4087 #define MCSC_TITLETEXT 3
4088 #define MCSC_MONTHBK 4
4089 #define MCSC_TRAILINGTEXT 5
4091 #define MCS_DAYSTATE 0x0001
4092 #define MCS_MULTISELECT 0x0002
4093 #define MCS_WEEKNUMBERS 0x0004
4094 #define MCS_NOTODAY 0x0010
4095 #define MCS_NOTODAYCIRCLE 0x0008
4097 #define MCHT_TITLE 0x00010000
4098 #define MCHT_CALENDAR 0x00020000
4099 #define MCHT_TODAYLINK 0x00030000
4101 #define MCHT_NEXT 0x01000000
4102 #define MCHT_PREV 0x02000000
4103 #define MCHT_NOWHERE 0x00000000
4104 #define MCHT_TITLEBK (MCHT_TITLE)
4105 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
4106 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
4107 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
4108 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
4110 #define MCHT_CALENDARBK (MCHT_CALENDAR)
4111 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
4112 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
4113 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
4114 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
4115 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
4119 #define GMR_VISIBLE 0
4120 #define GMR_DAYSTATE 1
4123 /* Month calendar's structures */
4126 typedef struct {
4127 UINT cbSize;
4128 POINT pt;
4129 UINT uHit;
4130 SYSTEMTIME st;
4131 } MCHITTESTINFO, *PMCHITTESTINFO;
4133 typedef struct tagNMSELCHANGE
4135 NMHDR nmhdr;
4136 SYSTEMTIME stSelStart;
4137 SYSTEMTIME stSelEnd;
4138 } NMSELCHANGE, *LPNMSELCHANGE;
4140 typedef NMSELCHANGE NMSELECT, *LPNMSELECT;
4141 typedef DWORD MONTHDAYSTATE, *LPMONTHDAYSTATE;
4143 typedef struct tagNMDAYSTATE
4145 NMHDR nmhdr;
4146 SYSTEMTIME stStart;
4147 int cDayState;
4148 LPMONTHDAYSTATE prgDayState;
4149 } NMDAYSTATE, *LPNMDAYSTATE;
4152 /* macros */
4154 #define MonthCal_GetCurSel(hmc, pst) \
4155 (BOOL)SNDMSGA(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
4156 #define MonthCal_SetCurSel(hmc, pst) \
4157 (BOOL)SNDMSGA(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
4158 #define MonthCal_GetMaxSelCount(hmc) \
4159 (DWORD)SNDMSGA(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
4160 #define MonthCal_SetMaxSelCount(hmc, n) \
4161 (BOOL)SNDMSGA(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
4162 #define MonthCal_GetSelRange(hmc, rgst) \
4163 SNDMSGA(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst))
4164 #define MonthCal_SetSelRange(hmc, rgst) \
4165 SNDMSGA(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst))
4166 #define MonthCal_GetMonthRange(hmc, gmr, rgst) \
4167 (DWORD)SNDMSGA(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
4168 #define MonthCal_SetDayState(hmc, cbds, rgds) \
4169 SNDMSGA(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
4170 #define MonthCal_GetMinReqRect(hmc, prc) \
4171 SNDMSGA(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
4172 #define MonthCal_SetColor(hmc, iColor, clr)\
4173 SNDMSGA(hmc, MCM_SETCOLOR, iColor, clr)
4174 #define MonthCal_GetColor(hmc, iColor) \
4175 SNDMSGA(hmc, MCM_SETCOLOR, iColor, 0)
4176 #define MonthCal_GetToday(hmc, pst)\
4177 (BOOL)SNDMSGA(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
4178 #define MonthCal_SetToday(hmc, pst)\
4179 SNDMSGA(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
4180 #define MonthCal_HitTest(hmc, pinfo) \
4181 SNDMSGA(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
4182 #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
4183 SNDMSGA(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
4184 #define MonthCal_GetFirstDayOfWeek(hmc) \
4185 (DWORD)SNDMSGA(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
4186 #define MonthCal_GetRange(hmc, rgst) \
4187 (DWORD)SNDMSGA(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
4188 #define MonthCal_SetRange(hmc, gd, rgst) \
4189 (BOOL)SNDMSGA(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4190 #define MonthCal_GetMonthDelta(hmc) \
4191 (int)SNDMSGA(hmc, MCM_GETMONTHDELTA, 0, 0)
4192 #define MonthCal_SetMonthDelta(hmc, n) \
4193 (int)SNDMSGA(hmc, MCM_SETMONTHDELTA, n, 0)
4194 #define MonthCal_GetMaxTodayWidth(hmc) \
4195 (DWORD)SNDMSGA(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
4196 #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
4197 (BOOL)SNDMSGA((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
4198 #define MonthCal_GetUnicodeFormat(hwnd) \
4199 (BOOL)SNDMSGA((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
4202 /**************************************************************************
4203 * Date and time picker control
4206 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
4207 #if defined(__GNUC__)
4208 # define DATETIMEPICK_CLASSW (const WCHAR []){ 'S','y','s', \
4209 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 }
4210 #elif defined(_MSC_VER)
4211 # define DATETIMEPICK_CLASSW L"SysDateTimePick32"
4212 #else
4213 static const WCHAR DATETIMEPICK_CLASSW[] = { 'S','y','s',
4214 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 };
4215 #endif
4216 #define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
4218 #define DTM_FIRST 0x1000
4219 #define DTN_FIRST (0U-760U)
4220 #define DTN_LAST (0U-799U)
4223 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
4224 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
4225 #define DTM_GETRANGE (DTM_FIRST+3)
4226 #define DTM_SETRANGE (DTM_FIRST+4)
4227 #define DTM_SETFORMATA (DTM_FIRST+5)
4228 #define DTM_SETFORMATW (DTM_FIRST + 50)
4229 #define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
4230 #define DTM_SETMCCOLOR (DTM_FIRST+6)
4231 #define DTM_GETMCCOLOR (DTM_FIRST+7)
4232 #define DTM_GETMONTHCAL (DTM_FIRST+8)
4233 #define DTM_SETMCFONT (DTM_FIRST+9)
4234 #define DTM_GETMCFONT (DTM_FIRST+10)
4237 /* Datetime Notifications */
4239 #define DTN_DATETIMECHANGE (DTN_FIRST + 1)
4240 #define DTN_USERSTRINGA (DTN_FIRST + 2)
4241 #define DTN_WMKEYDOWNA (DTN_FIRST + 3)
4242 #define DTN_FORMATA (DTN_FIRST + 4)
4243 #define DTN_FORMATQUERYA (DTN_FIRST + 5)
4244 #define DTN_DROPDOWN (DTN_FIRST + 6)
4245 #define DTN_CLOSEUP (DTN_FIRST + 7)
4246 #define DTN_USERSTRINGW (DTN_FIRST + 15)
4247 #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
4248 #define DTN_FORMATW (DTN_FIRST + 17)
4249 #define DTN_FORMATQUERYW (DTN_FIRST + 18)
4251 #define DTN_USERSTRING WINELIB_NAME_AW(DTN_USERSTRING)
4252 #define DTN_WMKEYDOWN WINELIB_NAME_AW(DTN_WMKEYDOWN)
4253 #define DTN_FORMAT WINELIB_NAME_AW(DTN_FORMAT)
4254 #define DTN_FORMATQUERY WINELIB_NAME_AW(DTN_FORMATQUERY)
4256 #define DTS_SHORTDATEFORMAT 0x0000
4257 #define DTS_UPDOWN 0x0001
4258 #define DTS_SHOWNONE 0x0002
4259 #define DTS_LONGDATEFORMAT 0x0004
4260 #define DTS_TIMEFORMAT 0x0009
4261 #define DTS_APPCANPARSE 0x0010
4262 #define DTS_RIGHTALIGN 0x0020
4264 typedef struct tagNMDATETIMECHANGE
4266 NMHDR nmhdr;
4267 DWORD dwFlags;
4268 SYSTEMTIME st;
4269 } NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
4271 typedef struct tagNMDATETIMESTRINGA
4273 NMHDR nmhdr;
4274 LPCSTR pszUserString;
4275 SYSTEMTIME st;
4276 DWORD dwFlags;
4277 } NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;
4279 typedef struct tagNMDATETIMESTRINGW
4281 NMHDR nmhdr;
4282 LPCWSTR pszUserString;
4283 SYSTEMTIME st;
4284 DWORD dwFlags;
4285 } NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
4287 DECL_WINELIB_TYPE_AW(NMDATETIMESTRING)
4288 DECL_WINELIB_TYPE_AW(LPNMDATETIMESTRING)
4290 typedef struct tagNMDATETIMEWMKEYDOWNA
4292 NMHDR nmhdr;
4293 int nVirtKey;
4294 LPCSTR pszFormat;
4295 SYSTEMTIME st;
4296 } NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;
4298 typedef struct tagNMDATETIMEWMKEYDOWNW
4300 NMHDR nmhdr;
4301 int nVirtKey;
4302 LPCWSTR pszFormat;
4303 SYSTEMTIME st;
4304 } NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;
4306 DECL_WINELIB_TYPE_AW(NMDATETIMEWMKEYDOWN)
4307 DECL_WINELIB_TYPE_AW(LPNMDATETIMEWMKEYDOWN)
4309 typedef struct tagNMDATETIMEFORMATA
4311 NMHDR nmhdr;
4312 LPCSTR pszFormat;
4313 SYSTEMTIME st;
4314 LPCSTR pszDisplay;
4315 CHAR szDisplay[64];
4316 } NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;
4319 typedef struct tagNMDATETIMEFORMATW
4321 NMHDR nmhdr;
4322 LPCWSTR pszFormat;
4323 SYSTEMTIME st;
4324 LPCWSTR pszDisplay;
4325 WCHAR szDisplay[64];
4326 } NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;
4328 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMAT)
4329 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMAT)
4331 typedef struct tagNMDATETIMEFORMATQUERYA
4333 NMHDR nmhdr;
4334 LPCSTR pszFormat;
4335 SIZE szMax;
4336 } NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;
4338 typedef struct tagNMDATETIMEFORMATQUERYW
4340 NMHDR nmhdr;
4341 LPCWSTR pszFormat;
4342 SIZE szMax;
4343 } NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;
4345 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMATQUERY)
4346 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMATQUERY)
4350 #define GDT_ERROR -1
4351 #define GDT_VALID 0
4352 #define GDT_NONE 1
4354 #define GDTR_MIN 0x0001
4355 #define GDTR_MAX 0x0002
4358 #define DateTime_GetSystemtime(hdp, pst) \
4359 (DWORD)SNDMSGA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
4360 #define DateTime_SetSystemtime(hdp, gd, pst) \
4361 (BOOL)SNDMSGA (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
4362 #define DateTime_GetRange(hdp, rgst) \
4363 (DWORD)SNDMSGA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
4364 #define DateTime_SetRange(hdp, gd, rgst) \
4365 (BOOL)SNDMSGA (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4366 #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
4367 #define DateTime_SetFormatA(hdp, sz) \
4368 (BOOL)SNDMSGA (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
4369 #define DateTime_SetFormatW(hdp, sz) \
4370 (BOOL)SNDMSGW (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
4371 #define DateTime_GetMonthCalColor(hdp, iColor) \
4372 SNDMSGA (hdp, DTM_GETMCCOLOR, iColor, 0)
4373 #define DateTime_GetMonthCal(hdp) \
4374 (HWND) SNDMSGA (hdp, DTM_GETMONTHCAL, 0, 0)
4375 #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \
4376 SNDMSGA (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
4377 #define DateTime_GetMonthCalFont(hdp) \
4378 SNDMSGA (hdp, DTM_GETMCFONT, 0, 0)
4385 /**************************************************************************
4386 * UNDOCUMENTED functions
4389 /* private heap memory functions */
4391 LPVOID WINAPI COMCTL32_Alloc (DWORD);
4392 LPVOID WINAPI COMCTL32_ReAlloc (LPVOID, DWORD);
4393 BOOL WINAPI COMCTL32_Free (LPVOID);
4394 DWORD WINAPI COMCTL32_GetSize (LPVOID);
4396 LPWSTR WINAPI COMCTL32_StrChrW (LPCWSTR, WORD);
4399 INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
4400 BOOL WINAPI Str_SetPtrA (LPSTR *, LPCSTR);
4401 INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
4402 BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
4403 #define Str_GetPtr WINELIB_NAME_AW(Str_GetPtr)
4404 #define Str_SetPtr WINELIB_NAME_AW(Str_SetPtr)
4407 /* Dynamic Storage Array */
4409 typedef struct _DSA
4411 INT nItemCount;
4412 LPVOID pData;
4413 INT nMaxCount;
4414 INT nItemSize;
4415 INT nGrow;
4416 } DSA, *HDSA;
4418 HDSA WINAPI DSA_Create (INT, INT);
4419 BOOL WINAPI DSA_DeleteAllItems (const HDSA);
4420 INT WINAPI DSA_DeleteItem (const HDSA, INT);
4421 BOOL WINAPI DSA_Destroy (const HDSA);
4422 BOOL WINAPI DSA_GetItem (const HDSA, INT, LPVOID);
4423 LPVOID WINAPI DSA_GetItemPtr (const HDSA, INT);
4424 INT WINAPI DSA_InsertItem (const HDSA, INT, LPVOID);
4425 BOOL WINAPI DSA_SetItem (const HDSA, INT, LPVOID);
4427 typedef INT (CALLBACK *DSAENUMPROC)(LPVOID, DWORD);
4428 VOID WINAPI DSA_EnumCallback (const HDSA, DSAENUMPROC, LPARAM);
4429 BOOL WINAPI DSA_DestroyCallback (const HDSA, DSAENUMPROC, LPARAM);
4432 /* Dynamic Pointer Array */
4434 typedef struct _DPA
4436 INT nItemCount;
4437 LPVOID *ptrs;
4438 HANDLE hHeap;
4439 INT nGrow;
4440 INT nMaxCount;
4441 } DPA, *HDPA;
4443 HDPA WINAPI DPA_Create (INT);
4444 HDPA WINAPI DPA_CreateEx (INT, HANDLE);
4445 BOOL WINAPI DPA_Destroy (const HDPA);
4446 HDPA WINAPI DPA_Clone (const HDPA, const HDPA);
4447 LPVOID WINAPI DPA_GetPtr (const HDPA, INT);
4448 INT WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);
4449 BOOL WINAPI DPA_Grow (const HDPA, INT);
4450 BOOL WINAPI DPA_SetPtr (const HDPA, INT, LPVOID);
4451 INT WINAPI DPA_InsertPtr (const HDPA, INT, LPVOID);
4452 LPVOID WINAPI DPA_DeletePtr (const HDPA, INT);
4453 BOOL WINAPI DPA_DeleteAllPtrs (const HDPA);
4455 typedef INT (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
4456 BOOL WINAPI DPA_Sort (const HDPA, PFNDPACOMPARE, LPARAM);
4458 #define DPAS_SORTED 0x0001
4459 #define DPAS_INSERTBEFORE 0x0002
4460 #define DPAS_INSERTAFTER 0x0004
4462 INT WINAPI DPA_Search (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
4464 #define DPAM_NOSORT 0x0001
4465 #define DPAM_INSERT 0x0004
4466 #define DPAM_DELETE 0x0008
4468 typedef PVOID (CALLBACK *PFNDPAMERGE)(DWORD,PVOID,PVOID,LPARAM);
4469 BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
4471 typedef INT (CALLBACK *DPAENUMPROC)(LPVOID, DWORD);
4472 VOID WINAPI DPA_EnumCallback (const HDPA, DPAENUMPROC, LPARAM);
4473 BOOL WINAPI DPA_DestroyCallback (const HDPA, DPAENUMPROC, LPARAM);
4476 #define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
4477 #define DPA_GetPtrPtr(hdpa) (*((LPVOID**)((BYTE*)(hdpa)+sizeof(INT))))
4478 #define DPA_FastGetPtr(hdpa,i) (DPA_GetPtrPtr(hdpa)[i])
4481 /* notification helper functions */
4483 LRESULT WINAPI COMCTL32_SendNotify (HWND, HWND, UINT, LPNMHDR);
4485 /* type and functionality of last parameter is still unknown */
4486 LRESULT WINAPI COMCTL32_SendNotifyEx (HWND, HWND, UINT, LPNMHDR, DWORD);
4488 #ifdef __cplusplus
4490 #endif
4492 #endif /* __WINE_COMMCTRL_H */