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