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
35 BOOL WINAPI ShowHideMenuCtl (HWND, UINT, LPINT);
36 VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, LPINT);
37 VOID WINAPI InitCommonControls (VOID);
39 typedef struct tagINITCOMMONCONTROLSEX {
42 } INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
44 BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
46 LANGID WINAPI GetMUILanguage (VOID);
47 VOID WINAPI InitMUILanguage (LANGID uiLang);
50 #define COMCTL32_VERSION 5 /* dll version */
53 #define _WIN32_IE 0x0400
56 #define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
57 #define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
58 #define ICC_BAR_CLASSES 0x00000004 /* toolbar, statusbar, trackbar, tooltips */
59 #define ICC_TAB_CLASSES 0x00000008 /* tab, tooltips */
60 #define ICC_UPDOWN_CLASS 0x00000010 /* updown */
61 #define ICC_PROGRESS_CLASS 0x00000020 /* progress */
62 #define ICC_HOTKEY_CLASS 0x00000040 /* hotkey */
63 #define ICC_ANIMATE_CLASS 0x00000080 /* animate */
64 #define ICC_WIN95_CLASSES 0x000000FF
65 #define ICC_DATE_CLASSES 0x00000100 /* month picker, date picker, time picker, updown */
66 #define ICC_USEREX_CLASSES 0x00000200 /* comboex */
67 #define ICC_COOL_CLASSES 0x00000400 /* rebar (coolbar) */
68 #define ICC_INTERNET_CLASSES 0x00000800 /* IP address, ... */
69 #define ICC_PAGESCROLLER_CLASS 0x00001000 /* page scroller */
70 #define ICC_NATIVEFNTCTL_CLASS 0x00002000 /* native font control ???*/
73 /* common control styles */
74 #define CCS_TOP 0x00000001L
75 #define CCS_NOMOVEY 0x00000002L
76 #define CCS_BOTTOM 0x00000003L
77 #define CCS_NORESIZE 0x00000004L
78 #define CCS_NOPARENTALIGN 0x00000008L
79 #define CCS_ADJUSTABLE 0x00000020L
80 #define CCS_NODIVIDER 0x00000040L
81 #define CCS_VERT 0x00000080L
82 #define CCS_LEFT (CCS_VERT|CCS_TOP)
83 #define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
84 #define CCS_NOMOVEX (CCS_VERT|CCS_NOMOVEY)
87 /* common control shared messages */
88 #define CCM_FIRST 0x2000
90 #define CCM_SETBKCOLOR (CCM_FIRST+1) /* lParam = bkColor */
91 #define CCM_SETCOLORSCHEME (CCM_FIRST+2) /* lParam = COLORSCHEME struct ptr */
92 #define CCM_GETCOLORSCHEME (CCM_FIRST+3) /* lParam = COLORSCHEME struct ptr */
93 #define CCM_GETDROPTARGET (CCM_FIRST+4)
94 #define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
95 #define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
96 #define CCM_SETVERSION (CCM_FIRST+7)
97 #define CCM_GETVERSION (CCM_FIRST+8)
98 #define CCM_SETNOTIFYWINDOW (CCM_FIRST+9) /* wParam = hwndParent */
101 /* common notification codes (WM_NOTIFY)*/
102 #define NM_FIRST (0U- 0U)
103 #define NM_LAST (0U- 99U)
104 #define NM_OUTOFMEMORY (NM_FIRST-1)
105 #define NM_CLICK (NM_FIRST-2)
106 #define NM_DBLCLK (NM_FIRST-3)
107 #define NM_RETURN (NM_FIRST-4)
108 #define NM_RCLICK (NM_FIRST-5)
109 #define NM_RDBLCLK (NM_FIRST-6)
110 #define NM_SETFOCUS (NM_FIRST-7)
111 #define NM_KILLFOCUS (NM_FIRST-8)
112 #define NM_CUSTOMDRAW (NM_FIRST-12)
113 #define NM_HOVER (NM_FIRST-13)
114 #define NM_NCHITTEST (NM_FIRST-14)
115 #define NM_KEYDOWN (NM_FIRST-15)
116 #define NM_RELEASEDCAPTURE (NM_FIRST-16)
117 #define NM_SETCURSOR (NM_FIRST-17)
118 #define NM_CHAR (NM_FIRST-18)
119 #define NM_TOOLTIPSCREATED (NM_FIRST-19)
121 #define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) \
122 (fn)((hwnd), (int)(wParam), (NMHDR*)(lParam))
123 #define FORWARD_WM_NOTIFY(hwnd, idFrom, pnmhdr, fn) \
124 (LRESULT)(fn)((hwnd), WM_NOTIFY, (WPARAM)(int)(idFrom), (LPARAM)(NMHDR*)(pnmhdr))
127 /* callback constants */
128 #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
129 #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
130 #define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
132 #define I_IMAGECALLBACK (-1)
133 #define I_IMAGENONE (-2)
134 #define I_INDENTCALLBACK (-1)
135 #define I_CHILDRENCALLBACK (-1)
137 /* owner drawn types */
138 #define ODT_HEADER 100
140 #define ODT_LISTVIEW 102
142 /* common notification structures */
143 typedef struct tagNMTOOLTIPSCREATED
147 } NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;
149 typedef struct tagNMMOUSE
155 DWORD dwHitInfo; /* info where on item or control the mouse is */
156 } NMMOUSE, *LPNMMOUSE;
158 typedef struct tagNMOBJECTNOTIFY
162 #ifdef __IID_DEFINED__
170 } NMOBJECTNOTIFY, *LPNMOBJECTNOTIFY;
172 typedef struct tagNMKEY
179 typedef struct tagNMCHAR
183 DWORD dwItemPrev; /* Item previously selected */
184 DWORD dwItemNext; /* Item to be selected */
187 #ifndef CCSIZEOF_STRUCT
188 #define CCSIZEOF_STRUCT(name, member) \
189 (((INT)((LPBYTE)(&((name*)0)->member)-((LPBYTE)((name*)0))))+ \
190 sizeof(((name*)0)->member))
194 /* This is only for Winelib applications. DON't use it wine itself!!! */
197 #define SNDMSG ::SendMessage
198 #else /* __cplusplus */
199 #define SNDMSG SendMessage
200 #endif /* __cplusplus */
205 #define SNDMSGA ::SendMessageA
206 #define SNDMSGW ::SendMessageW
208 #define SNDMSGA SendMessageA
209 #define SNDMSGW SendMessageW
212 /* Custom Draw messages */
214 #define CDRF_DODEFAULT 0x0
215 #define CDRF_NEWFONT 0x00000002
216 #define CDRF_SKIPDEFAULT 0x00000004
217 #define CDRF_NOTIFYPOSTPAINT 0x00000010
218 #define CDRF_NOTIFYITEMDRAW 0x00000020
219 #define CDRF_NOTIFYSUBITEMDRAW 0x00000020
220 #define CDRF_NOTIFYPOSTERASE 0x00000040
221 #define CDRF_NOTIFYITEMERASE 0x00000080 /* obsolete ??? */
224 /* drawstage flags */
226 #define CDDS_PREPAINT 1
227 #define CDDS_POSTPAINT 2
228 #define CDDS_PREERASE 3
229 #define CDDS_POSTERASE 4
231 #define CDDS_ITEM 0x00010000
232 #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
233 #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
234 #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
235 #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
236 #define CDDS_SUBITEM 0x00020000
238 /* itemState flags */
240 #define CDIS_SELECTED 0x0001
241 #define CDIS_GRAYED 0x0002
242 #define CDIS_DISABLED 0x0004
243 #define CDIS_CHECKED 0x0008
244 #define CDIS_FOCUS 0x0010
245 #define CDIS_DEFAULT 0x0020
246 #define CDIS_HOT 0x0040
247 #define CDIS_MARKED 0x0080
248 #define CDIS_INDETERMINATE 0x0100
251 typedef struct tagNMCUSTOMDRAWINFO
260 } NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
262 typedef struct tagNMTTCUSTOMDRAW
266 } NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
273 #define STATUSCLASSNAME16 "msctls_statusbar"
274 #define STATUSCLASSNAMEA "msctls_statusbar32"
275 #if defined(__GNUC__)
276 # define STATUSCLASSNAMEW (const WCHAR []){ 'm','s','c','t','l','s','_', \
277 's','t','a','t','u','s','b','a','r','3','2',0 }
278 #elif defined(_MSC_VER)
279 # define STATUSCLASSNAMEW L"msctls_statusbar32"
281 static const WCHAR STATUSCLASSNAMEW[] = { 'm','s','c','t','l','s','_',
282 's','t','a','t','u','s','b','a','r','3','2',0 };
284 #define STATUSCLASSNAME WINELIB_NAME_AW(STATUSCLASSNAME)
286 #define SBT_NOBORDERS 0x0100
287 #define SBT_POPOUT 0x0200
288 #define SBT_RTLREADING 0x0400 /* not supported */
289 #define SBT_TOOLTIPS 0x0800
290 #define SBT_OWNERDRAW 0x1000
292 #define SBARS_SIZEGRIP 0x0100
294 #define SB_SETTEXTA (WM_USER+1)
295 #define SB_SETTEXTW (WM_USER+11)
296 #define SB_SETTEXT WINELIB_NAME_AW(SB_SETTEXT)
297 #define SB_GETTEXTA (WM_USER+2)
298 #define SB_GETTEXTW (WM_USER+13)
299 #define SB_GETTEXT WINELIB_NAME_AW(SB_GETTEXT)
300 #define SB_GETTEXTLENGTHA (WM_USER+3)
301 #define SB_GETTEXTLENGTHW (WM_USER+12)
302 #define SB_GETTEXTLENGTH WINELIB_NAME_AW(SB_GETTEXTLENGTH)
303 #define SB_SETPARTS (WM_USER+4)
304 #define SB_SETBORDERS (WM_USER+5)
305 #define SB_GETPARTS (WM_USER+6)
306 #define SB_GETBORDERS (WM_USER+7)
307 #define SB_SETMINHEIGHT (WM_USER+8)
308 #define SB_SIMPLE (WM_USER+9)
309 #define SB_GETRECT (WM_USER+10)
310 #define SB_ISSIMPLE (WM_USER+14)
311 #define SB_SETICON (WM_USER+15)
312 #define SB_SETTIPTEXTA (WM_USER+16)
313 #define SB_SETTIPTEXTW (WM_USER+17)
314 #define SB_SETTIPTEXT WINELIB_NAME_AW(SB_SETTIPTEXT)
315 #define SB_GETTIPTEXTA (WM_USER+18)
316 #define SB_GETTIPTEXTW (WM_USER+19)
317 #define SB_GETTIPTEXT WINELIB_NAME_AW(SB_GETTIPTEXT)
318 #define SB_GETICON (WM_USER+20)
319 #define SB_SETBKCOLOR CCM_SETBKCOLOR /* lParam = bkColor */
320 #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
321 #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
323 #define SBN_FIRST (0U-880U)
324 #define SBN_LAST (0U-899U)
325 #define SBN_SIMPLEMODECHANGE (SBN_FIRST-0)
327 HWND WINAPI CreateStatusWindowA (INT, LPCSTR, HWND, UINT);
328 HWND WINAPI CreateStatusWindowW (INT, LPCWSTR, HWND, UINT);
329 #define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
330 VOID WINAPI DrawStatusTextA (HDC, LPRECT, LPCSTR, UINT);
331 VOID WINAPI DrawStatusTextW (HDC, LPRECT, LPCWSTR, UINT);
332 #define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
333 VOID WINAPI MenuHelp (UINT, WPARAM, LPARAM, HMENU,
334 HINSTANCE, HWND, UINT*);
336 typedef struct tagCOLORSCHEME
339 COLORREF clrBtnHighlight; /* highlight color */
340 COLORREF clrBtnShadow; /* shadow color */
341 } COLORSCHEME, *LPCOLORSCHEME;
343 /**************************************************************************
347 typedef struct tagDRAGLISTINFO
352 } DRAGLISTINFO, *LPDRAGLISTINFO;
354 #define DL_BEGINDRAG (WM_USER+133)
355 #define DL_DRAGGING (WM_USER+134)
356 #define DL_DROPPED (WM_USER+135)
357 #define DL_CANCELDRAG (WM_USER+136)
359 #define DL_CURSORSET 0
360 #define DL_STOPCURSOR 1
361 #define DL_COPYCURSOR 2
362 #define DL_MOVECURSOR 3
364 #define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
366 BOOL WINAPI MakeDragList (HWND);
367 VOID WINAPI DrawInsert (HWND, HWND, INT);
368 INT WINAPI LBItemFromPt (HWND, POINT, BOOL);
373 #define UPDOWN_CLASS16 "msctls_updown"
374 #define UPDOWN_CLASSA "msctls_updown32"
375 #if defined(__GNUC__)
376 # define UPDOWN_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
377 'u','p','d','o','w','n','3','2',0 }
378 #elif defined(_MSC_VER)
379 # define UPDOWN_CLASSW L"msctls_updown32"
381 static const WCHAR UPDOWN_CLASSW[] = { 'm','s','c','t','l','s','_',
382 'u','p','d','o','w','n','3','2',0 };
384 #define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
386 typedef struct tagUDACCEL
390 } UDACCEL, *LPUDACCEL;
392 #define UD_MAXVAL 0x7fff
393 #define UD_MINVAL 0x8001
395 #define UDS_WRAP 0x0001
396 #define UDS_SETBUDDYINT 0x0002
397 #define UDS_ALIGNRIGHT 0x0004
398 #define UDS_ALIGNLEFT 0x0008
399 #define UDS_AUTOBUDDY 0x0010
400 #define UDS_ARROWKEYS 0x0020
401 #define UDS_HORZ 0x0040
402 #define UDS_NOTHOUSANDS 0x0080
403 #define UDS_HOTTRACK 0x0100
405 #define UDN_FIRST (0U-721)
406 #define UDN_LAST (0U-740)
407 #define UDN_DELTAPOS (UDN_FIRST-1)
409 #define UDM_SETRANGE (WM_USER+101)
410 #define UDM_GETRANGE (WM_USER+102)
411 #define UDM_SETPOS (WM_USER+103)
412 #define UDM_GETPOS (WM_USER+104)
413 #define UDM_SETBUDDY (WM_USER+105)
414 #define UDM_GETBUDDY (WM_USER+106)
415 #define UDM_SETACCEL (WM_USER+107)
416 #define UDM_GETACCEL (WM_USER+108)
417 #define UDM_SETBASE (WM_USER+109)
418 #define UDM_GETBASE (WM_USER+110)
419 #define UDM_SETRANGE32 (WM_USER+111)
420 #define UDM_GETRANGE32 (WM_USER+112)
421 #define UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
422 #define UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
423 #define UDM_SETPOS32 (WM_USER+113)
424 #define UDM_GETPOS32 (WM_USER+114)
427 #define NMUPDOWN NM_UPDOWN
428 #define LPNMUPDOWN LPNM_UPDOWN
430 typedef struct tagNM_UPDOWN
435 } NM_UPDOWN, *LPNM_UPDOWN;
437 HWND WINAPI CreateUpDownControl (DWORD, INT, INT, INT, INT,
438 HWND, INT, HINSTANCE, HWND,
443 #define PROGRESS_CLASS16 "msctls_progress"
444 #define PROGRESS_CLASSA "msctls_progress32"
445 #if defined(__GNUC__)
446 # define PROGRESS_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
447 'p','r','o','g','r','e','s','s','3','2',0 }
448 #elif defined(_MSC_VER)
449 # define PROGRESS_CLASSW L"msctls_progress32"
451 static const WCHAR PROGRESS_CLASSW[] = { 'm','s','c','t','l','s','_',
452 'p','r','o','g','r','e','s','s','3','2',0 };
454 #define PROGRESS_CLASS WINELIB_NAME_AW(PROGRESS_CLASS)
456 #define PBM_SETRANGE (WM_USER+1)
457 #define PBM_SETPOS (WM_USER+2)
458 #define PBM_DELTAPOS (WM_USER+3)
459 #define PBM_SETSTEP (WM_USER+4)
460 #define PBM_STEPIT (WM_USER+5)
461 #define PBM_SETRANGE32 (WM_USER+6)
462 #define PBM_GETRANGE (WM_USER+7)
463 #define PBM_GETPOS (WM_USER+8)
464 #define PBM_SETBARCOLOR (WM_USER+9)
465 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
467 #define PBS_SMOOTH 0x01
468 #define PBS_VERTICAL 0x04
474 } PBRANGE, *PPBRANGE;
480 typedef struct _IMAGELIST *HIMAGELIST;
482 #define CLR_NONE 0xFFFFFFFF
483 #define CLR_DEFAULT 0xFF000000
484 #define CLR_HILIGHT CLR_DEFAULT
486 #define ILC_MASK 0x0001
487 #define ILC_COLOR 0x0000
488 #define ILC_COLORDDB 0x00FE
489 #define ILC_COLOR4 0x0004
490 #define ILC_COLOR8 0x0008
491 #define ILC_COLOR16 0x0010
492 #define ILC_COLOR24 0x0018
493 #define ILC_COLOR32 0x0020
494 #define ILC_PALETTE 0x0800 /* no longer supported by M$ */
496 #define ILD_NORMAL 0x0000
497 #define ILD_TRANSPARENT 0x0001
498 #define ILD_BLEND25 0x0002
499 #define ILD_BLEND50 0x0004
500 #define ILD_MASK 0x0010
501 #define ILD_IMAGE 0x0020
502 #define ILD_ROP 0x0040
503 #define ILD_OVERLAYMASK 0x0F00
504 #define ILD_PRESERVEALPHA 0x1000
505 #define ILD_SCALE 0x2000
506 #define ILD_DPISCALE 0x4000
508 #define ILD_SELECTED ILD_BLEND50
509 #define ILD_FOCUS ILD_BLEND25
510 #define ILD_BLEND ILD_BLEND50
512 #define INDEXTOOVERLAYMASK(i) ((i)<<8)
513 #define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
515 #define ILCF_MOVE (0x00000000)
516 #define ILCF_SWAP (0x00000001)
518 #define ILS_NORMAL 0x0000
519 #define ILS_GLOW 0x0001
520 #define ILS_SHADOW 0x0002
521 #define ILS_SATURATE 0x0004
522 #define ILS_ALPHA 0x0008
524 typedef struct _IMAGEINFO
531 } IMAGEINFO, *LPIMAGEINFO;
534 typedef struct _IMAGELISTDRAWPARAMS
544 INT xBitmap; /* x offest from the upperleft of bitmap */
545 INT yBitmap; /* y offset from the upperleft of bitmap */
553 } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
556 INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
557 INT WINAPI ImageList_AddIcon (HIMAGELIST, HICON);
558 INT WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
559 BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT);
560 BOOL WINAPI ImageList_Copy(HIMAGELIST,INT,HIMAGELIST,INT,INT);
561 HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
562 BOOL WINAPI ImageList_Destroy(HIMAGELIST);
563 BOOL WINAPI ImageList_DragEnter(HWND,INT,INT);
564 BOOL WINAPI ImageList_DragLeave(HWND);
565 BOOL WINAPI ImageList_DragMove(INT,INT);
566 BOOL WINAPI ImageList_DragShowNolock (BOOL);
567 BOOL WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
568 BOOL WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
569 INT,COLORREF,COLORREF,UINT);
570 BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
571 HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
572 BOOL WINAPI ImageList_EndDrag(VOID);
573 COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
574 HIMAGELIST WINAPI ImageList_GetDragImage(POINT*,POINT*);
575 HICON WINAPI ImageList_GetIcon(HIMAGELIST,INT,UINT);
576 BOOL WINAPI ImageList_GetIconSize(HIMAGELIST,INT*,INT*);
577 INT WINAPI ImageList_GetImageCount(HIMAGELIST);
578 BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST,INT,IMAGEINFO*);
579 BOOL WINAPI ImageList_GetImageRect(HIMAGELIST,INT,LPRECT);
580 HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,INT,INT,
582 HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,INT,INT,
584 #define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
585 HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
586 #ifdef IStream_IMETHODS
587 HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
589 BOOL WINAPI ImageList_Remove(HIMAGELIST,INT);
590 BOOL WINAPI ImageList_Replace(HIMAGELIST,INT,HBITMAP,HBITMAP);
591 INT WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT,HICON);
592 COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
593 BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT,INT,INT);
595 BOOL WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
596 BOOL WINAPI ImageList_SetImageCount(HIMAGELIST,INT);
597 BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
598 #ifdef IStream_IMETHODS
599 BOOL WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
603 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
605 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
606 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
607 ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
608 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
611 #ifndef WM_MOUSEHOVER
612 #define WM_MOUSEHOVER 0x02A1
613 #define WM_MOUSELEAVE 0x02A3
618 #define TME_HOVER 0x00000001
619 #define TME_LEAVE 0x00000002
620 #define TME_QUERY 0x40000000
621 #define TME_CANCEL 0x80000000
624 #define HOVER_DEFAULT 0xFFFFFFFF
626 typedef struct tagTRACKMOUSEEVENT {
631 } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
638 LPTRACKMOUSEEVENT lpEventTrack);
640 /* Flat Scrollbar control */
642 #define FLATSB_CLASS16 "flatsb_class"
643 #define FLATSB_CLASSA "flatsb_class32"
644 #if defined(__GNUC__)
645 # define FLATSB_CLASSW (const WCHAR []){ 'f','l','a','t','s','b','_', \
646 'c','l','a','s','s','3','2',0 }
647 #elif defined(_MSC_VER)
648 # define FLATSB_CLASSW L"flatsb_class32"
650 static const WCHAR FLATSB_CLASSW[] = { 'f','l','a','t','s','b','_',
651 'c','l','a','s','s','3','2',0 };
653 #define FLATSB_CLASS WINELIB_NAME_AW(FLATSB_CLASS)
655 #define WSB_PROP_CYVSCROLL 0x00000001L
656 #define WSB_PROP_CXHSCROLL 0x00000002L
657 #define WSB_PROP_CYHSCROLL 0x00000004L
658 #define WSB_PROP_CXVSCROLL 0x00000008L
659 #define WSB_PROP_CXHTHUMB 0x00000010L
660 #define WSB_PROP_CYVTHUMB 0x00000020L
661 #define WSB_PROP_VBKGCOLOR 0x00000040L
662 #define WSB_PROP_HBKGCOLOR 0x00000080L
663 #define WSB_PROP_VSTYLE 0x00000100L
664 #define WSB_PROP_HSTYLE 0x00000200L
665 #define WSB_PROP_WINSTYLE 0x00000400L
666 #define WSB_PROP_PALETTE 0x00000800L
667 #define WSB_PROP_MASK 0x00000FFFL
669 #define FSB_REGULAR_MODE 0
670 #define FSB_ENCARTA_MODE 1
671 #define FSB_FLAT_MODE 2
674 BOOL WINAPI FlatSB_EnableScrollBar(HWND, INT, UINT);
675 BOOL WINAPI FlatSB_ShowScrollBar(HWND, INT, BOOL);
676 BOOL WINAPI FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT);
677 BOOL WINAPI FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO);
678 INT WINAPI FlatSB_GetScrollPos(HWND, INT);
679 BOOL WINAPI FlatSB_GetScrollProp(HWND, INT, LPINT);
680 INT WINAPI FlatSB_SetScrollPos(HWND, INT, INT, BOOL);
681 INT WINAPI FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL);
682 INT WINAPI FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL);
683 BOOL WINAPI FlatSB_SetScrollProp(HWND, UINT, INT, BOOL);
684 BOOL WINAPI InitializeFlatSB(HWND);
685 HRESULT WINAPI UninitializeFlatSB(HWND);
687 /* Subclassing stuff */
688 typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR);
689 BOOL WINAPI SetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
690 BOOL WINAPI GetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR*);
691 BOOL WINAPI RemoveWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR);
692 LRESULT WINAPI DefSubclassProc(HWND, UINT, WPARAM, LPARAM);
696 #define WC_HEADER16 "SysHeader"
697 #define WC_HEADERA "SysHeader32"
698 #if defined(__GNUC__)
699 # define WC_HEADERW (const WCHAR []){ 'S','y','s','H','e','a','d','e','r','3','2',0 }
700 #elif defined(_MSC_VER)
701 # define WC_HEADERW L"SysHeader32"
703 static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',0 };
705 #define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
707 #define HDS_HORZ 0x0000
708 #define HDS_BUTTONS 0x0002
709 #define HDS_HOTTRACK 0x0004
710 #define HDS_HIDDEN 0x0008
711 #define HDS_DRAGDROP 0x0040
712 #define HDS_FULLDRAG 0x0080
714 #define HDI_WIDTH 0x0001
715 #define HDI_HEIGHT HDI_WIDTH
716 #define HDI_TEXT 0x0002
717 #define HDI_FORMAT 0x0004
718 #define HDI_LPARAM 0x0008
719 #define HDI_BITMAP 0x0010
720 #define HDI_IMAGE 0x0020
721 #define HDI_DI_SETITEM 0x0040
722 #define HDI_ORDER 0x0080
724 #define HDF_LEFT 0x0000
725 #define HDF_RIGHT 0x0001
726 #define HDF_CENTER 0x0002
727 #define HDF_JUSTIFYMASK 0x0003
728 #define HDF_RTLREADING 0x0004
730 #define HDF_IMAGE 0x0800
731 #define HDF_BITMAP_ON_RIGHT 0x1000
732 #define HDF_BITMAP 0x2000
733 #define HDF_STRING 0x4000
734 #define HDF_OWNERDRAW 0x8000
736 #define HHT_NOWHERE 0x0001
737 #define HHT_ONHEADER 0x0002
738 #define HHT_ONDIVIDER 0x0004
739 #define HHT_ONDIVOPEN 0x0008
740 #define HHT_ABOVE 0x0100
741 #define HHT_BELOW 0x0200
742 #define HHT_TORIGHT 0x0400
743 #define HHT_TOLEFT 0x0800
745 #define HDM_FIRST 0x1200
746 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
747 #define HDM_INSERTITEMA (HDM_FIRST+1)
748 #define HDM_INSERTITEMW (HDM_FIRST+10)
749 #define HDM_INSERTITEM WINELIB_NAME_AW(HDM_INSERTITEM)
750 #define HDM_DELETEITEM (HDM_FIRST+2)
751 #define HDM_GETITEMA (HDM_FIRST+3)
752 #define HDM_GETITEMW (HDM_FIRST+11)
753 #define HDM_GETITEM WINELIB_NAME_AW(HDM_GETITEM)
754 #define HDM_SETITEMA (HDM_FIRST+4)
755 #define HDM_SETITEMW (HDM_FIRST+12)
756 #define HDM_SETITEM WINELIB_NAME_AW(HDM_SETITEM)
757 #define HDM_LAYOUT (HDM_FIRST+5)
758 #define HDM_HITTEST (HDM_FIRST+6)
759 #define HDM_GETITEMRECT (HDM_FIRST+7)
760 #define HDM_SETIMAGELIST (HDM_FIRST+8)
761 #define HDM_GETIMAGELIST (HDM_FIRST+9)
763 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
764 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
765 #define HDM_GETORDERARRAY (HDM_FIRST+17)
766 #define HDM_SETORDERARRAY (HDM_FIRST+18)
767 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
768 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
769 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
771 #define HDN_FIRST (0U-300U)
772 #define HDN_LAST (0U-399U)
773 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
774 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
775 #define HDN_ITEMCHANGING WINELIB_NAME_AW(HDN_ITEMCHANGING)
776 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
777 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
778 #define HDN_ITEMCHANGED WINELIB_NAME_AW(HDN_ITEMCHANGED)
779 #define HDN_ITEMCLICKA (HDN_FIRST-2)
780 #define HDN_ITEMCLICKW (HDN_FIRST-22)
781 #define HDN_ITEMCLICK WINELIB_NAME_AW(HDN_ITEMCLICK)
782 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
783 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
784 #define HDN_ITEMDBLCLICK WINELIB_NAME_AW(HDN_ITEMDBLCLICK)
785 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
786 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
787 #define HDN_DIVIDERDBLCLICK WINELIB_NAME_AW(HDN_DIVIDERDBLCLICK)
788 #define HDN_BEGINTRACKA (HDN_FIRST-6)
789 #define HDN_BEGINTRACKW (HDN_FIRST-26)
790 #define HDN_BEGINTRACK WINELIB_NAME_AW(HDN_BEGINTRACK)
791 #define HDN_ENDTRACKA (HDN_FIRST-7)
792 #define HDN_ENDTRACKW (HDN_FIRST-27)
793 #define HDN_ENDTRACK WINELIB_NAME_AW(HDN_ENDTRACK)
794 #define HDN_TRACKA (HDN_FIRST-8)
795 #define HDN_TRACKW (HDN_FIRST-28)
796 #define HDN_TRACK WINELIB_NAME_AW(HDN_TRACK)
797 #define HDN_GETDISPINFOA (HDN_FIRST-9)
798 #define HDN_GETDISPINFOW (HDN_FIRST-29)
799 #define HDN_GETDISPINFO WINELIB_NAME_AW(HDN_GETDISPINFO)
800 #define HDN_BEGINDRAG (HDN_FIRST-10)
801 #define HDN_ENDDRAG (HDN_FIRST-11)
803 typedef struct _HD_LAYOUT
807 } HDLAYOUT, *LPHDLAYOUT;
809 #define HD_LAYOUT HDLAYOUT
811 typedef struct _HD_ITEMA
824 } HDITEMA, *LPHDITEMA;
826 typedef struct _HD_ITEMW
839 } HDITEMW, *LPHDITEMW;
841 #define HDITEM WINELIB_NAME_AW(HDITEM)
842 #define LPHDITEM WINELIB_NAME_AW(LPHDITEM)
843 #define HD_ITEM HDITEM
845 #define HDITEM_V1_SIZEA CCSIZEOF_STRUCT(HDITEMA, lParam)
846 #define HDITEM_V1_SIZEW CCSIZEOF_STRUCT(HDITEMW, lParam)
847 #define HDITEM_V1_SIZE WINELIB_NAME_AW(HDITEM_V1_SIZE)
849 typedef struct _HD_HITTESTINFO
854 } HDHITTESTINFO, *LPHDHITTESTINFO;
856 #define HD_HITTESTINFO HDHITTESTINFO
858 typedef struct tagNMHEADERA
864 } NMHEADERA, *LPNMHEADERA;
866 typedef struct tagNMHEADERW
872 } NMHEADERW, *LPNMHEADERW;
874 #define NMHEADER WINELIB_NAME_AW(NMHEADER)
875 #define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
876 #define HD_NOTIFY NMHEADER
878 typedef struct tagNMHDDISPINFOA
887 } NMHDDISPINFOA, *LPNMHDDISPINFOA;
889 typedef struct tagNMHDDISPINFOW
898 } NMHDDISPINFOW, *LPNMHDDISPINFOW;
900 #define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
901 #define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
903 #define Header_GetItemCount(hwndHD) \
904 (INT)SNDMSGA((hwndHD),HDM_GETITEMCOUNT,0,0L)
905 #define Header_InsertItemA(hwndHD,i,phdi) \
906 (INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
907 #define Header_InsertItemW(hwndHD,i,phdi) \
908 (INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
909 #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
910 #define Header_DeleteItem(hwndHD,i) \
911 (BOOL)SNDMSGA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
912 #define Header_GetItemA(hwndHD,i,phdi) \
913 (BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
914 #define Header_GetItemW(hwndHD,i,phdi) \
915 (BOOL)SNDMSGW((hwndHD),HDM_GETITEMW,(WPARAM)(INT)(i),(LPARAM)(HDITEMW*)(phdi))
916 #define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
917 #define Header_SetItemA(hwndHD,i,phdi) \
918 (BOOL)SNDMSGA((hwndHD),HDM_SETITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
919 #define Header_SetItemW(hwndHD,i,phdi) \
920 (BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
921 #define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
922 #define Header_Layout(hwndHD,playout) \
923 (BOOL)SNDMSGA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
924 #define Header_GetItemRect(hwnd,iItem,lprc) \
925 (BOOL)SNDMSGA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
926 #define Header_SetImageList(hwnd,himl) \
927 (HIMAGELIST)SNDMSGA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
928 #define Header_GetImageList(hwnd) \
929 (HIMAGELIST)SNDMSGA((hwnd),HDM_GETIMAGELIST,0,0)
930 #define Header_OrderToIndex(hwnd,i) \
931 (INT)SNDMSGA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
932 #define Header_CreateDragImage(hwnd,i) \
933 (HIMAGELIST)SNDMSGA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
934 #define Header_GetOrderArray(hwnd,iCount,lpi) \
935 (BOOL)SNDMSGA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
936 #define Header_SetOrderArray(hwnd,iCount,lpi) \
937 (BOOL)SNDMSGA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
938 #define Header_SetHotDivider(hwnd,fPos,dw) \
939 (INT)SNDMSGA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
940 #define Header_SetUnicodeFormat(hwnd,fUnicode) \
941 (BOOL)SNDMSGA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
942 #define Header_GetUnicodeFormat(hwnd) \
943 (BOOL)SNDMSGA((hwnd),HDM_GETUNICODEFORMAT,0,0)
948 #define TOOLBARCLASSNAME16 "ToolbarWindow"
949 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
950 #if defined(__GNUC__)
951 # define TOOLBARCLASSNAMEW (const WCHAR []){ 'T','o','o','l','b','a','r', \
952 'W','i','n','d','o','w','3','2',0 }
953 #elif defined(_MSC_VER)
954 # define TOOLBARCLASSNAMEW L"ToolbarWindow32"
956 static const WCHAR TOOLBARCLASSNAMEW[] = { 'T','o','o','l','b','a','r',
957 'W','i','n','d','o','w','3','2',0 };
959 #define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
961 #define CMB_MASKED 0x02
963 #define TBSTATE_CHECKED 0x01
964 #define TBSTATE_PRESSED 0x02
965 #define TBSTATE_ENABLED 0x04
966 #define TBSTATE_HIDDEN 0x08
967 #define TBSTATE_INDETERMINATE 0x10
968 #define TBSTATE_WRAP 0x20
969 #define TBSTATE_ELLIPSES 0x40
970 #define TBSTATE_MARKED 0x80
973 /* as of _WIN32_IE >= 0x0500 the following symbols are obsolete,
974 * "everyone" should use the BTNS_... stuff below
976 #define TBSTYLE_BUTTON 0x00
977 #define TBSTYLE_SEP 0x01
978 #define TBSTYLE_CHECK 0x02
979 #define TBSTYLE_GROUP 0x04
980 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
981 #define TBSTYLE_DROPDOWN 0x08
982 #define TBSTYLE_AUTOSIZE 0x10
983 #define TBSTYLE_NOPREFIX 0x20
984 #define BTNS_BUTTON TBSTYLE_BUTTON
985 #define BTNS_SEP TBSTYLE_SEP
986 #define BTNS_CHECK TBSTYLE_CHECK
987 #define BTNS_GROUP TBSTYLE_GROUP
988 #define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP
989 #define BTNS_DROPDOWN TBSTYLE_DROPDOWN
990 #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE
991 #define BTNS_NOPREFIX TBSTYLE_NOPREFIX
992 #define BTNS_SHOWTEXT 0x40 /* ignored unless TBSTYLE_EX_MIXEDB set */
993 #define BTNS_WHOLEDROPDOWN 0x80 /* draw dropdown arrow, but without split arrow section */
995 #define TBSTYLE_TOOLTIPS 0x0100
996 #define TBSTYLE_WRAPABLE 0x0200
997 #define TBSTYLE_ALTDRAG 0x0400
998 #define TBSTYLE_FLAT 0x0800
999 #define TBSTYLE_LIST 0x1000
1000 #define TBSTYLE_CUSTOMERASE 0x2000
1001 #define TBSTYLE_REGISTERDROP 0x4000
1002 #define TBSTYLE_TRANSPARENT 0x8000
1003 #define TBSTYLE_EX_DRAWDDARROWS 0x00000001
1004 #define TBSTYLE_EX_UNDOC1 0x00000004 /* similar to TBSTYLE_WRAPABLE */
1005 #define TBSTYLE_EX_MIXEDBUTTONS 0x00000008
1006 #define TBSTYLE_EX_HIDECLIPPEDBUTTONS 0x00000010 /* don't show partially obscured buttons */
1007 #define TBSTYLE_EX_DOUBLEBUFFER 0x00000080 /* Double Buffer the toolbar ??? */
1009 #define TBIF_IMAGE 0x00000001
1010 #define TBIF_TEXT 0x00000002
1011 #define TBIF_STATE 0x00000004
1012 #define TBIF_STYLE 0x00000008
1013 #define TBIF_LPARAM 0x00000010
1014 #define TBIF_COMMAND 0x00000020
1015 #define TBIF_SIZE 0x00000040
1017 #define TBBF_LARGE 0x0001
1019 #define TB_ENABLEBUTTON (WM_USER+1)
1020 #define TB_CHECKBUTTON (WM_USER+2)
1021 #define TB_PRESSBUTTON (WM_USER+3)
1022 #define TB_HIDEBUTTON (WM_USER+4)
1023 #define TB_INDETERMINATE (WM_USER+5)
1024 #define TB_MARKBUTTON (WM_USER+6)
1025 #define TB_ISBUTTONENABLED (WM_USER+9)
1026 #define TB_ISBUTTONCHECKED (WM_USER+10)
1027 #define TB_ISBUTTONPRESSED (WM_USER+11)
1028 #define TB_ISBUTTONHIDDEN (WM_USER+12)
1029 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
1030 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
1031 #define TB_SETSTATE (WM_USER+17)
1032 #define TB_GETSTATE (WM_USER+18)
1033 #define TB_ADDBITMAP (WM_USER+19)
1034 #define TB_ADDBUTTONSA (WM_USER+20)
1035 #define TB_ADDBUTTONSW (WM_USER+68)
1036 #define TB_ADDBUTTONS WINELIB_NAME_AW(TB_ADDBUTTONS)
1037 #define TB_HITTEST (WM_USER+69)
1038 #define TB_INSERTBUTTONA (WM_USER+21)
1039 #define TB_INSERTBUTTONW (WM_USER+67)
1040 #define TB_INSERTBUTTON WINELIB_NAME_AW(TB_INSERTBUTTON)
1041 #define TB_DELETEBUTTON (WM_USER+22)
1042 #define TB_GETBUTTON (WM_USER+23)
1043 #define TB_BUTTONCOUNT (WM_USER+24)
1044 #define TB_COMMANDTOINDEX (WM_USER+25)
1045 #define TB_SAVERESTOREA (WM_USER+26)
1046 #define TB_SAVERESTOREW (WM_USER+76)
1047 #define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
1048 #define TB_CUSTOMIZE (WM_USER+27)
1049 #define TB_ADDSTRINGA (WM_USER+28)
1050 #define TB_ADDSTRINGW (WM_USER+77)
1051 #define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
1052 #define TB_GETITEMRECT (WM_USER+29)
1053 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
1054 #define TB_SETBUTTONSIZE (WM_USER+31)
1055 #define TB_SETBITMAPSIZE (WM_USER+32)
1056 #define TB_AUTOSIZE (WM_USER+33)
1057 #define TB_GETTOOLTIPS (WM_USER+35)
1058 #define TB_SETTOOLTIPS (WM_USER+36)
1059 #define TB_SETPARENT (WM_USER+37)
1060 #define TB_SETROWS (WM_USER+39)
1061 #define TB_GETROWS (WM_USER+40)
1062 #define TB_GETBITMAPFLAGS (WM_USER+41)
1063 #define TB_SETCMDID (WM_USER+42)
1064 #define TB_CHANGEBITMAP (WM_USER+43)
1065 #define TB_GETBITMAP (WM_USER+44)
1066 #define TB_GETBUTTONTEXTA (WM_USER+45)
1067 #define TB_GETBUTTONTEXTW (WM_USER+75)
1068 #define TB_GETBUTTONTEXT WINELIB_NAME_AW(TB_GETBUTTONTEXT)
1069 #define TB_REPLACEBITMAP (WM_USER+46)
1070 #define TB_SETINDENT (WM_USER+47)
1071 #define TB_SETIMAGELIST (WM_USER+48)
1072 #define TB_GETIMAGELIST (WM_USER+49)
1073 #define TB_LOADIMAGES (WM_USER+50)
1074 #define TB_GETRECT (WM_USER+51) /* wParam is the Cmd instead of index */
1075 #define TB_SETHOTIMAGELIST (WM_USER+52)
1076 #define TB_GETHOTIMAGELIST (WM_USER+53)
1077 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
1078 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
1079 #define TB_SETSTYLE (WM_USER+56)
1080 #define TB_GETSTYLE (WM_USER+57)
1081 #define TB_GETBUTTONSIZE (WM_USER+58)
1082 #define TB_SETBUTTONWIDTH (WM_USER+59)
1083 #define TB_SETMAXTEXTROWS (WM_USER+60)
1084 #define TB_GETTEXTROWS (WM_USER+61)
1085 #define TB_GETOBJECT (WM_USER+62)
1086 #define TB_GETBUTTONINFOW (WM_USER+63)
1087 #define TB_GETBUTTONINFOA (WM_USER+65)
1088 #define TB_GETBUTTONINFO WINELIB_NAME_AW(TB_GETBUTTONINFO)
1089 #define TB_SETBUTTONINFOW (WM_USER+64)
1090 #define TB_SETBUTTONINFOA (WM_USER+66)
1091 #define TB_SETBUTTONINFO WINELIB_NAME_AW(TB_SETBUTTONINFO)
1092 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
1093 #define TB_GETHOTITEM (WM_USER+71)
1094 #define TB_SETHOTITEM (WM_USER+72)
1095 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
1096 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
1097 #define TB_MAPACCELERATORA (WM_USER+78)
1098 #define TB_MAPACCELERATORW (WM_USER+90)
1099 #define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
1100 #define TB_GETINSERTMARK (WM_USER+79)
1101 #define TB_SETINSERTMARK (WM_USER+80)
1102 #define TB_INSERTMARKHITTEST (WM_USER+81)
1103 #define TB_MOVEBUTTON (WM_USER+82)
1104 #define TB_GETMAXSIZE (WM_USER+83)
1105 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
1106 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
1107 #define TB_GETPADDING (WM_USER+86)
1108 #define TB_SETPADDING (WM_USER+87)
1109 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
1110 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
1111 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1112 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1113 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1114 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1115 #define TB_GETSTRINGW (WM_USER+91)
1116 #define TB_GETSTRINGA (WM_USER+92)
1117 #define TB_GETSTRING WINELIB_NAME_AW(TB_GETSTRING)
1119 /* undocumented messages in Toolbar */
1120 #define TB_UNKWN45D (WM_USER+93)
1121 #define TB_UNKWN45E (WM_USER+94)
1122 #define TB_UNKWN460 (WM_USER+96)
1123 #define TB_UNKWN463 (WM_USER+99)
1124 #define TB_UNKWN464 (WM_USER+100)
1127 #define TBN_FIRST (0U-700U)
1128 #define TBN_LAST (0U-720U)
1129 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
1130 #define TBN_GETBUTTONINFOW (TBN_FIRST-20)
1131 #define TBN_GETBUTTONINFO WINELIB_NAME_AW(TBN_GETBUTTONINFO)
1132 #define TBN_BEGINDRAG (TBN_FIRST-1)
1133 #define TBN_ENDDRAG (TBN_FIRST-2)
1134 #define TBN_BEGINADJUST (TBN_FIRST-3)
1135 #define TBN_ENDADJUST (TBN_FIRST-4)
1136 #define TBN_RESET (TBN_FIRST-5)
1137 #define TBN_QUERYINSERT (TBN_FIRST-6)
1138 #define TBN_QUERYDELETE (TBN_FIRST-7)
1139 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
1140 #define TBN_CUSTHELP (TBN_FIRST-9)
1141 #define TBN_DROPDOWN (TBN_FIRST-10)
1142 #define TBN_GETOBJECT (TBN_FIRST-12)
1143 #define TBN_HOTITEMCHANGE (TBN_FIRST-13)
1144 #define TBN_DRAGOUT (TBN_FIRST-14)
1145 #define TBN_DELETINGBUTTON (TBN_FIRST-15)
1146 #define TBN_GETDISPINFOA (TBN_FIRST-16)
1147 #define TBN_GETDISPINFOW (TBN_FIRST-17)
1148 #define TBN_GETDISPINFO WINELIB_NAME_AW(TBN_GETDISPINFO)
1149 #define TBN_GETINFOTIPA (TBN_FIRST-18)
1150 #define TBN_GETINFOTIPW (TBN_FIRST-19)
1151 #define TBN_GETINFOTIP WINELIB_NAME_AW(TBN_GETINFOTIP)
1152 #define TBN_INITCUSTOMIZE (TBN_FIRST-23)
1153 #define TBNRF_HIDEHELP 0x00000001
1156 /* Return values from TBN_DROPDOWN */
1157 #define TBDDRET_DEFAULT 0
1158 #define TBDDRET_NODEFAULT 1
1159 #define TBDDRET_TREATPRESSED 2
1161 typedef struct _NMTBCUSTOMDRAW
1164 HBRUSH hbrMonoDither;
1169 COLORREF clrTextHighlight;
1170 COLORREF clrBtnFace;
1171 COLORREF clrBtnHighlight;
1172 COLORREF clrHighlightHotTrack;
1175 int nHLStringBkMode;
1176 } NMTBCUSTOMDRAW, *LPNMTBCUSTOMDRAW;
1178 /* return flags for Toolbar NM_CUSTOMDRAW notifications */
1179 #define TBCDRF_NOEDGES 0x00010000 /* Don't draw button edges */
1180 #define TBCDRF_HILITEHOTTRACK 0x00020000 /* Use color of the button bkgnd */
1181 /* when hottracked */
1182 #define TBCDRF_NOOFFSET 0x00040000 /* No offset button if pressed */
1183 #define TBCDRF_NOMARK 0x00080000 /* Don't draw default highlight */
1184 /* for TBSTATE_MARKED */
1185 #define TBCDRF_NOETCHEDEFFECT 0x00100000 /* No etched effect for */
1186 /* disabled items */
1187 #define TBCDRF_BLENDICON 0x00200000 /* ILD_BLEND50 on the icon image */
1188 #define TBCDRF_NOBACKGROUND 0x00400000 /* ILD_BLEND50 on the icon image */
1191 /* This is just for old CreateToolbar. */
1192 /* Don't use it in new programs. */
1193 typedef struct _OLDTBBUTTON {
1200 } OLDTBBUTTON, *POLDTBBUTTON, *LPOLDTBBUTTON;
1201 typedef const OLDTBBUTTON *LPCOLDTBBUTTON;
1204 typedef struct _TBBUTTON {
1212 } TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
1213 typedef const TBBUTTON *LPCTBBUTTON;
1216 typedef struct _COLORMAP {
1219 } COLORMAP, *LPCOLORMAP;
1222 typedef struct tagTBADDBITMAP {
1225 } TBADDBITMAP, *LPTBADDBITMAP;
1227 #define HINST_COMMCTRL ((HINSTANCE)-1)
1228 #define IDB_STD_SMALL_COLOR 0
1229 #define IDB_STD_LARGE_COLOR 1
1230 #define IDB_VIEW_SMALL_COLOR 4
1231 #define IDB_VIEW_LARGE_COLOR 5
1232 #define IDB_HIST_SMALL_COLOR 8
1233 #define IDB_HIST_LARGE_COLOR 9
1240 #define STD_DELETE 5
1241 #define STD_FILENEW 6
1242 #define STD_FILEOPEN 7
1243 #define STD_FILESAVE 8
1244 #define STD_PRINTPRE 9
1245 #define STD_PROPERTIES 10
1248 #define STD_REPLACE 13
1249 #define STD_PRINT 14
1251 #define VIEW_LARGEICONS 0
1252 #define VIEW_SMALLICONS 1
1254 #define VIEW_DETAILS 3
1255 #define VIEW_SORTNAME 4
1256 #define VIEW_SORTSIZE 5
1257 #define VIEW_SORTDATE 6
1258 #define VIEW_SORTTYPE 7
1259 #define VIEW_PARENTFOLDER 8
1260 #define VIEW_NETCONNECT 9
1261 #define VIEW_NETDISCONNECT 10
1262 #define VIEW_NEWFOLDER 11
1263 #define VIEW_VIEWMENU 12
1266 #define HIST_FORWARD 1
1267 #define HIST_FAVORITES 2
1268 #define HIST_ADDTOFAVORITES 3
1269 #define HIST_VIEWTREE 4
1271 typedef struct tagTBSAVEPARAMSA {
1274 LPCSTR pszValueName;
1275 } TBSAVEPARAMSA, *LPTBSAVEPARAMSA;
1277 typedef struct tagTBSAVEPARAMSW {
1280 LPCWSTR pszValueName;
1281 } TBSAVEPARAMSW, *LPTBSAVEPARAMSW;
1283 #define TBSAVEPARAMS WINELIB_NAME_AW(TBSAVEPARAMS)
1284 #define LPTBSAVEPARAMS WINELIB_NAME_AW(LPTBSAVEPARAMS)
1298 } TBBUTTONINFOA, *LPTBBUTTONINFOA;
1312 } TBBUTTONINFOW, *LPTBBUTTONINFOW;
1314 #define TBBUTTONINFO WINELIB_NAME_AW(TBBUTTONINFO)
1315 #define LPTBBUTTONINFO WINELIB_NAME_AW(LPTBBUTTONINFO)
1317 typedef struct tagNMTBHOTITEM
1323 } NMTBHOTITEM, *LPNMTBHOTITEM;
1325 typedef struct tagNMTBGETINFOTIPA
1332 } NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
1334 typedef struct tagNMTBGETINFOTIPW
1341 } NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
1343 #define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOFTIP)
1344 #define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
1355 } NMTBDISPINFOA, *LPNMTBDISPINFOA;
1366 } NMTBDISPINFOW, *LPNMTBDISPINFOW;
1368 #define NMTBDISPINFO WINELIB_NAME_AW(NMTBDISPINFO)
1369 #define LPNMTBDISPINFO WINELIB_NAME_AW(LPNMTBDISPINFO)
1371 /* contents of dwMask in the NMTBDISPINFO structure */
1372 #define TBNF_IMAGE 0x00000001
1373 #define TBNF_TEXT 0x00000002
1374 #define TBNF_DI_SETITEM 0x10000000
1377 typedef struct tagNMTOOLBARA
1384 RECT rcButton; /* Version 5.80 */
1385 } NMTOOLBARA, *LPNMTOOLBARA, TBNOTIFYA, *LPTBNOTIFYA;
1387 typedef struct tagNMTOOLBARW
1394 RECT rcButton; /* Version 5.80 */
1395 } NMTOOLBARW, *LPNMTOOLBARW, TBNOTIFYW, *LPTBNOTIFYW;
1397 #define NMTOOLBAR WINELIB_NAME_AW(NMTOOLBAR)
1398 #define LPNMTOOLBAR WINELIB_NAME_AW(LPNMTOOLBAR)
1399 #define TBNOTIFY WINELIB_NAME_AW(TBNOTIFY)
1400 #define LPTBNOTIFY WINELIB_NAME_AW(LPTBNOTIFY)
1409 } TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
1411 #define HICF_OTHER 0x00000000
1412 #define HICF_MOUSE 0x00000001 /* Triggered by mouse */
1413 #define HICF_ARROWKEYS 0x00000002 /* Triggered by arrow keys */
1414 #define HICF_ACCELERATOR 0x00000004 /* Triggered by accelerator */
1415 #define HICF_DUPACCEL 0x00000008 /* This accelerator is not unique */
1416 #define HICF_ENTERING 0x00000010 /* idOld is invalid */
1417 #define HICF_LEAVING 0x00000020 /* idNew is invalid */
1418 #define HICF_RESELECT 0x00000040 /* hot item reselected */
1419 #define HICF_LMOUSE 0x00000080 /* left mouse button selected */
1420 #define HICF_TOGGLEDROPDOWN 0x00000100 /* Toggle button's dropdown state */
1426 } TBINSERTMARK, *LPTBINSERTMARK;
1427 #define TBIMHT_AFTER 0x00000001 /* TRUE = insert After iButton, otherwise before */
1428 #define TBIMHT_BACKGROUND 0x00000002 /* TRUE if and only if missed buttons completely */
1431 CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
1432 UINT, LPCOLDTBBUTTON, INT);
1435 CreateToolbarEx(HWND, DWORD, UINT, INT,
1436 HINSTANCE, UINT, LPCTBBUTTON,
1437 INT, INT, INT, INT, INT, UINT);
1440 CreateMappedBitmap (HINSTANCE, INT, UINT, LPCOLORMAP, INT);
1445 #define TOOLTIPS_CLASS16 "tooltips_class"
1446 #define TOOLTIPS_CLASSA "tooltips_class32"
1447 #if defined(__GNUC__)
1448 # define TOOLTIPS_CLASSW (const WCHAR []){ 't','o','o','l','t','i','p','s','_', \
1449 'c','l','a','s','s','3','2',0 }
1450 #elif defined(_MSC_VER)
1451 # define TOOLTIPS_CLASSW L"tooltips_class32"
1453 static const WCHAR TOOLTIPS_CLASSW[] = { 't','o','o','l','t','i','p','s','_',
1454 'c','l','a','s','s','3','2',0 };
1456 #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
1458 #define INFOTIPSIZE 1024
1460 #define TTS_ALWAYSTIP 0x01
1461 #define TTS_NOPREFIX 0x02
1463 #define TTF_IDISHWND 0x0001
1464 #define TTF_CENTERTIP 0x0002
1465 #define TTF_RTLREADING 0x0004
1466 #define TTF_SUBCLASS 0x0010
1467 #define TTF_TRACK 0x0020
1468 #define TTF_ABSOLUTE 0x0080
1469 #define TTF_TRANSPARENT 0x0100
1470 #define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
1473 #define TTDT_AUTOMATIC 0
1474 #define TTDT_RESHOW 1
1475 #define TTDT_AUTOPOP 2
1476 #define TTDT_INITIAL 3
1479 #define TTM_ACTIVATE (WM_USER+1)
1480 #define TTM_SETDELAYTIME (WM_USER+3)
1481 #define TTM_ADDTOOLA (WM_USER+4)
1482 #define TTM_ADDTOOLW (WM_USER+50)
1483 #define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
1484 #define TTM_DELTOOLA (WM_USER+5)
1485 #define TTM_DELTOOLW (WM_USER+51)
1486 #define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
1487 #define TTM_NEWTOOLRECTA (WM_USER+6)
1488 #define TTM_NEWTOOLRECTW (WM_USER+52)
1489 #define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
1490 #define TTM_RELAYEVENT (WM_USER+7)
1491 #define TTM_GETTOOLINFOA (WM_USER+8)
1492 #define TTM_GETTOOLINFOW (WM_USER+53)
1493 #define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
1494 #define TTM_SETTOOLINFOA (WM_USER+9)
1495 #define TTM_SETTOOLINFOW (WM_USER+54)
1496 #define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
1497 #define TTM_HITTESTA (WM_USER+10)
1498 #define TTM_HITTESTW (WM_USER+55)
1499 #define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
1500 #define TTM_GETTEXTA (WM_USER+11)
1501 #define TTM_GETTEXTW (WM_USER+56)
1502 #define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
1503 #define TTM_UPDATETIPTEXTA (WM_USER+12)
1504 #define TTM_UPDATETIPTEXTW (WM_USER+57)
1505 #define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
1506 #define TTM_GETTOOLCOUNT (WM_USER+13)
1507 #define TTM_ENUMTOOLSA (WM_USER+14)
1508 #define TTM_ENUMTOOLSW (WM_USER+58)
1509 #define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
1510 #define TTM_GETCURRENTTOOLA (WM_USER+15)
1511 #define TTM_GETCURRENTTOOLW (WM_USER+59)
1512 #define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
1513 #define TTM_WINDOWFROMPOINT (WM_USER+16)
1514 #define TTM_TRACKACTIVATE (WM_USER+17)
1515 #define TTM_TRACKPOSITION (WM_USER+18)
1516 #define TTM_SETTIPBKCOLOR (WM_USER+19)
1517 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
1518 #define TTM_GETDELAYTIME (WM_USER+21)
1519 #define TTM_GETTIPBKCOLOR (WM_USER+22)
1520 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
1521 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
1522 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
1523 #define TTM_SETMARGIN (WM_USER+26)
1524 #define TTM_GETMARGIN (WM_USER+27)
1525 #define TTM_POP (WM_USER+28)
1526 #define TTM_UPDATE (WM_USER+29)
1527 #define TTM_GETBUBBLESIZE (WM_USER+30)
1530 #define TTN_FIRST (0U-520U)
1531 #define TTN_LAST (0U-549U)
1532 #define TTN_GETDISPINFOA (TTN_FIRST-0)
1533 #define TTN_GETDISPINFOW (TTN_FIRST-10)
1534 #define TTN_GETDISPINFO WINELIB_NAME_AW(TTN_GETDISPINFO)
1535 #define TTN_SHOW (TTN_FIRST-1)
1536 #define TTN_POP (TTN_FIRST-2)
1538 #define TTN_NEEDTEXT TTN_GETDISPINFO
1539 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
1540 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
1542 typedef struct tagTOOLINFOA {
1551 } TTTOOLINFOA, *LPTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
1553 typedef struct tagTOOLINFOW {
1562 } TTTOOLINFOW, *LPTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW;
1564 #define TTTOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1565 #define TOOLINFO WINELIB_NAME_AW(TTTOOLINFO)
1566 #define PTOOLINFO WINELIB_NAME_AW(PTOOLINFO)
1567 #define LPTTTOOLINFO WINELIB_NAME_AW(LPTTTOOLINFO)
1568 #define LPTOOLINFO WINELIB_NAME_AW(LPTOOLINFO)
1570 #define TTTOOLINFO_V1_SIZEA CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
1571 #define TTTOOLINFO_V1_SIZEW CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
1572 #define TTTOOLINFO_V1_SIZE WINELIB_NAME_AW(TTTOOLINFO_V1_SIZE)
1574 typedef struct _TT_HITTESTINFOA
1579 } TTHITTESTINFOA, *LPTTHITTESTINFOA;
1580 #define LPHITTESTINFOA LPTTHITTESTINFOA
1582 typedef struct _TT_HITTESTINFOW
1587 } TTHITTESTINFOW, *LPTTHITTESTINFOW;
1588 #define LPHITTESTINFOW LPTTHITTESTINFOW
1590 #define TTHITTESTINFO WINELIB_NAME_AW(TTHITTESTINFO)
1591 #define LPTTHITTESTINFO WINELIB_NAME_AW(LPTTHITTESTINFO)
1592 #define LPHITTESTINFO WINELIB_NAME_AW(LPHITTESTINFO)
1594 typedef struct tagNMTTDISPINFOA
1602 } NMTTDISPINFOA, *LPNMTTDISPINFOA;
1604 typedef struct tagNMTTDISPINFOW
1612 } NMTTDISPINFOW, *LPNMTTDISPINFOW;
1614 #define NMTTDISPINFO WINELIB_NAME_AW(NMTTDISPINFO)
1615 #define LPNMTTDISPINFO WINELIB_NAME_AW(LPNMTTDISPINFO)
1617 #define NMTTDISPINFO_V1_SIZEA CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
1618 #define NMTTDISPINFO_V1_SIZEW CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)
1619 #define NMTTDISPINFO_V1_SIZE WINELIB_NAME_AW(NMTTDISPINFO_V1_SIZE)
1621 #define TOOLTIPTEXTW NMTTDISPINFOW
1622 #define TOOLTIPTEXTA NMTTDISPINFOA
1623 #define TOOLTIPTEXT NMTTDISPINFO
1624 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
1625 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
1626 #define LPTOOLTIPTEXT LPNMTTDISPINFO
1631 #define REBARCLASSNAME16 "ReBarWindow"
1632 #define REBARCLASSNAMEA "ReBarWindow32"
1633 #if defined(__GNUC__)
1634 # define REBARCLASSNAMEW (const WCHAR []){ 'R','e','B','a','r', \
1635 'W','i','n','d','o','w','3','2',0 }
1636 #elif defined(_MSC_VER)
1637 # define REBARCLASSNAMEW L"ReBarWindow32"
1639 static const WCHAR REBARCLASSNAMEW[] = { 'R','e','B','a','r',
1640 'W','i','n','d','o','w','3','2',0 };
1642 #define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
1644 #define RBS_TOOLTIPS 0x0100
1645 #define RBS_VARHEIGHT 0x0200
1646 #define RBS_BANDBORDERS 0x0400
1647 #define RBS_FIXEDORDER 0x0800
1648 #define RBS_REGISTERDROP 0x1000
1649 #define RBS_AUTOSIZE 0x2000
1650 #define RBS_VERTICALGRIPPER 0x4000
1651 #define RBS_DBLCLKTOGGLE 0x8000
1653 #define RBIM_IMAGELIST 0x00000001
1655 #define RBBIM_STYLE 0x00000001
1656 #define RBBIM_COLORS 0x00000002
1657 #define RBBIM_TEXT 0x00000004
1658 #define RBBIM_IMAGE 0x00000008
1659 #define RBBIM_CHILD 0x00000010
1660 #define RBBIM_CHILDSIZE 0x00000020
1661 #define RBBIM_SIZE 0x00000040
1662 #define RBBIM_BACKGROUND 0x00000080
1663 #define RBBIM_ID 0x00000100
1664 #define RBBIM_IDEALSIZE 0x00000200
1665 #define RBBIM_LPARAM 0x00000400
1666 #define RBBIM_HEADERSIZE 0x00000800
1668 #define RBBS_BREAK 0x00000001
1669 #define RBBS_FIXEDSIZE 0x00000002
1670 #define RBBS_CHILDEDGE 0x00000004
1671 #define RBBS_HIDDEN 0x00000008
1672 #define RBBS_NOVERT 0x00000010
1673 #define RBBS_FIXEDBMP 0x00000020
1674 #define RBBS_VARIABLEHEIGHT 0x00000040
1675 #define RBBS_GRIPPERALWAYS 0x00000080
1676 #define RBBS_NOGRIPPER 0x00000100
1678 #define RBNM_ID 0x00000001
1679 #define RBNM_STYLE 0x00000002
1680 #define RBNM_LPARAM 0x00000004
1682 #define RBHT_NOWHERE 0x0001
1683 #define RBHT_CAPTION 0x0002
1684 #define RBHT_CLIENT 0x0003
1685 #define RBHT_GRABBER 0x0004
1687 #define RB_INSERTBANDA (WM_USER+1)
1688 #define RB_INSERTBANDW (WM_USER+10)
1689 #define RB_INSERTBAND WINELIB_NAME_AW(RB_INSERTBAND)
1690 #define RB_DELETEBAND (WM_USER+2)
1691 #define RB_GETBARINFO (WM_USER+3)
1692 #define RB_SETBARINFO (WM_USER+4)
1693 #define RB_GETBANDINFO (WM_USER+5) /* just for compatibility */
1694 #define RB_SETBANDINFOA (WM_USER+6)
1695 #define RB_SETBANDINFOW (WM_USER+11)
1696 #define RB_SETBANDINFO WINELIB_NAME_AW(RB_SETBANDINFO)
1697 #define RB_SETPARENT (WM_USER+7)
1698 #define RB_HITTEST (WM_USER+8)
1699 #define RB_GETRECT (WM_USER+9)
1700 #define RB_GETBANDCOUNT (WM_USER+12)
1701 #define RB_GETROWCOUNT (WM_USER+13)
1702 #define RB_GETROWHEIGHT (WM_USER+14)
1703 #define RB_IDTOINDEX (WM_USER+16)
1704 #define RB_GETTOOLTIPS (WM_USER+17)
1705 #define RB_SETTOOLTIPS (WM_USER+18)
1706 #define RB_SETBKCOLOR (WM_USER+19)
1707 #define RB_GETBKCOLOR (WM_USER+20)
1708 #define RB_SETTEXTCOLOR (WM_USER+21)
1709 #define RB_GETTEXTCOLOR (WM_USER+22)
1710 #define RB_SIZETORECT (WM_USER+23)
1711 #define RB_BEGINDRAG (WM_USER+24)
1712 #define RB_ENDDRAG (WM_USER+25)
1713 #define RB_DRAGMOVE (WM_USER+26)
1714 #define RB_GETBARHEIGHT (WM_USER+27)
1715 #define RB_GETBANDINFOW (WM_USER+28)
1716 #define RB_GETBANDINFOA (WM_USER+29)
1717 #define RB_GETBANDINFO16 WINELIB_NAME_AW(RB_GETBANDINFO16)
1718 #define RB_MINIMIZEBAND (WM_USER+30)
1719 #define RB_MAXIMIZEBAND (WM_USER+31)
1720 #define RB_GETBANDBORDERS (WM_USER+34)
1721 #define RB_SHOWBAND (WM_USER+35)
1722 #define RB_SETPALETTE (WM_USER+37)
1723 #define RB_GETPALETTE (WM_USER+38)
1724 #define RB_MOVEBAND (WM_USER+39)
1725 #define RB_GETDROPTARGET CCM_GETDROPTARGET
1726 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
1727 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
1728 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1729 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1731 #define RBN_FIRST (0U-831U)
1732 #define RBN_LAST (0U-859U)
1733 #define RBN_HEIGHTCHANGE (RBN_FIRST-0)
1734 #define RBN_GETOBJECT (RBN_FIRST-1)
1735 #define RBN_LAYOUTCHANGED (RBN_FIRST-2)
1736 #define RBN_AUTOSIZE (RBN_FIRST-3)
1737 #define RBN_BEGINDRAG (RBN_FIRST-4)
1738 #define RBN_ENDDRAG (RBN_FIRST-5)
1739 #define RBN_DELETINGBAND (RBN_FIRST-6)
1740 #define RBN_DELETEDBAND (RBN_FIRST-7)
1741 #define RBN_CHILDSIZE (RBN_FIRST-8)
1743 typedef struct tagREBARINFO
1748 } REBARINFO, *LPREBARINFO;
1750 typedef struct tagREBARBANDINFOA
1772 } REBARBANDINFOA, *LPREBARBANDINFOA;
1774 typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
1776 typedef struct tagREBARBANDINFOW
1798 } REBARBANDINFOW, *LPREBARBANDINFOW;
1800 typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
1802 #define REBARBANDINFO WINELIB_NAME_AW(REBARBANDINFO)
1803 #define LPREBARBANDINFO WINELIB_NAME_AW(LPREBARBANDINFO)
1804 #define LPCREBARBANDINFO WINELIB_NAME_AW(LPCREBARBANDINFO)
1806 #define REBARBANDINFO_V3_SIZEA CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
1807 #define REBARBANDINFO_V3_SIZEW CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
1808 #define REBARBANDINFO_V3_SIZE WINELIB_NAME_AW(REBARBANDINFO_V3_SIZE)
1810 typedef struct tagNMREBARCHILDSIZE
1817 } NMREBARCHILDSIZE, *LPNMREBARCHILDSIZE;
1819 typedef struct tagNMREBAR
1827 } NMREBAR, *LPNMREBAR;
1829 typedef struct tagNMRBAUTOSIZE
1835 } NMRBAUTOSIZE, *LPNMRBAUTOSIZE;
1837 typedef struct _RB_HITTESTINFO
1842 } RBHITTESTINFO, *LPRBHITTESTINFO;
1845 /* Trackbar control */
1847 #define TRACKBAR_CLASS16 "msctls_trackbar"
1848 #define TRACKBAR_CLASSA "msctls_trackbar32"
1849 #if defined(__GNUC__)
1850 # define TRACKBAR_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
1851 't','r','a','c','k','b','a','r','3','2',0 }
1852 #elif defined(_MSC_VER)
1853 # define TRACKBAR_CLASSW L"msctls_trackbar32"
1855 static const WCHAR TRACKBAR_CLASSW[] = { 'm','s','c','t','l','s','_',
1856 't','r','a','c','k','b','a','r','3','2',0 };
1858 #define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
1860 #define TBS_AUTOTICKS 0x0001
1861 #define TBS_VERT 0x0002
1862 #define TBS_HORZ 0x0000
1863 #define TBS_TOP 0x0004
1864 #define TBS_BOTTOM 0x0000
1865 #define TBS_LEFT 0x0004
1866 #define TBS_RIGHT 0x0000
1867 #define TBS_BOTH 0x0008
1868 #define TBS_NOTICKS 0x0010
1869 #define TBS_ENABLESELRANGE 0x0020
1870 #define TBS_FIXEDLENGTH 0x0040
1871 #define TBS_NOTHUMB 0x0080
1872 #define TBS_TOOLTIPS 0x0100
1873 #define TBS_REVERSED 0x0200
1874 #define TBS_DOWNISLEFT 0x0400
1878 #define TBTS_BOTTOM 2
1879 #define TBTS_RIGHT 3
1882 #define TB_LINEDOWN 1
1884 #define TB_PAGEDOWN 3
1885 #define TB_THUMBPOSITION 4
1886 #define TB_THUMBTRACK 5
1889 #define TB_ENDTRACK 8
1891 #define TBCD_TICS 0x0001
1892 #define TBCD_THUMB 0x0002
1893 #define TBCD_CHANNEL 0x0003
1895 #define TBM_GETPOS (WM_USER)
1896 #define TBM_GETRANGEMIN (WM_USER+1)
1897 #define TBM_GETRANGEMAX (WM_USER+2)
1898 #define TBM_GETTIC (WM_USER+3)
1899 #define TBM_SETTIC (WM_USER+4)
1900 #define TBM_SETPOS (WM_USER+5)
1901 #define TBM_SETRANGE (WM_USER+6)
1902 #define TBM_SETRANGEMIN (WM_USER+7)
1903 #define TBM_SETRANGEMAX (WM_USER+8)
1904 #define TBM_CLEARTICS (WM_USER+9)
1905 #define TBM_SETSEL (WM_USER+10)
1906 #define TBM_SETSELSTART (WM_USER+11)
1907 #define TBM_SETSELEND (WM_USER+12)
1908 #define TBM_GETPTICS (WM_USER+14)
1909 #define TBM_GETTICPOS (WM_USER+15)
1910 #define TBM_GETNUMTICS (WM_USER+16)
1911 #define TBM_GETSELSTART (WM_USER+17)
1912 #define TBM_GETSELEND (WM_USER+18)
1913 #define TBM_CLEARSEL (WM_USER+19)
1914 #define TBM_SETTICFREQ (WM_USER+20)
1915 #define TBM_SETPAGESIZE (WM_USER+21)
1916 #define TBM_GETPAGESIZE (WM_USER+22)
1917 #define TBM_SETLINESIZE (WM_USER+23)
1918 #define TBM_GETLINESIZE (WM_USER+24)
1919 #define TBM_GETTHUMBRECT (WM_USER+25)
1920 #define TBM_GETCHANNELRECT (WM_USER+26)
1921 #define TBM_SETTHUMBLENGTH (WM_USER+27)
1922 #define TBM_GETTHUMBLENGTH (WM_USER+28)
1923 #define TBM_SETTOOLTIPS (WM_USER+29)
1924 #define TBM_GETTOOLTIPS (WM_USER+30)
1925 #define TBM_SETTIPSIDE (WM_USER+31)
1926 #define TBM_SETBUDDY (WM_USER+32)
1927 #define TBM_GETBUDDY (WM_USER+33)
1928 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
1929 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
1934 #define WC_PAGESCROLLERA "SysPager"
1935 #if defined(__GNUC__)
1936 # define WC_PAGESCROLLERW (const WCHAR []){ 'S','y','s','P','a','g','e','r',0 }
1937 #elif defined(_MSC_VER)
1938 # define WC_PAGESCROLLERW L"SysPager"
1940 static const WCHAR WC_PAGESCROLLERW[] = { 'S','y','s','P','a','g','e','r',0 };
1942 #define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
1944 #define PGS_VERT 0x00000000
1945 #define PGS_HORZ 0x00000001
1946 #define PGS_AUTOSCROLL 0x00000002
1947 #define PGS_DRAGNDROP 0x00000004
1949 #define PGF_INVISIBLE 0
1950 #define PGF_NORMAL 1
1951 #define PGF_GRAYED 2
1952 #define PGF_DEPRESSED 4
1955 #define PGB_TOPORLEFT 0
1956 #define PGB_BOTTOMORRIGHT 1
1958 /* only used with PGN_SCROLL */
1959 #define PGF_SCROLLUP 1
1960 #define PGF_SCROLLDOWN 2
1961 #define PGF_SCROLLLEFT 4
1962 #define PGF_SCROLLRIGHT 8
1965 #define PGK_CONTROL 2
1968 /* only used with PGN_CALCSIZE */
1969 #define PGF_CALCWIDTH 1
1970 #define PGF_CALCHEIGHT 2
1972 #define PGM_FIRST 0x1400
1973 #define PGM_SETCHILD (PGM_FIRST+1)
1974 #define PGM_RECALCSIZE (PGM_FIRST+2)
1975 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
1976 #define PGM_SETBKCOLOR (PGM_FIRST+4)
1977 #define PGM_GETBKCOLOR (PGM_FIRST+5)
1978 #define PGM_SETBORDER (PGM_FIRST+6)
1979 #define PGM_GETBORDER (PGM_FIRST+7)
1980 #define PGM_SETPOS (PGM_FIRST+8)
1981 #define PGM_GETPOS (PGM_FIRST+9)
1982 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
1983 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
1984 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
1985 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
1987 #define PGN_FIRST (0U-900U)
1988 #define PGN_LAST (0U-950U)
1989 #define PGN_SCROLL (PGN_FIRST-1)
1990 #define PGN_CALCSIZE (PGN_FIRST-2)
1992 #include "pshpack1.h"
2003 } NMPGSCROLL, *LPNMPGSCROLL;
2005 #include "poppack.h"
2013 } NMPGCALCSIZE, *LPNMPGCALCSIZE;
2016 /* Treeview control */
2018 #define WC_TREEVIEWA "SysTreeView32"
2019 #if defined(__GNUC__)
2020 # define WC_TREEVIEWW (const WCHAR []){ 'S','y','s', \
2021 'T','r','e','e','V','i','e','w','3','2',0 }
2022 #elif defined(_MSC_VER)
2023 # define WC_TREEVIEWW L"SysTreeView32"
2025 static const WCHAR WC_TREEVIEWW[] = { 'S','y','s',
2026 'T','r','e','e','V','i','e','w','3','2',0 };
2028 #define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
2030 #define TVSIL_NORMAL 0
2031 #define TVSIL_STATE 2
2033 #define TV_FIRST 0x1100
2034 #define TVM_INSERTITEMA (TV_FIRST+0)
2035 #define TVM_INSERTITEMW (TV_FIRST+50)
2036 #define TVM_INSERTITEM WINELIB_NAME_AW(TVM_INSERTITEM)
2037 #define TVM_DELETEITEM (TV_FIRST+1)
2038 #define TVM_EXPAND (TV_FIRST+2)
2039 #define TVM_GETITEMRECT (TV_FIRST+4)
2040 #define TVM_GETCOUNT (TV_FIRST+5)
2041 #define TVM_GETINDENT (TV_FIRST+6)
2042 #define TVM_SETINDENT (TV_FIRST+7)
2043 #define TVM_GETIMAGELIST (TV_FIRST+8)
2044 #define TVM_SETIMAGELIST (TV_FIRST+9)
2045 #define TVM_GETNEXTITEM (TV_FIRST+10)
2046 #define TVM_SELECTITEM (TV_FIRST+11)
2047 #define TVM_GETITEMA (TV_FIRST+12)
2048 #define TVM_GETITEMW (TV_FIRST+62)
2049 #define TVM_GETITEM WINELIB_NAME_AW(TVM_GETITEM)
2050 #define TVM_SETITEMA (TV_FIRST+13)
2051 #define TVM_SETITEMW (TV_FIRST+63)
2052 #define TVM_SETITEM WINELIB_NAME_AW(TVM_SETITEM)
2053 #define TVM_EDITLABELA (TV_FIRST+14)
2054 #define TVM_EDITLABELW (TV_FIRST+65)
2055 #define TVM_EDITLABEL WINELIB_NAME_AW(TVM_EDITLABEL)
2056 #define TVM_GETEDITCONTROL (TV_FIRST+15)
2057 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
2058 #define TVM_HITTEST (TV_FIRST+17)
2059 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
2060 #define TVM_SORTCHILDREN (TV_FIRST+19)
2061 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
2062 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
2063 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
2064 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
2065 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
2066 #define TVM_GETISEARCHSTRING WINELIB_NAME_AW(TVM_GETISEARCHSTRING)
2067 #define TVM_SETTOOLTIPS (TV_FIRST+24)
2068 #define TVM_GETTOOLTIPS (TV_FIRST+25)
2069 #define TVM_SETINSERTMARK (TV_FIRST+26)
2070 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
2071 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
2072 #define TVM_SETBKCOLOR (TV_FIRST+29)
2073 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
2074 #define TVM_GETBKCOLOR (TV_FIRST+31)
2075 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
2076 #define TVM_SETSCROLLTIME (TV_FIRST+33)
2077 #define TVM_GETSCROLLTIME (TV_FIRST+34)
2078 #define TVM_UNKNOWN35 (TV_FIRST+35)
2079 #define TVM_UNKNOWN36 (TV_FIRST+36)
2080 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
2081 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
2082 #define TVM_GETITEMSTATE (TV_FIRST+39)
2083 #define TVM_SETLINECOLOR (TV_FIRST+40)
2084 #define TVM_GETLINECOLOR (TV_FIRST+41)
2085 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
2086 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
2090 #define TVN_FIRST (0U-400U)
2091 #define TVN_LAST (0U-499U)
2093 #define TVN_SELCHANGINGA (TVN_FIRST-1)
2094 #define TVN_SELCHANGINGW (TVN_FIRST-50)
2095 #define TVN_SELCHANGING WINELIB_NAME_AW(TVN_SELCHANGING)
2097 #define TVN_SELCHANGEDA (TVN_FIRST-2)
2098 #define TVN_SELCHANGEDW (TVN_FIRST-51)
2099 #define TVN_SELCHANGED WINELIB_NAME_AW(TVN_SELCHANGED)
2101 #define TVN_GETDISPINFOA (TVN_FIRST-3)
2102 #define TVN_GETDISPINFOW (TVN_FIRST-52)
2103 #define TVN_GETDISPINFO WINELIB_NAME_AW(TVN_GETDISPINFO)
2105 #define TVN_SETDISPINFOA (TVN_FIRST-4)
2106 #define TVN_SETDISPINFOW (TVN_FIRST-53)
2107 #define TVN_SETDISPINFO WINELIB_NAME_AW(TVN_SETDISPINFO)
2109 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
2110 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
2111 #define TVN_ITEMEXPANDING WINELIB_NAME_AW(TVN_ITEMEXPANDING)
2113 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
2114 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
2115 #define TVN_ITEMEXPANDED WINELIB_NAME_AW(TVN_ITEMEXPANDED)
2117 #define TVN_BEGINDRAGA (TVN_FIRST-7)
2118 #define TVN_BEGINDRAGW (TVN_FIRST-56)
2119 #define TVN_BEGINDRAG WINELIB_NAME_AW(TVN_BEGINDRAG)
2121 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
2122 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
2123 #define TVN_BEGINRDRAG WINELIB_NAME_AW(TVN_BEGINRDRAG)
2125 #define TVN_DELETEITEMA (TVN_FIRST-9)
2126 #define TVN_DELETEITEMW (TVN_FIRST-58)
2127 #define TVN_DELETEITEM WINELIB_NAME_AW(TVN_DELETEITEM)
2129 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
2130 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
2131 #define TVN_BEGINLABELEDIT WINELIB_NAME_AW(TVN_BEGINLABELEDIT)
2133 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
2134 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
2135 #define TVN_ENDLABELEDIT WINELIB_NAME_AW(TVN_ENDLABELEDIT)
2137 #define TVN_KEYDOWN (TVN_FIRST-12)
2139 #define TVN_GETINFOTIPA (TVN_FIRST-13)
2140 #define TVN_GETINFOTIPW (TVN_FIRST-14)
2141 #define TVN_GETINFOTIP WINELIB_NAME_AW(TVN_GETINFOTIP)
2143 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
2149 #define TVIF_TEXT 0x0001
2150 #define TVIF_IMAGE 0x0002
2151 #define TVIF_PARAM 0x0004
2152 #define TVIF_STATE 0x0008
2153 #define TVIF_HANDLE 0x0010
2154 #define TVIF_SELECTEDIMAGE 0x0020
2155 #define TVIF_CHILDREN 0x0040
2156 #define TVIF_INTEGRAL 0x0080
2157 #define TVIF_DI_SETITEM 0x1000
2159 #define TVI_ROOT ((HTREEITEM)0xffff0000) /* -65536 */
2160 #define TVI_FIRST ((HTREEITEM)0xffff0001) /* -65535 */
2161 #define TVI_LAST ((HTREEITEM)0xffff0002) /* -65534 */
2162 #define TVI_SORT ((HTREEITEM)0xffff0003) /* -65533 */
2164 #define TVIS_FOCUSED 0x0001
2165 #define TVIS_SELECTED 0x0002
2166 #define TVIS_CUT 0x0004
2167 #define TVIS_DROPHILITED 0x0008
2168 #define TVIS_BOLD 0x0010
2169 #define TVIS_EXPANDED 0x0020
2170 #define TVIS_EXPANDEDONCE 0x0040
2171 #define TVIS_EXPANDPARTIAL 0x0080
2172 #define TVIS_OVERLAYMASK 0x0f00
2173 #define TVIS_STATEIMAGEMASK 0xf000
2174 #define TVIS_USERMASK 0xf000
2176 #define TVHT_NOWHERE 0x0001
2177 #define TVHT_ONITEMICON 0x0002
2178 #define TVHT_ONITEMLABEL 0x0004
2179 #define TVHT_ONITEMINDENT 0x0008
2180 #define TVHT_ONITEMBUTTON 0x0010
2181 #define TVHT_ONITEMRIGHT 0x0020
2182 #define TVHT_ONITEMSTATEICON 0x0040
2183 #define TVHT_ONITEM 0x0046
2184 #define TVHT_ABOVE 0x0100
2185 #define TVHT_BELOW 0x0200
2186 #define TVHT_TORIGHT 0x0400
2187 #define TVHT_TOLEFT 0x0800
2189 #define TVS_HASBUTTONS 0x0001
2190 #define TVS_HASLINES 0x0002
2191 #define TVS_LINESATROOT 0x0004
2192 #define TVS_EDITLABELS 0x0008
2193 #define TVS_DISABLEDRAGDROP 0x0010
2194 #define TVS_SHOWSELALWAYS 0x0020
2195 #define TVS_RTLREADING 0x0040
2196 #define TVS_NOTOOLTIPS 0x0080
2197 #define TVS_CHECKBOXES 0x0100
2198 #define TVS_TRACKSELECT 0x0200
2199 #define TVS_SINGLEEXPAND 0x0400
2200 #define TVS_INFOTIP 0x0800
2201 #define TVS_FULLROWSELECT 0x1000
2202 #define TVS_NOSCROLL 0x2000
2203 #define TVS_NONEVENHEIGHT 0x4000
2204 #define TVS_NOHSCROLL 0x8000
2206 #define TVS_SHAREDIMAGELISTS 0x0000
2207 #define TVS_PRIVATEIMAGELISTS 0x0400
2210 #define TVE_COLLAPSE 0x0001
2211 #define TVE_EXPAND 0x0002
2212 #define TVE_TOGGLE 0x0003
2213 #define TVE_EXPANDPARTIAL 0x4000
2214 #define TVE_COLLAPSERESET 0x8000
2218 #define TVGN_PREVIOUS 2
2219 #define TVGN_PARENT 3
2220 #define TVGN_CHILD 4
2221 #define TVGN_FIRSTVISIBLE 5
2222 #define TVGN_NEXTVISIBLE 6
2223 #define TVGN_PREVIOUSVISIBLE 7
2224 #define TVGN_DROPHILITE 8
2225 #define TVGN_CARET 9
2226 #define TVGN_LASTVISIBLE 10
2228 #define TVC_UNKNOWN 0x00
2229 #define TVC_BYMOUSE 0x01
2230 #define TVC_BYKEYBOARD 0x02
2233 typedef struct _TREEITEM *HTREEITEM;
2246 } TVITEMA, *LPTVITEMA;
2259 } TVITEMW, *LPTVITEMW;
2261 #define TV_ITEMA TVITEMA
2262 #define TV_ITEMW TVITEMW
2263 #define LPTV_ITEMA LPTVITEMA
2264 #define LPTV_ITEMW LPTVITEMW
2266 #define TVITEM WINELIB_NAME_AW(TVITEM)
2267 #define LPTVITEM WINELIB_NAME_AW(LPTVITEM)
2268 #define TV_ITEM WINELIB_NAME_AW(TV_ITEM)
2269 #define LPTV_ITEM WINELIB_NAME_AW(LPTV_ITEM)
2283 } TVITEMEXA, *LPTVITEMEXA;
2297 } TVITEMEXW, *LPTVITEMEXW;
2299 #define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
2300 #define LPTVITEMEX WINELIB_NAME_AW(LPTVITEMEX)
2302 typedef struct tagTVINSERTSTRUCTA {
2304 HTREEITEM hInsertAfter;
2309 } TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
2311 typedef struct tagTVINSERTSTRUCTW {
2313 HTREEITEM hInsertAfter;
2318 } TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
2320 #define TVINSERTSTRUCT WINELIB_NAME_AW(TVINSERTSTRUCT)
2321 #define LPTVINSERTSTRUCT WINELIB_NAME_AW(LPTVINSERTSTRUCT)
2323 #define TVINSERTSTRUCT_V1_SIZEA CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
2324 #define TVINSERTSTRUCT_V1_SIZEW CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)
2325 #define TVINSERTSTRUCT_V1_SIZE WINELIB_NAME_AW(TVINSERTSTRUCT_V1_SIZE)
2327 #define TV_INSERTSTRUCT TVINSERTSTRUCT
2328 #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
2329 #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
2330 #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
2331 #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
2332 #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
2336 typedef struct tagNMTREEVIEWA {
2342 } NMTREEVIEWA, *LPNMTREEVIEWA;
2344 typedef struct tagNMTREEVIEWW {
2350 } NMTREEVIEWW, *LPNMTREEVIEWW;
2352 #define NMTREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2353 #define NM_TREEVIEW WINELIB_NAME_AW(NMTREEVIEW)
2354 #define LPNMTREEVIEW WINELIB_NAME_AW(LPNMTREEVIEW)
2356 #define LPNM_TREEVIEW LPNMTREEVIEW
2358 typedef struct tagTVDISPINFOA {
2361 } NMTVDISPINFOA, *LPNMTVDISPINFOA;
2363 typedef struct tagTVDISPINFOW {
2366 } NMTVDISPINFOW, *LPNMTVDISPINFOW;
2368 #define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
2369 #define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
2370 #define TV_DISPINFO NMTVDISPINFO
2372 typedef INT (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
2374 typedef struct tagTVSORTCB
2377 PFNTVCOMPARE lpfnCompare;
2379 } TVSORTCB, *LPTVSORTCB;
2381 #define TV_SORTCB TVSORTCB
2382 #define LPTV_SORTCB LPTVSORTCB
2384 typedef struct tagTVHITTESTINFO {
2388 } TVHITTESTINFO, *LPTVHITTESTINFO;
2390 #define TV_HITTESTINFO TVHITTESTINFO
2393 /* Custom Draw Treeview */
2395 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)
2397 #define TVCDRF_NOIMAGES 0x00010000
2399 typedef struct tagNMTVCUSTOMDRAW
2404 INT iLevel; /* IE>0x0400 */
2405 } NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
2407 /* Treeview tooltips */
2409 typedef struct tagNMTVGETINFOTIPA
2416 } NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
2418 typedef struct tagNMTVGETINFOTIPW
2425 } NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
2427 #define NMTVGETINFOTIP WINELIB_NAME_AW(NMTVGETINFOTIP)
2428 #define LPNMTVGETINFOTIP WINELIB_NAME_AW(LPNMTVGETINFOTIP)
2430 #include "pshpack1.h"
2431 typedef struct tagTVKEYDOWN
2436 } NMTVKEYDOWN, *LPNMTVKEYDOWN;
2437 #include "poppack.h"
2439 #define TV_KEYDOWN NMTVKEYDOWN
2441 #define TreeView_InsertItemA(hwnd, phdi) \
2442 (HTREEITEM)SNDMSGA((hwnd), TVM_INSERTITEMA, 0, \
2443 (LPARAM)(LPTVINSERTSTRUCTA)(phdi))
2444 #define TreeView_InsertItemW(hwnd,phdi) \
2445 (HTREEITEM)SNDMSGW((hwnd), TVM_INSERTITEMW, 0, \
2446 (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
2447 #define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem)
2449 #define TreeView_DeleteItem(hwnd, hItem) \
2450 (BOOL)SNDMSGA((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
2451 #define TreeView_DeleteAllItems(hwnd) \
2452 (BOOL)SNDMSGA((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
2453 #define TreeView_Expand(hwnd, hitem, code) \
2454 (BOOL)SNDMSGA((hwnd), TVM_EXPAND, (WPARAM)code, \
2455 (LPARAM)(HTREEITEM)(hitem))
2457 #define TreeView_GetItemRect(hwnd, hitem, prc, code) \
2458 (*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSGA((hwnd), \
2459 TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
2461 #define TreeView_GetCount(hwnd) \
2462 (UINT)SNDMSGA((hwnd), TVM_GETCOUNT, 0, 0)
2463 #define TreeView_GetIndent(hwnd) \
2464 (UINT)SNDMSGA((hwnd), TVM_GETINDENT, 0, 0)
2465 #define TreeView_SetIndent(hwnd, indent) \
2466 (BOOL)SNDMSGA((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
2468 #define TreeView_GetImageList(hwnd, iImage) \
2469 (HIMAGELIST)SNDMSGA((hwnd), TVM_GETIMAGELIST, iImage, 0)
2471 #define TreeView_SetImageList(hwnd, himl, iImage) \
2472 (HIMAGELIST)SNDMSGA((hwnd), TVM_SETIMAGELIST, iImage, \
2473 (LPARAM)(UINT)(HIMAGELIST)(himl))
2475 #define TreeView_GetNextItem(hwnd, hitem, code) \
2476 (HTREEITEM)SNDMSGA((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
2477 (LPARAM)(HTREEITEM) (hitem))
2479 #define TreeView_GetChild(hwnd, hitem) \
2480 TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
2481 #define TreeView_GetNextSibling(hwnd, hitem) \
2482 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
2483 #define TreeView_GetPrevSibling(hwnd, hitem) \
2484 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
2485 #define TreeView_GetParent(hwnd, hitem) \
2486 TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
2487 #define TreeView_GetFirstVisible(hwnd) \
2488 TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
2489 #define TreeView_GetLastVisible(hwnd) \
2490 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2491 #define TreeView_GetNextVisible(hwnd, hitem) \
2492 TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
2493 #define TreeView_GetPrevVisible(hwnd, hitem) \
2494 TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
2495 #define TreeView_GetSelection(hwnd) \
2496 TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
2497 #define TreeView_GetDropHilight(hwnd) \
2498 TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
2499 #define TreeView_GetRoot(hwnd) \
2500 TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
2501 #define TreeView_GetLastVisible(hwnd) \
2502 TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
2505 #define TreeView_Select(hwnd, hitem, code) \
2506 (UINT)SNDMSGA((hwnd), TVM_SELECTITEM, (WPARAM)code, \
2507 (LPARAM)(UINT)(hitem))
2510 #define TreeView_SelectItem(hwnd, hitem) \
2511 TreeView_Select(hwnd, hitem, TVGN_CARET)
2512 #define TreeView_SelectDropTarget(hwnd, hitem) \
2513 TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
2514 #define TreeView_SelectSetFirstVisible(hwnd, hitem) \
2515 TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
2518 #define TreeView_GetItemA(hwnd, pitem) \
2519 (BOOL)SNDMSGA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2520 #define TreeView_GetItemW(hwnd, pitem) \
2521 (BOOL)SNDMSGW((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
2522 #define TreeView_GetItem WINELIB_NAME_AW(TreeView_GetItem)
2524 #define TreeView_SetItemA(hwnd, pitem) \
2525 (BOOL)SNDMSGA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2526 #define TreeView_SetItemW(hwnd, pitem) \
2527 (BOOL)SNDMSGW((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
2528 #define TreeView_SetItem WINELIB_NAME_AW(TreeView_SetItem)
2530 #define TreeView_EditLabel(hwnd, hitem) \
2531 (HWND)SNDMSGA((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
2533 #define TreeView_GetEditControl(hwnd) \
2534 (HWND)SNDMSGA((hwnd), TVM_GETEDITCONTROL, 0, 0)
2536 #define TreeView_GetVisibleCount(hwnd) \
2537 (UINT)SNDMSGA((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
2539 #define TreeView_HitTest(hwnd, lpht) \
2540 (HTREEITEM)SNDMSGA((hwnd), TVM_HITTEST, 0,\
2541 (LPARAM)(LPTVHITTESTINFO)(lpht))
2543 #define TreeView_CreateDragImage(hwnd, hitem) \
2544 (HIMAGELIST)SNDMSGA((hwnd), TVM_CREATEDRAGIMAGE, 0,\
2545 (LPARAM)(HTREEITEM)(hitem))
2547 #define TreeView_SortChildren(hwnd, hitem, recurse) \
2548 (BOOL)SNDMSGA((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
2549 (LPARAM)(HTREEITEM)(hitem))
2551 #define TreeView_EnsureVisible(hwnd, hitem) \
2552 (BOOL)SNDMSGA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
2554 #define TreeView_SortChildrenCB(hwnd, psort, recurse) \
2555 (BOOL)SNDMSGA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
2556 (LPARAM)(LPTV_SORTCB)(psort))
2558 #define TreeView_EndEditLabelNow(hwnd, fCancel) \
2559 (BOOL)SNDMSGA((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
2561 #define TreeView_GetISearchString(hwnd, lpsz) \
2562 (BOOL)SNDMSGA((hwnd), TVM_GETISEARCHSTRING, 0, \
2563 (LPARAM)(LPTSTR)lpsz)
2565 #define TreeView_SetToolTips(hwnd, hwndTT) \
2566 (HWND)SNDMSGA((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
2568 #define TreeView_GetToolTips(hwnd) \
2569 (HWND)SNDMSGA((hwnd), TVM_GETTOOLTIPS, 0, 0)
2571 #define TreeView_SetItemHeight(hwnd, iHeight) \
2572 (INT)SNDMSGA((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
2574 #define TreeView_GetItemHeight(hwnd) \
2575 (INT)SNDMSGA((hwnd), TVM_GETITEMHEIGHT, 0, 0)
2577 #define TreeView_SetBkColor(hwnd, clr) \
2578 (COLORREF)SNDMSGA((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
2580 #define TreeView_SetTextColor(hwnd, clr) \
2581 (COLORREF)SNDMSGA((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
2583 #define TreeView_GetBkColor(hwnd) \
2584 (COLORREF)SNDMSGA((hwnd), TVM_GETBKCOLOR, 0, 0)
2586 #define TreeView_GetTextColor(hwnd) \
2587 (COLORREF)SNDMSGA((hwnd), TVM_GETTEXTCOLOR, 0, 0)
2589 #define TreeView_SetScrollTime(hwnd, uTime) \
2590 (UINT)SNDMSGA((hwnd), TVM_SETSCROLLTIME, uTime, 0)
2592 #define TreeView_GetScrollTime(hwnd) \
2593 (UINT)SNDMSGA((hwnd), TVM_GETSCROLLTIME, 0, 0)
2595 #define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
2596 (BOOL)SNDMSGA((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
2599 #define TreeView_SetInsertMarkColor(hwnd, clr) \
2600 (COLORREF)SNDMSGA((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
2602 #define TreeView_GetInsertMarkColor(hwnd) \
2603 (COLORREF)SNDMSGA((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
2605 #define TreeView_GetItemState(hwndTV, hti, mask) \
2606 (UINT)SNDMSGA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
2607 #define TreeView_GetCheckState(hwndTV, hti) \
2608 ((((UINT)(SNDMSGA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
2609 TVIS_STATEIMAGEMASK))) >> 12) -1)
2611 #define TreeView_SetLineColor(hwnd, clr) \
2612 (COLORREF)SNDMSGA((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
2614 #define TreeView_GetLineColor(hwnd) \
2615 (COLORREF)SNDMSGA((hwnd), TVM_GETLINECOLOR, 0, 0)
2617 #define TreeView_SetItemState(hwndTV, hti, data, _mask) \
2619 _TVi.mask = TVIF_STATE; \
2621 _TVi.stateMask = _mask; \
2622 _TVi.state = data; \
2623 SNDMSGA((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_TVi); \
2627 /* Listview control */
2629 #define WC_LISTVIEWA "SysListView32"
2630 #if defined(__GNUC__)
2631 # define WC_LISTVIEWW (const WCHAR []){ 'S','y','s', \
2632 'L','i','s','t','V','i','e','w','3','2',0 }
2633 #elif defined(_MSC_VER)
2634 # define WC_LISTVIEWW L"SysListView32"
2636 static const WCHAR WC_LISTVIEWW[] = { 'S','y','s',
2637 'L','i','s','t','V','i','e','w','3','2',0 };
2639 #define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
2641 #define LVSCW_AUTOSIZE -1
2642 #define LVSCW_AUTOSIZE_USEHEADER -2
2644 #define LVS_ICON 0x0000
2645 #define LVS_REPORT 0x0001
2646 #define LVS_SMALLICON 0x0002
2647 #define LVS_LIST 0x0003
2648 #define LVS_TYPEMASK 0x0003
2649 #define LVS_SINGLESEL 0x0004
2650 #define LVS_SHOWSELALWAYS 0x0008
2651 #define LVS_SORTASCENDING 0x0010
2652 #define LVS_SORTDESCENDING 0x0020
2653 #define LVS_SHAREIMAGELISTS 0x0040
2654 #define LVS_NOLABELWRAP 0x0080
2655 #define LVS_AUTOARRANGE 0x0100
2656 #define LVS_EDITLABELS 0x0200
2657 #define LVS_OWNERDATA 0x1000
2658 #define LVS_NOSCROLL 0x2000
2659 #define LVS_TYPESTYLEMASK 0xfc00
2660 #define LVS_ALIGNTOP 0x0000
2661 #define LVS_ALIGNLEFT 0x0800
2662 #define LVS_ALIGNMASK 0x0c00
2663 #define LVS_OWNERDRAWFIXED 0x0400
2664 #define LVS_NOCOLUMNHEADER 0x4000
2665 #define LVS_NOSORTHEADER 0x8000
2667 #define LVS_EX_GRIDLINES 0x0001
2668 #define LVS_EX_SUBITEMIMAGES 0x0002
2669 #define LVS_EX_CHECKBOXES 0x0004
2670 #define LVS_EX_TRACKSELECT 0x0008
2671 #define LVS_EX_HEADERDRAGDROP 0x0010
2672 #define LVS_EX_FULLROWSELECT 0x0020
2673 #define LVS_EX_ONECLICKACTIVATE 0x0040
2674 #define LVS_EX_TWOCLICKACTIVATE 0x0080
2675 #define LVS_EX_FLATSB 0x0100
2676 #define LVS_EX_REGIONAL 0x0200
2677 #define LVS_EX_INFOTIP 0x0400
2678 #define LVS_EX_UNDERLINEHOT 0x0800
2679 #define LVS_EX_UNDERLINECOLD 0x1000
2680 #define LVS_EX_MULTIWORKAREAS 0x2000
2682 #define LVCF_FMT 0x0001
2683 #define LVCF_WIDTH 0x0002
2684 #define LVCF_TEXT 0x0004
2685 #define LVCF_SUBITEM 0x0008
2686 #define LVCF_IMAGE 0x0010
2687 #define LVCF_ORDER 0x0020
2689 #define LVCFMT_LEFT 0x0000
2690 #define LVCFMT_RIGHT 0x0001
2691 #define LVCFMT_CENTER 0x0002
2692 #define LVCFMT_JUSTIFYMASK 0x0003
2693 #define LVCFMT_IMAGE 0x0800
2694 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
2695 #define LVCFMT_COL_HAS_IMAGES 0x8000
2697 #define LVSIL_NORMAL 0
2698 #define LVSIL_SMALL 1
2699 #define LVSIL_STATE 2
2701 /* following 2 flags only for LVS_OWNERDATA listviews */
2702 /* and only in report or list mode */
2703 #define LVSICF_NOINVALIDATEALL 0x0001
2704 #define LVSICF_NOSCROLL 0x0002
2707 #define LVFI_PARAM 0X0001
2708 #define LVFI_STRING 0X0002
2709 #define LVFI_PARTIAL 0X0008
2710 #define LVFI_WRAP 0X0020
2711 #define LVFI_NEARESTXY 0X0040
2713 #define LVIF_TEXT 0x0001
2714 #define LVIF_IMAGE 0x0002
2715 #define LVIF_PARAM 0x0004
2716 #define LVIF_STATE 0x0008
2717 #define LVIF_INDENT 0x0010
2718 #define LVIF_NORECOMPUTE 0x0800
2719 #define LVIF_DI_SETITEM 0x1000
2721 #define LVIR_BOUNDS 0x0000
2722 #define LVIR_LABEL 0x0002
2723 #define LVIR_ICON 0x0001
2724 #define LVIR_SELECTBOUNDS 0x0003
2726 #define LVIS_FOCUSED 0x0001
2727 #define LVIS_SELECTED 0x0002
2728 #define LVIS_CUT 0x0004
2729 #define LVIS_DROPHILITED 0x0008
2730 #define LVIS_ACTIVATING 0x0020
2732 #define LVIS_OVERLAYMASK 0x0F00
2733 #define LVIS_STATEIMAGEMASK 0xF000
2735 #define LVNI_ALL 0x0000
2736 #define LVNI_FOCUSED 0x0001
2737 #define LVNI_SELECTED 0x0002
2738 #define LVNI_CUT 0x0004
2739 #define LVNI_DROPHILITED 0x0008
2741 #define LVNI_ABOVE 0x0100
2742 #define LVNI_BELOW 0x0200
2743 #define LVNI_TOLEFT 0x0400
2744 #define LVNI_TORIGHT 0x0800
2746 #define LVHT_NOWHERE 0x0001
2747 #define LVHT_ONITEMICON 0x0002
2748 #define LVHT_ONITEMLABEL 0x0004
2749 #define LVHT_ONITEMSTATEICON 0x0008
2750 #define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
2752 #define LVHT_ABOVE 0x0008
2753 #define LVHT_BELOW 0x0010
2754 #define LVHT_TORIGHT 0x0020
2755 #define LVHT_TOLEFT 0x0040
2757 #define LVM_FIRST 0x1000
2758 #define LVM_GETBKCOLOR (LVM_FIRST+0)
2759 #define LVM_SETBKCOLOR (LVM_FIRST+1)
2760 #define LVM_GETIMAGELIST (LVM_FIRST+2)
2761 #define LVM_SETIMAGELIST (LVM_FIRST+3)
2762 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
2763 #define LVM_GETITEMA (LVM_FIRST+5)
2764 #define LVM_GETITEMW (LVM_FIRST+75)
2765 #define LVM_GETITEM WINELIB_NAME_AW(LVM_GETITEM)
2766 #define LVM_SETITEMA (LVM_FIRST+6)
2767 #define LVM_SETITEMW (LVM_FIRST+76)
2768 #define LVM_SETITEM WINELIB_NAME_AW(LVM_SETITEM)
2769 #define LVM_INSERTITEMA (LVM_FIRST+7)
2770 #define LVM_INSERTITEMW (LVM_FIRST+77)
2771 #define LVM_INSERTITEM WINELIB_NAME_AW(LVM_INSERTITEM)
2772 #define LVM_DELETEITEM (LVM_FIRST+8)
2773 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
2774 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
2775 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
2776 #define LVM_GETNEXTITEM (LVM_FIRST+12)
2777 #define LVM_FINDITEMA (LVM_FIRST+13)
2778 #define LVM_FINDITEMW (LVM_FIRST+83)
2779 #define LVM_FINDITEM WINELIB_NAME_AW(LVM_FINDITEM)
2780 #define LVM_GETITEMRECT (LVM_FIRST+14)
2781 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
2782 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
2783 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
2784 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
2785 #define LVM_GETSTRINGWIDTH WINELIB_NAME_AW(LVM_GETSTRINGWIDTH)
2786 #define LVM_HITTEST (LVM_FIRST+18)
2787 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
2788 #define LVM_SCROLL (LVM_FIRST+20)
2789 #define LVM_REDRAWITEMS (LVM_FIRST+21)
2790 #define LVM_ARRANGE (LVM_FIRST+22)
2791 #define LVM_EDITLABELA (LVM_FIRST+23)
2792 #define LVM_EDITLABELW (LVM_FIRST+118)
2793 #define LVM_EDITLABEL WINELIB_NAME_AW(LVM_EDITLABEL)
2794 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
2795 #define LVM_GETCOLUMNA (LVM_FIRST+25)
2796 #define LVM_GETCOLUMNW (LVM_FIRST+95)
2797 #define LVM_GETCOLUMN WINELIB_NAME_AW(LVM_GETCOLUMN)
2798 #define LVM_SETCOLUMNA (LVM_FIRST+26)
2799 #define LVM_SETCOLUMNW (LVM_FIRST+96)
2800 #define LVM_SETCOLUMN WINELIB_NAME_AW(LVM_SETCOLUMN)
2801 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
2802 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
2803 #define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
2804 #define LVM_DELETECOLUMN (LVM_FIRST+28)
2805 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
2806 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
2807 #define LVM_GETHEADER (LVM_FIRST+31)
2809 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
2810 #define LVM_GETVIEWRECT (LVM_FIRST+34)
2811 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
2812 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
2813 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
2814 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
2815 #define LVM_GETTOPINDEX (LVM_FIRST+39)
2816 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
2817 #define LVM_GETORIGIN (LVM_FIRST+41)
2818 #define LVM_UPDATE (LVM_FIRST+42)
2819 #define LVM_SETITEMSTATE (LVM_FIRST+43)
2820 #define LVM_GETITEMSTATE (LVM_FIRST+44)
2821 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
2822 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
2823 #define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
2824 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
2825 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
2826 #define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
2827 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
2828 #define LVM_SORTITEMS (LVM_FIRST+48)
2829 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
2830 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
2831 #define LVM_GETITEMSPACING (LVM_FIRST+51)
2832 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
2833 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
2834 #define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
2835 #define LVM_SETICONSPACING (LVM_FIRST+53)
2836 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
2837 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
2838 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
2839 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
2840 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
2841 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
2842 #define LVM_SETHOTITEM (LVM_FIRST+60)
2843 #define LVM_GETHOTITEM (LVM_FIRST+61)
2844 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
2845 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
2846 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
2847 #define LVM_SETWORKAREAS (LVM_FIRST+65)
2848 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
2849 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
2850 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
2851 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
2852 #define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
2853 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
2854 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
2855 #define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
2856 #define LVM_GETWORKAREAS (LVM_FIRST+70)
2857 #define LVM_SETHOVERTIME (LVM_FIRST+71)
2858 #define LVM_GETHOVERTIME (LVM_FIRST+72)
2859 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
2860 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
2861 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
2862 #define LVM_GETUNICODEFORMAT (CCM_GETUNICODEFORMAT)
2863 #define LVM_SETUNICODEFORMAT (CCM_SETUNICODEFORMAT)
2865 #define LVN_FIRST (0U-100U)
2866 #define LVN_LAST (0U-199U)
2867 #define LVN_ITEMCHANGING (LVN_FIRST-0)
2868 #define LVN_ITEMCHANGED (LVN_FIRST-1)
2869 #define LVN_INSERTITEM (LVN_FIRST-2)
2870 #define LVN_DELETEITEM (LVN_FIRST-3)
2871 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
2872 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
2873 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
2874 #define LVN_BEGINLABELEDIT WINELIB_NAME_AW(LVN_BEGINLABELEDIT)
2875 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
2876 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
2877 #define LVN_ENDLABELEDIT WINELIB_NAME_AW(LVN_ENDLABELEDIT)
2878 #define LVN_COLUMNCLICK (LVN_FIRST-8)
2879 #define LVN_BEGINDRAG (LVN_FIRST-9)
2880 #define LVN_BEGINRDRAG (LVN_FIRST-11)
2881 #define LVN_ODCACHEHINT (LVN_FIRST-13)
2882 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
2883 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
2884 #define LVN_HOTTRACK (LVN_FIRST-21)
2885 #define LVN_ODFINDITEMA (LVN_FIRST-52)
2886 #define LVN_ODFINDITEMW (LVN_FIRST-79)
2887 #define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
2888 #define LVN_GETDISPINFOA (LVN_FIRST-50)
2889 #define LVN_GETDISPINFOW (LVN_FIRST-77)
2890 #define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
2891 #define LVN_SETDISPINFOA (LVN_FIRST-51)
2892 #define LVN_SETDISPINFOW (LVN_FIRST-78)
2893 #define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
2894 #define LVN_KEYDOWN (LVN_FIRST-55)
2895 #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
2896 #define LVN_GETINFOTIPA (LVN_FIRST-57)
2897 #define LVN_GETINFOTIPW (LVN_FIRST-58)
2898 #define LVN_GETINFOTIP WINELIB_NAME_AW(LVN_GETINFOTIP)
2900 #define LVA_ALIGNLEFT 0x0000
2901 #define LVA_DEFAULT 0x0001
2902 #define LVA_ALIGNTOP 0x0002
2903 #define LVA_SNAPTOGRID 0x0005
2905 typedef struct tagLVITEMA
2916 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2917 int iGroupId; /* (_WIN32_IE >= 0x560) */
2918 UINT cColumns; /* (_WIN32_IE >= 0x560) */
2919 PUINT puColumns; /* (_WIN32_IE >= 0x560) */
2920 } LVITEMA, *LPLVITEMA;
2922 typedef struct tagLVITEMW
2933 INT iIndent; /* (_WIN32_IE >= 0x0300) */
2934 int iGroupId; /* (_WIN32_IE >= 0x560) */
2935 UINT cColumns; /* (_WIN32_IE >= 0x560) */
2936 PUINT puColumns; /* (_WIN32_IE >= 0x560) */
2937 } LVITEMW, *LPLVITEMW;
2939 #define LVITEM WINELIB_NAME_AW(LVITEM)
2940 #define LPLVITEM WINELIB_NAME_AW(LPLVITEM)
2942 #define LVITEM_V1_SIZEA CCSIZEOF_STRUCT(LVITEMA, lParam)
2943 #define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
2944 #define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
2946 #define LV_ITEM LVITEM
2948 typedef struct LVSETINFOTIPA
2955 } LVSETINFOTIPA, *PLVSETINFOTIPA;
2957 typedef struct LVSETINFOTIPW
2964 } LVSETINFOTIPW, *PLVSETINFOTIPW;
2966 #define LVSETINFOTIP WINELIB_NAME_AW(LVSETINFOTIP)
2967 #define PLVSETINFOTIP WINELIB_NAME_AW(PLVSETINFOTIP)
2969 /* ListView background image structs and constants
2970 For _WIN32_IE version 0x400 and later. */
2972 typedef struct tagLVBKIMAGEA
2980 } LVBKIMAGEA, *LPLVBKIMAGEA;
2982 typedef struct tagLVBKIMAGEW
2990 } LVBKIMAGEW, *LPLVBKIMAGEW;
2992 #define LVBKIMAGE WINELIB_NAME_AW(LVBKIMAGE)
2993 #define LPLVBKIMAGE WINELIB_NAME_AW(LPLVBKIMAGE)
2995 #define LVBKIF_SOURCE_NONE 0x00000000
2996 #define LVBKIF_SOURCE_HBITMAP 0x00000001
2997 #define LVBKIF_SOURCE_URL 0x00000002
2998 #define LVBKIF_SOURCE_MASK 0x00000003
2999 #define LVBKIF_STYLE_NORMAL 0x00000000
3000 #define LVBKIF_STYLE_TILE 0x00000010
3001 #define LVBKIF_STYLE_MASK 0x00000010
3003 #define ListView_SetBkImage(hwnd, plvbki) \
3004 (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)plvbki)
3006 #define ListView_GetBkImage(hwnd, plvbki) \
3007 (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)plvbki)
3009 typedef struct tagLVCOLUMNA
3017 INT iImage; /* (_WIN32_IE >= 0x0300) */
3018 INT iOrder; /* (_WIN32_IE >= 0x0300) */
3019 } LVCOLUMNA, *LPLVCOLUMNA;
3021 typedef struct tagLVCOLUMNW
3029 INT iImage; /* (_WIN32_IE >= 0x0300) */
3030 INT iOrder; /* (_WIN32_IE >= 0x0300) */
3031 } LVCOLUMNW, *LPLVCOLUMNW;
3033 #define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
3034 #define LPLVCOLUMN WINELIB_NAME_AW(LPLVCOLUMN)
3036 #define LVCOLUMN_V1_SIZEA CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
3037 #define LVCOLUMN_V1_SIZEW CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)
3038 #define LVCOLUMN_V1_SIZE WINELIB_NAME_AW(LVCOLUMN_V1_SIZE)
3040 #define LV_COLUMN LVCOLUMN
3043 typedef struct tagNMLISTVIEW
3053 } NMLISTVIEW, *LPNMLISTVIEW;
3055 #define NM_LISTVIEW NMLISTVIEW
3056 #define LPNM_LISTVIEW LPNMLISTVIEW
3058 typedef struct tagNMITEMACTIVATE
3069 } NMITEMACTIVATE, *LPNMITEMACTIVATE;
3071 typedef struct tagLVDISPINFOA
3075 } NMLVDISPINFOA, *LPNMLVDISPINFOA;
3077 typedef struct tagLVDISPINFOW
3081 } NMLVDISPINFOW, *LPNMLVDISPINFOW;
3083 #define NMLVDISPINFO WINELIB_NAME_AW(NMLVDISPINFO)
3084 #define LPNMLVDISPINFO WINELIB_NAME_AW(LPNMLVDISPINFO)
3086 #define LV_DISPINFO NMLVDISPINFO
3088 #include "pshpack1.h"
3089 typedef struct tagLVKEYDOWN
3094 } NMLVKEYDOWN, *LPNMLVKEYDOWN;
3095 #include "poppack.h"
3097 #define LV_KEYDOWN NMLVKEYDOWN
3099 typedef struct tagNMLVGETINFOTIPA
3108 } NMLVGETINFOTIPA, *LPNMLVGETINFOTIPA;
3110 typedef struct tagNMLVGETINFOTIPW
3119 } NMLVGETINFOTIPW, *LPNMLVGETINFOTIPW;
3121 #define NMLVGETINFOTIP WINELIB_NAME_AW(NMLVGETINFOTIP)
3122 #define LPNMLVGETINFOTIP WINELIB_NAME_AW(LPNMLVGETINFOTIP)
3124 typedef struct tagLVHITTESTINFO
3130 } LVHITTESTINFO, *LPLVHITTESTINFO;
3132 #define LV_HITTESTINFO LVHITTESTINFO
3133 #define _LV_HITTESTINFO tagLVHITTESTINFO
3134 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
3136 typedef struct tagLVFINDINFOA
3143 } LVFINDINFOA, *LPLVFINDINFOA;
3145 typedef struct tagLVFINDINFOW
3152 } LVFINDINFOW, *LPLVFINDINFOW;
3154 #define LVFINDINFO WINELIB_NAME_AW(LVFINDINFO)
3155 #define LPLVFINDINFO WINELIB_NAME_AW(LPLVFINDINFO)
3157 /* Groups relates structures */
3159 typedef struct LVGROUPA
3169 } LVGROUPA, *PLVGROUPA;
3171 typedef struct LVGROUPW
3181 } LVGROUPW, *PLVGROUPW;
3183 #define LVGROUP WINELIB_NAME_AW(LVGROUP)
3184 #define PLVGROUP WINELIB_NAME_AW(PLVGROUP)
3186 typedef struct LVGROUPMETRICS
3198 COLORREF crRightHeader;
3200 } LVGROUPMETRICS, *PLVGROUPMETRICS;
3202 typedef INT (*PFNLVGROUPCOMPARE)(INT, INT, VOID*);
3204 typedef struct LVINSERTGROUPSORTEDA
3206 PFNLVGROUPCOMPARE pfnGroupCompare;
3209 } LVINSERTGROUPSORTEDA, *PLVINSERTGROUPSORTEDA;
3211 typedef struct LVINSERTGROUPSORTEDW
3213 PFNLVGROUPCOMPARE pfnGroupCompare;
3216 } LVINSERTGROUPSORTEDW, *PLVINSERTGROUPSORTEDW;
3218 #define LVINSERTGROUPSORTED WINELIB_NAME_AW(LVINSERTGROUPSORTED)
3219 #define PLVINSERTGROUPSORTED WINELIB_NAME_AW(PLVINSERTGROUPSORTED)
3221 /* Tile related structures */
3223 typedef struct LVTILEINFO
3229 } LVTILEINFO, *PLVTILEINFO;
3231 typedef struct LVTILEVIEWINFO
3239 } LVTILEVIEWINFO, *PLVTILEVIEWINFO;
3241 typedef struct LVINSERTMARK
3247 } LVINSERTMARK, *PLVINSERTMARK;
3249 typedef struct tagTCHITTESTINFO
3253 } TCHITTESTINFO, *LPTCHITTESTINFO;
3255 #define TC_HITTESTINFO TCHITTESTINFO
3257 typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
3259 #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLCUSTOMDRW, clrTextBk)
3261 typedef struct tagNMLVCUSTOMDRAW
3266 int iSubItem; /* (_WIN32_IE >= 0x0400) */
3267 DWORD dwItemType; /* (_WIN32_IE >= 0x560) */
3268 COLORREF clrFace; /* (_WIN32_IE >= 0x560) */
3269 int iIconEffect; /* (_WIN32_IE >= 0x560) */
3270 int iIconPhase; /* (_WIN32_IE >= 0x560) */
3271 int iPartId; /* (_WIN32_IE >= 0x560) */
3272 int iStateId; /* (_WIN32_IE >= 0x560) */
3273 RECT rcText; /* (_WIN32_IE >= 0x560) */
3274 UINT uAlign; /* (_WIN32_IE >= 0x560) */
3275 } NMLVCUSTOMDRAW, *LPNMLVCUSTOMDRAW;
3277 typedef struct tagNMLVCACHEHINT
3282 } NMLVCACHEHINT, *LPNMLVCACHEHINT;
3284 #define LPNM_CACHEHINT LPNMLVCACHEHINT
3285 #define PNM_CACHEHINT LPNMLVCACHEHINT
3286 #define NM_CACHEHINT NMLVCACHEHINT
3288 typedef struct tagNMLVFINDITEMA
3293 } NMLVFINDITEMA, *LPNMLVFINDITEMA;
3295 typedef struct tagNMLVFINDITEMW
3300 } NMLVFINDITEMW, *LPNMLVFINDITEMW;
3302 #define NMLVFINDITEM WINELIB_NAME_AW(NMLVFINDITEM)
3303 #define LPNMLVFINDITEM WINELIB_NAME_AW(LPNMLVFINDITEM)
3304 #define NM_FINDITEM NMLVFINDITEM
3305 #define LPNM_FINDITEM LPNMLVFINDITEM
3306 #define PNM_FINDITEM LPNMLVFINDITEM
3308 typedef struct tagNMLVODSTATECHANGE
3315 } NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;
3317 #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3318 #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
3319 #define NM_ODSTATECHANGE NMLVODSTATECHANGE
3321 typedef struct NMLVSCROLL
3326 } NMLVSCROLL, *LPNMLVSCROLL;
3328 #define ListView_SetTextBkColor(hwnd,clrBk) \
3329 (BOOL)SNDMSGA((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3330 #define ListView_SetTextColor(hwnd,clrBk) \
3331 (BOOL)SNDMSGA((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3332 #define ListView_DeleteColumn(hwnd,col)\
3333 (LRESULT)SNDMSGA((hwnd),LVM_DELETECOLUMN,0,(LPARAM)(INT)(col))
3334 #define ListView_GetColumnA(hwnd,x,col)\
3335 (LRESULT)SNDMSGA((hwnd),LVM_GETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3336 #define ListView_GetColumnW(hwnd,x,col)\
3337 (LRESULT)SNDMSGW((hwnd),LVM_GETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3338 #define ListView_GetColumn WINELIB_NAME_AW(ListView_GetColumn)
3339 #define ListView_SetColumnA(hwnd,x,col)\
3340 (LRESULT)SNDMSGA((hwnd),LVM_SETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
3341 #define ListView_SetColumnW(hwnd,x,col)\
3342 (LRESULT)SNDMSGW((hwnd),LVM_SETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
3343 #define ListView_SetColumn WINELIB_NAME_AW(ListView_SetColumn)
3346 #define ListView_GetNextItem(hwnd,nItem,flags) \
3347 (INT)SNDMSGA((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
3348 #define ListView_FindItemA(hwnd,nItem,plvfi) \
3349 (INT)SNDMSGA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOA*)(plvfi))
3350 #define ListView_FindItemW(hwnd,nItem,plvfi) \
3351 (INT)SNDMSGW((hwnd),LVM_FINDITEMW,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOW*)(plvfi))
3352 #define ListView_FindItem WINELIB_NAME_AW(ListView_FindItem)
3354 #define ListView_Arrange(hwnd,code) \
3355 (INT)SNDMSGA((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
3356 #define ListView_GetItemPosition(hwnd,i,ppt) \
3357 (INT)SNDMSGA((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
3358 #define ListView_GetItemRect(hwnd,i,prc,code) \
3359 (BOOL)SNDMSGA((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
3360 ((prc) ? (((RECT*)(prc))->left = (code),(LPARAM)(RECT \
3361 *)(prc)) : (LPARAM)(RECT*)NULL))
3362 #define ListView_SetItemA(hwnd,pitem) \
3363 (INT)SNDMSGA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3364 #define ListView_SetItemW(hwnd,pitem) \
3365 (INT)SNDMSGW((hwnd),LVM_SETITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3366 #define ListView_SetItem WINELIB_NAME_AW(ListView_SetItem)
3367 #define ListView_SetItemState(hwnd,i,pitem) \
3368 (BOOL)SNDMSGA((hwnd),LVM_SETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(LPLVITEMA)(pitem))
3369 #define ListView_GetItemState(hwnd,i,mask) \
3370 (BOOL)SNDMSGA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
3371 #define ListView_GetCountPerPage(hwnd) \
3372 (BOOL)SNDMSGW((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
3373 #define ListView_GetImageList(hwnd,iImageList) \
3374 (HIMAGELIST)SNDMSGA((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
3375 #define ListView_GetStringWidthA(hwnd,pstr) \
3376 (INT)SNDMSGA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
3377 #define ListView_GetStringWidthW(hwnd,pstr) \
3378 (INT)SNDMSGW((hwnd),LVM_GETSTRINGWIDTHW,0,(LPARAM)(LPCWSTR)(pstr))
3379 #define ListView_GetStringWidth WINELIB_NAME_AW(ListView_GetStringWidth)
3380 #define ListView_GetTopIndex(hwnd) \
3381 (BOOL)SNDMSGA((hwnd),LVM_GETTOPINDEX,0,0L)
3382 #define ListView_Scroll(hwnd,dx,dy) \
3383 (BOOL)SNDMSGA((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
3384 #define ListView_EnsureVisible(hwnd,i,fPartialOk) \
3385 (BOOL)SNDMSGA((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
3386 #define ListView_SetBkColor(hwnd,clrBk) \
3387 (BOOL)SNDMSGA((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
3388 #define ListView_SetImageList(hwnd,himl,iImageList) \
3389 (HIMAGELIST)(UINT)SNDMSGA((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(UINT)(HIMAGELIST)(himl))
3390 #define ListView_GetItemCount(hwnd) \
3391 (INT)SNDMSGA((hwnd),LVM_GETITEMCOUNT,0,0L)
3393 #define ListView_GetItemA(hwnd,pitem) \
3394 (BOOL)SNDMSGA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
3395 #define ListView_GetItemW(hwnd,pitem) \
3396 (BOOL)SNDMSGW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
3397 #define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
3399 #define ListView_HitTest(hwnd,pinfo) \
3400 (INT)SNDMSGA((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
3402 #define ListView_InsertItemA(hwnd,pitem) \
3403 (INT)SNDMSGA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
3404 #define ListView_InsertItemW(hwnd,pitem) \
3405 (INT)SNDMSGW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
3406 #define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
3408 #define ListView_DeleteAllItems(hwnd) \
3409 (BOOL)SNDMSGA((hwnd),LVM_DELETEALLITEMS,0,0L)
3411 #define ListView_InsertColumnA(hwnd,iCol,pcol) \
3412 (INT)SNDMSGA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
3413 #define ListView_InsertColumnW(hwnd,iCol,pcol) \
3414 (INT)SNDMSGW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
3415 #define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
3417 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
3418 (BOOL)SNDMSGA((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
3419 #define ListView_SetItemPosition(hwndLV, i, x, y) \
3420 (BOOL)SNDMSGA((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
3421 #define ListView_GetSelectedCount(hwndLV) \
3422 (UINT)SNDMSGA((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
3424 #define ListView_EditLabelA(hwndLV, i) \
3425 (HWND)SNDMSGA((hwndLV),LVM_EDITLABELA,(WPARAM)(int)(i), 0L)
3426 #define ListView_EditLabelW(hwndLV, i) \
3427 (HWND)SNDMSGW((hwndLV),LVM_EDITLABELW,(WPARAM)(int)(i), 0L)
3428 #define ListView_EditLabel WINELIB_NAME_AW(ListView_EditLabel)
3430 #define ListView_SetItemTextA(hwndLV, i, _iSubItem, _pszText) \
3431 { LVITEMA _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3432 SNDMSGA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}
3433 #define ListView_SetItemTextW(hwndLV, i, _iSubItem, _pszText) \
3434 { LVITEMW _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
3435 SNDMSGW(hwndLV, LVM_SETITEMTEXTW, (WPARAM)i, (LPARAM) (LVITEMW*)& _LVi);}
3436 #define ListView_SetItemText WINELIB_NAME_AW(ListView_SetItemText)
3438 #define ListView_DeleteItem(hwndLV, i) \
3439 (BOOL)SNDMSGA(hwndLV, LVM_DELETEITEM, (WPARAM)(int)(i), 0L)
3440 #define ListView_Update(hwndLV, i) \
3441 (BOOL)SNDMSGA((hwndLV), LVM_UPDATE, (WPARAM)(i), 0L)
3442 #define ListView_GetColumnOrderArray(hwndLV, iCount, pi) \
3443 (BOOL)SNDMSGA((hwndLV), LVM_GETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3444 #define ListView_GetExtendedListViewStyle(hwndLV) \
3445 (DWORD)SNDMSGA((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0L)
3446 #define ListView_GetHotCursor(hwndLV) \
3447 (HCURSOR)SNDMSGA((hwndLV), LVM_GETHOTCURSOR, 0, 0L)
3448 #define ListView_GetHotItem(hwndLV) \
3449 (int)SNDMSGA((hwndLV), LVM_GETHOTITEM, 0, 0L)
3450 #define ListView_GetItemSpacing(hwndLV, fSmall) \
3451 (DWORD)SNDMSGA((hwndLV), LVM_GETITEMSPACING, (WPARAM)fSmall, 0L)
3452 #define ListView_GetSubItemRect(hwndLV, iItem, iSubItem, code, prc) \
3453 (BOOL)SNDMSGA((hwndLV), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
3454 ((prc) ? (((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code):0), (LPARAM)prc)
3455 #define ListView_GetToolTips(hwndLV) \
3456 (HWND)SNDMSGA((hwndLV), LVM_GETTOOLTIPS, 0, 0L)
3457 #define ListView_SetColumnOrderArray(hwndLV, iCount, pi) \
3458 (BOOL)SNDMSGA((hwndLV), LVM_SETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
3459 #define ListView_SetExtendedListViewStyle(hwndLV, dw) \
3460 (DWORD)SNDMSGA((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dw)
3461 #define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw) \
3462 (DWORD)SNDMSGA((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)dwMask, (LPARAM)dw)
3463 #define ListView_SetHotCursor(hwndLV, hcur) \
3464 (HCURSOR)SNDMSGA((hwndLV), LVM_SETHOTCURSOR, 0, (LPARAM)hcur)
3465 #define ListView_SetHotItem(hwndLV, i) \
3466 (int)SNDMSGA((hwndLV), LVM_SETHOTITEM, (WPARAM)i, 0L)
3467 #define ListView_SetIconSpacing(hwndLV, cx, cy) \
3468 (DWORD)SNDMSGA((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
3469 #define ListView_SetToolTips(hwndLV, hwndNewHwnd) \
3470 (HWND)SNDMSGA((hwndLV), LVM_SETTOOLTIPS, (WPARAM)hwndNewHwnd, 0L)
3471 #define ListView_SubItemHitTest(hwndLV, plvhti) \
3472 (int)SNDMSGA((hwndLV), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
3477 #define WC_TABCONTROL16 "SysTabControl"
3478 #define WC_TABCONTROLA "SysTabControl32"
3479 #if defined(__GNUC__)
3480 # define WC_TABCONTROLW (const WCHAR []){ 'S','y','s', \
3481 'T','a','b','C','o','n','t','r','o','l','3','2',0 }
3482 #elif defined(_MSC_VER)
3483 # define WC_TABCONTROLW L"SysTabControl32"
3485 static const WCHAR WC_TABCONTROLW[] = { 'S','y','s',
3486 'T','a','b','C','o','n','t','r','o','l','3','2',0 };
3488 #define WC_TABCONTROL WINELIB_NAME_AW(WC_TABCONTROL)
3490 /* tab control styles */
3491 #define TCS_SCROLLOPPOSITE 0x0001 /* assumes multiline tab */
3492 #define TCS_BOTTOM 0x0002
3493 #define TCS_RIGHT 0x0002
3494 #define TCS_MULTISELECT 0x0004 /* allow multi-select in button mode */
3495 #define TCS_FLATBUTTONS 0x0008
3496 #define TCS_FORCEICONLEFT 0x0010
3497 #define TCS_FORCELABELLEFT 0x0020
3498 #define TCS_HOTTRACK 0x0040
3499 #define TCS_VERTICAL 0x0080
3500 #define TCS_TABS 0x0000
3501 #define TCS_BUTTONS 0x0100
3502 #define TCS_SINGLELINE 0x0000
3503 #define TCS_MULTILINE 0x0200
3504 #define TCS_RIGHTJUSTIFY 0x0000
3505 #define TCS_FIXEDWIDTH 0x0400
3506 #define TCS_RAGGEDRIGHT 0x0800
3507 #define TCS_FOCUSONBUTTONDOWN 0x1000
3508 #define TCS_OWNERDRAWFIXED 0x2000
3509 #define TCS_TOOLTIPS 0x4000
3510 #define TCS_FOCUSNEVER 0x8000
3511 #define TCS_EX_FLATSEPARATORS 0x00000001 /* to be used with */
3512 #define TCS_EX_REGISTERDROP 0x00000002 /* TCM_SETEXTENDEDSTYLE */
3515 #define TCM_FIRST 0x1300
3517 #define TCM_GETIMAGELIST (TCM_FIRST + 2)
3518 #define TCM_SETIMAGELIST (TCM_FIRST + 3)
3519 #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
3520 #define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
3521 #define TCM_GETITEMA (TCM_FIRST + 5)
3522 #define TCM_GETITEMW (TCM_FIRST + 60)
3523 #define TCM_SETITEMA (TCM_FIRST + 6)
3524 #define TCM_SETITEMW (TCM_FIRST + 61)
3525 #define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
3526 #define TCM_INSERTITEMA (TCM_FIRST + 7)
3527 #define TCM_INSERTITEMW (TCM_FIRST + 62)
3528 #define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
3529 #define TCM_DELETEITEM (TCM_FIRST + 8)
3530 #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
3531 #define TCM_GETITEMRECT (TCM_FIRST + 10)
3532 #define TCM_GETCURSEL (TCM_FIRST + 11)
3533 #define TCM_SETCURSEL (TCM_FIRST + 12)
3534 #define TCM_HITTEST (TCM_FIRST + 13)
3535 #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
3536 #define TCM_ADJUSTRECT (TCM_FIRST + 40)
3537 #define TCM_SETITEMSIZE (TCM_FIRST + 41)
3538 #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
3539 #define TCM_SETPADDING (TCM_FIRST + 43)
3540 #define TCM_GETROWCOUNT (TCM_FIRST + 44)
3541 #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
3542 #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
3543 #define TCM_GETCURFOCUS (TCM_FIRST + 47)
3544 #define TCM_SETCURFOCUS (TCM_FIRST + 48)
3545 #define TCM_SETMINTABWIDTH (TCM_FIRST + 49)
3546 #define TCM_DESELECTALL (TCM_FIRST + 50)
3547 #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
3548 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
3549 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
3550 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3551 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3554 #define TCIF_TEXT 0x0001
3555 #define TCIF_IMAGE 0x0002
3556 #define TCIF_RTLREADING 0x0004
3557 #define TCIF_PARAM 0x0008
3558 #define TCIF_STATE 0x0010
3560 #define TCIS_BUTTONPRESSED 0x0001
3561 #define TCIS_HIGHLIGHTED 0x0002
3563 /* TabCtrl Macros */
3564 #define TabCtrl_GetImageList(hwnd) \
3565 (HIMAGELIST)SNDMSGA((hwnd), TCM_GETIMAGELIST, 0, 0L)
3566 #define TabCtrl_SetImageList(hwnd, himl) \
3567 (HIMAGELIST)SNDMSGA((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
3568 #define TabCtrl_GetItemCount(hwnd) \
3569 (int)SNDMSGA((hwnd), TCM_GETITEMCOUNT, 0, 0L)
3570 #define TabCtrl_GetItemA(hwnd, iItem, pitem) \
3571 (BOOL)SNDMSGA((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3572 #define TabCtrl_GetItemW(hwnd, iItem, pitem) \
3573 (BOOL)SNDMSGW((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3574 #define TabCtrl_GetItem WINELIB_NAME_AW(TabCtrl_GetItem)
3575 #define TabCtrl_SetItemA(hwnd, iItem, pitem) \
3576 (BOOL)SNDMSGA((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3577 #define TabCtrl_SetItemW(hwnd, iItem, pitem) \
3578 (BOOL)SNDMSGW((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM *)(pitem))
3579 #define TabCtrl_SetItem WINELIB_NAME_AW(TabCtrl_GetItem)
3580 #define TabCtrl_InsertItemA(hwnd, iItem, pitem) \
3581 (int)SNDMSGA((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
3582 #define TabCtrl_InsertItemW(hwnd, iItem, pitem) \
3583 (int)SNDMSGW((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM *)(pitem))
3584 #define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
3585 #define TabCtrl_DeleteItem(hwnd, i) \
3586 (BOOL)SNDMSGA((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
3587 #define TabCtrl_DeleteAllItems(hwnd) \
3588 (BOOL)SNDMSGA((hwnd), TCM_DELETEALLITEMS, 0, 0L)
3589 #define TabCtrl_GetItemRect(hwnd, i, prc) \
3590 (BOOL)SNDMSGA((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
3591 #define TabCtrl_GetCurSel(hwnd) \
3592 (int)SNDMSGA((hwnd), TCM_GETCURSEL, 0, 0)
3593 #define TabCtrl_SetCurSel(hwnd, i) \
3594 (int)SNDMSGA((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
3595 #define TabCtrl_HitTest(hwndTC, pinfo) \
3596 (int)SNDMSGA((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
3597 #define TabCtrl_SetItemExtra(hwndTC, cb) \
3598 (BOOL)SNDMSGA((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
3599 #define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
3600 (int)SNDMSGA(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
3601 #define TabCtrl_SetItemSize(hwnd, x, y) \
3602 (DWORD)SNDMSGA((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
3603 #define TabCtrl_RemoveImage(hwnd, i) \
3604 (void)SNDMSGA((hwnd), TCM_REMOVEIMAGE, i, 0L)
3605 #define TabCtrl_SetPadding(hwnd, cx, cy) \
3606 (void)SNDMSGA((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
3607 #define TabCtrl_GetRowCount(hwnd) \
3608 (int)SNDMSGA((hwnd), TCM_GETROWCOUNT, 0, 0L)
3609 #define TabCtrl_GetToolTips(hwnd) \
3610 (HWND)SNDMSGA((hwnd), TCM_GETTOOLTIPS, 0, 0L)
3611 #define TabCtrl_SetToolTips(hwnd, hwndTT) \
3612 (void)SNDMSGA((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
3613 #define TabCtrl_GetCurFocus(hwnd) \
3614 (int)SNDMSGA((hwnd), TCM_GETCURFOCUS, 0, 0)
3615 #define TabCtrl_SetCurFocus(hwnd, i) \
3616 SNDMSGA((hwnd),TCM_SETCURFOCUS, i, 0)
3617 #define TabCtrl_SetMinTabWidth(hwnd, x) \
3618 (int)SNDMSGA((hwnd), TCM_SETMINTABWIDTH, 0, x)
3619 #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
3620 (void)SNDMSGA((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
3623 /* constants for TCHITTESTINFO */
3625 #define TCHT_NOWHERE 0x01
3626 #define TCHT_ONITEMICON 0x02
3627 #define TCHT_ONITEMLABEL 0x04
3628 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
3631 typedef struct tagTCITEMA {
3639 } TCITEMA, *LPTCITEMA;
3641 typedef struct tagTCITEMW
3650 } TCITEMW, *LPTCITEMW;
3652 #define TCITEM WINELIB_NAME_AW(TCITEM)
3653 #define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
3654 #define TC_ITEM TCITEM
3656 #define TCN_FIRST (0U-550U)
3657 #define TCN_LAST (0U-580U)
3658 #define TCN_KEYDOWN (TCN_FIRST - 0)
3659 #define TCN_SELCHANGE (TCN_FIRST - 1)
3660 #define TCN_SELCHANGING (TCN_FIRST - 2)
3661 #define TCN_GETOBJECT (TCN_FIRST - 3)
3663 #include "pshpack1.h"
3664 typedef struct tagTCKEYDOWN
3670 #include "poppack.h"
3672 #define TC_KEYDOWN NMTCKEYDOWN
3674 /* ComboBoxEx control */
3676 #define WC_COMBOBOXEXA "ComboBoxEx32"
3677 #if defined(__GNUC__)
3678 # define WC_COMBOBOXEXW (const WCHAR []){ 'C','o','m','b','o', \
3679 'B','o','x','E','x','3','2',0 }
3680 #elif defined(_MSC_VER)
3681 # define WC_COMBOBOXEXW L"ComboBoxEx32"
3683 static const WCHAR WC_COMBOBOXEXW[] = { 'C','o','m','b','o',
3684 'B','o','x','E','x','3','2',0 };
3686 #define WC_COMBOBOXEX WINELIB_NAME_AW(WC_COMBOBOXEX)
3688 #define CBEIF_TEXT 0x00000001
3689 #define CBEIF_IMAGE 0x00000002
3690 #define CBEIF_SELECTEDIMAGE 0x00000004
3691 #define CBEIF_OVERLAY 0x00000008
3692 #define CBEIF_INDENT 0x00000010
3693 #define CBEIF_LPARAM 0x00000020
3694 #define CBEIF_DI_SETITEM 0x10000000
3696 #define CBEM_INSERTITEMA (WM_USER+1)
3697 #define CBEM_INSERTITEMW (WM_USER+11)
3698 #define CBEM_INSERTITEM WINELIB_NAME_AW(CBEM_INSERTITEM)
3699 #define CBEM_SETIMAGELIST (WM_USER+2)
3700 #define CBEM_GETIMAGELIST (WM_USER+3)
3701 #define CBEM_GETITEMA (WM_USER+4)
3702 #define CBEM_GETITEMW (WM_USER+13)
3703 #define CBEM_GETITEM WINELIB_NAME_AW(CBEM_GETITEM)
3704 #define CBEM_SETITEMA (WM_USER+5)
3705 #define CBEM_SETITEMW (WM_USER+12)
3706 #define CBEM_SETITEM WINELIB_NAME_AW(CBEM_SETITEM)
3707 #define CBEM_DELETEITEM CB_DELETESTRING
3708 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
3709 #define CBEM_GETEDITCONTROL (WM_USER+7)
3710 #define CBEM_SETEXSTYLE (WM_USER+8)
3711 #define CBEM_GETEXSTYLE (WM_USER+9)
3712 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
3713 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
3714 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
3715 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
3716 #define CBEM_HASEDITCHANGED (WM_USER+10)
3718 #define CBEIF_TEXT 0x00000001
3719 #define CBEIF_IMAGE 0x00000002
3720 #define CBEIF_SELECTEDIMAGE 0x00000004
3721 #define CBEIF_OVERLAY 0x00000008
3722 #define CBEIF_INDENT 0x00000010
3723 #define CBEIF_LPARAM 0x00000020
3724 #define CBEIF_DI_SETITEM 0x10000000
3726 #define CBEN_FIRST (0U-800U)
3727 #define CBEN_LAST (0U-830U)
3729 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
3730 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
3731 #define CBEN_GETDISPINFO WINELIB_NAME_AW(CBEN_GETDISPINFO)
3732 #define CBEN_INSERTITEM (CBEN_FIRST - 1)
3733 #define CBEN_DELETEITEM (CBEN_FIRST - 2)
3734 #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
3735 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
3736 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
3737 #define CBEN_ENDEDIT WINELIB_NAME_AW(CBEN_ENDEDIT)
3738 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
3739 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
3740 #define CBEN_DRAGBEGIN WINELIB_NAME_AW(CBEN_DRAGBEGIN)
3742 #define CBES_EX_NOEDITIMAGE 0x00000001
3743 #define CBES_EX_NOEDITIMAGEINDENT 0x00000002
3744 #define CBES_EX_PATHWORDBREAKPROC 0x00000004
3745 #define CBES_EX_NOSIZELIMIT 0x00000008
3746 #define CBES_EX_CASESENSITIVE 0x00000010
3749 typedef struct tagCOMBOBOXEXITEMA
3760 } COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
3761 typedef COMBOBOXEXITEMA const *PCCOMBOEXITEMA; /* Yes, there's a BOX missing */
3763 typedef struct tagCOMBOBOXEXITEMW
3774 } COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
3775 typedef COMBOBOXEXITEMW const *PCCOMBOEXITEMW; /* Yes, there's a BOX missing */
3777 #define COMBOBOXEXITEM WINELIB_NAME_AW(COMBOBOXEXITEM)
3778 #define PCOMBOBOXEXITEM WINELIB_NAME_AW(PCOMBOBOXEXITEM)
3779 #define PCCOMBOBOXEXITEM WINELIB_NAME_AW(PCCOMBOEXITEM) /* Yes, there's a BOX missing */
3781 #define CBENF_KILLFOCUS 1
3782 #define CBENF_RETURN 2
3783 #define CBENF_ESCAPE 3
3784 #define CBENF_DROPDOWN 4
3786 #define CBEMAXSTRLEN 260
3788 typedef struct tagNMCBEENDEDITW
3793 WCHAR szText[CBEMAXSTRLEN];
3795 } NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;
3797 typedef struct tagNMCBEENDEDITA
3802 char szText[CBEMAXSTRLEN];
3804 } NMCBEENDEDITA, *LPNMCBEENDEDITA, *PNMCBEENDEDITA;
3806 #define NMCBEENDEDIT WINELIB_NAME_AW(NMCBEENDEDIT)
3807 #define LPNMCBEENDEDIT WINELIB_NAME_AW(LPNMCBEENDEDIT)
3808 #define PNMCBEENDEDIT WINELIB_NAME_AW(PNMCBEENDEDIT)
3813 COMBOBOXEXITEMA ceItem;
3814 } NMCOMBOBOXEXA, *PNMCOMBOBOXEXA;
3819 COMBOBOXEXITEMW ceItem;
3820 } NMCOMBOBOXEXW, *PNMCOMBOBOXEXW;
3822 #define NMCOMBOBOXEX WINELIB_NAME_AW(NMCOMBOBOXEX)
3823 #define PNMCOMBOBOXEX WINELIB_NAME_AW(PNMCOMBOBOXEX)
3829 char szText[CBEMAXSTRLEN];
3830 } NMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA;
3836 WCHAR szText[CBEMAXSTRLEN];
3837 } NMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW;
3839 #define NMCBEDRAGBEGIN WINELIB_NAME_AW(NMCBEDRAGBEGIN)
3840 #define PNMCBEDRAGBEGIN WINELIB_NAME_AW(PNMCBEDRAGBEGIN)
3841 #define LPNMCBEDRAGBEGIN WINELIB_NAME_AW(LPNMCBEDRAGBEGIN)
3844 /* Hotkey control */
3846 #define HOTKEY_CLASS16 "msctls_hotkey"
3847 #define HOTKEY_CLASSA "msctls_hotkey32"
3848 #if defined(__GNUC__)
3849 # define HOTKEY_CLASSW (const WCHAR []){ 'm','s','c','t','l','s','_', \
3850 'h','o','t','k','e','y','3','2',0 }
3851 #elif defined(_MSC_VER)
3852 # define HOTKEY_CLASSW L"msctls_hotkey32"
3854 static const WCHAR HOTKEY_CLASSW[] = { 'm','s','c','t','l','s','_',
3855 'h','o','t','k','e','y','3','2',0 };
3857 #define HOTKEY_CLASS WINELIB_NAME_AW(HOTKEY_CLASS)
3859 #define HOTKEYF_SHIFT 0x01
3860 #define HOTKEYF_CONTROL 0x02
3861 #define HOTKEYF_ALT 0x04
3862 #define HOTKEYF_EXT 0x08
3864 #define HKCOMB_NONE 0x0001
3865 #define HKCOMB_S 0x0002
3866 #define HKCOMB_C 0x0004
3867 #define HKCOMB_A 0x0008
3868 #define HKCOMB_SC 0x0010
3869 #define HKCOMB_SA 0x0020
3870 #define HKCOMB_CA 0x0040
3871 #define HKCOMB_SCA 0x0080
3873 #define HKM_SETHOTKEY (WM_USER+1)
3874 #define HKM_GETHOTKEY (WM_USER+2)
3875 #define HKM_SETRULES (WM_USER+3)
3878 /* animate control */
3880 #define ANIMATE_CLASSA "SysAnimate32"
3881 #if defined(__GNUC__)
3882 # define ANIMATE_CLASSW (const WCHAR []){ 'S','y','s', \
3883 'A','n','i','m','a','t','e','3','2',0 }
3884 #elif defined(_MSC_VER)
3885 # define ANIMATE_CLASSW L"SysAnimate32"
3887 static const WCHAR ANIMATE_CLASSW[] = { 'S','y','s',
3888 'A','n','i','m','a','t','e','3','2',0 };
3890 #define ANIMATE_CLASS WINELIB_NAME_AW(ANIMATE_CLASS)
3892 #define ACS_CENTER 0x0001
3893 #define ACS_TRANSPARENT 0x0002
3894 #define ACS_AUTOPLAY 0x0004
3895 #define ACS_TIMER 0x0008 /* no threads, just timers */
3897 #define ACM_OPENA (WM_USER+100)
3898 #define ACM_OPENW (WM_USER+103)
3899 #define ACM_OPEN WINELIB_NAME_AW(ACM_OPEN)
3900 #define ACM_PLAY (WM_USER+101)
3901 #define ACM_STOP (WM_USER+102)
3906 #define Animate_CreateA(hwndP,id,dwStyle,hInstance) \
3907 CreateWindowA(ANIMATE_CLASSA,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
3908 #define Animate_CreateW(hwndP,id,dwStyle,hInstance) \
3909 CreateWindowW(ANIMATE_CLASSW,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
3910 #define Animate_Create WINELIB_NAME_AW(Animate_Create)
3911 #define Animate_OpenA(hwnd,szName) \
3912 (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,(LPARAM)(LPSTR)(szName))
3913 #define Animate_OpenW(hwnd,szName) \
3914 (BOOL)SNDMSGW(hwnd,ACM_OPENW,0,(LPARAM)(LPWSTR)(szName))
3915 #define Animate_Open WINELIB_NAME_AW(Animate_Open)
3916 #define Animate_OpenExA(hwnd,hInst,szName) \
3917 (BOOL)SNDMSGA(hwnd,ACM_OPENA,(WPARAM)hInst,(LPARAM)(LPSTR)(szName))
3918 #define Animate_OpenExW(hwnd,hInst,szName) \
3919 (BOOL)SNDMSGW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
3920 #define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
3921 #define Animate_Play(hwnd,from,to,rep) \
3922 (BOOL)SNDMSGA(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
3923 #define Animate_Stop(hwnd) \
3924 (BOOL)SNDMSGA(hwnd,ACM_STOP,0,0)
3925 #define Animate_Close(hwnd) \
3926 (BOOL)SNDMSGA(hwnd,ACM_OPENA,0,0)
3927 #define Animate_Seek(hwnd,frame) \
3928 (BOOL)SNDMSGA(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
3931 /**************************************************************************
3932 * IP Address control
3935 #define WC_IPADDRESSA "SysIPAddress32"
3936 #if defined(__GNUC__)
3937 # define WC_IPADDRESSW (const WCHAR []){ 'S','y','s', \
3938 'I','P','A','d','d','r','e','s','s','3','2',0 }
3939 #elif defined(_MSC_VER)
3940 # define WC_IPADDRESSW L"SysIPAddress32"
3942 static const WCHAR WC_IPADDRESSW[] = { 'S','y','s',
3943 'I','P','A','d','d','r','e','s','s','3','2',0 };
3945 #define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
3947 #define IPM_CLEARADDRESS (WM_USER+100)
3948 #define IPM_SETADDRESS (WM_USER+101)
3949 #define IPM_GETADDRESS (WM_USER+102)
3950 #define IPM_SETRANGE (WM_USER+103)
3951 #define IPM_SETFOCUS (WM_USER+104)
3952 #define IPM_ISBLANK (WM_USER+105)
3954 #define IPN_FIRST (0U-860U)
3955 #define IPN_LAST (0U-879U)
3956 #define IPN_FIELDCHANGED (IPN_FIRST-0)
3958 typedef struct tagNMIPADDRESS
3963 } NMIPADDRESS, *LPNMIPADDRESS;
3965 #define MAKEIPRANGE(low,high) \
3966 ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
3967 #define MAKEIPADDRESS(b1,b2,b3,b4) \
3968 ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
3970 #define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
3971 #define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
3972 #define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
3973 #define FOURTH_IPADDRESS(x) ((x)&0xff)
3976 /**************************************************************************
3977 * Native Font control
3980 #define WC_NATIVEFONTCTLA "NativeFontCtl"
3981 #if defined(__GNUC__)
3982 # define WC_NATIVEFONTCTLW (const WCHAR []){ 'N','a','t','i','v','e', \
3983 'F','o','n','t','C','t','l',0 }
3984 #elif defined(_MSC_VER)
3985 # define WC_NATIVEFONTCTLW L"NativeFontCtl"
3987 static const WCHAR WC_NATIVEFONTCTLW[] = { 'N','a','t','i','v','e',
3988 'F','o','n','t','C','t','l',0 };
3990 #define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
3992 #define NFS_EDIT 0x0001
3993 #define NFS_STATIC 0x0002
3994 #define NFS_LISTCOMBO 0x0004
3995 #define NFS_BUTTON 0x0008
3996 #define NFS_ALL 0x0010
3999 /**************************************************************************
4000 * Month calendar control
4004 #define MONTHCAL_CLASSA "SysMonthCal32"
4005 #if defined(__GNUC__)
4006 # define MONTHCAL_CLASSW (const WCHAR []){ 'S','y','s', \
4007 'M','o','n','t','h','C','a','l','3','2',0 }
4008 #elif defined(_MSC_VER)
4009 # define MONTHCAL_CLASSW L"SysMonthCal32"
4011 static const WCHAR MONTHCAL_CLASSW[] = { 'S','y','s',
4012 'M','o','n','t','h','C','a','l','3','2',0 };
4014 #define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
4016 #define MCM_FIRST 0x1000
4017 #define MCN_FIRST (0U-750U)
4018 #define MCN_LAST (0U-759U)
4021 #define MCM_GETCURSEL (MCM_FIRST + 1)
4022 #define MCM_SETCURSEL (MCM_FIRST + 2)
4023 #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
4024 #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
4025 #define MCM_GETSELRANGE (MCM_FIRST + 5)
4026 #define MCM_SETSELRANGE (MCM_FIRST + 6)
4027 #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
4028 #define MCM_SETDAYSTATE (MCM_FIRST + 8)
4029 #define MCM_GETMINREQRECT (MCM_FIRST + 9)
4030 #define MCM_SETCOLOR (MCM_FIRST + 10)
4031 #define MCM_GETCOLOR (MCM_FIRST + 11)
4032 #define MCM_SETTODAY (MCM_FIRST + 12)
4033 #define MCM_GETTODAY (MCM_FIRST + 13)
4034 #define MCM_HITTEST (MCM_FIRST + 14)
4035 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
4036 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
4037 #define MCM_GETRANGE (MCM_FIRST + 17)
4038 #define MCM_SETRANGE (MCM_FIRST + 18)
4039 #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
4040 #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
4041 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
4042 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
4043 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
4048 #define MCN_SELCHANGE (MCN_FIRST + 1)
4049 #define MCN_GETDAYSTATE (MCN_FIRST + 3)
4050 #define MCN_SELECT (MCN_FIRST + 4)
4052 #define MCSC_BACKGROUND 0
4054 #define MCSC_TITLEBK 2
4055 #define MCSC_TITLETEXT 3
4056 #define MCSC_MONTHBK 4
4057 #define MCSC_TRAILINGTEXT 5
4059 #define MCS_DAYSTATE 0x0001
4060 #define MCS_MULTISELECT 0x0002
4061 #define MCS_WEEKNUMBERS 0x0004
4062 #define MCS_NOTODAY 0x0010
4063 #define MCS_NOTODAYCIRCLE 0x0008
4065 #define MCHT_TITLE 0x00010000
4066 #define MCHT_CALENDAR 0x00020000
4067 #define MCHT_TODAYLINK 0x00030000
4069 #define MCHT_NEXT 0x01000000
4070 #define MCHT_PREV 0x02000000
4071 #define MCHT_NOWHERE 0x00000000
4072 #define MCHT_TITLEBK (MCHT_TITLE)
4073 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
4074 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
4075 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
4076 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
4078 #define MCHT_CALENDARBK (MCHT_CALENDAR)
4079 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
4080 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
4081 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
4082 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
4083 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
4087 #define GMR_VISIBLE 0
4088 #define GMR_DAYSTATE 1
4091 /* Month calendar's structures */
4099 } MCHITTESTINFO, *PMCHITTESTINFO;
4101 typedef struct tagNMSELCHANGE
4104 SYSTEMTIME stSelStart;
4105 SYSTEMTIME stSelEnd;
4106 } NMSELCHANGE, *LPNMSELCHANGE;
4108 typedef NMSELCHANGE NMSELECT, *LPNMSELECT;
4109 typedef DWORD MONTHDAYSTATE, *LPMONTHDAYSTATE;
4111 typedef struct tagNMDAYSTATE
4116 LPMONTHDAYSTATE prgDayState;
4117 } NMDAYSTATE, *LPNMDAYSTATE;
4122 #define MonthCal_GetCurSel(hmc, pst) \
4123 (BOOL)SNDMSGA(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
4124 #define MonthCal_SetCurSel(hmc, pst) \
4125 (BOOL)SNDMSGA(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
4126 #define MonthCal_GetMaxSelCount(hmc) \
4127 (DWORD)SNDMSGA(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
4128 #define MonthCal_SetMaxSelCount(hmc, n) \
4129 (BOOL)SNDMSGA(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
4130 #define MonthCal_GetSelRange(hmc, rgst) \
4131 SNDMSGA(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst))
4132 #define MonthCal_SetSelRange(hmc, rgst) \
4133 SNDMSGA(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst))
4134 #define MonthCal_GetMonthRange(hmc, gmr, rgst) \
4135 (DWORD)SNDMSGA(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
4136 #define MonthCal_SetDayState(hmc, cbds, rgds) \
4137 SNDMSGA(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
4138 #define MonthCal_GetMinReqRect(hmc, prc) \
4139 SNDMSGA(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
4140 #define MonthCal_SetColor(hmc, iColor, clr)\
4141 SNDMSGA(hmc, MCM_SETCOLOR, iColor, clr)
4142 #define MonthCal_GetColor(hmc, iColor) \
4143 SNDMSGA(hmc, MCM_SETCOLOR, iColor, 0)
4144 #define MonthCal_GetToday(hmc, pst)\
4145 (BOOL)SNDMSGA(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
4146 #define MonthCal_SetToday(hmc, pst)\
4147 SNDMSGA(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
4148 #define MonthCal_HitTest(hmc, pinfo) \
4149 SNDMSGA(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
4150 #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \
4151 SNDMSGA(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
4152 #define MonthCal_GetFirstDayOfWeek(hmc) \
4153 (DWORD)SNDMSGA(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
4154 #define MonthCal_GetRange(hmc, rgst) \
4155 (DWORD)SNDMSGA(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
4156 #define MonthCal_SetRange(hmc, gd, rgst) \
4157 (BOOL)SNDMSGA(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4158 #define MonthCal_GetMonthDelta(hmc) \
4159 (int)SNDMSGA(hmc, MCM_GETMONTHDELTA, 0, 0)
4160 #define MonthCal_SetMonthDelta(hmc, n) \
4161 (int)SNDMSGA(hmc, MCM_SETMONTHDELTA, n, 0)
4162 #define MonthCal_GetMaxTodayWidth(hmc) \
4163 (DWORD)SNDMSGA(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
4164 #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \
4165 (BOOL)SNDMSGA((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
4166 #define MonthCal_GetUnicodeFormat(hwnd) \
4167 (BOOL)SNDMSGA((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
4170 /**************************************************************************
4171 * Date and time picker control
4174 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
4175 #if defined(__GNUC__)
4176 # define DATETIMEPICK_CLASSW (const WCHAR []){ 'S','y','s', \
4177 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 }
4178 #elif defined(_MSC_VER)
4179 # define DATETIMEPICK_CLASSW L"SysDateTimePick32"
4181 static const WCHAR DATETIMEPICK_CLASSW[] = { 'S','y','s',
4182 'D','a','t','e','T','i','m','e','P','i','c','k','3','2',0 };
4184 #define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
4186 #define DTM_FIRST 0x1000
4187 #define DTN_FIRST (0U-760U)
4188 #define DTN_LAST (0U-799U)
4191 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
4192 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
4193 #define DTM_GETRANGE (DTM_FIRST+3)
4194 #define DTM_SETRANGE (DTM_FIRST+4)
4195 #define DTM_SETFORMATA (DTM_FIRST+5)
4196 #define DTM_SETFORMATW (DTM_FIRST + 50)
4197 #define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
4198 #define DTM_SETMCCOLOR (DTM_FIRST+6)
4199 #define DTM_GETMCCOLOR (DTM_FIRST+7)
4200 #define DTM_GETMONTHCAL (DTM_FIRST+8)
4201 #define DTM_SETMCFONT (DTM_FIRST+9)
4202 #define DTM_GETMCFONT (DTM_FIRST+10)
4205 /* Datetime Notifications */
4207 #define DTN_DATETIMECHANGE (DTN_FIRST + 1)
4208 #define DTN_USERSTRINGA (DTN_FIRST + 2)
4209 #define DTN_WMKEYDOWNA (DTN_FIRST + 3)
4210 #define DTN_FORMATA (DTN_FIRST + 4)
4211 #define DTN_FORMATQUERYA (DTN_FIRST + 5)
4212 #define DTN_DROPDOWN (DTN_FIRST + 6)
4213 #define DTN_CLOSEUP (DTN_FIRST + 7)
4214 #define DTN_USERSTRINGW (DTN_FIRST + 15)
4215 #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
4216 #define DTN_FORMATW (DTN_FIRST + 17)
4217 #define DTN_FORMATQUERYW (DTN_FIRST + 18)
4219 #define DTN_USERSTRING WINELIB_NAME_AW(DTN_USERSTRING)
4220 #define DTN_WMKEYDOWN WINELIB_NAME_AW(DTN_WMKEYDOWN)
4221 #define DTN_FORMAT WINELIB_NAME_AW(DTN_FORMAT)
4222 #define DTN_FORMATQUERY WINELIB_NAME_AW(DTN_FORMATQUERY)
4224 #define DTS_SHORTDATEFORMAT 0x0000
4225 #define DTS_UPDOWN 0x0001
4226 #define DTS_SHOWNONE 0x0002
4227 #define DTS_LONGDATEFORMAT 0x0004
4228 #define DTS_TIMEFORMAT 0x0009
4229 #define DTS_APPCANPARSE 0x0010
4230 #define DTS_RIGHTALIGN 0x0020
4232 typedef struct tagNMDATETIMECHANGE
4237 } NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
4239 typedef struct tagNMDATETIMESTRINGA
4242 LPCSTR pszUserString;
4245 } NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;
4247 typedef struct tagNMDATETIMESTRINGW
4250 LPCWSTR pszUserString;
4253 } NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
4255 DECL_WINELIB_TYPE_AW(NMDATETIMESTRING)
4256 DECL_WINELIB_TYPE_AW(LPNMDATETIMESTRING)
4258 typedef struct tagNMDATETIMEWMKEYDOWNA
4264 } NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;
4266 typedef struct tagNMDATETIMEWMKEYDOWNW
4272 } NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;
4274 DECL_WINELIB_TYPE_AW(NMDATETIMEWMKEYDOWN)
4275 DECL_WINELIB_TYPE_AW(LPNMDATETIMEWMKEYDOWN)
4277 typedef struct tagNMDATETIMEFORMATA
4284 } NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;
4287 typedef struct tagNMDATETIMEFORMATW
4293 WCHAR szDisplay[64];
4294 } NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;
4296 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMAT)
4297 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMAT)
4299 typedef struct tagNMDATETIMEFORMATQUERYA
4304 } NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;
4306 typedef struct tagNMDATETIMEFORMATQUERYW
4311 } NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;
4313 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMATQUERY)
4314 DECL_WINELIB_TYPE_AW(LPNMDATETIMEFORMATQUERY)
4318 #define GDT_ERROR -1
4322 #define GDTR_MIN 0x0001
4323 #define GDTR_MAX 0x0002
4326 #define DateTime_GetSystemtime(hdp, pst) \
4327 (DWORD)SNDMSGA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
4328 #define DateTime_SetSystemtime(hdp, gd, pst) \
4329 (BOOL)SNDMSGA (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
4330 #define DateTime_GetRange(hdp, rgst) \
4331 (DWORD)SNDMSGA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
4332 #define DateTime_SetRange(hdp, gd, rgst) \
4333 (BOOL)SNDMSGA (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
4334 #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
4335 #define DateTime_SetFormatA(hdp, sz) \
4336 (BOOL)SNDMSGA (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
4337 #define DateTime_SetFormatW(hdp, sz) \
4338 (BOOL)SNDMSGW (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
4339 #define DateTime_GetMonthCalColor(hdp, iColor) \
4340 SNDMSGA (hdp, DTM_GETMCCOLOR, iColor, 0)
4341 #define DateTime_GetMonthCal(hdp) \
4342 (HWND) SNDMSGA (hdp, DTM_GETMONTHCAL, 0, 0)
4343 #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \
4344 SNDMSGA (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
4345 #define DateTime_GetMonthCalFont(hdp) \
4346 SNDMSGA (hdp, DTM_GETMCFONT, 0, 0)
4353 /**************************************************************************
4354 * UNDOCUMENTED functions
4357 /* private heap memory functions */
4359 LPVOID WINAPI COMCTL32_Alloc (DWORD);
4360 LPVOID WINAPI COMCTL32_ReAlloc (LPVOID, DWORD);
4361 BOOL WINAPI COMCTL32_Free (LPVOID);
4362 DWORD WINAPI COMCTL32_GetSize (LPVOID);
4364 LPWSTR WINAPI COMCTL32_StrChrW (LPCWSTR, WORD);
4367 INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
4368 BOOL WINAPI Str_SetPtrA (LPSTR *, LPCSTR);
4369 INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
4370 BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
4371 #define Str_GetPtr WINELIB_NAME_AW(Str_GetPtr)
4372 #define Str_SetPtr WINELIB_NAME_AW(Str_SetPtr)
4375 /* Dynamic Storage Array */
4386 HDSA WINAPI DSA_Create (INT, INT);
4387 BOOL WINAPI DSA_DeleteAllItems (const HDSA);
4388 INT WINAPI DSA_DeleteItem (const HDSA, INT);
4389 BOOL WINAPI DSA_Destroy (const HDSA);
4390 BOOL WINAPI DSA_GetItem (const HDSA, INT, LPVOID);
4391 LPVOID WINAPI DSA_GetItemPtr (const HDSA, INT);
4392 INT WINAPI DSA_InsertItem (const HDSA, INT, LPVOID);
4393 BOOL WINAPI DSA_SetItem (const HDSA, INT, LPVOID);
4395 typedef INT (CALLBACK *DSAENUMPROC)(LPVOID, DWORD);
4396 VOID WINAPI DSA_EnumCallback (const HDSA, DSAENUMPROC, LPARAM);
4397 BOOL WINAPI DSA_DestroyCallback (const HDSA, DSAENUMPROC, LPARAM);
4400 /* Dynamic Pointer Array */
4411 HDPA WINAPI DPA_Create (INT);
4412 HDPA WINAPI DPA_CreateEx (INT, HANDLE);
4413 BOOL WINAPI DPA_Destroy (const HDPA);
4414 HDPA WINAPI DPA_Clone (const HDPA, const HDPA);
4415 LPVOID WINAPI DPA_GetPtr (const HDPA, INT);
4416 INT WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);
4417 BOOL WINAPI DPA_Grow (const HDPA, INT);
4418 BOOL WINAPI DPA_SetPtr (const HDPA, INT, LPVOID);
4419 INT WINAPI DPA_InsertPtr (const HDPA, INT, LPVOID);
4420 LPVOID WINAPI DPA_DeletePtr (const HDPA, INT);
4421 BOOL WINAPI DPA_DeleteAllPtrs (const HDPA);
4423 typedef INT (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
4424 BOOL WINAPI DPA_Sort (const HDPA, PFNDPACOMPARE, LPARAM);
4426 #define DPAS_SORTED 0x0001
4427 #define DPAS_INSERTBEFORE 0x0002
4428 #define DPAS_INSERTAFTER 0x0004
4430 INT WINAPI DPA_Search (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
4432 #define DPAM_NOSORT 0x0001
4433 #define DPAM_INSERT 0x0004
4434 #define DPAM_DELETE 0x0008
4436 typedef PVOID (CALLBACK *PFNDPAMERGE)(DWORD,PVOID,PVOID,LPARAM);
4437 BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
4439 typedef INT (CALLBACK *DPAENUMPROC)(LPVOID, DWORD);
4440 VOID WINAPI DPA_EnumCallback (const HDPA, DPAENUMPROC, LPARAM);
4441 BOOL WINAPI DPA_DestroyCallback (const HDPA, DPAENUMPROC, LPARAM);
4444 #define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
4445 #define DPA_GetPtrPtr(hdpa) (*((LPVOID**)((BYTE*)(hdpa)+sizeof(INT))))
4446 #define DPA_FastGetPtr(hdpa,i) (DPA_GetPtrPtr(hdpa)[i])
4449 /* notification helper functions */
4451 LRESULT WINAPI COMCTL32_SendNotify (HWND, HWND, UINT, LPNMHDR);
4453 /* type and functionality of last parameter is still unknown */
4454 LRESULT WINAPI COMCTL32_SendNotifyEx (HWND, HWND, UINT, LPNMHDR, DWORD);
4460 #endif /* __WINE_COMMCTRL_H */