Make sure sed uses the right locale.
[wine.git] / include / commctrl.h
blob6792b3d3b4781740d40caa10ae2ffe9b1e913a8a
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 <prsht.h>
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 BOOL WINAPI ShowHideMenuCtl (HWND, UINT, LPINT);
31 VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, LPINT);
32 VOID WINAPI InitCommonControls (VOID);
34 typedef struct tagINITCOMMONCONTROLSEX {
35 DWORD dwSize;
36 DWORD dwICC;
37 } INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
39 BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
41 LANGID WINAPI GetMUILanguage (VOID);
42 VOID WINAPI InitMUILanguage (LANGID uiLang);
45 #define COMCTL32_VERSION 5 /* dll version */
47 #ifndef _WIN32_IE
48 #define _WIN32_IE 0x0400
49 #endif
51 #define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
52 #define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
53 #define ICC_BAR_CLASSES 0x00000004 /* toolbar, statusbar, trackbar, tooltips */
54 #define ICC_TAB_CLASSES 0x00000008 /* tab, tooltips */
55 #define ICC_UPDOWN_CLASS 0x00000010 /* updown */
56 #define ICC_PROGRESS_CLASS 0x00000020 /* progress */
57 #define ICC_HOTKEY_CLASS 0x00000040 /* hotkey */
58 #define ICC_ANIMATE_CLASS 0x00000080 /* animate */
59 #define ICC_WIN95_CLASSES 0x000000FF
60 #define ICC_DATE_CLASSES 0x00000100 /* month picker, date picker, time picker, updown */
61 #define ICC_USEREX_CLASSES 0x00000200 /* comboex */
62 #define ICC_COOL_CLASSES 0x00000400 /* rebar (coolbar) */
63 #define ICC_INTERNET_CLASSES 0x00000800 /* IP address, ... */
64 #define ICC_PAGESCROLLER_CLASS 0x00001000 /* page scroller */
65 #define ICC_NATIVEFNTCTL_CLASS 0x00002000 /* native font control ???*/
68 /* common control styles */
69 #define CCS_TOP 0x00000001L
70 #define CCS_NOMOVEY 0x00000002L
71 #define CCS_BOTTOM 0x00000003L
72 #define CCS_NORESIZE 0x00000004L
73 #define CCS_NOPARENTALIGN 0x00000008L
74 #define CCS_ADJUSTABLE 0x00000020L
75 #define CCS_NODIVIDER 0x00000040L
76 #define CCS_VERT 0x00000080L
77 #define CCS_LEFT (CCS_VERT|CCS_TOP)
78 #define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
79 #define CCS_NOMOVEX (CCS_VERT|CCS_NOMOVEY)
82 /* common control shared messages */
83 #define CCM_FIRST 0x2000
85 #define CCM_SETBKCOLOR (CCM_FIRST+1) /* lParam = bkColor */
86 #define CCM_SETCOLORSCHEME (CCM_FIRST+2) /* lParam = COLORSCHEME struct ptr */
87 #define CCM_GETCOLORSCHEME (CCM_FIRST+3) /* lParam = COLORSCHEME struct ptr */
88 #define CCM_GETDROPTARGET (CCM_FIRST+4)
89 #define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
90 #define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
91 #define CCM_SETVERSION (CCM_FIRST+7)
92 #define CCM_GETVERSION (CCM_FIRST+8)
93 #define CCM_SETNOTIFYWINDOW (CCM_FIRST+9) /* wParam = hwndParent */
96 /* common notification codes (WM_NOTIFY)*/
97 #define NM_FIRST (0U- 0U)
98 #define NM_LAST (0U- 99U)
99 #define NM_OUTOFMEMORY (NM_FIRST-1)
100 #define NM_CLICK (NM_FIRST-2)
101 #define NM_DBLCLK (NM_FIRST-3)
102 #define NM_RETURN (NM_FIRST-4)
103 #define NM_RCLICK (NM_FIRST-5)
104 #define NM_RDBLCLK (NM_FIRST-6)
105 #define NM_SETFOCUS (NM_FIRST-7)
106 #define NM_KILLFOCUS (NM_FIRST-8)
107 #define NM_CUSTOMDRAW (NM_FIRST-12)
108 #define NM_HOVER (NM_FIRST-13)
109 #define NM_NCHITTEST (NM_FIRST-14)
110 #define NM_KEYDOWN (NM_FIRST-15)
111 #define NM_RELEASEDCAPTURE (NM_FIRST-16)
112 #define NM_SETCURSOR (NM_FIRST-17)
113 #define NM_CHAR (NM_FIRST-18)
114 #define NM_TOOLTIPSCREATED (NM_FIRST-19)
116 #define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) \
117 (fn)((hwnd), (int)(wParam), (NMHDR*)(lParam))
118 #define FORWARD_WM_NOTIFY(hwnd, idFrom, pnmhdr, fn) \
119 (LRESULT)(fn)((hwnd), WM_NOTIFY, (WPARAM)(int)(idFrom), (LPARAM)(NMHDR*)(pnmhdr))
122 /* callback constants */
123 #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
124 #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
125 #define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
127 #define I_IMAGECALLBACK (-1)
128 #define I_IMAGENONE (-2)
129 #define I_INDENTCALLBACK (-1)
130 #define I_CHILDRENCALLBACK (-1)
132 /* owner drawn types */
133 #define ODT_HEADER 100
134 #define ODT_TAB 101
135 #define ODT_LISTVIEW 102
137 /* common notification structures */
138 typedef struct tagNMTOOLTIPSCREATED
140 NMHDR hdr;
141 HWND hwndToolTips;
142 } NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;
144 typedef struct tagNMMOUSE
146 NMHDR hdr;
147 DWORD dwItemSpec;
148 DWORD dwItemData;
149 POINT pt;
150 DWORD dwHitInfo; /* info where on item or control the mouse is */
151 } NMMOUSE, *LPNMMOUSE;
153 typedef struct tagNMOBJECTNOTIFY
155 NMHDR hdr;
156 int iItem;
157 #ifdef __IID_DEFINED__
158 const IID *piid;
159 #else
160 const void *piid;
161 #endif
162 void *pObject;
163 HRESULT hResult;
164 DWORD dwFlags;
165 } NMOBJECTNOTIFY, *LPNMOBJECTNOTIFY;
167 typedef struct tagNMKEY
169 NMHDR hdr;
170 UINT nVKey;
171 UINT uFlags;
172 } NMKEY, *LPNMKEY;
174 typedef struct tagNMCHAR
176 NMHDR hdr;
177 UINT ch;
178 DWORD dwItemPrev; /* Item previously selected */
179 DWORD dwItemNext; /* Item to be selected */
180 } NMCHAR, *LPNMCHAR;
182 #ifndef CCSIZEOF_STRUCT
183 #define CCSIZEOF_STRUCT(name, member) \
184 (((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
185 sizeof(((name*)0)->member))
186 #endif
189 /* This is only for Winelib applications. DON't use it wine itself!!! */
190 #ifndef SNDMSG
191 #ifdef __cplusplus
192 #define SNDMSG ::SendMessage
193 #else /* __cplusplus */
194 #define SNDMSG SendMessage
195 #endif /* __cplusplus */
196 #endif /* SNDMSG */
199 #ifdef __cplusplus
200 #define SNDMSGA ::SendMessageA
201 #define SNDMSGW ::SendMessageW
202 #else
203 #define SNDMSGA SendMessageA
204 #define SNDMSGW SendMessageW
205 #endif
207 /* Custom Draw messages */
209 #define CDRF_DODEFAULT 0x0
210 #define CDRF_NEWFONT 0x00000002
211 #define CDRF_SKIPDEFAULT 0x00000004
212 #define CDRF_NOTIFYPOSTPAINT 0x00000010
213 #define CDRF_NOTIFYITEMDRAW 0x00000020
214 #define CDRF_NOTIFYSUBITEMDRAW 0x00000020
215 #define CDRF_NOTIFYPOSTERASE 0x00000040
216 #define CDRF_NOTIFYITEMERASE 0x00000080 /* obsolete ??? */
219 /* drawstage flags */
221 #define CDDS_PREPAINT 1
222 #define CDDS_POSTPAINT 2
223 #define CDDS_PREERASE 3
224 #define CDDS_POSTERASE 4
226 #define CDDS_ITEM 0x00010000
227 #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
228 #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
229 #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
230 #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
231 #define CDDS_SUBITEM 0x00020000
233 /* itemState flags */
235 #define CDIS_SELECTED 0x0001
236 #define CDIS_GRAYED 0x0002
237 #define CDIS_DISABLED 0x0004
238 #define CDIS_CHECKED 0x0008
239 #define CDIS_FOCUS 0x0010
240 #define CDIS_DEFAULT 0x0020
241 #define CDIS_HOT 0x0040
242 #define CDIS_MARKED 0x0080
243 #define CDIS_INDETERMINATE 0x0100
246 typedef struct tagNMCUSTOMDRAWINFO
248 NMHDR hdr;
249 DWORD dwDrawStage;
250 HDC hdc;
251 RECT rc;
252 DWORD dwItemSpec;
253 UINT uItemState;
254 LPARAM lItemlParam;
255 } NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
257 typedef struct tagNMTTCUSTOMDRAW
259 NMCUSTOMDRAW nmcd;
260 UINT uDrawFlags;
261 } NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
266 /* StatusWindow */
268 #define STATUSCLASSNAME16 "msctls_statusbar"
269 #define STATUSCLASSNAMEA "msctls_statusbar32"
270 #if defined(__GNUC__)
271 # define STATUSCLASSNAMEW (const WCHAR []){ 'm','s','c','t','l','s','_', \
272 's','t','a','t','u','s','b','a','r','3','2',0 }
273 #elif defined(_MSC_VER)
274 # define STATUSCLASSNAMEW L"msctls_statusbar32"
275 #else
276 static const WCHAR STATUSCLASSNAMEW[] = { 'm','s','c','t','l','s','_',
277 's','t','a','t','u','s','b','a','r','3','2',0 };
278 #endif
279 #define STATUSCLASSNAME WINELIB_NAME_AW(STATUSCLASSNAME)
281 #define SBT_NOBORDERS 0x0100
282 #define SBT_POPOUT 0x0200
283 #define SBT_RTLREADING 0x0400 /* not supported */
284 #define SBT_TOOLTIPS 0x0800
285 #define SBT_OWNERDRAW 0x1000
287 #define SBARS_SIZEGRIP 0x0100
289 #define SB_SETTEXTA (WM_USER+1)
290 #define SB_SETTEXTW (WM_USER+11)
291 #define SB_SETTEXT WINELIB_NAME_AW(SB_SETTEXT)
292 #define SB_GETTEXTA (WM_USER+2)
293 #define SB_GETTEXTW (WM_USER+13)
294 #define SB_GETTEXT WINELIB_NAME_AW(SB_GETTEXT)
295 #define SB_GETTEXTLENGTHA (WM_USER+3)
296 #define SB_GETTEXTLENGTHW (WM_USER+12)
297 #define SB_GETTEXTLENGTH WINELIB_NAME_AW(SB_GETTEXTLENGTH)
298 #define SB_SETPARTS (WM_USER+4)
299 #define SB_SETBORDERS (WM_USER+5)
300 #define SB_GETPARTS (WM_USER+6)
301 #define SB_GETBORDERS (WM_USER+7)
302 #define SB_SETMINHEIGHT (WM_USER+8)
303 #define SB_SIMPLE (WM_USER+9)
304 #define SB_GETRECT (WM_USER+10)
305 #define SB_ISSIMPLE (WM_USER+14)
306 #define SB_SETICON (WM_USER+15)
307 #define SB_SETTIPTEXTA (WM_USER+16)
308 #define SB_SETTIPTEXTW (WM_USER+17)
309 #define SB_SETTIPTEXT WINELIB_NAME_AW(SB_SETTIPTEXT)
310 #define SB_GETTIPTEXTA (WM_USER+18)
311 #define SB_GETTIPTEXTW (WM_USER+19)
312 #define SB_GETTIPTEXT WINELIB_NAME_AW(SB_GETTIPTEXT)
313 #define SB_GETICON (WM_USER+20)
314 #define SB_SETBKCOLOR CCM_SETBKCOLOR /* lParam = bkColor */
315 #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
316 #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
318 #define SBN_FIRST (0U-880U)
319 #define SBN_LAST (0U-899U)
320 #define SBN_SIMPLEMODECHANGE (SBN_FIRST-0)
322 HWND WINAPI CreateStatusWindowA (LONG, LPCSTR, HWND, UINT);
323 HWND WINAPI CreateStatusWindowW (LONG, LPCWSTR, HWND, UINT);
324 #define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
325 VOID WINAPI DrawStatusTextA (HDC, LPRECT, LPCSTR, UINT);
326 VOID WINAPI DrawStatusTextW (HDC, LPRECT, LPCWSTR, UINT);
327 #define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
328 VOID WINAPI MenuHelp (UINT, WPARAM, LPARAM, HMENU,
329 HINSTANCE, HWND, UINT*);
331 typedef struct tagCOLORSCHEME
333 DWORD dwSize;
334 COLORREF clrBtnHighlight; /* highlight color */
335 COLORREF clrBtnShadow; /* shadow color */
336 } COLORSCHEME, *LPCOLORSCHEME;
338 /**************************************************************************
339 * Drag List control
342 typedef struct tagDRAGLISTINFO
344 UINT uNotification;
345 HWND hWnd;
346 POINT ptCursor;
347 } DRAGLISTINFO, *LPDRAGLISTINFO;
349 #define DL_BEGINDRAG (WM_USER+133)
350 #define DL_DRAGGING (WM_USER+134)
351 #define DL_DROPPED (WM_USER+135)
352 #define DL_CANCELDRAG (WM_USER+136)
354 #define DL_CURSORSET 0
355 #define DL_STOPCURSOR 1
356 #define DL_COPYCURSOR 2
357 #define DL_MOVECURSOR 3
359 #define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
361 BOOL WINAPI MakeDragList (HWND);
362 VOID WINAPI DrawInsert (HWND, HWND, INT);
363 INT WINAPI LBItemFromPt (HWND, POINT, BOOL);
366 /* UpDown */
368 #define UPDOWN_CLASS16 "msctls_updown"
369 #define UPDOWN_CLASSA "msctls_updown32"
370 #if defined(__GNUC__)
371 # define UPDOWN_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
372 'u','p','d','o','w','n','3','2',0 }
373 #elif defined(_MSC_VER)
374 # define UPDOWN_CLASSW L"msctls_updown32"
375 #else
376 static const WCHAR UPDOWN_CLASSW[] = { 'm','s','c','t','l','s','_',
377 'u','p','d','o','w','n','3','2',0 };
378 #endif
379 #define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
381 typedef struct tagUDACCEL
383 UINT nSec;
384 UINT nInc;
385 } UDACCEL, *LPUDACCEL;
387 #define UD_MAXVAL 0x7fff
388 #define UD_MINVAL 0x8001
390 #define UDS_WRAP 0x0001
391 #define UDS_SETBUDDYINT 0x0002
392 #define UDS_ALIGNRIGHT 0x0004
393 #define UDS_ALIGNLEFT 0x0008
394 #define UDS_AUTOBUDDY 0x0010
395 #define UDS_ARROWKEYS 0x0020
396 #define UDS_HORZ 0x0040
397 #define UDS_NOTHOUSANDS 0x0080
398 #define UDS_HOTTRACK 0x0100
400 #define UDN_FIRST (0U-721)
401 #define UDN_LAST (0U-740)
402 #define UDN_DELTAPOS (UDN_FIRST-1)
404 #define UDM_SETRANGE (WM_USER+101)
405 #define UDM_GETRANGE (WM_USER+102)
406 #define UDM_SETPOS (WM_USER+103)
407 #define UDM_GETPOS (WM_USER+104)
408 #define UDM_SETBUDDY (WM_USER+105)
409 #define UDM_GETBUDDY (WM_USER+106)
410 #define UDM_SETACCEL (WM_USER+107)
411 #define UDM_GETACCEL (WM_USER+108)
412 #define UDM_SETBASE (WM_USER+109)
413 #define UDM_GETBASE (WM_USER+110)
414 #define UDM_SETRANGE32 (WM_USER+111)
415 #define UDM_GETRANGE32 (WM_USER+112)
416 #define UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
417 #define UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
418 #define UDM_SETPOS32 (WM_USER+113)
419 #define UDM_GETPOS32 (WM_USER+114)
422 #define NMUPDOWN NM_UPDOWN
423 #define LPNMUPDOWN LPNM_UPDOWN
425 typedef struct tagNM_UPDOWN
427 NMHDR hdr;
428 int iPos;
429 int iDelta;
430 } NM_UPDOWN, *LPNM_UPDOWN;
432 HWND WINAPI CreateUpDownControl (DWORD, INT, INT, INT, INT,
433 HWND, INT, HINSTANCE, HWND,
434 INT, INT, INT);
436 /* Progress Bar */
438 #define PROGRESS_CLASS16 "msctls_progress"
439 #define PROGRESS_CLASSA "msctls_progress32"
440 #if defined(__GNUC__)
441 # define PROGRESS_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
442 'p','r','o','g','r','e','s','s','3','2',0 }
443 #elif defined(_MSC_VER)
444 # define PROGRESS_CLASSW L"msctls_progress32"
445 #else
446 static const WCHAR PROGRESS_CLASSW[] = { 'm','s','c','t','l','s','_',
447 'p','r','o','g','r','e','s','s','3','2',0 };
448 #endif
449 #define PROGRESS_CLASS WINELIB_NAME_AW(PROGRESS_CLASS)
451 #define PBM_SETRANGE (WM_USER+1)
452 #define PBM_SETPOS (WM_USER+2)
453 #define PBM_DELTAPOS (WM_USER+3)
454 #define PBM_SETSTEP (WM_USER+4)
455 #define PBM_STEPIT (WM_USER+5)
456 #define PBM_SETRANGE32 (WM_USER+6)
457 #define PBM_GETRANGE (WM_USER+7)
458 #define PBM_GETPOS (WM_USER+8)
459 #define PBM_SETBARCOLOR (WM_USER+9)
460 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
462 #define PBS_SMOOTH 0x01
463 #define PBS_VERTICAL 0x04
465 typedef struct
467 INT iLow;
468 INT iHigh;
469 } PBRANGE, *PPBRANGE;
472 /* ImageList */
474 struct _IMAGELIST;
475 typedef struct _IMAGELIST *HIMAGELIST;
477 #define CLR_NONE 0xFFFFFFFF
478 #define CLR_DEFAULT 0xFF000000
479 #define CLR_HILIGHT CLR_DEFAULT
481 #define ILC_MASK 0x0001
482 #define ILC_COLOR 0x0000
483 #define ILC_COLORDDB 0x00FE
484 #define ILC_COLOR4 0x0004
485 #define ILC_COLOR8 0x0008
486 #define ILC_COLOR16 0x0010
487 #define ILC_COLOR24 0x0018
488 #define ILC_COLOR32 0x0020
489 #define ILC_PALETTE 0x0800 /* no longer supported by M$ */
491 #define ILD_NORMAL 0x0000
492 #define ILD_TRANSPARENT 0x0001
493 #define ILD_BLEND25 0x0002
494 #define ILD_BLEND50 0x0004
495 #define ILD_MASK 0x0010
496 #define ILD_IMAGE 0x0020
497 #define ILD_ROP 0x0040
498 #define ILD_OVERLAYMASK 0x0F00
499 #define ILD_PRESERVEALPHA 0x1000
500 #define ILD_SCALE 0x2000
501 #define ILD_DPISCALE 0x4000
503 #define ILD_SELECTED ILD_BLEND50
504 #define ILD_FOCUS ILD_BLEND25
505 #define ILD_BLEND ILD_BLEND50
507 #define INDEXTOOVERLAYMASK(i) ((i)<<8)
508 #define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
510 #define ILCF_MOVE (0x00000000)
511 #define ILCF_SWAP (0x00000001)
513 #define ILS_NORMAL 0x0000
514 #define ILS_GLOW 0x0001
515 #define ILS_SHADOW 0x0002
516 #define ILS_SATURATE 0x0004
517 #define ILS_ALPHA 0x0008
519 typedef struct _IMAGEINFO
521 HBITMAP hbmImage;
522 HBITMAP hbmMask;
523 INT Unused1;
524 INT Unused2;
525 RECT rcImage;
526 } IMAGEINFO, *LPIMAGEINFO;
529 typedef struct _IMAGELISTDRAWPARAMS
531 DWORD cbSize;
532 HIMAGELIST himl;
533 INT i;
534 HDC hdcDst;
535 INT x;
536 INT y;
537 INT cx;
538 INT cy;
539 INT xBitmap; /* x offest from the upperleft of bitmap */
540 INT yBitmap; /* y offset from the upperleft of bitmap */
541 COLORREF rgbBk;
542 COLORREF rgbFg;
543 UINT fStyle;
544 DWORD dwRop;
545 DWORD fState;
546 DWORD Frame;
547 DWORD crEffect;
548 } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
551 INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
552 INT WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
553 BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT);
554 BOOL WINAPI ImageList_Copy(HIMAGELIST,INT,HIMAGELIST,INT,UINT);
555 HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
556 BOOL WINAPI ImageList_Destroy(HIMAGELIST);
557 BOOL WINAPI ImageList_DragEnter(HWND,INT,INT);
558 BOOL WINAPI ImageList_DragLeave(HWND);
559 BOOL WINAPI ImageList_DragMove(INT,INT);
560 BOOL WINAPI ImageList_DragShowNolock (BOOL);
561 BOOL WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
562 BOOL WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
563 INT,COLORREF,COLORREF,UINT);
564 BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
565 HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
566 VOID WINAPI ImageList_EndDrag(VOID);
567 COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
568 HIMAGELIST WINAPI ImageList_GetDragImage(POINT*,POINT*);
569 HICON WINAPI ImageList_GetIcon(HIMAGELIST,INT,UINT);
570 BOOL WINAPI ImageList_GetIconSize(HIMAGELIST,INT*,INT*);
571 INT WINAPI ImageList_GetImageCount(HIMAGELIST);
572 BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST,INT,IMAGEINFO*);
573 BOOL WINAPI ImageList_GetImageRect(HIMAGELIST,INT,LPRECT);
574 HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,INT,INT,
575 COLORREF,UINT,UINT);
576 HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,INT,INT,
577 COLORREF,UINT,UINT);
578 #define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
579 HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
580 #ifdef IStream_METHODS
581 HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
582 #endif
583 BOOL WINAPI ImageList_Remove(HIMAGELIST,INT);
584 BOOL WINAPI ImageList_Replace(HIMAGELIST,INT,HBITMAP,HBITMAP);
585 INT WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT,HICON);
586 COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
587 BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT,INT,INT);
589 BOOL WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
590 BOOL WINAPI ImageList_SetImageCount(HIMAGELIST,UINT);
591 BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
592 #ifdef IStream_METHODS
593 BOOL WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
594 #endif
596 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
597 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
598 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
599 ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
600 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
603 #ifndef WM_MOUSEHOVER
604 #define WM_MOUSEHOVER 0x02A1
605 #define WM_MOUSELEAVE 0x02A3
606 #endif
608 #ifndef TME_HOVER
610 #define TME_HOVER 0x00000001
611 #define TME_LEAVE 0x00000002
612 #define TME_NONCLIENT 0x00000010
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_SETBITMAPMARGIN (HDM_FIRST+20)
762 #define HDM_GETBITMAPMARGIN (HDM_FIRST+21)
763 #define HDM_SETFILTERCHANGETIMEOUT (HDM_FIRST+22)
764 #define HDM_EDITFILTER (HDM_FIRST+23)
765 #define HDM_CLEARFILTER (HDM_FIRST+24)
766 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
767 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
769 #define HDN_FIRST (0U-300U)
770 #define HDN_LAST (0U-399U)
771 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
772 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
773 #define HDN_ITEMCHANGING WINELIB_NAME_AW(HDN_ITEMCHANGING)
774 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
775 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
776 #define HDN_ITEMCHANGED WINELIB_NAME_AW(HDN_ITEMCHANGED)
777 #define HDN_ITEMCLICKA (HDN_FIRST-2)
778 #define HDN_ITEMCLICKW (HDN_FIRST-22)
779 #define HDN_ITEMCLICK WINELIB_NAME_AW(HDN_ITEMCLICK)
780 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
781 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
782 #define HDN_ITEMDBLCLICK WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
783 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
784 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
785 #define HDN_DIVIDERDBLCLICK WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
786 #define HDN_BEGINTRACKA (HDN_FIRST-6)
787 #define HDN_BEGINTRACKW (HDN_FIRST-26)
788 #define HDN_BEGINTRACK WINELIB_NAME_AW(HDN_BEGINTRACK)
789 #define HDN_ENDTRACKA (HDN_FIRST-7)
790 #define HDN_ENDTRACKW (HDN_FIRST-27)
791 #define HDN_ENDTRACK WINELIB_NAME_AW(HDN_ENDTRACK)
792 #define HDN_TRACKA (HDN_FIRST-8)
793 #define HDN_TRACKW (HDN_FIRST-28)
794 #define HDN_TRACK WINELIB_NAME_AW(HDN_TRACK)
795 #define HDN_GETDISPINFOA (HDN_FIRST-9)
796 #define HDN_GETDISPINFOW (HDN_FIRST-29)
797 #define HDN_GETDISPINFO WINELIB_NAME_AW(HDN_GETDISPINFO)
798 #define HDN_BEGINDRAG (HDN_FIRST-10)
799 #define HDN_ENDDRAG (HDN_FIRST-11)
801 typedef struct _HD_LAYOUT
803 RECT *prc;
804 WINDOWPOS *pwpos;
805 } HDLAYOUT, *LPHDLAYOUT;
807 #define HD_LAYOUT HDLAYOUT
809 typedef struct _HD_ITEMA
811 UINT mask;
812 INT cxy;
813 LPSTR pszText;
814 HBITMAP hbm;
815 INT cchTextMax;
816 INT fmt;
817 LPARAM lParam;
818 INT iImage;
819 INT iOrder;
820 UINT type;
821 LPVOID pvFilter;
822 } HDITEMA, *LPHDITEMA;
824 typedef struct _HD_ITEMW
826 UINT mask;
827 INT cxy;
828 LPWSTR pszText;
829 HBITMAP hbm;
830 INT cchTextMax;
831 INT fmt;
832 LPARAM lParam;
833 INT iImage;
834 INT iOrder;
835 UINT type;
836 LPVOID pvFilter;
837 } HDITEMW, *LPHDITEMW;
839 #define HDITEM WINELIB_NAME_AW(HDITEM)
840 #define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
841 #define HD_ITEM HDITEM
843 #define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
844 #define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
845 #define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
847 typedef struct _HD_HITTESTINFO
849 POINT pt;
850 UINT flags;
851 INT iItem;
852 } HDHITTESTINFO, *LPHDHITTESTINFO;
854 #define HD_HITTESTINFO HDHITTESTINFO
856 typedef struct tagNMHEADERA
858 NMHDR hdr;
859 INT iItem;
860 INT iButton;
861 HDITEMA *pitem;
862 } NMHEADERA, *LPNMHEADERA;
864 typedef struct tagNMHEADERW
866 NMHDR hdr;
867 INT iItem;
868 INT iButton;
869 HDITEMW *pitem;
870 } NMHEADERW, *LPNMHEADERW;
872 #define NMHEADER WINELIB_NAME_AW(NMHEADER)
873 #define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
874 #define HD_NOTIFY NMHEADER
876 typedef struct tagNMHDDISPINFOA
878 NMHDR hdr;
879 INT iItem;
880 UINT mask;
881 LPSTR pszText;
882 INT cchTextMax;
883 INT iImage;
884 LPARAM lParam;
885 } NMHDDISPINFOA, *LPNMHDDISPINFOA;
887 typedef struct tagNMHDDISPINFOW
889 NMHDR hdr;
890 INT iItem;
891 UINT mask;
892 LPWSTR pszText;
893 INT cchTextMax;
894 INT iImage;
895 LPARAM lParam;
896 } NMHDDISPINFOW, *LPNMHDDISPINFOW;
898 #define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
899 #define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
901 #define Header_GetItemCount(hwndHD) \
902 (INT)SNDMSGA((hwndHD),HDM_GETITEMCOUNT,0,0L)
903 #define Header_InsertItemA(hwndHD,i,phdi) \
904 (INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
905 #define Header_InsertItemW(hwndHD,i,phdi) \
906 (INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
907 #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
908 #define Header_DeleteItem(hwndHD,i) \
909 (BOOL)SNDMSGA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
910 #define Header_GetItemA(hwndHD,i,phdi) \
911 (BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
912 #define Header_GetItemW(hwndHD,i,phdi) \
913 (BOOL)SNDMSGW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
914 #define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
915 #define Header_SetItemA(hwndHD,i,phdi) \
916 (BOOL)SNDMSGA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
917 #define Header_SetItemW(hwndHD,i,phdi) \
918 (BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
919 #define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
920 #define Header_Layout(hwndHD,playout) \
921 (BOOL)SNDMSGA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
922 #define Header_GetItemRect(hwnd,iItem,lprc) \
923 (BOOL)SNDMSGA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
924 #define Header_SetImageList(hwnd,himl) \
925 (HIMAGELIST)SNDMSGA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
926 #define Header_GetImageList(hwnd) \
927 (HIMAGELIST)SNDMSGA((hwnd),HDM_GETIMAGELIST,0,0)
928 #define Header_OrderToIndex(hwnd,i) \
929 (INT)SNDMSGA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
930 #define Header_CreateDragImage(hwnd,i) \
931 (HIMAGELIST)SNDMSGA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
932 #define Header_GetOrderArray(hwnd,iCount,lpi) \
933 (BOOL)SNDMSGA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
934 #define Header_SetOrderArray(hwnd,iCount,lpi) \
935 (BOOL)SNDMSGA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
936 #define Header_SetHotDivider(hwnd,fPos,dw) \
937 (INT)SNDMSGA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
938 #define Header_SetUnicodeFormat(hwnd,fUnicode) \
939 (BOOL)SNDMSGA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
940 #define Header_GetUnicodeFormat(hwnd) \
941 (BOOL)SNDMSGA((hwnd),HDM_GETUNICODEFORMAT,0,0)
943 /* Win32 5.1 Button Theme */
944 #define BCN_FIRST (0U-1250U)
945 #define BCN_LAST (0U-1350U)
947 #define BCN_HOTITEMCHANGE (BCN_FIRST + 0x0001)
950 /* Toolbar */
952 #define TOOLBARCLASSNAME16 "ToolbarWindow"
953 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
954 #if defined(__GNUC__)
955 # define TOOLBARCLASSNAMEW (const WCHAR []){ 'T','o','o','l','b','a','r', \
956 'W','i','n','d','o','w','3','2',0 }
957 #elif defined(_MSC_VER)
958 # define TOOLBARCLASSNAMEW L"ToolbarWindow32"
959 #else
960 static const WCHAR TOOLBARCLASSNAMEW[] = { 'T','o','o','l','b','a','r',
961 'W','i','n','d','o','w','3','2',0 };
962 #endif
963 #define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
965 #define CMB_MASKED 0x02
967 #define TBSTATE_CHECKED 0x01
968 #define TBSTATE_PRESSED 0x02
969 #define TBSTATE_ENABLED 0x04
970 #define TBSTATE_HIDDEN 0x08
971 #define TBSTATE_INDETERMINATE 0x10
972 #define TBSTATE_WRAP 0x20
973 #define TBSTATE_ELLIPSES 0x40
974 #define TBSTATE_MARKED 0x80
977 /* as of _WIN32_IE >= 0x0500 the following symbols are obsolete,
978 * "everyone" should use the BTNS_... stuff below
980 #define TBSTYLE_BUTTON 0x00
981 #define TBSTYLE_SEP 0x01
982 #define TBSTYLE_CHECK 0x02
983 #define TBSTYLE_GROUP 0x04
984 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
985 #define TBSTYLE_DROPDOWN 0x08
986 #define TBSTYLE_AUTOSIZE 0x10
987 #define TBSTYLE_NOPREFIX 0x20
988 #define BTNS_BUTTON TBSTYLE_BUTTON
989 #define BTNS_SEP TBSTYLE_SEP
990 #define BTNS_CHECK TBSTYLE_CHECK
991 #define BTNS_GROUP TBSTYLE_GROUP
992 #define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP
993 #define BTNS_DROPDOWN TBSTYLE_DROPDOWN
994 #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE
995 #define BTNS_NOPREFIX TBSTYLE_NOPREFIX
996 #define BTNS_SHOWTEXT 0x40 /* ignored unless TBSTYLE_EX_MIXEDB set */
997 #define BTNS_WHOLEDROPDOWN 0x80 /* draw dropdown arrow, but without split arrow section */
999 #define TBSTYLE_TOOLTIPS 0x0100
1000 #define TBSTYLE_WRAPABLE 0x0200
1001 #define TBSTYLE_ALTDRAG 0x0400
1002 #define TBSTYLE_FLAT 0x0800
1003 #define TBSTYLE_LIST 0x1000
1004 #define TBSTYLE_CUSTOMERASE 0x2000
1005 #define TBSTYLE_REGISTERDROP 0x4000
1006 #define TBSTYLE_TRANSPARENT 0x8000
1007 #define TBSTYLE_EX_DRAWDDARROWS 0x00000001
1008 #define TBSTYLE_EX_UNDOC1 0x00000004 /* similar to TBSTYLE_WRAPABLE */
1009 #define TBSTYLE_EX_MIXEDBUTTONS 0x00000008
1010 #define TBSTYLE_EX_HIDECLIPPEDBUTTONS 0x00000010 /* don't show partially obscured buttons */
1011 #define TBSTYLE_EX_DOUBLEBUFFER 0x00000080 /* Double Buffer the toolbar ??? */
1013 #define TBIF_IMAGE 0x00000001
1014 #define TBIF_TEXT 0x00000002
1015 #define TBIF_STATE 0x00000004
1016 #define TBIF_STYLE 0x00000008
1017 #define TBIF_LPARAM 0x00000010
1018 #define TBIF_COMMAND 0x00000020
1019 #define TBIF_SIZE 0x00000040
1020 #define TBIF_BYINDEX 0x80000000
1022 #define TBBF_LARGE 0x0001
1024 #define TB_ENABLEBUTTON (WM_USER+1)
1025 #define TB_CHECKBUTTON (WM_USER+2)
1026 #define TB_PRESSBUTTON (WM_USER+3)
1027 #define TB_HIDEBUTTON (WM_USER+4)
1028 #define TB_INDETERMINATE (WM_USER+5)
1029 #define TB_MARKBUTTON (WM_USER+6)
1030 #define TB_ISBUTTONENABLED (WM_USER+9)
1031 #define TB_ISBUTTONCHECKED (WM_USER+10)
1032 #define TB_ISBUTTONPRESSED (WM_USER+11)
1033 #define TB_ISBUTTONHIDDEN (WM_USER+12)
1034 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
1035 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
1036 #define TB_SETSTATE (WM_USER+17)
1037 #define TB_GETSTATE (WM_USER+18)
1038 #define TB_ADDBITMAP (WM_USER+19)
1039 #define TB_ADDBUTTONSA (WM_USER+20)
1040 #define TB_ADDBUTTONSW (WM_USER+68)
1041 #define TB_ADDBUTTONS WINELIB_NAME_AW(TB_ADDBUTTONS)
1042 #define TB_HITTEST (WM_USER+69)
1043 #define TB_INSERTBUTTONA (WM_USER+21)
1044 #define TB_INSERTBUTTONW (WM_USER+67)
1045 #define TB_INSERTBUTTON WINELIB_NAME_AW(TB_INSERTBUTTON)
1046 #define TB_DELETEBUTTON (WM_USER+22)
1047 #define TB_GETBUTTON (WM_USER+23)
1048 #define TB_BUTTONCOUNT (WM_USER+24)
1049 #define TB_COMMANDTOINDEX (WM_USER+25)
1050 #define TB_SAVERESTOREA (WM_USER+26)
1051 #define TB_SAVERESTOREW (WM_USER+76)
1052 #define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
1053 #define TB_CUSTOMIZE (WM_USER+27)
1054 #define TB_ADDSTRINGA (WM_USER+28)
1055 #define TB_ADDSTRINGW (WM_USER+77)
1056 #define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
1057 #define TB_GETITEMRECT (WM_USER+29)
1058 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
1059 #define TB_SETBUTTONSIZE (WM_USER+31)
1060 #define TB_SETBITMAPSIZE (WM_USER+32)
1061 #define TB_AUTOSIZE (WM_USER+33)
1062 #define TB_GETTOOLTIPS (WM_USER+35)
1063 #define TB_SETTOOLTIPS (WM_USER+36)
1064 #define TB_SETPARENT (WM_USER+37)
1065 #define TB_SETROWS (WM_USER+39)
1066 #define TB_GETROWS (WM_USER+40)
1067 #define TB_GETBITMAPFLAGS (WM_USER+41)
1068 #define TB_SETCMDID (WM_USER+42)
1069 #define TB_CHANGEBITMAP (WM_USER+43)
1070 #define TB_GETBITMAP (WM_USER+44)
1071 #define TB_GETBUTTONTEXTA (WM_USER+45)
1072 #define TB_GETBUTTONTEXTW (WM_USER+75)
1073 #define TB_GETBUTTONTEXT WINELIB_NAME_AW(TB_GETBUTTONTEXT)
1074 #define TB_REPLACEBITMAP (WM_USER+46)
1075 #define TB_SETINDENT (WM_USER+47)
1076 #define TB_SETIMAGELIST (WM_USER+48)
1077 #define TB_GETIMAGELIST (WM_USER+49)
1078 #define TB_LOADIMAGES (WM_USER+50)
1079 #define TB_GETRECT (WM_USER+51) /* wParam is the Cmd instead of index */
1080 #define TB_SETHOTIMAGELIST (WM_USER+52)
1081 #define TB_GETHOTIMAGELIST (WM_USER+53)
1082 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
1083 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
1084 #define TB_SETSTYLE (WM_USER+56)
1085 #define TB_GETSTYLE (WM_USER+57)
1086 #define TB_GETBUTTONSIZE (WM_USER+58)
1087 #define TB_SETBUTTONWIDTH (WM_USER+59)
1088 #define TB_SETMAXTEXTROWS (WM_USER+60)
1089 #define TB_GETTEXTROWS (WM_USER+61)
1090 #define TB_GETOBJECT (WM_USER+62)
1091 #define TB_GETBUTTONINFOW (WM_USER+63)
1092 #define TB_GETBUTTONINFOA (WM_USER+65)
1093 #define TB_GETBUTTONINFO WINELIB_NAME_AW(TB_GETBUTTONINFO)
1094 #define TB_SETBUTTONINFOW (WM_USER+64)
1095 #define TB_SETBUTTONINFOA (WM_USER+66)
1096 #define TB_SETBUTTONINFO WINELIB_NAME_AW(TB_SETBUTTONINFO)
1097 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
1098 #define TB_GETHOTITEM (WM_USER+71)
1099 #define TB_SETHOTITEM (WM_USER+72)
1100 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
1101 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
1102 #define TB_MAPACCELERATORA (WM_USER+78)
1103 #define TB_MAPACCELERATORW (WM_USER+90)
1104 #define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
1105 #define TB_GETINSERTMARK (WM_USER+79)
1106 #define TB_SETINSERTMARK (WM_USER+80)
1107 #define TB_INSERTMARKHITTEST (WM_USER+81)
1108 #define TB_MOVEBUTTON (WM_USER+82)
1109 #define TB_GETMAXSIZE (WM_USER+83)
1110 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
1111 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
1112 #define TB_GETPADDING (WM_USER+86)
1113 #define TB_SETPADDING (WM_USER+87)
1114 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
1115 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
1116 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1117 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1118 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1119 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1120 #define TB_GETSTRINGW (WM_USER+91)
1121 #define TB_GETSTRINGA (WM_USER+92)
1122 #define TB_GETSTRING WINELIB_NAME_AW(TB_GETSTRING)
1124 /* undocumented messages in Toolbar */
1125 #define TB_UNKWN45D (WM_USER+93)
1126 #define TB_UNKWN45E (WM_USER+94)
1127 #define TB_UNKWN460 (WM_USER+96)
1128 #define TB_UNKWN463 (WM_USER+99)
1129 #define TB_UNKWN464 (WM_USER+100)
1132 #define TBN_FIRST (0U-700U)
1133 #define TBN_LAST (0U-720U)
1134 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
1135 #define TBN_GETBUTTONINFOW (TBN_FIRST-20)
1136 #define TBN_GETBUTTONINFO WINELIB_NAME_AW(TBN_GETBUTTONINFO)
1137 #define TBN_BEGINDRAG (TBN_FIRST-1)
1138 #define TBN_ENDDRAG (TBN_FIRST-2)
1139 #define TBN_BEGINADJUST (TBN_FIRST-3)
1140 #define TBN_ENDADJUST (TBN_FIRST-4)
1141 #define TBN_RESET (TBN_FIRST-5)
1142 #define TBN_QUERYINSERT (TBN_FIRST-6)
1143 #define TBN_QUERYDELETE (TBN_FIRST-7)
1144 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
1145 #define TBN_CUSTHELP (TBN_FIRST-9)
1146 #define TBN_DROPDOWN (TBN_FIRST-10)
1147 #define TBN_GETOBJECT (TBN_FIRST-12)
1148 #define TBN_HOTITEMCHANGE (TBN_FIRST-13)
1149 #define TBN_DRAGOUT (TBN_FIRST-14)
1150 #define TBN_DELETINGBUTTON (TBN_FIRST-15)
1151 #define TBN_GETDISPINFOA (TBN_FIRST-16)
1152 #define TBN_GETDISPINFOW (TBN_FIRST-17)
1153 #define TBN_GETDISPINFO WINELIB_NAME_AW(TBN_GETDISPINFO)
1154 #define TBN_GETINFOTIPA (TBN_FIRST-18)
1155 #define TBN_GETINFOTIPW (TBN_FIRST-19)
1156 #define TBN_GETINFOTIP WINELIB_NAME_AW(TBN_GETINFOTIP)
1157 #define TBN_INITCUSTOMIZE (TBN_FIRST-23)
1158 #define TBNRF_HIDEHELP 0x00000001
1161 /* Return values from TBN_DROPDOWN */
1162 #define TBDDRET_DEFAULT 0
1163 #define TBDDRET_NODEFAULT 1
1164 #define TBDDRET_TREATPRESSED 2
1166 typedef struct _NMTBCUSTOMDRAW
1168 NMCUSTOMDRAW nmcd;
1169 HBRUSH hbrMonoDither;
1170 HBRUSH hbrLines;
1171 HPEN hpenLines;
1172 COLORREF clrText;
1173 COLORREF clrMark;
1174 COLORREF clrTextHighlight;
1175 COLORREF clrBtnFace;
1176 COLORREF clrBtnHighlight;
1177 COLORREF clrHighlightHotTrack;
1178 RECT rcText;
1179 int nStringBkMode;
1180 int nHLStringBkMode;
1181 } NMTBCUSTOMDRAW, *LPNMTBCUSTOMDRAW;
1183 /* return flags for Toolbar NM_CUSTOMDRAW notifications */
1184 #define TBCDRF_NOEDGES 0x00010000 /* Don't draw button edges */
1185 #define TBCDRF_HILITEHOTTRACK 0x00020000 /* Use color of the button bkgnd */
1186 /* when hottracked */
1187 #define TBCDRF_NOOFFSET 0x00040000 /* No offset button if pressed */
1188 #define TBCDRF_NOMARK 0x00080000 /* Don't draw default highlight */
1189 /* for TBSTATE_MARKED */
1190 #define TBCDRF_NOETCHEDEFFECT 0x00100000 /* No etched effect for */
1191 /* disabled items */
1192 #define TBCDRF_BLENDICON 0x00200000 /* ILD_BLEND50 on the icon image */
1193 #define TBCDRF_NOBACKGROUND 0x00400000 /* ILD_BLEND50 on the icon image */
1196 /* This is just for old CreateToolbar. */
1197 /* Don't use it in new programs. */
1198 typedef struct _OLDTBBUTTON {
1199 INT iBitmap;
1200 INT idCommand;
1201 BYTE fsState;
1202 BYTE fsStyle;
1203 BYTE bReserved[2];
1204 DWORD dwData;
1205 } OLDTBBUTTON, *POLDTBBUTTON, *LPOLDTBBUTTON;
1206 typedef const OLDTBBUTTON *LPCOLDTBBUTTON;
1209 typedef struct _TBBUTTON {
1210 INT iBitmap;
1211 INT idCommand;
1212 BYTE fsState;
1213 BYTE fsStyle;
1214 BYTE bReserved[2];
1215 DWORD dwData;
1216 INT iString;
1217 } TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
1218 typedef const TBBUTTON *LPCTBBUTTON;
1221 typedef struct _COLORMAP {
1222 COLORREF from;
1223 COLORREF to;
1224 } COLORMAP, *LPCOLORMAP;
1227 typedef struct tagTBADDBITMAP {
1228 HINSTANCE hInst;
1229 UINT nID;
1230 } TBADDBITMAP, *LPTBADDBITMAP;
1232 #define HINST_COMMCTRL ((HINSTANCE)-1)
1233 #define IDB_STD_SMALL_COLOR 0
1234 #define IDB_STD_LARGE_COLOR 1
1235 #define IDB_VIEW_SMALL_COLOR 4
1236 #define IDB_VIEW_LARGE_COLOR 5
1237 #define IDB_HIST_SMALL_COLOR 8
1238 #define IDB_HIST_LARGE_COLOR 9
1240 #define STD_CUT 0
1241 #define STD_COPY 1
1242 #define STD_PASTE 2
1243 #define STD_UNDO 3
1244 #define STD_REDOW 4
1245 #define STD_DELETE 5
1246 #define STD_FILENEW 6
1247 #define STD_FILEOPEN 7
1248 #define STD_FILESAVE 8
1249 #define STD_PRINTPRE 9
1250 #define STD_PROPERTIES 10
1251 #define STD_HELP 11
1252 #define STD_FIND 12
1253 #define STD_REPLACE 13
1254 #define STD_PRINT 14
1256 #define VIEW_LARGEICONS 0
1257 #define VIEW_SMALLICONS 1
1258 #define VIEW_LIST 2
1259 #define VIEW_DETAILS 3
1260 #define VIEW_SORTNAME 4
1261 #define VIEW_SORTSIZE 5
1262 #define VIEW_SORTDATE 6
1263 #define VIEW_SORTTYPE 7
1264 #define VIEW_PARENTFOLDER 8
1265 #define VIEW_NETCONNECT 9
1266 #define VIEW_NETDISCONNECT 10
1267 #define VIEW_NEWFOLDER 11
1268 #define VIEW_VIEWMENU 12
1270 #define HIST_BACK 0
1271 #define HIST_FORWARD 1
1272 #define HIST_FAVORITES 2
1273 #define HIST_ADDTOFAVORITES 3
1274 #define HIST_VIEWTREE 4
1276 typedef struct tagTBSAVEPARAMSA {
1277 HKEY hkr;
1278 LPCSTR pszSubKey;
1279 LPCSTR pszValueName;
1280 } TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
1282 typedef struct tagTBSAVEPARAMSW {
1283 HKEY hkr;
1284 LPCWSTR pszSubKey;
1285 LPCWSTR pszValueName;
1286 } TBSAVEPARAMSW, *LPTBSAVEPARAMSW;
1288 #define TBSAVEPARAMS WINELIB_NAME_AW(TBSAVEPARAMS)
1289 #define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
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 LPSTR pszText;
1302 INT cchText;
1303 } TBBUTTONINFOA, *LPTBBUTTONINFOA;
1305 typedef struct
1307 UINT cbSize;
1308 DWORD dwMask;
1309 INT idCommand;
1310 INT iImage;
1311 BYTE fsState;
1312 BYTE fsStyle;
1313 WORD cx;
1314 DWORD lParam;
1315 LPWSTR pszText;
1316 INT cchText;
1317 } TBBUTTONINFOW, *LPTBBUTTONINFOW;
1319 #define TBBUTTONINFO WINELIB_NAME_AW(TBBUTTONINFO)
1320 #define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
1322 typedef struct tagNMTBHOTITEM
1324 NMHDR hdr;
1325 int idOld;
1326 int idNew;
1327 DWORD dwFlags;
1328 } NMTBHOTITEM, *LPNMTBHOTITEM;
1330 typedef struct tagNMTBGETINFOTIPA
1332 NMHDR hdr;
1333 LPSTR pszText;
1334 INT cchTextMax;
1335 INT iItem;
1336 LPARAM lParam;
1337 } NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
1339 typedef struct tagNMTBGETINFOTIPW
1341 NMHDR hdr;
1342 LPWSTR pszText;
1343 INT cchTextMax;
1344 INT iItem;
1345 LPARAM lParam;
1346 } NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
1348 #define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOFTIP)
1349 #define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
1351 typedef struct
1353 NMHDR hdr;
1354 DWORD dwMask;
1355 int idCommand;
1356 DWORD lParam;
1357 int iImage;
1358 LPSTR pszText;
1359 int cchText;
1360 } NMTBDISPINFOA, *LPNMTBDISPINFOA;
1362 typedef struct
1364 NMHDR hdr;
1365 DWORD dwMask;
1366 int idCommand;
1367 DWORD lParam;
1368 int iImage;
1369 LPWSTR pszText;
1370 int cchText;
1371 } NMTBDISPINFOW, *LPNMTBDISPINFOW;
1373 #define NMTBDISPINFO WINELIB_NAME_AW(NMTBDISPINFO)
1374 #define LPNMTBDISPINFO WINELIB_NAME_AW(LPNMTBDISPINFO)
1376 /* contents of dwMask in the NMTBDISPINFO structure */
1377 #define TBNF_IMAGE 0x00000001
1378 #define TBNF_TEXT 0x00000002
1379 #define TBNF_DI_SETITEM 0x10000000
1382 typedef struct tagNMTOOLBARA
1384 NMHDR hdr;
1385 INT iItem;
1386 TBBUTTON tbButton;
1387 INT cchText;
1388 LPSTR pszText;
1389 RECT rcButton; /* Version 5.80 */
1390 } NMTOOLBARA, *LPNMTOOLBARA, TBNOTIFYA, *LPTBNOTIFYA;
1392 typedef struct tagNMTOOLBARW
1394 NMHDR hdr;
1395 INT iItem;
1396 TBBUTTON tbButton;
1397 INT cchText;
1398 LPWSTR pszText;
1399 RECT rcButton; /* Version 5.80 */
1400 } NMTOOLBARW, *LPNMTOOLBARW, TBNOTIFYW, *LPTBNOTIFYW;
1402 #define NMTOOLBAR WINELIB_NAME_AW(NMTOOLBAR)
1403 #define LPNMTOOLBAR WINELIB_NAME_AW(LPNMTOOLBAR)
1404 #define TBNOTIFY WINELIB_NAME_AW(TBNOTIFY)
1405 #define LPTBNOTIFY WINELIB_NAME_AW(LPTBNOTIFY)
1407 typedef struct
1409 HINSTANCE hInstOld;
1410 UINT nIDOld;
1411 HINSTANCE hInstNew;
1412 UINT nIDNew;
1413 INT nButtons;
1414 } TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
1416 #define HICF_OTHER 0x00000000
1417 #define HICF_MOUSE 0x00000001 /* Triggered by mouse */
1418 #define HICF_ARROWKEYS 0x00000002 /* Triggered by arrow keys */
1419 #define HICF_ACCELERATOR 0x00000004 /* Triggered by accelerator */
1420 #define HICF_DUPACCEL 0x00000008 /* This accelerator is not unique */
1421 #define HICF_ENTERING 0x00000010 /* idOld is invalid */
1422 #define HICF_LEAVING 0x00000020 /* idNew is invalid */
1423 #define HICF_RESELECT 0x00000040 /* hot item reselected */
1424 #define HICF_LMOUSE 0x00000080 /* left mouse button selected */
1425 #define HICF_TOGGLEDROPDOWN 0x00000100 /* Toggle button's dropdown state */
1427 typedef struct
1429 int iButton;
1430 DWORD dwFlags;
1431 } TBINSERTMARK, *LPTBINSERTMARK;
1432 #define TBIMHT_AFTER 0x00000001 /* TRUE = insert After iButton, otherwise before */
1433 #define TBIMHT_BACKGROUND 0x00000002 /* TRUE if and only if missed buttons completely */
1435 HWND WINAPI
1436 CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
1437 UINT, LPCTBBUTTON, INT);
1439 HWND WINAPI
1440 CreateToolbarEx(HWND, DWORD, UINT, INT,
1441 HINSTANCE, UINT, LPCTBBUTTON,
1442 INT, INT, INT, INT, INT, UINT);
1444 HBITMAP WINAPI
1445 CreateMappedBitmap (HINSTANCE, INT, UINT, LPCOLORMAP, INT);
1448 /* Tool tips */
1450 #define TOOLTIPS_CLASS16 "tooltips_class"
1451 #define TOOLTIPS_CLASSA "tooltips_class32"
1452 #if defined(__GNUC__)
1453 # define TOOLTIPS_CLASSW (const WCHAR []){ 't','o','o','l','t','i','p','s','_', \
1454 'c','l','a','s','s','3','2',0 }
1455 #elif defined(_MSC_VER)
1456 # define TOOLTIPS_CLASSW L"tooltips_class32"
1457 #else
1458 static const WCHAR TOOLTIPS_CLASSW[] = { 't','o','o','l','t','i','p','s','_',
1459 'c','l','a','s','s','3','2',0 };
1460 #endif
1461 #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
1463 #define INFOTIPSIZE 1024
1465 #define TTS_ALWAYSTIP 0x01
1466 #define TTS_NOPREFIX 0x02
1468 #define TTF_IDISHWND 0x0001
1469 #define TTF_CENTERTIP 0x0002
1470 #define TTF_RTLREADING 0x0004
1471 #define TTF_SUBCLASS 0x0010
1472 #define TTF_TRACK 0x0020
1473 #define TTF_ABSOLUTE 0x0080
1474 #define TTF_TRANSPARENT 0x0100
1475 #define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
1478 #define TTDT_AUTOMATIC 0
1479 #define TTDT_RESHOW 1
1480 #define TTDT_AUTOPOP 2
1481 #define TTDT_INITIAL 3
1484 #define TTM_ACTIVATE (WM_USER+1)
1485 #define TTM_SETDELAYTIME (WM_USER+3)
1486 #define TTM_ADDTOOLA (WM_USER+4)
1487 #define TTM_ADDTOOLW (WM_USER+50)
1488 #define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
1489 #define TTM_DELTOOLA (WM_USER+5)
1490 #define TTM_DELTOOLW (WM_USER+51)
1491 #define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
1492 #define TTM_NEWTOOLRECTA (WM_USER+6)
1493 #define TTM_NEWTOOLRECTW (WM_USER+52)
1494 #define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
1495 #define TTM_RELAYEVENT (WM_USER+7)
1496 #define TTM_GETTOOLINFOA (WM_USER+8)
1497 #define TTM_GETTOOLINFOW (WM_USER+53)
1498 #define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
1499 #define TTM_SETTOOLINFOA (WM_USER+9)
1500 #define TTM_SETTOOLINFOW (WM_USER+54)
1501 #define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
1502 #define TTM_HITTESTA (WM_USER+10)
1503 #define TTM_HITTESTW (WM_USER+55)
1504 #define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
1505 #define TTM_GETTEXTA (WM_USER+11)
1506 #define TTM_GETTEXTW (WM_USER+56)
1507 #define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
1508 #define TTM_UPDATETIPTEXTA (WM_USER+12)
1509 #define TTM_UPDATETIPTEXTW (WM_USER+57)
1510 #define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
1511 #define TTM_GETTOOLCOUNT (WM_USER+13)
1512 #define TTM_ENUMTOOLSA (WM_USER+14)
1513 #define TTM_ENUMTOOLSW (WM_USER+58)
1514 #define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
1515 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1516 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1517 #define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
1518 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1519 #define TTM_TRACKACTIVATE (WM_USER+17)
1520 #define TTM_TRACKPOSITION (WM_USER+18)
1521 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1522 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1523 #define TTM_GETDELAYTIME (WM_USER+21)
1524 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1525 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1526 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1527 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1528 #define TTM_SETMARGIN (WM_USER+26)
1529 #define TTM_GETMARGIN (WM_USER+27)
1530 #define TTM_POP (WM_USER+28)
1531 #define TTM_UPDATE (WM_USER+29)
1532 #define TTM_GETBUBBLESIZE (WM_USER+30)
1535 #define TTN_FIRST (0U-520U)
1536 #define TTN_LAST (0U-549U)
1537 #define TTN_GETDISPINFOA (TTN_FIRST-0)
1538 #define TTN_GETDISPINFOW (TTN_FIRST-10)
1539 #define TTN_GETDISPINFO WINELIB_NAME_AW(TTN_GETDISPINFO)
1540 #define TTN_SHOW (TTN_FIRST-1)
1541 #define TTN_POP (TTN_FIRST-2)
1543 #define TTN_NEEDTEXT TTN_GETDISPINFO
1544 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1545 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1547 typedef struct tagTOOLINFOA {
1548 UINT cbSize;
1549 UINT uFlags;
1550 HWND hwnd;
1551 UINT uId;
1552 RECT rect;
1553 HINSTANCE hinst;
1554 LPSTR lpszText;
1555 LPARAM lParam;
1556 } TTTOOLINFOA, *LPTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
1558 typedef struct tagTOOLINFOW {
1559 UINT cbSize;
1560 UINT uFlags;
1561 HWND hwnd;
1562 UINT uId;
1563 RECT rect;
1564 HINSTANCE hinst;
1565 LPWSTR lpszText;
1566 LPARAM lParam;
1567 } TTTOOLINFOW, *LPTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW;
1569 #define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1570 #define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1571 #define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
1572 #define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
1573 #define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
1575 #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
1576 #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
1577 #define TTTOOLINFO_V1_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(TTTOOLINFO), lpszText)
1579 typedef struct _TT_HITTESTINFOA
1581 HWND hwnd;
1582 POINT pt;
1583 TTTOOLINFOA ti;
1584 } TTHITTESTINFOA, *LPTTHITTESTINFOA;
1585 #define LPHITTESTINFOA LPTTHITTESTINFOA
1587 typedef struct _TT_HITTESTINFOW
1589 HWND hwnd;
1590 POINT pt;
1591 TTTOOLINFOW ti;
1592 } TTHITTESTINFOW, *LPTTHITTESTINFOW;
1593 #define LPHITTESTINFOW LPTTHITTESTINFOW
1595 #define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
1596 #define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
1597 #define LPHITTESTINFO WINELIB_NAME_AW(LPHITTESTINFO)
1599 typedef struct tagNMTTDISPINFOA
1601 NMHDR hdr;
1602 LPSTR lpszText;
1603 CHAR szText[80];
1604 HINSTANCE hinst;
1605 UINT uFlags;
1606 LPARAM lParam;
1607 } NMTTDISPINFOA, *LPNMTTDISPINFOA;
1609 typedef struct tagNMTTDISPINFOW
1611 NMHDR hdr;
1612 LPWSTR lpszText;
1613 WCHAR szText[80];
1614 HINSTANCE hinst;
1615 UINT uFlags;
1616 LPARAM lParam;
1617 } NMTTDISPINFOW, *LPNMTTDISPINFOW;
1619 #define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
1620 #define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
1622 #define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
1623 #define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
1624 #define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)
1626 #define TOOLTIPTEXTW NMTTDISPINFOW
1627 #define TOOLTIPTEXTA NMTTDISPINFOA
1628 #define TOOLTIPTEXT NMTTDISPINFO
1629 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1630 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1631 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1634 /* Rebar control */
1636 #define REBARCLASSNAME16 "ReBarWindow"
1637 #define REBARCLASSNAMEA "ReBarWindow32"
1638 #if defined(__GNUC__)
1639 # define REBARCLASSNAMEW (const WCHAR []){ 'R','e','B','a','r', \
1640 'W','i','n','d','o','w','3','2',0 }
1641 #elif defined(_MSC_VER)
1642 # define REBARCLASSNAMEW L"ReBarWindow32"
1643 #else
1644 static const WCHAR REBARCLASSNAMEW[] = { 'R','e','B','a','r',
1645 'W','i','n','d','o','w','3','2',0 };
1646 #endif
1647 #define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
1649 #define RBS_TOOLTIPS 0x0100
1650 #define RBS_VARHEIGHT 0x0200
1651 #define RBS_BANDBORDERS 0x0400
1652 #define RBS_FIXEDORDER 0x0800
1653 #define RBS_REGISTERDROP 0x1000
1654 #define RBS_AUTOSIZE 0x2000
1655 #define RBS_VERTICALGRIPPER 0x4000
1656 #define RBS_DBLCLKTOGGLE 0x8000
1658 #define RBIM_IMAGELIST 0x00000001
1660 #define RBBIM_STYLE 0x00000001
1661 #define RBBIM_COLORS 0x00000002
1662 #define RBBIM_TEXT 0x00000004
1663 #define RBBIM_IMAGE 0x00000008
1664 #define RBBIM_CHILD 0x00000010
1665 #define RBBIM_CHILDSIZE 0x00000020
1666 #define RBBIM_SIZE 0x00000040
1667 #define RBBIM_BACKGROUND 0x00000080
1668 #define RBBIM_ID 0x00000100
1669 #define RBBIM_IDEALSIZE 0x00000200
1670 #define RBBIM_LPARAM 0x00000400
1671 #define RBBIM_HEADERSIZE 0x00000800
1673 #define RBBS_BREAK 0x00000001
1674 #define RBBS_FIXEDSIZE 0x00000002
1675 #define RBBS_CHILDEDGE 0x00000004
1676 #define RBBS_HIDDEN 0x00000008
1677 #define RBBS_NOVERT 0x00000010
1678 #define RBBS_FIXEDBMP 0x00000020
1679 #define RBBS_VARIABLEHEIGHT 0x00000040
1680 #define RBBS_GRIPPERALWAYS 0x00000080
1681 #define RBBS_NOGRIPPER 0x00000100
1682 #define RBBS_USECHEVRON 0x00000200
1683 #define RBBS_HIDETITLE 0x00000400
1684 #define RBBS_TOPALIGN 0x00000800
1686 #define RBNM_ID 0x00000001
1687 #define RBNM_STYLE 0x00000002
1688 #define RBNM_LPARAM 0x00000004
1690 #define RBHT_NOWHERE 0x0001
1691 #define RBHT_CAPTION 0x0002
1692 #define RBHT_CLIENT 0x0003
1693 #define RBHT_GRABBER 0x0004
1694 #define RBHT_CHEVRON 0x0008
1696 #define RB_INSERTBANDA (WM_USER+1)
1697 #define RB_INSERTBANDW (WM_USER+10)
1698 #define RB_INSERTBAND WINELIB_NAME_AW(RB_INSERTBAND)
1699 #define RB_DELETEBAND (WM_USER+2)
1700 #define RB_GETBARINFO (WM_USER+3)
1701 #define RB_SETBARINFO (WM_USER+4)
1702 #define RB_GETBANDINFO (WM_USER+5) /* just for compatibility */
1703 #define RB_SETBANDINFOA (WM_USER+6)
1704 #define RB_SETBANDINFOW (WM_USER+11)
1705 #define RB_SETBANDINFO WINELIB_NAME_AW(RB_SETBANDINFO)
1706 #define RB_SETPARENT (WM_USER+7)
1707 #define RB_HITTEST (WM_USER+8)
1708 #define RB_GETRECT (WM_USER+9)
1709 #define RB_GETBANDCOUNT (WM_USER+12)
1710 #define RB_GETROWCOUNT (WM_USER+13)
1711 #define RB_GETROWHEIGHT (WM_USER+14)
1712 #define RB_IDTOINDEX (WM_USER+16)
1713 #define RB_GETTOOLTIPS (WM_USER+17)
1714 #define RB_SETTOOLTIPS (WM_USER+18)
1715 #define RB_SETBKCOLOR (WM_USER+19)
1716 #define RB_GETBKCOLOR (WM_USER+20)
1717 #define RB_SETTEXTCOLOR (WM_USER+21)
1718 #define RB_GETTEXTCOLOR (WM_USER+22)
1719 #define RB_SIZETORECT (WM_USER+23)
1720 #define RB_BEGINDRAG (WM_USER+24)
1721 #define RB_ENDDRAG (WM_USER+25)
1722 #define RB_DRAGMOVE (WM_USER+26)
1723 #define RB_GETBARHEIGHT (WM_USER+27)
1724 #define RB_GETBANDINFOW (WM_USER+28)
1725 #define RB_GETBANDINFOA (WM_USER+29)
1726 #define RB_GETBANDINFO16 WINELIB_NAME_AW(RB_GETBANDINFO16)
1727 #define RB_MINIMIZEBAND (WM_USER+30)
1728 #define RB_MAXIMIZEBAND (WM_USER+31)
1729 #define RB_GETBANDBORDERS (WM_USER+34)
1730 #define RB_SHOWBAND (WM_USER+35)
1731 #define RB_SETPALETTE (WM_USER+37)
1732 #define RB_GETPALETTE (WM_USER+38)
1733 #define RB_MOVEBAND (WM_USER+39)
1734 #define RB_GETBANDMARGINS (WM_USER+40)
1735 #define RB_PUSHCHEVRON (WM_USER+43)
1736 #define RB_GETDROPTARGET CCM_GETDROPTARGET
1737 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1738 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1739 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1740 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1742 #define RBN_FIRST (0U-831U)
1743 #define RBN_LAST (0U-859U)
1744 #define RBN_HEIGHTCHANGE (RBN_FIRST-0)
1745 #define RBN_GETOBJECT (RBN_FIRST-1)
1746 #define RBN_LAYOUTCHANGED (RBN_FIRST-2)
1747 #define RBN_AUTOSIZE (RBN_FIRST-3)
1748 #define RBN_BEGINDRAG (RBN_FIRST-4)
1749 #define RBN_ENDDRAG (RBN_FIRST-5)
1750 #define RBN_DELETINGBAND (RBN_FIRST-6)
1751 #define RBN_DELETEDBAND (RBN_FIRST-7)
1752 #define RBN_CHILDSIZE (RBN_FIRST-8)
1753 #define RBN_CHEVRONPUSHED (RBN_FIRST-10)
1754 #define RBN_MINMAX (RBN_FIRST-21)
1755 #define RBN_AUTOBREAK (RBN_FIRST-22)
1757 typedef struct tagREBARINFO
1759 UINT cbSize;
1760 UINT fMask;
1761 HIMAGELIST himl;
1762 } REBARINFO, *LPREBARINFO;
1764 typedef struct tagREBARBANDINFOA
1766 UINT cbSize;
1767 UINT fMask;
1768 UINT fStyle;
1769 COLORREF clrFore;
1770 COLORREF clrBack;
1771 LPSTR lpText;
1772 UINT cch;
1773 INT iImage;
1774 HWND hwndChild;
1775 UINT cxMinChild;
1776 UINT cyMinChild;
1777 UINT cx;
1778 HBITMAP hbmBack;
1779 UINT wID;
1780 UINT cyChild;
1781 UINT cyMaxChild;
1782 UINT cyIntegral;
1783 UINT cxIdeal;
1784 LPARAM lParam;
1785 UINT cxHeader;
1786 } REBARBANDINFOA, *LPREBARBANDINFOA;
1788 typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
1790 typedef struct tagREBARBANDINFOW
1792 UINT cbSize;
1793 UINT fMask;
1794 UINT fStyle;
1795 COLORREF clrFore;
1796 COLORREF clrBack;
1797 LPWSTR lpText;
1798 UINT cch;
1799 INT iImage;
1800 HWND hwndChild;
1801 UINT cxMinChild;
1802 UINT cyMinChild;
1803 UINT cx;
1804 HBITMAP hbmBack;
1805 UINT wID;
1806 UINT cyChild;
1807 UINT cyMaxChild;
1808 UINT cyIntegral;
1809 UINT cxIdeal;
1810 LPARAM lParam;
1811 UINT cxHeader;
1812 } REBARBANDINFOW, *LPREBARBANDINFOW;
1814 typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
1816 #define REBARBANDINFO WINELIB_NAME_AW(REBARBANDINFO)
1817 #define LPREBARBANDINFO WINELIB_NAME_AW(LPREBARBANDINFO)
1818 #define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
1820 #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
1821 #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
1822 #define REBARBANDINFO_V3_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(REBARBANDINFO), wID)
1824 typedef struct tagNMREBARCHILDSIZE
1826 NMHDR hdr;
1827 UINT uBand;
1828 UINT wID;
1829 RECT rcChild;
1830 RECT rcBand;
1831 } NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;
1833 typedef struct tagNMREBAR
1835 NMHDR hdr;
1836 DWORD dwMask;
1837 UINT uBand;
1838 UINT fStyle;
1839 UINT wID;
1840 LPARAM lParam;
1841 } NMREBAR, *LPNMREBAR;
1843 typedef struct tagNMRBAUTOSIZE
1845 NMHDR hdr;
1846 BOOL fChanged;
1847 RECT rcTarget;
1848 RECT rcActual;
1849 } NMRBAUTOSIZE, *LPNMRBAUTOSIZE;
1851 typedef struct tagNMREBARCHEVRON
1853 NMHDR hdr;
1854 UINT uBand;
1855 UINT wID;
1856 LPARAM lParam;
1857 RECT rc;
1858 LPARAM lParamNM;
1859 } NMREBARCHEVRON, *LPNMREBARCHEVRON;
1861 typedef struct _RB_HITTESTINFO
1863 POINT pt;
1864 UINT flags;
1865 INT iBand;
1866 } RBHITTESTINFO, *LPRBHITTESTINFO;
1869 /* Trackbar control */
1871 #define TRACKBAR_CLASS16 "msctls_trackbar"
1872 #define TRACKBAR_CLASSA "msctls_trackbar32"
1873 #if defined(__GNUC__)
1874 # define TRACKBAR_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
1875 't','r','a','c','k','b','a','r','3','2',0 }
1876 #elif defined(_MSC_VER)
1877 # define TRACKBAR_CLASSW L"msctls_trackbar32"
1878 #else
1879 static const WCHAR TRACKBAR_CLASSW[] = { 'm','s','c','t','l','s','_',
1880 't','r','a','c','k','b','a','r','3','2',0 };
1881 #endif
1882 #define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
1884 #define TBS_AUTOTICKS 0x0001
1885 #define TBS_VERT 0x0002
1886 #define TBS_HORZ 0x0000
1887 #define TBS_TOP 0x0004
1888 #define TBS_BOTTOM 0x0000
1889 #define TBS_LEFT 0x0004
1890 #define TBS_RIGHT 0x0000
1891 #define TBS_BOTH 0x0008
1892 #define TBS_NOTICKS 0x0010
1893 #define TBS_ENABLESELRANGE 0x0020
1894 #define TBS_FIXEDLENGTH 0x0040
1895 #define TBS_NOTHUMB 0x0080
1896 #define TBS_TOOLTIPS 0x0100
1897 #define TBS_REVERSED 0x0200
1898 #define TBS_DOWNISLEFT 0x0400
1900 #define TBTS_TOP 0
1901 #define TBTS_LEFT 1
1902 #define TBTS_BOTTOM 2
1903 #define TBTS_RIGHT 3
1905 #define TB_LINEUP 0
1906 #define TB_LINEDOWN 1
1907 #define TB_PAGEUP 2
1908 #define TB_PAGEDOWN 3
1909 #define TB_THUMBPOSITION 4
1910 #define TB_THUMBTRACK 5
1911 #define TB_TOP 6
1912 #define TB_BOTTOM 7
1913 #define TB_ENDTRACK 8
1915 #define TBCD_TICS 0x0001
1916 #define TBCD_THUMB 0x0002
1917 #define TBCD_CHANNEL 0x0003
1919 #define TBM_GETPOS (WM_USER)
1920 #define TBM_GETRANGEMIN (WM_USER+1)
1921 #define TBM_GETRANGEMAX (WM_USER+2)
1922 #define TBM_GETTIC (WM_USER+3)
1923 #define TBM_SETTIC (WM_USER+4)
1924 #define TBM_SETPOS (WM_USER+5)
1925 #define TBM_SETRANGE (WM_USER+6)
1926 #define TBM_SETRANGEMIN (WM_USER+7)
1927 #define TBM_SETRANGEMAX (WM_USER+8)
1928 #define TBM_CLEARTICS (WM_USER+9)
1929 #define TBM_SETSEL (WM_USER+10)
1930 #define TBM_SETSELSTART (WM_USER+11)
1931 #define TBM_SETSELEND (WM_USER+12)
1932 #define TBM_GETPTICS (WM_USER+14)
1933 #define TBM_GETTICPOS (WM_USER+15)
1934 #define TBM_GETNUMTICS (WM_USER+16)
1935 #define TBM_GETSELSTART (WM_USER+17)
1936 #define TBM_GETSELEND (WM_USER+18)
1937 #define TBM_CLEARSEL (WM_USER+19)
1938 #define TBM_SETTICFREQ (WM_USER+20)
1939 #define TBM_SETPAGESIZE (WM_USER+21)
1940 #define TBM_GETPAGESIZE (WM_USER+22)
1941 #define TBM_SETLINESIZE (WM_USER+23)
1942 #define TBM_GETLINESIZE (WM_USER+24)
1943 #define TBM_GETTHUMBRECT (WM_USER+25)
1944 #define TBM_GETCHANNELRECT (WM_USER+26)
1945 #define TBM_SETTHUMBLENGTH (WM_USER+27)
1946 #define TBM_GETTHUMBLENGTH (WM_USER+28)
1947 #define TBM_SETTOOLTIPS (WM_USER+29)
1948 #define TBM_GETTOOLTIPS (WM_USER+30)
1949 #define TBM_SETTIPSIDE (WM_USER+31)
1950 #define TBM_SETBUDDY (WM_USER+32)
1951 #define TBM_GETBUDDY (WM_USER+33)
1952 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1953 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1956 /* Pager control */
1958 #define WC_PAGESCROLLERA "SysPager"
1959 #if defined(__GNUC__)
1960 # define WC_PAGESCROLLERW (const WCHAR []){ 'S','y','s','P','a','g','e','r',0 }
1961 #elif defined(_MSC_VER)
1962 # define WC_PAGESCROLLERW L"SysPager"
1963 #else
1964 static const WCHAR WC_PAGESCROLLERW[] = { 'S','y','s','P','a','g','e','r',0 };
1965 #endif
1966 #define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
1968 #define PGS_VERT 0x00000000
1969 #define PGS_HORZ 0x00000001
1970 #define PGS_AUTOSCROLL 0x00000002
1971 #define PGS_DRAGNDROP 0x00000004
1973 #define PGF_INVISIBLE 0
1974 #define PGF_NORMAL 1
1975 #define PGF_GRAYED 2
1976 #define PGF_DEPRESSED 4
1977 #define PGF_HOT 8
1979 #define PGB_TOPORLEFT 0
1980 #define PGB_BOTTOMORRIGHT 1
1982 /* only used with PGN_SCROLL */
1983 #define PGF_SCROLLUP 1
1984 #define PGF_SCROLLDOWN 2
1985 #define PGF_SCROLLLEFT 4
1986 #define PGF_SCROLLRIGHT 8
1988 #define PGK_SHIFT 1
1989 #define PGK_CONTROL 2
1990 #define PGK_MENU 4
1992 /* only used with PGN_CALCSIZE */
1993 #define PGF_CALCWIDTH 1
1994 #define PGF_CALCHEIGHT 2
1996 #define PGM_FIRST 0x1400
1997 #define PGM_SETCHILD (PGM_FIRST+1)
1998 #define PGM_RECALCSIZE (PGM_FIRST+2)
1999 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
2000 #define PGM_SETBKCOLOR (PGM_FIRST+4)
2001 #define PGM_GETBKCOLOR (PGM_FIRST+5)
2002 #define PGM_SETBORDER (PGM_FIRST+6)
2003 #define PGM_GETBORDER (PGM_FIRST+7)
2004 #define PGM_SETPOS (PGM_FIRST+8)
2005 #define PGM_GETPOS (PGM_FIRST+9)
2006 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
2007 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
2008 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
2009 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
2011 #define PGN_FIRST (0U-900U)
2012 #define PGN_LAST (0U-950U)
2013 #define PGN_SCROLL (PGN_FIRST-1)
2014 #define PGN_CALCSIZE (PGN_FIRST-2)
2016 #include <pshpack1.h>
2018 typedef struct
2020 NMHDR hdr;
2021 WORD fwKeys;
2022 RECT rcParent;
2023 INT iDir;
2024 INT iXpos;
2025 INT iYpos;
2026 INT iScroll;
2027 } NMPGSCROLL, *LPNMPGSCROLL;
2029 #include <poppack.h>
2031 typedef struct
2033 NMHDR hdr;
2034 DWORD dwFlag;
2035 INT iWidth;
2036 INT iHeight;
2037 } NMPGCALCSIZE, *LPNMPGCALCSIZE;
2040 /* Treeview control */
2042 #define WC_TREEVIEWA "SysTreeView32"
2043 #if defined(__GNUC__)
2044 # define WC_TREEVIEWW (const WCHAR []){ 'S','y','s', \
2045 'T','r','e','e','V','i','e','w','3','2',0 }
2046 #elif defined(_MSC_VER)
2047 # define WC_TREEVIEWW L"SysTreeView32"
2048 #else
2049 static const WCHAR WC_TREEVIEWW[] = { 'S','y','s',
2050 'T','r','e','e','V','i','e','w','3','2',0 };
2051 #endif
2052 #define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
2054 #define TVSIL_NORMAL 0
2055 #define TVSIL_STATE 2
2057 #define TV_FIRST 0x1100
2058 #define TVM_INSERTITEMA (TV_FIRST+0)
2059 #define TVM_INSERTITEMW (TV_FIRST+50)
2060 #define TVM_INSERTITEM WINELIB_NAME_AW(TVM_INSERTITEM)
2061 #define TVM_DELETEITEM (TV_FIRST+1)
2062 #define TVM_EXPAND (TV_FIRST+2)
2063 #define TVM_GETITEMRECT (TV_FIRST+4)
2064 #define TVM_GETCOUNT (TV_FIRST+5)
2065 #define TVM_GETINDENT (TV_FIRST+6)
2066 #define TVM_SETINDENT (TV_FIRST+7)
2067 #define TVM_GETIMAGELIST (TV_FIRST+8)
2068 #define TVM_SETIMAGELIST (TV_FIRST+9)
2069 #define TVM_GETNEXTITEM (TV_FIRST+10)
2070 #define TVM_SELECTITEM (TV_FIRST+11)
2071 #define TVM_GETITEMA (TV_FIRST+12)
2072 #define TVM_GETITEMW (TV_FIRST+62)
2073 #define TVM_GETITEM WINELIB_NAME_AW(TVM_GETITEM)
2074 #define TVM_SETITEMA (TV_FIRST+13)
2075 #define TVM_SETITEMW (TV_FIRST+63)
2076 #define TVM_SETITEM WINELIB_NAME_AW(TVM_SETITEM)
2077 #define TVM_EDITLABELA (TV_FIRST+14)
2078 #define TVM_EDITLABELW (TV_FIRST+65)
2079 #define TVM_EDITLABEL WINELIB_NAME_AW(TVM_EDITLABEL)
2080 #define TVM_GETEDITCONTROL (TV_FIRST+15)
2081 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
2082 #define TVM_HITTEST (TV_FIRST+17)
2083 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
2084 #define TVM_SORTCHILDREN (TV_FIRST+19)
2085 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
2086 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
2087 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
2088 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
2089 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
2090 #define TVM_GETISEARCHSTRING WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
2091 #define TVM_SETTOOLTIPS (TV_FIRST+24)
2092 #define TVM_GETTOOLTIPS (TV_FIRST+25)
2093 #define TVM_SETINSERTMARK (TV_FIRST+26)
2094 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
2095 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
2096 #define TVM_SETBKCOLOR (TV_FIRST+29)
2097 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
2098 #define TVM_GETBKCOLOR (TV_FIRST+31)
2099 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
2100 #define TVM_SETSCROLLTIME (TV_FIRST+33)
2101 #define TVM_GETSCROLLTIME (TV_FIRST+34)
2102 #define TVM_UNKNOWN35 (TV_FIRST+35)
2103 #define TVM_UNKNOWN36 (TV_FIRST+36)
2104 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
2105 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
2106 #define TVM_GETITEMSTATE (TV_FIRST+39)
2107 #define TVM_SETLINECOLOR (TV_FIRST+40)
2108 #define TVM_GETLINECOLOR (TV_FIRST+41)
2109 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2110 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2114 #define TVN_FIRST (0U-400U)
2115 #define TVN_LAST (0U-499U)
2117 #define TVN_SELCHANGINGA (TVN_FIRST-1)
2118 #define TVN_SELCHANGINGW (TVN_FIRST-50)
2119 #define TVN_SELCHANGING WINELIB_NAME_AW(TVN_SELCHANGING)
2121 #define TVN_SELCHANGEDA (TVN_FIRST-2)
2122 #define TVN_SELCHANGEDW (TVN_FIRST-51)
2123 #define TVN_SELCHANGED WINELIB_NAME_AW(TVN_SELCHANGED)
2125 #define TVN_GETDISPINFOA (TVN_FIRST-3)
2126 #define TVN_GETDISPINFOW (TVN_FIRST-52)
2127 #define TVN_GETDISPINFO WINELIB_NAME_AW(TVN_GETDISPINFO)
2129 #define TVN_SETDISPINFOA (TVN_FIRST-4)
2130 #define TVN_SETDISPINFOW (TVN_FIRST-53)
2131 #define TVN_SETDISPINFO WINELIB_NAME_AW(TVN_SETDISPINFO)
2133 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
2134 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
2135 #define TVN_ITEMEXPANDING WINELIB_NAME_AW(TVN_ITEMEXPANDING)
2137 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
2138 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
2139 #define TVN_ITEMEXPANDED WINELIB_NAME_AW(TVN_ITEMEXPANDED)
2141 #define TVN_BEGINDRAGA (TVN_FIRST-7)
2142 #define TVN_BEGINDRAGW (TVN_FIRST-56)
2143 #define TVN_BEGINDRAG WINELIB_NAME_AW(TVN_BEGINDRAG)
2145 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
2146 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
2147 #define TVN_BEGINRDRAG WINELIB_NAME_AW(TVN_BEGINRDRAG)
2149 #define TVN_DELETEITEMA (TVN_FIRST-9)
2150 #define TVN_DELETEITEMW (TVN_FIRST-58)
2151 #define TVN_DELETEITEM WINELIB_NAME_AW(TVN_DELETEITEM)
2153 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
2154 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
2155 #define TVN_BEGINLABELEDIT WINELIB_NAME_AW(TVN_BEGINLABELEDIT)
2157 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
2158 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
2159 #define TVN_ENDLABELEDIT WINELIB_NAME_AW(TVN_ENDLABELEDIT)
2161 #define TVN_KEYDOWN (TVN_FIRST-12)
2163 #define TVN_GETINFOTIPA (TVN_FIRST-13)
2164 #define TVN_GETINFOTIPW (TVN_FIRST-14)
2165 #define TVN_GETINFOTIP WINELIB_NAME_AW(TVN_GETINFOTIP)
2167 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
2173 #define TVIF_TEXT 0x0001
2174 #define TVIF_IMAGE 0x0002
2175 #define TVIF_PARAM 0x0004
2176 #define TVIF_STATE 0x0008
2177 #define TVIF_HANDLE 0x0010
2178 #define TVIF_SELECTEDIMAGE 0x0020
2179 #define TVIF_CHILDREN 0x0040
2180 #define TVIF_INTEGRAL 0x0080
2181 #define TVIF_DI_SETITEM 0x1000
2183 #define TVI_ROOT ((HTREEITEM)0xffff0000) /* -65536 */
2184 #define TVI_FIRST ((HTREEITEM)0xffff0001) /* -65535 */
2185 #define TVI_LAST ((HTREEITEM)0xffff0002) /* -65534 */
2186 #define TVI_SORT ((HTREEITEM)0xffff0003) /* -65533 */
2188 #define TVIS_FOCUSED 0x0001
2189 #define TVIS_SELECTED 0x0002
2190 #define TVIS_CUT 0x0004
2191 #define TVIS_DROPHILITED 0x0008
2192 #define TVIS_BOLD 0x0010
2193 #define TVIS_EXPANDED 0x0020
2194 #define TVIS_EXPANDEDONCE 0x0040
2195 #define TVIS_EXPANDPARTIAL 0x0080
2196 #define TVIS_OVERLAYMASK 0x0f00
2197 #define TVIS_STATEIMAGEMASK 0xf000
2198 #define TVIS_USERMASK 0xf000
2200 #define TVHT_NOWHERE 0x0001
2201 #define TVHT_ONITEMICON 0x0002
2202 #define TVHT_ONITEMLABEL 0x0004
2203 #define TVHT_ONITEMINDENT 0x0008
2204 #define TVHT_ONITEMBUTTON 0x0010
2205 #define TVHT_ONITEMRIGHT 0x0020
2206 #define TVHT_ONITEMSTATEICON 0x0040
2207 #define TVHT_ONITEM 0x0046
2208 #define TVHT_ABOVE 0x0100
2209 #define TVHT_BELOW 0x0200
2210 #define TVHT_TORIGHT 0x0400
2211 #define TVHT_TOLEFT 0x0800
2213 #define TVS_HASBUTTONS 0x0001
2214 #define TVS_HASLINES 0x0002
2215 #define TVS_LINESATROOT 0x0004
2216 #define TVS_EDITLABELS 0x0008
2217 #define TVS_DISABLEDRAGDROP 0x0010
2218 #define TVS_SHOWSELALWAYS 0x0020
2219 #define TVS_RTLREADING 0x0040
2220 #define TVS_NOTOOLTIPS 0x0080
2221 #define TVS_CHECKBOXES 0x0100
2222 #define TVS_TRACKSELECT 0x0200
2223 #define TVS_SINGLEEXPAND 0x0400
2224 #define TVS_INFOTIP 0x0800
2225 #define TVS_FULLROWSELECT 0x1000
2226 #define TVS_NOSCROLL 0x2000
2227 #define TVS_NONEVENHEIGHT 0x4000
2228 #define TVS_NOHSCROLL 0x8000
2230 #define TVS_SHAREDIMAGELISTS 0x0000
2231 #define TVS_PRIVATEIMAGELISTS 0x0400
2234 #define TVE_COLLAPSE 0x0001
2235 #define TVE_EXPAND 0x0002
2236 #define TVE_TOGGLE 0x0003
2237 #define TVE_EXPANDPARTIAL 0x4000
2238 #define TVE_COLLAPSERESET 0x8000
2240 #define TVGN_ROOT 0
2241 #define TVGN_NEXT 1
2242 #define TVGN_PREVIOUS 2
2243 #define TVGN_PARENT 3
2244 #define TVGN_CHILD 4
2245 #define TVGN_FIRSTVISIBLE 5
2246 #define TVGN_NEXTVISIBLE 6
2247 #define TVGN_PREVIOUSVISIBLE 7
2248 #define TVGN_DROPHILITE 8
2249 #define TVGN_CARET 9
2250 #define TVGN_LASTVISIBLE 10
2252 #define TVC_UNKNOWN 0x00
2253 #define TVC_BYMOUSE 0x01
2254 #define TVC_BYKEYBOARD 0x02
2257 typedef struct _TREEITEM *HTREEITEM;
2259 typedef struct {
2260 UINT mask;
2261 HTREEITEM hItem;
2262 UINT state;
2263 UINT stateMask;
2264 LPSTR pszText;
2265 INT cchTextMax;
2266 INT iImage;
2267 INT iSelectedImage;
2268 INT cChildren;
2269 LPARAM lParam;
2270 } TVITEMA, *LPTVITEMA;
2272 typedef struct {
2273 UINT mask;
2274 HTREEITEM hItem;
2275 UINT state;
2276 UINT stateMask;
2277 LPWSTR pszText;
2278 INT cchTextMax;
2279 INT iImage;
2280 INT iSelectedImage;
2281 INT cChildren;
2282 LPARAM lParam;
2283 } TVITEMW, *LPTVITEMW;
2285 #define TV_ITEMA TVITEMA
2286 #define TV_ITEMW TVITEMW
2287 #define LPTV_ITEMA LPTVITEMA
2288 #define LPTV_ITEMW LPTVITEMW
2290 #define TVITEM WINELIB_NAME_AW(TVITEM)
2291 #define LPTVITEM WINELIB_NAME_AW(LPTVITEM)
2292 #define TV_ITEM WINELIB_NAME_AW(TV_ITEM)
2293 #define LPTV_ITEM WINELIB_NAME_AW(LPTV_ITEM)
2295 typedef struct {
2296 UINT mask;
2297 HTREEITEM hItem;
2298 UINT state;
2299 UINT stateMask;
2300 LPSTR pszText;
2301 INT cchTextMax;
2302 INT iImage;
2303 INT iSelectedImage;
2304 INT cChildren;
2305 LPARAM lParam;
2306 INT iIntegral;
2307 } TVITEMEXA, *LPTVITEMEXA;
2309 typedef struct {
2310 UINT mask;
2311 HTREEITEM hItem;
2312 UINT state;
2313 UINT stateMask;
2314 LPWSTR pszText;
2315 INT cchTextMax;
2316 INT iImage;
2317 INT iSelectedImage;
2318 INT cChildren;
2319 LPARAM lParam;
2320 INT iIntegral;
2321 } TVITEMEXW, *LPTVITEMEXW;
2323 #define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
2324 #define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
2326 typedef struct tagTVINSERTSTRUCTA {
2327 HTREEITEM hParent;
2328 HTREEITEM hInsertAfter;
2329 union {
2330 TVITEMEXA itemex;
2331 TVITEMA item;
2332 } DUMMYUNIONNAME;
2333 } TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
2335 typedef struct tagTVINSERTSTRUCTW {
2336 HTREEITEM hParent;
2337 HTREEITEM hInsertAfter;
2338 union {
2339 TVITEMEXW itemex;
2340 TVITEMW item;
2341 } DUMMYUNIONNAME;
2342 } TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
2344 #define TVINSERTSTRUCT WINELIB_NAME_AW(TVINSERTSTRUCT)
2345 #define LPTVINSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
2347 #define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
2348 #define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
2349 #define TVINSERTSTRUCT_V1_SIZE WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)
2351 #define TV_INSERTSTRUCT TVINSERTSTRUCT
2352 #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
2353 #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
2354 #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
2355 #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
2356 #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
2360 typedef struct tagNMTREEVIEWA {
2361 NMHDR hdr;
2362 UINT action;
2363 TVITEMA itemOld;
2364 TVITEMA itemNew;
2365 POINT ptDrag;
2366 } NMTREEVIEWA, *LPNMTREEVIEWA;
2368 typedef struct tagNMTREEVIEWW {
2369 NMHDR hdr;
2370 UINT action;
2371 TVITEMW itemOld;
2372 TVITEMW itemNew;
2373 POINT ptDrag;
2374 } NMTREEVIEWW, *LPNMTREEVIEWW;
2376 #define NMTREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2377 #define NM_TREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2378 #define NM_TREEVIEWA NMTREEVIEWA
2379 #define NM_TREEVIEWW NMTREEVIEWW
2380 #define LPNMTREEVIEW WINELIB_NAME_AW(LPNMTREEVIEW)
2382 #define LPNM_TREEVIEW LPNMTREEVIEW
2383 #define LPNM_TREEVIEWA LPNMTREEVIEWA
2384 #define LPNM_TREEVIEWW LPNMTREEVIEWW
2386 typedef struct tagTVDISPINFOA {
2387 NMHDR hdr;
2388 TVITEMA item;
2389 } NMTVDISPINFOA, *LPNMTVDISPINFOA;
2391 typedef struct tagTVDISPINFOW {
2392 NMHDR hdr;
2393 TVITEMW item;
2394 } NMTVDISPINFOW, *LPNMTVDISPINFOW;
2396 #define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
2397 #define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
2398 #define TV_DISPINFO NMTVDISPINFO
2400 typedef INT (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
2402 typedef struct tagTVSORTCB
2404 HTREEITEM hParent;
2405 PFNTVCOMPARE lpfnCompare;
2406 LPARAM lParam;
2407 } TVSORTCB, *LPTVSORTCB;
2409 #define TV_SORTCB TVSORTCB
2410 #define LPTV_SORTCB LPTVSORTCB
2412 typedef struct tagTVHITTESTINFO {
2413 POINT pt;
2414 UINT flags;
2415 HTREEITEM hItem;
2416 } TVHITTESTINFO, *LPTVHITTESTINFO;
2418 #define TV_HITTESTINFO TVHITTESTINFO
2421 /* Custom Draw Treeview */
2423 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
2425 #define TVCDRF_NOIMAGES 0x00010000
2427 typedef struct tagNMTVCUSTOMDRAW
2429 NMCUSTOMDRAW nmcd;
2430 COLORREF clrText;
2431 COLORREF clrTextBk;
2432 INT iLevel; /* IE>0x0400 */
2433 } NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
2435 /* Treeview tooltips */
2437 typedef struct tagNMTVGETINFOTIPA
2439 NMHDR hdr;
2440 LPSTR pszText;
2441 INT cchTextMax;
2442 HTREEITEM hItem;
2443 LPARAM lParam;
2444 } NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
2446 typedef struct tagNMTVGETINFOTIPW
2448 NMHDR hdr;
2449 LPWSTR pszText;
2450 INT cchTextMax;
2451 HTREEITEM hItem;
2452 LPARAM lParam;
2453 } NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
2455 #define NMTVGETINFOTIP WINELIB_NAME_AW(NMTVGETINFOTIP)
2456 #define LPNMTVGETINFOTIP WINELIB_NAME_AW(LPNMTVGETINFOTIP)
2458 #include <pshpack1.h>
2459 typedef struct tagTVKEYDOWN
2461 NMHDR hdr;
2462 WORD wVKey;
2463 UINT flags;
2464 } NMTVKEYDOWN, *LPNMTVKEYDOWN;
2465 #include <poppack.h>
2467 #define TV_KEYDOWN NMTVKEYDOWN
2469 #define TreeView_InsertItemA(hwnd, phdi) \
2470 (HTREEITEM)SNDMSGA((hwnd), TVM_INSERTITEMA, 0, \
2471 (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
2472 #define TreeView_InsertItemW(hwnd,phdi) \
2473 (HTREEITEM)SNDMSGW((hwnd), TVM_INSERTITEMW, 0, \
2474 (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
2475 #define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem)
2477 #define TreeView_DeleteItem(hwnd, hItem) \
2478 (BOOL)SNDMSGA((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
2479 #define TreeView_DeleteAllItems(hwnd) \
2480 (BOOL)SNDMSGA((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
2481 #define TreeView_Expand(hwnd, hitem, code) \
2482 (BOOL)SNDMSGA((hwnd), TVM_EXPAND, (WPARAM)code, \
2483 (LPARAM)(HTREEITEM)(hitem))
2485 #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
2486 (*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSGA((hwnd), \
2487 TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
2489 #define TreeView_GetCount(hwnd) \
2490 (UINT)SNDMSGA((hwnd), TVM_GETCOUNT, 0, 0)
2491 #define TreeView_GetIndent(hwnd) \
2492 (UINT)SNDMSGA((hwnd), TVM_GETINDENT, 0, 0)
2493 #define TreeView_SetIndent(hwnd, indent) \
2494 (BOOL)SNDMSGA((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
2496 #define TreeView_GetImageList(hwnd, iImage) \
2497 (HIMAGELIST)SNDMSGA((hwnd), TVM_GETIMAGELIST, iImage, 0)
2499 #define TreeView_SetImageList(hwnd, himl, iImage) \
2500 (HIMAGELIST)SNDMSGA((hwnd), TVM_SETIMAGELIST, iImage, \
2501 (LPARAM)(UINT)(HIMAGELIST)(himl))
2503 #define TreeView_GetNextItem(hwnd, hitem, code) \
2504 (HTREEITEM)SNDMSGA((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
2505 (LPARAM)(HTREEITEM) (hitem))
2507 #define TreeView_GetChild(hwnd, hitem) \
2508 TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
2509 #define TreeView_GetNextSibling(hwnd, hitem) \
2510 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
2511 #define TreeView_GetPrevSibling(hwnd, hitem) \
2512 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
2513 #define TreeView_GetParent(hwnd, hitem) \
2514 TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
2515 #define TreeView_GetFirstVisible(hwnd) \
2516 TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
2517 #define TreeView_GetLastVisible(hwnd) \
2518 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2519 #define TreeView_GetNextVisible(hwnd, hitem) \
2520 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
2521 #define TreeView_GetPrevVisible(hwnd, hitem) \
2522 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
2523 #define TreeView_GetSelection(hwnd) \
2524 TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
2525 #define TreeView_GetDropHilight(hwnd) \
2526 TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
2527 #define TreeView_GetRoot(hwnd) \
2528 TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
2529 #define TreeView_GetLastVisible(hwnd) \
2530 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2533 #define TreeView_Select(hwnd, hitem, code) \
2534 (UINT)SNDMSGA((hwnd), TVM_SELECTITEM, (WPARAM)code, \
2535 (LPARAM)(UINT)(hitem))
2538 #define TreeView_SelectItem(hwnd, hitem) \
2539 TreeView_Select(hwnd, hitem, TVGN_CARET)
2540 #define TreeView_SelectDropTarget(hwnd, hitem) \
2541 TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
2542 #define TreeView_SelectSetFirstVisible(hwnd, hitem) \
2543 TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
2546 #define TreeView_GetItemA(hwnd, pitem) \
2547 (BOOL)SNDMSGA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2548 #define TreeView_GetItemW(hwnd, pitem) \
2549 (BOOL)SNDMSGW((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2550 #define TreeView_GetItem WINELIB_NAME_AW(TreeView_GetItem)
2552 #define TreeView_SetItemA(hwnd, pitem) \
2553 (BOOL)SNDMSGA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2554 #define TreeView_SetItemW(hwnd, pitem) \
2555 (BOOL)SNDMSGW((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2556 #define TreeView_SetItem WINELIB_NAME_AW(TreeView_SetItem)
2558 #define TreeView_EditLabel(hwnd, hitem) \
2559 (HWND)SNDMSGA((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
2561 #define TreeView_GetEditControl(hwnd) \
2562 (HWND)SNDMSGA((hwnd), TVM_GETEDITCONTROL, 0, 0)
2564 #define TreeView_GetVisibleCount(hwnd) \
2565 (UINT)SNDMSGA((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
2567 #define TreeView_HitTest(hwnd, lpht) \
2568 (HTREEITEM)SNDMSGA((hwnd), TVM_HITTEST, 0,\
2569 (LPARAM)(LPTVHITTESTINFO)(lpht))
2571 #define TreeView_CreateDragImage(hwnd, hitem) \
2572 (HIMAGELIST)SNDMSGA((hwnd), TVM_CREATEDRAGIMAGE, 0,\
2573 (LPARAM)(HTREEITEM)(hitem))
2575 #define TreeView_SortChildren(hwnd, hitem, recurse) \
2576 (BOOL)SNDMSGA((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
2577 (LPARAM)(HTREEITEM)(hitem))
2579 #define TreeView_EnsureVisible(hwnd, hitem) \
2580 (BOOL)SNDMSGA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
2582 #define TreeView_SortChildrenCB(hwnd, psort, recurse) \
2583 (BOOL)SNDMSGA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
2584 (LPARAM)(LPTV_SORTCB)(psort))
2586 #define TreeView_EndEditLabelNow(hwnd, fCancel) \
2587 (BOOL)SNDMSGA((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
2589 #define TreeView_GetISearchString(hwnd, lpsz) \
2590 (BOOL)SNDMSGA((hwnd), TVM_GETISEARCHSTRING, 0, \
2591 (LPARAM)(LPTSTR)lpsz)
2593 #define TreeView_SetToolTips(hwnd, hwndTT) \
2594 (HWND)SNDMSGA((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
2596 #define TreeView_GetToolTips(hwnd) \
2597 (HWND)SNDMSGA((hwnd), TVM_GETTOOLTIPS, 0, 0)
2599 #define TreeView_SetItemHeight(hwnd, iHeight) \
2600 (INT)SNDMSGA((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
2602 #define TreeView_GetItemHeight(hwnd) \
2603 (INT)SNDMSGA((hwnd), TVM_GETITEMHEIGHT, 0, 0)
2605 #define TreeView_SetBkColor(hwnd, clr) \
2606 (COLORREF)SNDMSGA((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
2608 #define TreeView_SetTextColor(hwnd, clr) \
2609 (COLORREF)SNDMSGA((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
2611 #define TreeView_GetBkColor(hwnd) \
2612 (COLORREF)SNDMSGA((hwnd), TVM_GETBKCOLOR, 0, 0)
2614 #define TreeView_GetTextColor(hwnd) \
2615 (COLORREF)SNDMSGA((hwnd), TVM_GETTEXTCOLOR, 0, 0)
2617 #define TreeView_SetScrollTime(hwnd, uTime) \
2618 (UINT)SNDMSGA((hwnd), TVM_SETSCROLLTIME, uTime, 0)
2620 #define TreeView_GetScrollTime(hwnd) \
2621 (UINT)SNDMSGA((hwnd), TVM_GETSCROLLTIME, 0, 0)
2623 #define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
2624 (BOOL)SNDMSGA((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
2625 (LPARAM) (hItem))
2627 #define TreeView_SetInsertMarkColor(hwnd, clr) \
2628 (COLORREF)SNDMSGA((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
2630 #define TreeView_GetInsertMarkColor(hwnd) \
2631 (COLORREF)SNDMSGA((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
2633 #define TreeView_GetItemState(hwndTV, hti, mask) \
2634 (UINT)SNDMSGA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
2635 #define TreeView_GetCheckState(hwndTV, hti) \
2636 ((((UINT)(SNDMSGA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
2637 TVIS_STATEIMAGEMASK))) >> 12) -1)
2639 #define TreeView_SetLineColor(hwnd, clr) \
2640 (COLORREF)SNDMSGA((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
2642 #define TreeView_GetLineColor(hwnd) \
2643 (COLORREF)SNDMSGA((hwnd), TVM_GETLINECOLOR, 0, 0)
2645 #define TreeView_SetItemState(hwndTV, hti, data, _mask) \
2646 { TVITEM _TVi; \
2647 _TVi.mask = TVIF_STATE; \
2648 _TVi.hItem = hti; \
2649 _TVi.stateMask = _mask; \
2650 _TVi.state = data; \
2651 SNDMSGA((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_TVi); \
2655 /* Listview control */
2657 #define WC_LISTVIEWA "SysListView32"
2658 #if defined(__GNUC__)
2659 # define WC_LISTVIEWW (const WCHAR []){ 'S','y','s', \
2660 'L','i','s','t','V','i','e','w','3','2',0 }
2661 #elif defined(_MSC_VER)
2662 # define WC_LISTVIEWW L"SysListView32"
2663 #else
2664 static const WCHAR WC_LISTVIEWW[] = { 'S','y','s',
2665 'L','i','s','t','V','i','e','w','3','2',0 };
2666 #endif
2667 #define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
2669 #define LVSCW_AUTOSIZE -1
2670 #define LVSCW_AUTOSIZE_USEHEADER -2
2672 #define LVS_ICON 0x0000
2673 #define LVS_REPORT 0x0001
2674 #define LVS_SMALLICON 0x0002
2675 #define LVS_LIST 0x0003
2676 #define LVS_TYPEMASK 0x0003
2677 #define LVS_SINGLESEL 0x0004
2678 #define LVS_SHOWSELALWAYS 0x0008
2679 #define LVS_SORTASCENDING 0x0010
2680 #define LVS_SORTDESCENDING 0x0020
2681 #define LVS_SHAREIMAGELISTS 0x0040
2682 #define LVS_NOLABELWRAP 0x0080
2683 #define LVS_AUTOARRANGE 0x0100
2684 #define LVS_EDITLABELS 0x0200
2685 #define LVS_OWNERDATA 0x1000
2686 #define LVS_NOSCROLL 0x2000
2687 #define LVS_TYPESTYLEMASK 0xfc00
2688 #define LVS_ALIGNTOP 0x0000
2689 #define LVS_ALIGNLEFT 0x0800
2690 #define LVS_ALIGNMASK 0x0c00
2691 #define LVS_OWNERDRAWFIXED 0x0400
2692 #define LVS_NOCOLUMNHEADER 0x4000
2693 #define LVS_NOSORTHEADER 0x8000
2695 #define LVS_EX_GRIDLINES 0x0001
2696 #define LVS_EX_SUBITEMIMAGES 0x0002
2697 #define LVS_EX_CHECKBOXES 0x0004
2698 #define LVS_EX_TRACKSELECT 0x0008
2699 #define LVS_EX_HEADERDRAGDROP 0x0010
2700 #define LVS_EX_FULLROWSELECT 0x0020
2701 #define LVS_EX_ONECLICKACTIVATE 0x0040
2702 #define LVS_EX_TWOCLICKACTIVATE 0x0080
2703 #define LVS_EX_FLATSB 0x0100
2704 #define LVS_EX_REGIONAL 0x0200
2705 #define LVS_EX_INFOTIP 0x0400
2706 #define LVS_EX_UNDERLINEHOT 0x0800
2707 #define LVS_EX_UNDERLINECOLD 0x1000
2708 #define LVS_EX_MULTIWORKAREAS 0x2000
2710 #define LVCF_FMT 0x0001
2711 #define LVCF_WIDTH 0x0002
2712 #define LVCF_TEXT 0x0004
2713 #define LVCF_SUBITEM 0x0008
2714 #define LVCF_IMAGE 0x0010
2715 #define LVCF_ORDER 0x0020
2717 #define LVCFMT_LEFT 0x0000
2718 #define LVCFMT_RIGHT 0x0001
2719 #define LVCFMT_CENTER 0x0002
2720 #define LVCFMT_JUSTIFYMASK 0x0003
2721 #define LVCFMT_IMAGE 0x0800
2722 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2723 #define LVCFMT_COL_HAS_IMAGES 0x8000
2725 #define LVSIL_NORMAL 0
2726 #define LVSIL_SMALL 1
2727 #define LVSIL_STATE 2
2729 /* following 2 flags only for LVS_OWNERDATA listviews */
2730 /* and only in report or list mode */
2731 #define LVSICF_NOINVALIDATEALL 0x0001
2732 #define LVSICF_NOSCROLL 0x0002
2735 #define LVFI_PARAM 0X0001
2736 #define LVFI_STRING 0X0002
2737 #define LVFI_PARTIAL 0X0008
2738 #define LVFI_WRAP 0X0020
2739 #define LVFI_NEARESTXY 0X0040
2741 #define LVIF_TEXT 0x0001
2742 #define LVIF_IMAGE 0x0002
2743 #define LVIF_PARAM 0x0004
2744 #define LVIF_STATE 0x0008
2745 #define LVIF_INDENT 0x0010
2746 #define LVIF_GROUPID 0x0100
2747 #define LVIF_COLUMNS 0x0200
2748 #define LVIF_NORECOMPUTE 0x0800
2749 #define LVIF_DI_SETITEM 0x1000
2751 #define LVIR_BOUNDS 0x0000
2752 #define LVIR_LABEL 0x0002
2753 #define LVIR_ICON 0x0001
2754 #define LVIR_SELECTBOUNDS 0x0003
2756 #define LVIS_FOCUSED 0x0001
2757 #define LVIS_SELECTED 0x0002
2758 #define LVIS_CUT 0x0004
2759 #define LVIS_DROPHILITED 0x0008
2760 #define LVIS_ACTIVATING 0x0020
2762 #define LVIS_OVERLAYMASK 0x0F00
2763 #define LVIS_STATEIMAGEMASK 0xF000
2765 #define LVNI_ALL 0x0000
2766 #define LVNI_FOCUSED 0x0001
2767 #define LVNI_SELECTED 0x0002
2768 #define LVNI_CUT 0x0004
2769 #define LVNI_DROPHILITED 0x0008
2771 #define LVNI_ABOVE 0x0100
2772 #define LVNI_BELOW 0x0200
2773 #define LVNI_TOLEFT 0x0400
2774 #define LVNI_TORIGHT 0x0800
2776 #define LVHT_NOWHERE 0x0001
2777 #define LVHT_ONITEMICON 0x0002
2778 #define LVHT_ONITEMLABEL 0x0004
2779 #define LVHT_ONITEMSTATEICON 0x0008
2780 #define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
2782 #define LVHT_ABOVE 0x0008
2783 #define LVHT_BELOW 0x0010
2784 #define LVHT_TORIGHT 0x0020
2785 #define LVHT_TOLEFT 0x0040
2787 #define LVM_FIRST 0x1000
2788 #define LVM_GETBKCOLOR (LVM_FIRST+0)
2789 #define LVM_SETBKCOLOR (LVM_FIRST+1)
2790 #define LVM_GETIMAGELIST (LVM_FIRST+2)
2791 #define LVM_SETIMAGELIST (LVM_FIRST+3)
2792 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
2793 #define LVM_GETITEMA (LVM_FIRST+5)
2794 #define LVM_GETITEMW (LVM_FIRST+75)
2795 #define LVM_GETITEM WINELIB_NAME_AW(LVM_GETITEM)
2796 #define LVM_SETITEMA (LVM_FIRST+6)
2797 #define LVM_SETITEMW (LVM_FIRST+76)
2798 #define LVM_SETITEM WINELIB_NAME_AW(LVM_SETITEM)
2799 #define LVM_INSERTITEMA (LVM_FIRST+7)
2800 #define LVM_INSERTITEMW (LVM_FIRST+77)
2801 #define LVM_INSERTITEM WINELIB_NAME_AW(LVM_INSERTITEM)
2802 #define LVM_DELETEITEM (LVM_FIRST+8)
2803 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
2804 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
2805 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
2806 #define LVM_GETNEXTITEM (LVM_FIRST+12)
2807 #define LVM_FINDITEMA (LVM_FIRST+13)
2808 #define LVM_FINDITEMW (LVM_FIRST+83)
2809 #define LVM_FINDITEM WINELIB_NAME_AW(LVM_FINDITEM)
2810 #define LVM_GETITEMRECT (LVM_FIRST+14)
2811 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
2812 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
2813 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
2814 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
2815 #define LVM_GETSTRINGWIDTH WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
2816 #define LVM_HITTEST (LVM_FIRST+18)
2817 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
2818 #define LVM_SCROLL (LVM_FIRST+20)
2819 #define LVM_REDRAWITEMS (LVM_FIRST+21)
2820 #define LVM_ARRANGE (LVM_FIRST+22)
2821 #define LVM_EDITLABELA (LVM_FIRST+23)
2822 #define LVM_EDITLABELW (LVM_FIRST+118)
2823 #define LVM_EDITLABEL WINELIB_NAME_AW(LVM_EDITLABEL)
2824 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
2825 #define LVM_GETCOLUMNA (LVM_FIRST+25)
2826 #define LVM_GETCOLUMNW (LVM_FIRST+95)
2827 #define LVM_GETCOLUMN WINELIB_NAME_AW(LVM_GETCOLUMN)
2828 #define LVM_SETCOLUMNA (LVM_FIRST+26)
2829 #define LVM_SETCOLUMNW (LVM_FIRST+96)
2830 #define LVM_SETCOLUMN WINELIB_NAME_AW(LVM_SETCOLUMN)
2831 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
2832 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
2833 #define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
2834 #define LVM_DELETECOLUMN (LVM_FIRST+28)
2835 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
2836 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
2837 #define LVM_GETHEADER (LVM_FIRST+31)
2839 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
2840 #define LVM_GETVIEWRECT (LVM_FIRST+34)
2841 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
2842 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
2843 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
2844 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
2845 #define LVM_GETTOPINDEX (LVM_FIRST+39)
2846 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
2847 #define LVM_GETORIGIN (LVM_FIRST+41)
2848 #define LVM_UPDATE (LVM_FIRST+42)
2849 #define LVM_SETITEMSTATE (LVM_FIRST+43)
2850 #define LVM_GETITEMSTATE (LVM_FIRST+44)
2851 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
2852 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
2853 #define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
2854 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
2855 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
2856 #define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
2857 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
2858 #define LVM_SORTITEMS (LVM_FIRST+48)
2859 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
2860 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
2861 #define LVM_GETITEMSPACING (LVM_FIRST+51)
2862 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
2863 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
2864 #define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
2865 #define LVM_SETICONSPACING (LVM_FIRST+53)
2866 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
2867 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
2868 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
2869 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
2870 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
2871 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
2872 #define LVM_SETHOTITEM (LVM_FIRST+60)
2873 #define LVM_GETHOTITEM (LVM_FIRST+61)
2874 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
2875 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
2876 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
2877 #define LVM_SETWORKAREAS (LVM_FIRST+65)
2878 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
2879 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
2880 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
2881 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
2882 #define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
2883 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
2884 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
2885 #define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
2886 #define LVM_GETWORKAREAS (LVM_FIRST+70)
2887 #define LVM_SETHOVERTIME (LVM_FIRST+71)
2888 #define LVM_GETHOVERTIME (LVM_FIRST+72)
2889 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
2890 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
2891 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
2892 #define LVM_GETUNICODEFORMAT (CCM_GETUNICODEFORMAT)
2893 #define LVM_SETUNICODEFORMAT (CCM_SETUNICODEFORMAT)
2895 #define LVN_FIRST (0U-100U)
2896 #define LVN_LAST (0U-199U)
2897 #define LVN_ITEMCHANGING (LVN_FIRST-0)
2898 #define LVN_ITEMCHANGED (LVN_FIRST-1)
2899 #define LVN_INSERTITEM (LVN_FIRST-2)
2900 #define LVN_DELETEITEM (LVN_FIRST-3)
2901 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
2902 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
2903 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
2904 #define LVN_BEGINLABELEDIT WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
2905 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
2906 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
2907 #define LVN_ENDLABELEDIT WINELIB_NAME_AW(LVN_ENDLABELEDIT)
2908 #define LVN_COLUMNCLICK (LVN_FIRST-8)
2909 #define LVN_BEGINDRAG (LVN_FIRST-9)
2910 #define LVN_BEGINRDRAG (LVN_FIRST-11)
2911 #define LVN_ODCACHEHINT (LVN_FIRST-13)
2912 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
2913 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
2914 #define LVN_HOTTRACK (LVN_FIRST-21)
2915 #define LVN_ODFINDITEMA (LVN_FIRST-52)
2916 #define LVN_ODFINDITEMW (LVN_FIRST-79)
2917 #define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
2918 #define LVN_GETDISPINFOA (LVN_FIRST-50)
2919 #define LVN_GETDISPINFOW (LVN_FIRST-77)
2920 #define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
2921 #define LVN_SETDISPINFOA (LVN_FIRST-51)
2922 #define LVN_SETDISPINFOW (LVN_FIRST-78)
2923 #define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
2924 #define LVN_KEYDOWN (LVN_FIRST-55)
2925 #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
2926 #define LVN_GETINFOTIPA (LVN_FIRST-57)
2927 #define LVN_GETINFOTIPW (LVN_FIRST-58)
2928 #define LVN_GETINFOTIP WINELIB_NAME_AW(LVN_GETINFOTIP)
2930 #define LVA_ALIGNLEFT 0x0000
2931 #define LVA_DEFAULT 0x0001
2932 #define LVA_ALIGNTOP 0x0002
2933 #define LVA_SNAPTOGRID 0x0005
2935 typedef struct tagLVITEMA
2937 UINT mask;
2938 INT iItem;
2939 INT iSubItem;
2940 UINT state;
2941 UINT stateMask;
2942 LPSTR pszText;
2943 INT cchTextMax;
2944 INT iImage;
2945 LPARAM lParam;
2946 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2947 int iGroupId; /* (_WIN32_IE >= 0x560) */
2948 UINT cColumns; /* (_WIN32_IE >= 0x560) */
2949 PUINT puColumns; /* (_WIN32_IE >= 0x560) */
2950 } LVITEMA, *LPLVITEMA;
2952 typedef struct tagLVITEMW
2954 UINT mask;
2955 INT iItem;
2956 INT iSubItem;
2957 UINT state;
2958 UINT stateMask;
2959 LPWSTR pszText;
2960 INT cchTextMax;
2961 INT iImage;
2962 LPARAM lParam;
2963 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2964 int iGroupId; /* (_WIN32_IE >= 0x560) */
2965 UINT cColumns; /* (_WIN32_IE >= 0x560) */
2966 PUINT puColumns; /* (_WIN32_IE >= 0x560) */
2967 } LVITEMW, *LPLVITEMW;
2969 #define LVITEM WINELIB_NAME_AW(LVITEM)
2970 #define LPLVITEM WINELIB_NAME_AW(LPLVITEM)
2972 #define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
2973 #define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
2974 #define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
2976 #define LV_ITEM LVITEM
2977 #define LV_ITEMA LVITEMA
2978 #define LV_ITEMW LVITEMW
2980 typedef struct LVSETINFOTIPA
2982 UINT cbSize;
2983 DWORD dwFlags;
2984 LPSTR pszText;
2985 int iItem;
2986 int iSubItem;
2987 } LVSETINFOTIPA, *PLVSETINFOTIPA;
2989 typedef struct LVSETINFOTIPW
2991 UINT cbSize;
2992 DWORD dwFlags;
2993 LPWSTR pszText;
2994 int iItem;
2995 int iSubItem;
2996 } LVSETINFOTIPW, *PLVSETINFOTIPW;
2998 #define LVSETINFOTIP WINELIB_NAME_AW(LVSETINFOTIP)
2999 #define PLVSETINFOTIP WINELIB_NAME_AW(PLVSETINFOTIP)
3001 /* ListView background image structs and constants
3002 For _WIN32_IE version 0x400 and later. */
3004 typedef struct tagLVBKIMAGEA
3006 ULONG ulFlags;
3007 HBITMAP hbm;
3008 LPSTR pszImage;
3009 UINT cchImageMax;
3010 int xOffsetPercent;
3011 int yOffsetPercent;
3012 } LVBKIMAGEA, *LPLVBKIMAGEA;
3014 typedef struct tagLVBKIMAGEW
3016 ULONG ulFlags;
3017 HBITMAP hbm;
3018 LPWSTR pszImage;
3019 UINT cchImageMax;
3020 int xOffsetPercent;
3021 int yOffsetPercent;
3022 } LVBKIMAGEW, *LPLVBKIMAGEW;
3024 #define LVBKIMAGE WINELIB_NAME_AW(LVBKIMAGE)
3025 #define LPLVBKIMAGE WINELIB_NAME_AW(LPLVBKIMAGE)
3027 #define LVBKIF_SOURCE_NONE 0x00000000
3028 #define LVBKIF_SOURCE_HBITMAP 0x00000001
3029 #define LVBKIF_SOURCE_URL 0x00000002
3030 #define LVBKIF_SOURCE_MASK 0x00000003
3031 #define LVBKIF_STYLE_NORMAL 0x00000000
3032 #define LVBKIF_STYLE_TILE 0x00000010
3033 #define LVBKIF_STYLE_MASK 0x00000010
3035 #define ListView_SetBkImage(hwnd, plvbki) \
3036 (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)plvbki)
3038 #define ListView_GetBkImage(hwnd, plvbki) \
3039 (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)plvbki)
3041 typedef struct tagLVCOLUMNA
3043 UINT mask;
3044 INT fmt;
3045 INT cx;
3046 LPSTR pszText;
3047 INT cchTextMax;
3048 INT iSubItem;
3049 INT iImage; /* (_WIN32_IE >= 0x0300) */
3050 INT iOrder; /* (_WIN32_IE >= 0x0300) */
3051 } LVCOLUMNA, *LPLVCOLUMNA;
3053 typedef struct tagLVCOLUMNW
3055 UINT mask;
3056 INT fmt;
3057 INT cx;
3058 LPWSTR pszText;
3059 INT cchTextMax;
3060 INT iSubItem;
3061 INT iImage; /* (_WIN32_IE >= 0x0300) */
3062 INT iOrder; /* (_WIN32_IE >= 0x0300) */
3063 } LVCOLUMNW, *LPLVCOLUMNW;
3065 #define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
3066 #define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)
3068 #define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
3069 #define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
3070 #define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)
3072 #define LV_COLUMN LVCOLUMN
3075 typedef struct tagNMLISTVIEW
3077 NMHDR hdr;
3078 INT iItem;
3079 INT iSubItem;
3080 UINT uNewState;
3081 UINT uOldState;
3082 UINT uChanged;
3083 POINT ptAction;
3084 LPARAM lParam;
3085 } NMLISTVIEW, *LPNMLISTVIEW;
3087 #define NM_LISTVIEW NMLISTVIEW
3088 #define LPNM_LISTVIEW LPNMLISTVIEW
3090 typedef struct tagNMITEMACTIVATE
3092 NMHDR hdr;
3093 int iItem;
3094 int iSubItem;
3095 UINT uNewState;
3096 UINT uOldState;
3097 UINT uChanged;
3098 POINT ptAction;
3099 LPARAM lParam;
3100 UINT uKeyFlags;
3101 } NMITEMACTIVATE, *LPNMITEMACTIVATE;
3103 #define LVKF_ALT 0x0001
3104 #define LVKF_CONTROL 0x0002
3105 #define LVKF_SHIFT 0x0004
3107 typedef struct tagLVDISPINFO
3109 NMHDR hdr;
3110 LVITEMA item;
3111 } NMLVDISPINFOA, *LPNMLVDISPINFOA;
3113 typedef struct tagLVDISPINFOW
3115 NMHDR hdr;
3116 LVITEMW item;
3117 } NMLVDISPINFOW, *LPNMLVDISPINFOW;
3119 #define NMLVDISPINFO WINELIB_NAME_AW(NMLVDISPINFO)
3120 #define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
3122 #define LV_DISPINFO NMLVDISPINFO
3123 #define LV_DISPINFOA NMLVDISPINFOA
3124 #define LV_DISPINFOW NMLVDISPINFOW
3126 #include <pshpack1.h>
3127 typedef struct tagLVKEYDOWN
3129 NMHDR hdr;
3130 WORD wVKey;
3131 UINT flags;
3132 } NMLVKEYDOWN, *LPNMLVKEYDOWN;
3133 #include <poppack.h>
3135 #define LV_KEYDOWN NMLVKEYDOWN
3137 typedef struct tagNMLVGETINFOTIPA
3139 NMHDR hdr;
3140 DWORD dwFlags;
3141 LPSTR pszText;
3142 int cchTextMax;
3143 int iItem;
3144 int iSubItem;
3145 LPARAM lParam;
3146 } NMLVGETINFOTIPA, *LPNMLVGETINFOTIPA;
3148 typedef struct tagNMLVGETINFOTIPW
3150 NMHDR hdr;
3151 DWORD dwFlags;
3152 LPWSTR pszText;
3153 int cchTextMax;
3154 int iItem;
3155 int iSubItem;
3156 LPARAM lParam;
3157 } NMLVGETINFOTIPW, *LPNMLVGETINFOTIPW;
3159 #define NMLVGETINFOTIP WINELIB_NAME_AW(NMLVGETINFOTIP)
3160 #define LPNMLVGETINFOTIP WINELIB_NAME_AW(LPNMLVGETINFOTIP)
3162 typedef struct tagLVHITTESTINFO
3164 POINT pt;
3165 UINT flags;
3166 INT iItem;
3167 INT iSubItem;
3168 } LVHITTESTINFO, *LPLVHITTESTINFO;
3170 #define LV_HITTESTINFO LVHITTESTINFO
3171 #define _LV_HITTESTINFO tagLVHITTESTINFO
3172 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
3174 typedef struct tagLVFINDINFOA
3176 UINT flags;
3177 LPCSTR psz;
3178 LPARAM lParam;
3179 POINT pt;
3180 UINT vkDirection;
3181 } LVFINDINFOA, *LPLVFINDINFOA;
3183 typedef struct tagLVFINDINFOW
3185 UINT flags;
3186 LPCWSTR psz;
3187 LPARAM lParam;
3188 POINT pt;
3189 UINT vkDirection;
3190 } LVFINDINFOW, *LPLVFINDINFOW;
3192 #define LVFINDINFO WINELIB_NAME_AW(LVFINDINFO)
3193 #define LPLVFINDINFO WINELIB_NAME_AW(LPLVFINDINFO)
3195 #define LV_FINDINFO LVFINDINFO
3196 #define LV_FINDINFOA LVFINDINFOA
3197 #define LV_FINDINFOW LVFINDINFOW
3199 /* Groups relates structures */
3201 typedef struct LVGROUPA
3203 UINT cbSize;
3204 UINT mask;
3205 LPSTR pszHeader;
3206 int cchHeader;
3207 int iGroupId;
3208 UINT stateMask;
3209 UINT state;
3210 UINT uAlign;
3211 } LVGROUPA, *PLVGROUPA;
3213 typedef struct LVGROUPW
3215 UINT cbSize;
3216 UINT mask;
3217 LPWSTR pszHeader;
3218 int cchHeader;
3219 int iGroupId;
3220 UINT stateMask;
3221 UINT state;
3222 UINT uAlign;
3223 } LVGROUPW, *PLVGROUPW;
3225 #define LVGROUP WINELIB_NAME_AW(LVGROUP)
3226 #define PLVGROUP WINELIB_NAME_AW(PLVGROUP)
3228 typedef struct LVGROUPMETRICS
3230 UINT cbSize;
3231 UINT mask;
3232 UINT Left;
3233 UINT Top;
3234 UINT Right;
3235 UINT Bottom;
3236 COLORREF crLeft;
3237 COLORREF crTop;
3238 COLORREF crRight;
3239 COLORREF crBottom;
3240 COLORREF crRightHeader;
3241 COLORREF crFooter;
3242 } LVGROUPMETRICS, *PLVGROUPMETRICS;
3244 typedef INT (*PFNLVGROUPCOMPARE)(INT, INT, VOID*);
3246 typedef struct LVINSERTGROUPSORTEDA
3248 PFNLVGROUPCOMPARE pfnGroupCompare;
3249 LPVOID *pvData;
3250 LVGROUPA lvGroup;
3251 } LVINSERTGROUPSORTEDA, *PLVINSERTGROUPSORTEDA;
3253 typedef struct LVINSERTGROUPSORTEDW
3255 PFNLVGROUPCOMPARE pfnGroupCompare;
3256 LPVOID *pvData;
3257 LVGROUPW lvGroup;
3258 } LVINSERTGROUPSORTEDW, *PLVINSERTGROUPSORTEDW;
3260 #define LVINSERTGROUPSORTED WINELIB_NAME_AW(LVINSERTGROUPSORTED)
3261 #define PLVINSERTGROUPSORTED WINELIB_NAME_AW(PLVINSERTGROUPSORTED)
3263 /* Tile related structures */
3265 typedef struct LVTILEINFO
3267 UINT cbSize;
3268 int iItem;
3269 UINT cColumns;
3270 PUINT puColumns;
3271 } LVTILEINFO, *PLVTILEINFO;
3273 typedef struct LVTILEVIEWINFO
3275 UINT cbSize;
3276 DWORD dwMask;
3277 DWORD dwFlags;
3278 SIZE sizeTile;
3279 int cLines;
3280 RECT rcLabelMargin;
3281 } LVTILEVIEWINFO, *PLVTILEVIEWINFO;
3283 typedef struct LVINSERTMARK
3285 UINT cbSize;
3286 DWORD dwFlags;
3287 int iItem;
3288 DWORD dwReserved;
3289 } LVINSERTMARK, *PLVINSERTMARK;
3291 typedef struct tagTCHITTESTINFO
3293 POINT pt;
3294 UINT flags;
3295 } TCHITTESTINFO, *LPTCHITTESTINFO;
3297 #define TC_HITTESTINFO TCHITTESTINFO
3299 typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
3301 #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLCUSTOMDRW, clrTextBk)
3303 typedef struct tagNMLVCUSTOMDRAW
3305 NMCUSTOMDRAW nmcd;
3306 COLORREF clrText;
3307 COLORREF clrTextBk;
3308 int iSubItem; /* (_WIN32_IE >= 0x0400) */
3309 DWORD dwItemType; /* (_WIN32_IE >= 0x560) */
3310 COLORREF clrFace; /* (_WIN32_IE >= 0x560) */
3311 int iIconEffect; /* (_WIN32_IE >= 0x560) */
3312 int iIconPhase; /* (_WIN32_IE >= 0x560) */
3313 int iPartId; /* (_WIN32_IE >= 0x560) */
3314 int iStateId; /* (_WIN32_IE >= 0x560) */
3315 RECT rcText; /* (_WIN32_IE >= 0x560) */
3316 UINT uAlign; /* (_WIN32_IE >= 0x560) */
3317 } NMLVCUSTOMDRAW, *LPNMLVCUSTOMDRAW;
3319 typedef struct tagNMLVCACHEHINT
3321 NMHDR hdr;
3322 INT iFrom;
3323 INT iTo;
3324 } NMLVCACHEHINT, *LPNMLVCACHEHINT;
3326 #define LPNM_CACHEHINT LPNMLVCACHEHINT
3327 #define PNM_CACHEHINT LPNMLVCACHEHINT
3328 #define NM_CACHEHINT NMLVCACHEHINT
3330 typedef struct tagNMLVFINDITEMA
3332 NMHDR hdr;
3333 int iStart;
3334 LVFINDINFOA lvfi;
3335 } NMLVFINDITEMA, *LPNMLVFINDITEMA;
3337 typedef struct tagNMLVFINDITEMW
3339 NMHDR hdr;
3340 int iStart;
3341 LVFINDINFOW lvfi;
3342 } NMLVFINDITEMW, *LPNMLVFINDITEMW;
3344 #define NMLVFINDITEM WINELIB_NAME_AW(NMLVFINDITEM)
3345 #define LPNMLVFINDITEM WINELIB_NAME_AW(LPNMLVFINDITEM)
3346 #define NM_FINDITEM NMLVFINDITEM
3347 #define LPNM_FINDITEM LPNMLVFINDITEM
3348 #define PNM_FINDITEM LPNMLVFINDITEM
3350 typedef struct tagNMLVODSTATECHANGE
3352 NMHDR hdr;
3353 int iFrom;
3354 int iTo;
3355 UINT uNewState;
3356 UINT uOldState;
3357 } NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;
3359 #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3360 #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3361 #define NM_ODSTATECHANGE NMLVODSTATECHANGE
3363 typedef struct NMLVSCROLL
3365 NMHDR hdr;
3366 int dx;
3367 int dy;
3368 } NMLVSCROLL, *LPNMLVSCROLL;
3370 #define ListView_SetItemCount(hwnd,count) \
3371 (BOOL)SNDMSGA((hwnd),LVM_SETITEMCOUNT,(WPARAM)(INT)(count),0)
3372 #define ListView_SetTextBkColor(hwnd,clrBk) \
3373 (BOOL)SNDMSGA((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3374 #define ListView_SetTextColor(hwnd,clrBk) \
3375 (BOOL)SNDMSGA((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3376 #define ListView_DeleteColumn(hwnd,col)\
3377 (LRESULT)SNDMSGA((hwnd),LVM_DELETECOLUMN,0,(LPARAM)(INT)(col))
3378 #define ListView_GetColumnA(hwnd,x,col)\
3379 (LRESULT)SNDMSGA((hwnd),LVM_GETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3380 #define ListView_GetColumnW(hwnd,x,col)\
3381 (LRESULT)SNDMSGW((hwnd),LVM_GETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3382 #define ListView_GetColumn WINELIB_NAME_AW(ListView_GetColumn)
3383 #define ListView_SetColumnA(hwnd,x,col)\
3384 (LRESULT)SNDMSGA((hwnd),LVM_SETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3385 #define ListView_SetColumnW(hwnd,x,col)\
3386 (LRESULT)SNDMSGW((hwnd),LVM_SETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3387 #define ListView_SetColumn WINELIB_NAME_AW(ListView_SetColumn)
3388 #define ListView_GetColumnWidth(hwnd,x)\
3389 (INT)SNDMSGW((hwnd),LVM_GETCOLUMNWIDTH,(WPARAM)(INT)(x),0L)
3390 #define ListView_SetColumnWidth(hwnd,x,width)\
3391 (BOOL)SNDMSGW((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(INT)(x),(LPARAM)(MAKELPARAM(width,0)))
3394 #define ListView_GetNextItem(hwnd,nItem,flags) \
3395 (INT)SNDMSGA((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
3396 #define ListView_FindItemA(hwnd,nItem,plvfi) \
3397 (INT)SNDMSGA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOA*)(plvfi))
3398 #define ListView_FindItemW(hwnd,nItem,plvfi) \
3399 (INT)SNDMSGW((hwnd),LVM_FINDITEMW,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOW*)(plvfi))
3400 #define ListView_FindItem WINELIB_NAME_AW(ListView_FindItem)
3402 #define ListView_Arrange(hwnd,code) \
3403 (INT)SNDMSGA((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
3404 #define ListView_GetItemPosition(hwnd,i,ppt) \
3405 (INT)SNDMSGA((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
3406 #define ListView_GetItemRect(hwnd,i,prc,code) \
3407 (BOOL)SNDMSGA((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
3408 ((prc) ? (((RECT*)(prc))->left = (code),(LPARAM)(RECT \
3409 *)(prc)) : (LPARAM)(RECT*)NULL))
3410 #define ListView_SetItemA(hwnd,pitem) \
3411 (INT)SNDMSGA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3412 #define ListView_SetItemW(hwnd,pitem) \
3413 (INT)SNDMSGW((hwnd),LVM_SETITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3414 #define ListView_SetItem WINELIB_NAME_AW(ListView_SetItem)
3415 #define ListView_SetItemState(hwnd,i,data,dataMask) \
3416 { LVITEMA _LVi; _LVi.state = data; _LVi.stateMask = dataMask;\
3417 SNDMSGA(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEMA)&_LVi);}
3418 #define ListView_GetItemState(hwnd,i,mask) \
3419 (BOOL)SNDMSGA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
3420 #define ListView_GetCountPerPage(hwnd) \
3421 (BOOL)SNDMSGW((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
3422 #define ListView_GetImageList(hwnd,iImageList) \
3423 (HIMAGELIST)SNDMSGA((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
3424 #define ListView_GetStringWidthA(hwnd,pstr) \
3425 (INT)SNDMSGA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
3426 #define ListView_GetStringWidthW(hwnd,pstr) \
3427 (INT)SNDMSGW((hwnd),LVM_GETSTRINGWIDTHW,0,(LPARAM)(LPCWSTR)(pstr))
3428 #define ListView_GetStringWidth WINELIB_NAME_AW(ListView_GetStringWidth)
3429 #define ListView_GetTopIndex(hwnd) \
3430 (BOOL)SNDMSGA((hwnd),LVM_GETTOPINDEX,0,0L)
3431 #define ListView_Scroll(hwnd,dx,dy) \
3432 (BOOL)SNDMSGA((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
3433 #define ListView_EnsureVisible(hwnd,i,fPartialOk) \
3434 (BOOL)SNDMSGA((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
3435 #define ListView_SetBkColor(hwnd,clrBk) \
3436 (BOOL)SNDMSGA((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3437 #define ListView_SetImageList(hwnd,himl,iImageList) \
3438 (HIMAGELIST)(UINT)SNDMSGA((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(UINT)(HIMAGELIST)(himl))
3439 #define ListView_GetItemCount(hwnd) \
3440 (INT)SNDMSGA((hwnd),LVM_GETITEMCOUNT,0,0L)
3441 #define ListView_RedrawItems(hwnd,first,last) \
3442 (BOOL)SNDMSGA((hwnd),LVM_REDRAWITEMS,(WPARAM)(INT)(first),(LPARAM)(INT)(last))
3444 #define ListView_GetItemA(hwnd,pitem) \
3445 (BOOL)SNDMSGA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
3446 #define ListView_GetItemW(hwnd,pitem) \
3447 (BOOL)SNDMSGW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
3448 #define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
3450 #define ListView_HitTest(hwnd,pinfo) \
3451 (INT)SNDMSGA((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
3453 #define ListView_InsertItemA(hwnd,pitem) \
3454 (INT)SNDMSGA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3455 #define ListView_InsertItemW(hwnd,pitem) \
3456 (INT)SNDMSGW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3457 #define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
3459 #define ListView_DeleteAllItems(hwnd) \
3460 (BOOL)SNDMSGA((hwnd),LVM_DELETEALLITEMS,0,0L)
3462 #define ListView_InsertColumnA(hwnd,iCol,pcol) \
3463 (INT)SNDMSGA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
3464 #define ListView_InsertColumnW(hwnd,iCol,pcol) \
3465 (INT)SNDMSGW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
3466 #define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
3468 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
3469 (BOOL)SNDMSGA((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
3470 #define ListView_SetItemPosition(hwndLV, i, x, y) \
3471 (BOOL)SNDMSGA((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
3472 #define ListView_GetSelectedCount(hwndLV) \
3473 (UINT)SNDMSGA((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
3475 #define ListView_EditLabelA(hwndLV, i) \
3476 (HWND)SNDMSGA((hwndLV),LVM_EDITLABELA,(WPARAM)(int)(i), 0L)
3477 #define ListView_EditLabelW(hwndLV, i) \
3478 (HWND)SNDMSGW((hwndLV),LVM_EDITLABELW,(WPARAM)(int)(i), 0L)
3479 #define ListView_EditLabel WINELIB_NAME_AW(ListView_EditLabel)
3481 #define ListView_GetItemTextA(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
3483 LVITEMA _LVi;\
3484 _LVi.iSubItem = _iSubItem;\
3485 _LVi.cchTextMax = _cchTextMax;\
3486 _LVi.pszText = _pszText;\
3487 SNDMSGA(hwndLV, LVM_GETITEMTEXTA, (WPARAM)(i), (LPARAM)&_LVi);\
3489 #define ListView_GetItemTextW(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
3491 LVITEMW _LVi;\
3492 _LVi.iSubItem = _iSubItem;\
3493 _LVi.cchTextMax = _cchTextMax;\
3494 _LVi.pszText = _pszText;\
3495 SNDMSGW(hwndLV, LVM_GETITEMTEXTW, (WPARAM)(i), (LPARAM)&_LVi);\
3497 #define ListView_GetItemText WINELIB_NAME_AW(ListView_GetItemText)
3499 #define ListView_SetItemTextA(hwndLV, i, _iSubItem, _pszText) \
3500 { LVITEMA _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3501 SNDMSGA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}
3502 #define ListView_SetItemTextW(hwndLV, i, _iSubItem, _pszText) \
3503 { LVITEMW _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3504 SNDMSGW(hwndLV, LVM_SETITEMTEXTW, (WPARAM)i, (LPARAM) (LVITEMW*)& _LVi);}
3505 #define ListView_SetItemText WINELIB_NAME_AW(ListView_SetItemText)
3507 #define ListView_DeleteItem(hwndLV, i) \
3508 (BOOL)SNDMSGA(hwndLV, LVM_DELETEITEM, (WPARAM)(int)(i), 0L)
3509 #define ListView_Update(hwndLV, i) \
3510 (BOOL)SNDMSGA((hwndLV), LVM_UPDATE, (WPARAM)(i), 0L)
3511 #define ListView_GetColumnOrderArray(hwndLV, iCount, pi) \
3512 (BOOL)SNDMSGA((hwndLV), LVM_GETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3513 #define ListView_GetExtendedListViewStyle(hwndLV) \
3514 (DWORD)SNDMSGA((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0L)
3515 #define ListView_GetHotCursor(hwndLV) \
3516 (HCURSOR)SNDMSGA((hwndLV), LVM_GETHOTCURSOR, 0, 0L)
3517 #define ListView_GetHotItem(hwndLV) \
3518 (int)SNDMSGA((hwndLV), LVM_GETHOTITEM, 0, 0L)
3519 #define ListView_GetItemSpacing(hwndLV, fSmall) \
3520 (DWORD)SNDMSGA((hwndLV), LVM_GETITEMSPACING, (WPARAM)fSmall, 0L)
3521 #define ListView_GetSubItemRect(hwndLV, iItem, iSubItem, code, prc) \
3522 (BOOL)SNDMSGA((hwndLV), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
3523 ((prc) ? (((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code):0), (LPARAM)prc)
3524 #define ListView_GetToolTips(hwndLV) \
3525 (HWND)SNDMSGA((hwndLV), LVM_GETTOOLTIPS, 0, 0L)
3526 #define ListView_SetColumnOrderArray(hwndLV, iCount, pi) \
3527 (BOOL)SNDMSGA((hwndLV), LVM_SETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3528 #define ListView_SetExtendedListViewStyle(hwndLV, dw) \
3529 (DWORD)SNDMSGA((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dw)
3530 #define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw) \
3531 (DWORD)SNDMSGA((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)dwMask, (LPARAM)dw)
3532 #define ListView_SetHotCursor(hwndLV, hcur) \
3533 (HCURSOR)SNDMSGA((hwndLV), LVM_SETHOTCURSOR, 0, (LPARAM)hcur)
3534 #define ListView_SetHotItem(hwndLV, i) \
3535 (int)SNDMSGA((hwndLV), LVM_SETHOTITEM, (WPARAM)i, 0L)
3536 #define ListView_SetIconSpacing(hwndLV, cx, cy) \
3537 (DWORD)SNDMSGA((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
3538 #define ListView_SetToolTips(hwndLV, hwndNewHwnd) \
3539 (HWND)SNDMSGA((hwndLV), LVM_SETTOOLTIPS, (WPARAM)hwndNewHwnd, 0L)
3540 #define ListView_SubItemHitTest(hwndLV, plvhti) \
3541 (int)SNDMSGA((hwndLV), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
3543 #define ListView_GetSelectionMark(hwndLV) \
3544 (int)SNDMSG((hwndLV), LVM_GETSELECTIONMARK, 0, 0)
3545 #define ListView_SetSelectionMark(hwndLV, iItem) \
3546 (int)SNDMSG((hwndLV), LVM_SETSELECTIONMARK, 0, (LPARAM)(iItem))
3548 #define ListView_GetViewRect(hwndLV, prc) \
3549 (BOOL)SNDMSG((hwndLV),LVM_GETVIEWRECT,0,(LPARAM)(LPRECT)(prc))
3551 /* Tab Control */
3553 #define WC_TABCONTROL16 "SysTabControl"
3554 #define WC_TABCONTROLA "SysTabControl32"
3555 #if defined(__GNUC__)
3556 # define WC_TABCONTROLW (const WCHAR []){ 'S','y','s', \
3557 'T','a','b','C','o','n','t','r','o','l','3','2',0 }
3558 #elif defined(_MSC_VER)
3559 # define WC_TABCONTROLW L"SysTabControl32"
3560 #else
3561 static const WCHAR WC_TABCONTROLW[] = { 'S','y','s',
3562 'T','a','b','C','o','n','t','r','o','l','3','2',0 };
3563 #endif
3564 #define WC_TABCONTROL WINELIB_NAME_AW(WC_TABCONTROL)
3566 /* tab control styles */
3567 #define TCS_SCROLLOPPOSITE 0x0001 /* assumes multiline tab */
3568 #define TCS_BOTTOM 0x0002
3569 #define TCS_RIGHT 0x0002
3570 #define TCS_MULTISELECT 0x0004 /* allow multi-select in button mode */
3571 #define TCS_FLATBUTTONS 0x0008
3572 #define TCS_FORCEICONLEFT 0x0010
3573 #define TCS_FORCELABELLEFT 0x0020
3574 #define TCS_HOTTRACK 0x0040
3575 #define TCS_VERTICAL 0x0080
3576 #define TCS_TABS 0x0000
3577 #define TCS_BUTTONS 0x0100
3578 #define TCS_SINGLELINE 0x0000
3579 #define TCS_MULTILINE 0x0200
3580 #define TCS_RIGHTJUSTIFY 0x0000
3581 #define TCS_FIXEDWIDTH 0x0400
3582 #define TCS_RAGGEDRIGHT 0x0800
3583 #define TCS_FOCUSONBUTTONDOWN 0x1000
3584 #define TCS_OWNERDRAWFIXED 0x2000
3585 #define TCS_TOOLTIPS 0x4000
3586 #define TCS_FOCUSNEVER 0x8000
3587 #define TCS_EX_FLATSEPARATORS 0x00000001 /* to be used with */
3588 #define TCS_EX_REGISTERDROP 0x00000002 /* TCM_SETEXTENDEDSTYLE */
3591 #define TCM_FIRST 0x1300
3593 #define TCM_GETIMAGELIST (TCM_FIRST + 2)
3594 #define TCM_SETIMAGELIST (TCM_FIRST + 3)
3595 #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
3596 #define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
3597 #define TCM_GETITEMA (TCM_FIRST + 5)
3598 #define TCM_GETITEMW (TCM_FIRST + 60)
3599 #define TCM_SETITEMA (TCM_FIRST + 6)
3600 #define TCM_SETITEMW (TCM_FIRST + 61)
3601 #define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
3602 #define TCM_INSERTITEMA (TCM_FIRST + 7)
3603 #define TCM_INSERTITEMW (TCM_FIRST + 62)
3604 #define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
3605 #define TCM_DELETEITEM (TCM_FIRST + 8)
3606 #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
3607 #define TCM_GETITEMRECT (TCM_FIRST + 10)
3608 #define TCM_GETCURSEL (TCM_FIRST + 11)
3609 #define TCM_SETCURSEL (TCM_FIRST + 12)
3610 #define TCM_HITTEST (TCM_FIRST + 13)
3611 #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
3612 #define TCM_ADJUSTRECT (TCM_FIRST + 40)
3613 #define TCM_SETITEMSIZE (TCM_FIRST + 41)
3614 #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
3615 #define TCM_SETPADDING (TCM_FIRST + 43)
3616 #define TCM_GETROWCOUNT (TCM_FIRST + 44)
3617 #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
3618 #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
3619 #define TCM_GETCURFOCUS (TCM_FIRST + 47)
3620 #define TCM_SETCURFOCUS (TCM_FIRST + 48)
3621 #define TCM_SETMINTABWIDTH (TCM_FIRST + 49)
3622 #define TCM_DESELECTALL (TCM_FIRST + 50)
3623 #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
3624 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
3625 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
3626 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3627 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3630 #define TCIF_TEXT 0x0001
3631 #define TCIF_IMAGE 0x0002
3632 #define TCIF_RTLREADING 0x0004
3633 #define TCIF_PARAM 0x0008
3634 #define TCIF_STATE 0x0010
3636 #define TCIS_BUTTONPRESSED 0x0001
3637 #define TCIS_HIGHLIGHTED 0x0002
3639 /* TabCtrl Macros */
3640 #define TabCtrl_GetImageList(hwnd) \
3641 (HIMAGELIST)SNDMSGA((hwnd), TCM_GETIMAGELIST, 0, 0L)
3642 #define TabCtrl_SetImageList(hwnd, himl) \
3643 (HIMAGELIST)SNDMSGA((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
3644 #define TabCtrl_GetItemCount(hwnd) \
3645 (int)SNDMSGA((hwnd), TCM_GETITEMCOUNT, 0, 0L)
3646 #define TabCtrl_GetItemA(hwnd, iItem, pitem) \
3647 (BOOL)SNDMSGA((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3648 #define TabCtrl_GetItemW(hwnd, iItem, pitem) \
3649 (BOOL)SNDMSGW((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3650 #define TabCtrl_GetItem WINELIB_NAME_AW(TabCtrl_GetItem)
3651 #define TabCtrl_SetItemA(hwnd, iItem, pitem) \
3652 (BOOL)SNDMSGA((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3653 #define TabCtrl_SetItemW(hwnd, iItem, pitem) \
3654 (BOOL)SNDMSGW((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3655 #define TabCtrl_SetItem WINELIB_NAME_AW(TabCtrl_GetItem)
3656 #define TabCtrl_InsertItemA(hwnd, iItem, pitem) \
3657 (int)SNDMSGA((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
3658 #define TabCtrl_InsertItemW(hwnd, iItem, pitem) \
3659 (int)SNDMSGW((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
3660 #define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
3661 #define TabCtrl_DeleteItem(hwnd, i) \
3662 (BOOL)SNDMSGA((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
3663 #define TabCtrl_DeleteAllItems(hwnd) \
3664 (BOOL)SNDMSGA((hwnd), TCM_DELETEALLITEMS, 0, 0L)
3665 #define TabCtrl_GetItemRect(hwnd, i, prc) \
3666 (BOOL)SNDMSGA((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
3667 #define TabCtrl_GetCurSel(hwnd) \
3668 (int)SNDMSGA((hwnd), TCM_GETCURSEL, 0, 0)
3669 #define TabCtrl_SetCurSel(hwnd, i) \
3670 (int)SNDMSGA((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
3671 #define TabCtrl_HitTest(hwndTC, pinfo) \
3672 (int)SNDMSGA((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
3673 #define TabCtrl_SetItemExtra(hwndTC, cb) \
3674 (BOOL)SNDMSGA((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
3675 #define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
3676 (int)SNDMSGA(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
3677 #define TabCtrl_SetItemSize(hwnd, x, y) \
3678 (DWORD)SNDMSGA((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
3679 #define TabCtrl_RemoveImage(hwnd, i) \
3680 (void)SNDMSGA((hwnd), TCM_REMOVEIMAGE, i, 0L)
3681 #define TabCtrl_SetPadding(hwnd, cx, cy) \
3682 (void)SNDMSGA((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
3683 #define TabCtrl_GetRowCount(hwnd) \
3684 (int)SNDMSGA((hwnd), TCM_GETROWCOUNT, 0, 0L)
3685 #define TabCtrl_GetToolTips(hwnd) \
3686 (HWND)SNDMSGA((hwnd), TCM_GETTOOLTIPS, 0, 0L)
3687 #define TabCtrl_SetToolTips(hwnd, hwndTT) \
3688 (void)SNDMSGA((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
3689 #define TabCtrl_GetCurFocus(hwnd) \
3690 (int)SNDMSGA((hwnd), TCM_GETCURFOCUS, 0, 0)
3691 #define TabCtrl_SetCurFocus(hwnd, i) \
3692 SNDMSGA((hwnd),TCM_SETCURFOCUS, i, 0)
3693 #define TabCtrl_SetMinTabWidth(hwnd, x) \
3694 (int)SNDMSGA((hwnd), TCM_SETMINTABWIDTH, 0, x)
3695 #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
3696 (void)SNDMSGA((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
3697 #define TabCtrl_GetUnicodeFormat(hwnd) \
3698 (BOOL)SNDMSGA((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
3699 #define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) \
3700 (BOOL)SNDMSGA((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)fUnicode, 0)
3701 #define TabCtrl_GetExtendedStyle(hwnd) \
3702 (BOOL)SNDMSGA((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
3703 #define TabCtrl_SetExtendedStyle(hwnd, dwExStyle) \
3704 (BOOL)SNDMSGA((hwnd), TCM_GETEXTENDEDSTYLE, 0, (LPARAM)dwExStyle)
3705 #define TabCtrl_HighlightItem(hwnd, i, fHighlight) \
3706 (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)i, (LPARAM)MAKELONG(fHighlight, 0))
3708 /* constants for TCHITTESTINFO */
3710 #define TCHT_NOWHERE 0x01
3711 #define TCHT_ONITEMICON 0x02
3712 #define TCHT_ONITEMLABEL 0x04
3713 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
3716 typedef struct tagTCITEMA {
3717 UINT mask;
3718 UINT dwState;
3719 UINT dwStateMask;
3720 LPSTR pszText;
3721 INT cchTextMax;
3722 INT iImage;
3723 LPARAM lParam;
3724 } TCITEMA, *LPTCITEMA;
3726 typedef struct tagTCITEMW
3728 UINT mask;
3729 DWORD dwState;
3730 DWORD dwStateMask;
3731 LPWSTR pszText;
3732 INT cchTextMax;
3733 INT iImage;
3734 LPARAM lParam;
3735 } TCITEMW, *LPTCITEMW;
3737 #define TCITEM WINELIB_NAME_AW(TCITEM)
3738 #define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
3739 #define TC_ITEM TCITEM
3741 #define TCN_FIRST (0U-550U)
3742 #define TCN_LAST (0U-580U)
3743 #define TCN_KEYDOWN (TCN_FIRST - 0)
3744 #define TCN_SELCHANGE (TCN_FIRST - 1)
3745 #define TCN_SELCHANGING (TCN_FIRST - 2)
3746 #define TCN_GETOBJECT (TCN_FIRST - 3)
3748 #include <pshpack1.h>
3749 typedef struct tagTCKEYDOWN
3751 NMHDR hdr;
3752 WORD wVKey;
3753 UINT flags;
3754 } NMTCKEYDOWN;
3755 #include <poppack.h>
3757 #define TC_KEYDOWN NMTCKEYDOWN
3759 /* ComboBoxEx control */
3761 #define WC_COMBOBOXEXA "ComboBoxEx32"
3762 #if defined(__GNUC__)
3763 # define WC_COMBOBOXEXW (const WCHAR []){ 'C','o','m','b','o', \
3764 'B','o','x','E','x','3','2',0 }
3765 #elif defined(_MSC_VER)
3766 # define WC_COMBOBOXEXW L"ComboBoxEx32"
3767 #else
3768 static const WCHAR WC_COMBOBOXEXW[] = { 'C','o','m','b','o',
3769 'B','o','x','E','x','3','2',0 };
3770 #endif
3771 #define WC_COMBOBOXEX WINELIB_NAME_AW(WC_COMBOBOXEX)
3773 #define CBEIF_TEXT 0x00000001
3774 #define CBEIF_IMAGE 0x00000002
3775 #define CBEIF_SELECTEDIMAGE 0x00000004
3776 #define CBEIF_OVERLAY 0x00000008
3777 #define CBEIF_INDENT 0x00000010
3778 #define CBEIF_LPARAM 0x00000020
3779 #define CBEIF_DI_SETITEM 0x10000000
3781 #define CBEM_INSERTITEMA (WM_USER+1)
3782 #define CBEM_INSERTITEMW (WM_USER+11)
3783 #define CBEM_INSERTITEM WINELIB_NAME_AW(CBEM_INSERTITEM)
3784 #define CBEM_SETIMAGELIST (WM_USER+2)
3785 #define CBEM_GETIMAGELIST (WM_USER+3)
3786 #define CBEM_GETITEMA (WM_USER+4)
3787 #define CBEM_GETITEMW (WM_USER+13)
3788 #define CBEM_GETITEM WINELIB_NAME_AW(CBEM_GETITEM)
3789 #define CBEM_SETITEMA (WM_USER+5)
3790 #define CBEM_SETITEMW (WM_USER+12)
3791 #define CBEM_SETITEM WINELIB_NAME_AW(CBEM_SETITEM)
3792 #define CBEM_DELETEITEM CB_DELETESTRING
3793 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
3794 #define CBEM_GETEDITCONTROL (WM_USER+7)
3795 #define CBEM_SETEXSTYLE (WM_USER+8)
3796 #define CBEM_GETEXSTYLE (WM_USER+9)
3797 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
3798 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
3799 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3800 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3801 #define CBEM_HASEDITCHANGED (WM_USER+10)
3803 #define CBEIF_TEXT 0x00000001
3804 #define CBEIF_IMAGE 0x00000002
3805 #define CBEIF_SELECTEDIMAGE 0x00000004
3806 #define CBEIF_OVERLAY 0x00000008
3807 #define CBEIF_INDENT 0x00000010
3808 #define CBEIF_LPARAM 0x00000020
3809 #define CBEIF_DI_SETITEM 0x10000000
3811 #define CBEN_FIRST (0U-800U)
3812 #define CBEN_LAST (0U-830U)
3814 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
3815 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
3816 #define CBEN_GETDISPINFO WINELIB_NAME_AW(CBEN_GETDISPINFO)
3817 #define CBEN_INSERTITEM (CBEN_FIRST - 1)
3818 #define CBEN_DELETEITEM (CBEN_FIRST - 2)
3819 #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
3820 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
3821 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
3822 #define CBEN_ENDEDIT WINELIB_NAME_AW(CBEN_ENDEDIT)
3823 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
3824 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
3825 #define CBEN_DRAGBEGIN WINELIB_NAME_AW(CBEN_DRAGBEGIN)
3827 #define CBES_EX_NOEDITIMAGE 0x00000001
3828 #define CBES_EX_NOEDITIMAGEINDENT 0x00000002
3829 #define CBES_EX_PATHWORDBREAKPROC 0x00000004
3830 #define CBES_EX_NOSIZELIMIT 0x00000008
3831 #define CBES_EX_CASESENSITIVE 0x00000010
3834 typedef struct tagCOMBOBOXEXITEMA
3836 UINT mask;
3837 int iItem;
3838 LPSTR pszText;
3839 int cchTextMax;
3840 int iImage;
3841 int iSelectedImage;
3842 int iOverlay;
3843 int iIndent;
3844 LPARAM lParam;
3845 } COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
3846 typedef COMBOBOXEXITEMA const *PCCOMBOEXITEMA; /* Yes, there's a BOX missing */
3848 typedef struct tagCOMBOBOXEXITEMW
3850 UINT mask;
3851 int iItem;
3852 LPWSTR pszText;
3853 int cchTextMax;
3854 int iImage;
3855 int iSelectedImage;
3856 int iOverlay;
3857 int iIndent;
3858 LPARAM lParam;
3859 } COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
3860 typedef COMBOBOXEXITEMW const *PCCOMBOEXITEMW; /* Yes, there's a BOX missing */
3862 #define COMBOBOXEXITEM WINELIB_NAME_AW(COMBOBOXEXITEM)
3863 #define PCOMBOBOXEXITEM WINELIB_NAME_AW(PCOMBOBOXEXITEM)
3864 #define PCCOMBOBOXEXITEM WINELIB_NAME_AW(PCCOMBOEXITEM) /* Yes, there's a BOX missing */
3866 #define CBENF_KILLFOCUS 1
3867 #define CBENF_RETURN 2
3868 #define CBENF_ESCAPE 3
3869 #define CBENF_DROPDOWN 4
3871 #define CBEMAXSTRLEN 260
3873 typedef struct tagNMCBEENDEDITW
3875 NMHDR hdr;
3876 BOOL fChanged;
3877 int iNewSelection;
3878 WCHAR szText[CBEMAXSTRLEN];
3879 int iWhy;
3880 } NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;
3882 typedef struct tagNMCBEENDEDITA
3884 NMHDR hdr;
3885 BOOL fChanged;
3886 int iNewSelection;
3887 char szText[CBEMAXSTRLEN];
3888 int iWhy;
3889 } NMCBEENDEDITA, *LPNMCBEENDEDITA, *PNMCBEENDEDITA;
3891 #define NMCBEENDEDIT WINELIB_NAME_AW(NMCBEENDEDIT)
3892 #define LPNMCBEENDEDIT WINELIB_NAME_AW(LPNMCBEENDEDIT)
3893 #define PNMCBEENDEDIT WINELIB_NAME_AW(PNMCBEENDEDIT)
3895 typedef struct
3897 NMHDR hdr;
3898 COMBOBOXEXITEMA ceItem;
3899 } NMCOMBOBOXEXA, *PNMCOMBOBOXEXA;
3901 typedef struct
3903 NMHDR hdr;
3904 COMBOBOXEXITEMW ceItem;
3905 } NMCOMBOBOXEXW, *PNMCOMBOBOXEXW;
3907 #define NMCOMBOBOXEX WINELIB_NAME_AW(NMCOMBOBOXEX)
3908 #define PNMCOMBOBOXEX WINELIB_NAME_AW(PNMCOMBOBOXEX)
3910 typedef struct
3912 NMHDR hdr;
3913 int iItemid;
3914 char szText[CBEMAXSTRLEN];
3915 } NMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA;
3917 typedef struct
3919 NMHDR hdr;
3920 int iItemid;
3921 WCHAR szText[CBEMAXSTRLEN];
3922 } NMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW;
3924 #define NMCBEDRAGBEGIN WINELIB_NAME_AW(NMCBEDRAGBEGIN)
3925 #define PNMCBEDRAGBEGIN WINELIB_NAME_AW(PNMCBEDRAGBEGIN)
3926 #define LPNMCBEDRAGBEGIN WINELIB_NAME_AW(LPNMCBEDRAGBEGIN)
3929 /* Hotkey control */
3931 #define HOTKEY_CLASS16 "msctls_hotkey"
3932 #define HOTKEY_CLASSA "msctls_hotkey32"
3933 #if defined(__GNUC__)
3934 # define HOTKEY_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
3935 'h','o','t','k','e','y','3','2',0 }
3936 #elif defined(_MSC_VER)
3937 # define HOTKEY_CLASSW L"msctls_hotkey32"
3938 #else
3939 static const WCHAR HOTKEY_CLASSW[] = { 'm','s','c','t','l','s','_',
3940 'h','o','t','k','e','y','3','2',0 };
3941 #endif
3942 #define HOTKEY_CLASS WINELIB_NAME_AW(HOTKEY_CLASS)
3944 #define HOTKEYF_SHIFT 0x01
3945 #define HOTKEYF_CONTROL 0x02
3946 #define HOTKEYF_ALT 0x04
3947 #define HOTKEYF_EXT 0x08
3949 #define HKCOMB_NONE 0x0001
3950 #define HKCOMB_S 0x0002
3951 #define HKCOMB_C 0x0004
3952 #define HKCOMB_A 0x0008
3953 #define HKCOMB_SC 0x0010
3954 #define HKCOMB_SA 0x0020
3955 #define HKCOMB_CA 0x0040
3956 #define HKCOMB_SCA 0x0080
3958 #define HKM_SETHOTKEY (WM_USER+1)
3959 #define HKM_GETHOTKEY (WM_USER+2)
3960 #define HKM_SETRULES (WM_USER+3)
3963 /* animate control */
3965 #define ANIMATE_CLASSA "SysAnimate32"
3966 #if defined(__GNUC__)
3967 # define ANIMATE_CLASSW (const WCHAR []){ 'S','y','s', \
3968 'A','n','i','m','a','t','e','3','2',0 }
3969 #elif defined(_MSC_VER)
3970 # define ANIMATE_CLASSW L"SysAnimate32"
3971 #else
3972 static const WCHAR ANIMATE_CLASSW[] = { 'S','y','s',
3973 'A','n','i','m','a','t','e','3','2',0 };
3974 #endif
3975 #define ANIMATE_CLASS WINELIB_NAME_AW(ANIMATE_CLASS)
3977 #define ACS_CENTER 0x0001
3978 #define ACS_TRANSPARENT 0x0002
3979 #define ACS_AUTOPLAY 0x0004
3980 #define ACS_TIMER 0x0008 /* no threads, just timers */
3982 #define ACM_OPENA (WM_USER+100)
3983 #define ACM_OPENW (WM_USER+103)
3984 #define ACM_OPEN WINELIB_NAME_AW(ACM_OPEN)
3985 #define ACM_PLAY (WM_USER+101)
3986 #define ACM_STOP (WM_USER+102)
3988 #define ACN_START 1
3989 #define ACN_STOP 2
3991 #define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
3992 CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
3993 #define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
3994 CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
3995 #define Animate_Create WINELIB_NAME_AW(Animate_Create)
3996 #define Animate_OpenA(hwnd,szName) \
3997 (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
3998 #define Animate_OpenW(hwnd,szName) \
3999 (BOOL)SNDMSGW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
4000 #define Animate_Open WINELIB_NAME_AW(Animate_Open)
4001 #define Animate_OpenExA(hwnd,hInst,szName) \
4002 (BOOL)SNDMSGA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
4003 #define Animate_OpenExW(hwnd,hInst,szName) \
4004 (BOOL)SNDMSGW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
4005 #define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
4006 #define Animate_Play(hwnd,from,to,rep) \
4007 (BOOL)SNDMSGA(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
4008 #define Animate_Stop(hwnd) \
4009 (BOOL)SNDMSGA(hwnd,ACM_STOP,0,0)
4010 #define Animate_Close(hwnd) \
4011 (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,0)
4012 #define Animate_Seek(hwnd,frame) \
4013 (BOOL)SNDMSGA(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
4016 /**************************************************************************
4017 * IP Address control
4020 #define WC_IPADDRESSA "SysIPAddress32"
4021 #if defined(__GNUC__)
4022 # define WC_IPADDRESSW (const WCHAR []){ 'S','y','s', \
4023 'I','P','A','d','d','r','e','s','s','3','2',0 }
4024 #elif defined(_MSC_VER)
4025 # define WC_IPADDRESSW L"SysIPAddress32"
4026 #else
4027 static const WCHAR WC_IPADDRESSW[] = { 'S','y','s',
4028 'I','P','A','d','d','r','e','s','s','3','2',0 };
4029 #endif
4030 #define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
4032 #define IPM_CLEARADDRESS (WM_USER+100)
4033 #define IPM_SETADDRESS (WM_USER+101)
4034 #define IPM_GETADDRESS (WM_USER+102)
4035 #define IPM_SETRANGE (WM_USER+103)
4036 #define IPM_SETFOCUS (WM_USER+104)
4037 #define IPM_ISBLANK (WM_USER+105)
4039 #define IPN_FIRST (0U-860U)
4040 #define IPN_LAST (0U-879U)
4041 #define IPN_FIELDCHANGED (IPN_FIRST-0)
4043 typedef struct tagNMIPADDRESS
4045 NMHDR hdr;
4046 INT iField;
4047 INT iValue;
4048 } NMIPADDRESS, *LPNMIPADDRESS;
4050 #define MAKEIPRANGE(low,high) \
4051 ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
4052 #define MAKEIPADDRESS(b1,b2,b3,b4) \
4053 ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
4055 #define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
4056 #define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
4057 #define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
4058 #define FOURTH_IPADDRESS(x) ((x)&0xff)
4061 /**************************************************************************
4062 * Native Font control
4065 #define WC_NATIVEFONTCTLA "NativeFontCtl"
4066 #if defined(__GNUC__)
4067 # define WC_NATIVEFONTCTLW (const WCHAR []){ 'N','a','t','i','v','e', \
4068 'F','o','n','t','C','t','l',0 }
4069 #elif defined(_MSC_VER)
4070 # define WC_NATIVEFONTCTLW L"NativeFontCtl"
4071 #else
4072 static const WCHAR WC_NATIVEFONTCTLW[] = { 'N','a','t','i','v','e',
4073 'F','o','n','t','C','t','l',0 };
4074 #endif
4075 #define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
4077 #define NFS_EDIT 0x0001
4078 #define NFS_STATIC 0x0002
4079 #define NFS_LISTCOMBO 0x0004
4080 #define NFS_BUTTON 0x0008
4081 #define NFS_ALL 0x0010
4084 /**************************************************************************
4085 * Month calendar control
4089 #define MONTHCAL_CLASSA "SysMonthCal32"
4090 #if defined(__GNUC__)
4091 # define MONTHCAL_CLASSW (const WCHAR []){ 'S','y','s', \
4092 'M','o','n','t','h','C','a','l','3','2',0 }
4093 #elif defined(_MSC_VER)
4094 # define MONTHCAL_CLASSW L"SysMonthCal32"
4095 #else
4096 static const WCHAR MONTHCAL_CLASSW[] = { 'S','y','s',
4097 'M','o','n','t','h','C','a','l','3','2',0 };
4098 #endif
4099 #define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
4101 #define MCM_FIRST 0x1000
4102 #define MCN_FIRST (0U-750U)
4103 #define MCN_LAST (0U-759U)
4106 #define MCM_GETCURSEL (MCM_FIRST + 1)
4107 #define MCM_SETCURSEL (MCM_FIRST + 2)
4108 #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
4109 #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
4110 #define MCM_GETSELRANGE (MCM_FIRST + 5)
4111 #define MCM_SETSELRANGE (MCM_FIRST + 6)
4112 #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
4113 #define MCM_SETDAYSTATE (MCM_FIRST + 8)
4114 #define MCM_GETMINREQRECT (MCM_FIRST + 9)
4115 #define MCM_SETCOLOR (MCM_FIRST + 10)
4116 #define MCM_GETCOLOR (MCM_FIRST + 11)
4117 #define MCM_SETTODAY (MCM_FIRST + 12)
4118 #define MCM_GETTODAY (MCM_FIRST + 13)
4119 #define MCM_HITTEST (MCM_FIRST + 14)
4120 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
4121 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
4122 #define MCM_GETRANGE (MCM_FIRST + 17)
4123 #define MCM_SETRANGE (MCM_FIRST + 18)
4124 #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
4125 #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
4126 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
4127 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4128 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4131 /* Notifications */
4133 #define MCN_SELCHANGE (MCN_FIRST + 1)
4134 #define MCN_GETDAYSTATE (MCN_FIRST + 3)
4135 #define MCN_SELECT (MCN_FIRST + 4)
4137 #define MCSC_BACKGROUND 0
4138 #define MCSC_TEXT 1
4139 #define MCSC_TITLEBK 2
4140 #define MCSC_TITLETEXT 3
4141 #define MCSC_MONTHBK 4
4142 #define MCSC_TRAILINGTEXT 5
4144 #define MCS_DAYSTATE 0x0001
4145 #define MCS_MULTISELECT 0x0002
4146 #define MCS_WEEKNUMBERS 0x0004
4147 #define MCS_NOTODAY 0x0010
4148 #define MCS_NOTODAYCIRCLE 0x0008
4150 #define MCHT_TITLE 0x00010000
4151 #define MCHT_CALENDAR 0x00020000
4152 #define MCHT_TODAYLINK 0x00030000
4154 #define MCHT_NEXT 0x01000000
4155 #define MCHT_PREV 0x02000000
4156 #define MCHT_NOWHERE 0x00000000
4157 #define MCHT_TITLEBK (MCHT_TITLE)
4158 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
4159 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
4160 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
4161 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
4163 #define MCHT_CALENDARBK (MCHT_CALENDAR)
4164 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
4165 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
4166 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
4167 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
4168 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
4172 #define GMR_VISIBLE 0
4173 #define GMR_DAYSTATE 1
4176 /* Month calendar's structures */
4179 typedef struct {
4180 UINT cbSize;
4181 POINT pt;
4182 UINT uHit;
4183 SYSTEMTIME st;
4184 } MCHITTESTINFO, *PMCHITTESTINFO;
4186 typedef struct tagNMSELCHANGE
4188 NMHDR nmhdr;
4189 SYSTEMTIME stSelStart;
4190 SYSTEMTIME stSelEnd;
4191 } NMSELCHANGE, *LPNMSELCHANGE;
4193 typedef NMSELCHANGE NMSELECT, *LPNMSELECT;
4194 typedef DWORD MONTHDAYSTATE, *LPMONTHDAYSTATE;
4196 typedef struct tagNMDAYSTATE
4198 NMHDR nmhdr;
4199 SYSTEMTIME stStart;
4200 int cDayState;
4201 LPMONTHDAYSTATE prgDayState;
4202 } NMDAYSTATE, *LPNMDAYSTATE;
4205 /* macros */
4207 #define MonthCal_GetCurSel(hmc, pst) \
4208 (BOOL)SNDMSGA(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
4209 #define MonthCal_SetCurSel(hmc, pst) \
4210 (BOOL)SNDMSGA(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
4211 #define MonthCal_GetMaxSelCount(hmc) \
4212 (DWORD)SNDMSGA(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
4213 #define MonthCal_SetMaxSelCount(hmc, n) \
4214 (BOOL)SNDMSGA(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
4215 #define MonthCal_GetSelRange(hmc, rgst) \
4216 SNDMSGA(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst))
4217 #define MonthCal_SetSelRange(hmc, rgst) \
4218 SNDMSGA(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst))
4219 #define MonthCal_GetMonthRange(hmc, gmr, rgst) \
4220 (DWORD)SNDMSGA(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
4221 #define MonthCal_SetDayState(hmc, cbds, rgds) \
4222 SNDMSGA(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
4223 #define MonthCal_GetMinReqRect(hmc, prc) \
4224 SNDMSGA(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
4225 #define MonthCal_SetColor(hmc, iColor, clr)\
4226 SNDMSGA(hmc, MCM_SETCOLOR, iColor, clr)
4227 #define MonthCal_GetColor(hmc, iColor) \
4228 SNDMSGA(hmc, MCM_SETCOLOR, iColor, 0)
4229 #define MonthCal_GetToday(hmc, pst)\
4230 (BOOL)SNDMSGA(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
4231 #define MonthCal_SetToday(hmc, pst)\
4232 SNDMSGA(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
4233 #define MonthCal_HitTest(hmc, pinfo) \
4234 SNDMSGA(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
4235 #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
4236 SNDMSGA(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
4237 #define MonthCal_GetFirstDayOfWeek(hmc) \
4238 (DWORD)SNDMSGA(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
4239 #define MonthCal_GetRange(hmc, rgst) \
4240 (DWORD)SNDMSGA(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
4241 #define MonthCal_SetRange(hmc, gd, rgst) \
4242 (BOOL)SNDMSGA(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4243 #define MonthCal_GetMonthDelta(hmc) \
4244 (int)SNDMSGA(hmc, MCM_GETMONTHDELTA, 0, 0)
4245 #define MonthCal_SetMonthDelta(hmc, n) \
4246 (int)SNDMSGA(hmc, MCM_SETMONTHDELTA, n, 0)
4247 #define MonthCal_GetMaxTodayWidth(hmc) \
4248 (DWORD)SNDMSGA(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
4249 #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
4250 (BOOL)SNDMSGA((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
4251 #define MonthCal_GetUnicodeFormat(hwnd) \
4252 (BOOL)SNDMSGA((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
4255 /**************************************************************************
4256 * Date and time picker control
4259 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
4260 #if defined(__GNUC__)
4261 # define DATETIMEPICK_CLASSW (const WCHAR []){ 'S','y','s', \
4262 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 }
4263 #elif defined(_MSC_VER)
4264 # define DATETIMEPICK_CLASSW L"SysDateTimePick32"
4265 #else
4266 static const WCHAR DATETIMEPICK_CLASSW[] = { 'S','y','s',
4267 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 };
4268 #endif
4269 #define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
4271 #define DTM_FIRST 0x1000
4272 #define DTN_FIRST (0U-760U)
4273 #define DTN_LAST (0U-799U)
4276 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
4277 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
4278 #define DTM_GETRANGE (DTM_FIRST+3)
4279 #define DTM_SETRANGE (DTM_FIRST+4)
4280 #define DTM_SETFORMATA (DTM_FIRST+5)
4281 #define DTM_SETFORMATW (DTM_FIRST + 50)
4282 #define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
4283 #define DTM_SETMCCOLOR (DTM_FIRST+6)
4284 #define DTM_GETMCCOLOR (DTM_FIRST+7)
4285 #define DTM_GETMONTHCAL (DTM_FIRST+8)
4286 #define DTM_SETMCFONT (DTM_FIRST+9)
4287 #define DTM_GETMCFONT (DTM_FIRST+10)
4290 /* Datetime Notifications */
4292 #define DTN_DATETIMECHANGE (DTN_FIRST + 1)
4293 #define DTN_USERSTRINGA (DTN_FIRST + 2)
4294 #define DTN_WMKEYDOWNA (DTN_FIRST + 3)
4295 #define DTN_FORMATA (DTN_FIRST + 4)
4296 #define DTN_FORMATQUERYA (DTN_FIRST + 5)
4297 #define DTN_DROPDOWN (DTN_FIRST + 6)
4298 #define DTN_CLOSEUP (DTN_FIRST + 7)
4299 #define DTN_USERSTRINGW (DTN_FIRST + 15)
4300 #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
4301 #define DTN_FORMATW (DTN_FIRST + 17)
4302 #define DTN_FORMATQUERYW (DTN_FIRST + 18)
4304 #define DTN_USERSTRING WINELIB_NAME_AW(DTN_USERSTRING)
4305 #define DTN_WMKEYDOWN WINELIB_NAME_AW(DTN_WMKEYDOWN)
4306 #define DTN_FORMAT WINELIB_NAME_AW(DTN_FORMAT)
4307 #define DTN_FORMATQUERY WINELIB_NAME_AW(DTN_FORMATQUERY)
4309 #define DTS_SHORTDATEFORMAT 0x0000
4310 #define DTS_UPDOWN 0x0001
4311 #define DTS_SHOWNONE 0x0002
4312 #define DTS_LONGDATEFORMAT 0x0004
4313 #define DTS_TIMEFORMAT 0x0009
4314 #define DTS_APPCANPARSE 0x0010
4315 #define DTS_RIGHTALIGN 0x0020
4317 typedef struct tagNMDATETIMECHANGE
4319 NMHDR nmhdr;
4320 DWORD dwFlags;
4321 SYSTEMTIME st;
4322 } NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
4324 typedef struct tagNMDATETIMESTRINGA
4326 NMHDR nmhdr;
4327 LPCSTR pszUserString;
4328 SYSTEMTIME st;
4329 DWORD dwFlags;
4330 } NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;
4332 typedef struct tagNMDATETIMESTRINGW
4334 NMHDR nmhdr;
4335 LPCWSTR pszUserString;
4336 SYSTEMTIME st;
4337 DWORD dwFlags;
4338 } NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
4340 DECL_WINELIB_TYPE_AW(NMDATETIMESTRING)
4341 DECL_WINELIB_TYPE_AW(LPNMDATETIMESTRING)
4343 typedef struct tagNMDATETIMEWMKEYDOWNA
4345 NMHDR nmhdr;
4346 int nVirtKey;
4347 LPCSTR pszFormat;
4348 SYSTEMTIME st;
4349 } NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;
4351 typedef struct tagNMDATETIMEWMKEYDOWNW
4353 NMHDR nmhdr;
4354 int nVirtKey;
4355 LPCWSTR pszFormat;
4356 SYSTEMTIME st;
4357 } NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;
4359 DECL_WINELIB_TYPE_AW(NMDATETIMEWMKEYDOWN)
4360 DECL_WINELIB_TYPE_AW(LPNMDATETIMEWMKEYDOWN)
4362 typedef struct tagNMDATETIMEFORMATA
4364 NMHDR nmhdr;
4365 LPCSTR pszFormat;
4366 SYSTEMTIME st;
4367 LPCSTR pszDisplay;
4368 CHAR szDisplay[64];
4369 } NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;
4372 typedef struct tagNMDATETIMEFORMATW
4374 NMHDR nmhdr;
4375 LPCWSTR pszFormat;
4376 SYSTEMTIME st;
4377 LPCWSTR pszDisplay;
4378 WCHAR szDisplay[64];
4379 } NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;
4381 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMAT)
4382 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMAT)
4384 typedef struct tagNMDATETIMEFORMATQUERYA
4386 NMHDR nmhdr;
4387 LPCSTR pszFormat;
4388 SIZE szMax;
4389 } NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;
4391 typedef struct tagNMDATETIMEFORMATQUERYW
4393 NMHDR nmhdr;
4394 LPCWSTR pszFormat;
4395 SIZE szMax;
4396 } NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;
4398 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMATQUERY)
4399 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMATQUERY)
4403 #define GDT_ERROR -1
4404 #define GDT_VALID 0
4405 #define GDT_NONE 1
4407 #define GDTR_MIN 0x0001
4408 #define GDTR_MAX 0x0002
4411 #define DateTime_GetSystemtime(hdp, pst) \
4412 (DWORD)SNDMSGA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
4413 #define DateTime_SetSystemtime(hdp, gd, pst) \
4414 (BOOL)SNDMSGA (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
4415 #define DateTime_GetRange(hdp, rgst) \
4416 (DWORD)SNDMSGA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
4417 #define DateTime_SetRange(hdp, gd, rgst) \
4418 (BOOL)SNDMSGA (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4419 #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
4420 #define DateTime_SetFormatA(hdp, sz) \
4421 (BOOL)SNDMSGA (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
4422 #define DateTime_SetFormatW(hdp, sz) \
4423 (BOOL)SNDMSGW (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
4424 #define DateTime_GetMonthCalColor(hdp, iColor) \
4425 SNDMSGA (hdp, DTM_GETMCCOLOR, iColor, 0)
4426 #define DateTime_GetMonthCal(hdp) \
4427 (HWND) SNDMSGA (hdp, DTM_GETMONTHCAL, 0, 0)
4428 #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \
4429 SNDMSGA (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
4430 #define DateTime_GetMonthCalFont(hdp) \
4431 SNDMSGA (hdp, DTM_GETMCFONT, 0, 0)
4433 #define DA_LAST (0x7fffffff)
4434 #define DPA_APPEND (0x7fffffff)
4435 #define DPA_ERR (-1)
4437 #define DSA_APPEND (0x7fffffff)
4438 #define DSA_ERR (-1)
4440 struct _DSA;
4441 typedef struct _DSA *HDSA;
4443 typedef INT (CALLBACK *PFNDSAENUMCALLBACK)(LPVOID, LPVOID);
4445 HDSA WINAPI DSA_Create(INT, INT);
4446 BOOL WINAPI DSA_Destroy(HDSA);
4447 void WINAPI DSA_DestroyCallback(HDSA, PFNDSAENUMCALLBACK, LPVOID);
4448 LPVOID WINAPI DSA_GetItemPtr(HDSA, INT);
4449 INT WINAPI DSA_InsertItem(HDSA, INT, LPVOID);
4451 #define DPAS_SORTED 0x0001
4452 #define DPAS_INSERTBEFORE 0x0002
4453 #define DPAS_INSERTAFTER 0x0004
4456 struct _DPA;
4457 typedef struct _DPA *HDPA;
4459 typedef INT (CALLBACK *PFNDPAENUMCALLBACK)(LPVOID, LPVOID);
4460 typedef INT (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
4462 HDPA WINAPI DPA_Create(INT);
4463 BOOL WINAPI DPA_Destroy(HDPA);
4464 LPVOID WINAPI DPA_DeletePtr(HDPA, INT);
4465 BOOL WINAPI DPA_DeleteAllPtrs(HDPA);
4466 BOOL WINAPI DPA_SetPtr(HDPA, INT, LPVOID);
4467 LPVOID WINAPI DPA_GetPtr(HDPA, INT);
4468 INT WINAPI DPA_InsertPtr(HDPA, INT, LPVOID);
4469 BOOL WINAPI DPA_Sort(HDPA, PFNDPACOMPARE, LPARAM);
4470 void WINAPI DPA_EnumCallback(HDPA, PFNDPAENUMCALLBACK, LPVOID);
4471 void WINAPI DPA_DestroyCallback(HDPA, PFNDPAENUMCALLBACK, LPVOID);
4472 INT WINAPI DPA_Search(HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
4474 BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
4476 #ifdef __cplusplus
4478 #endif
4480 #endif /* __WINE_COMMCTRL_H */