Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _INC_COMMCTRL
      7 #define _INC_COMMCTRL
      8 
      9 #include <_mingw_unicode.h>
     10 
     11 #ifndef _WINRESRC_
     12 #ifndef _WIN32_IE
     13 #define _WIN32_IE 0x0501
     14 #endif
     15 #endif
     16 
     17 #ifndef _HRESULT_DEFINED
     18 #define _HRESULT_DEFINED
     19 typedef LONG HRESULT;
     20 #endif
     21 
     22 #ifndef NOUSER
     23 #ifndef WINCOMMCTRLAPI
     24 #ifndef _COMCTL32_
     25 #define WINCOMMCTRLAPI DECLSPEC_IMPORT
     26 #else
     27 #define WINCOMMCTRLAPI
     28 #endif
     29 #endif
     30 
     31 #ifdef __cplusplus
     32 extern "C" {
     33 #endif
     34 
     35 #include <prsht.h>
     36 
     37 #ifndef SNDMSG
     38 #ifdef __cplusplus
     39 #define SNDMSG ::SendMessage
     40 #else
     41 #define SNDMSG SendMessage
     42 #endif
     43 #endif
     44 
     45   WINCOMMCTRLAPI void WINAPI InitCommonControls(void);
     46 
     47   typedef struct tagINITCOMMONCONTROLSEX {
     48     DWORD dwSize;
     49     DWORD dwICC;
     50   } INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
     51 #define ICC_LISTVIEW_CLASSES 0x1
     52 #define ICC_TREEVIEW_CLASSES 0x2
     53 #define ICC_BAR_CLASSES 0x4
     54 #define ICC_TAB_CLASSES 0x8
     55 #define ICC_UPDOWN_CLASS 0x10
     56 #define ICC_PROGRESS_CLASS 0x20
     57 #define ICC_HOTKEY_CLASS 0x40
     58 #define ICC_ANIMATE_CLASS 0x80
     59 #define ICC_WIN95_CLASSES 0xff
     60 #define ICC_DATE_CLASSES 0x100
     61 #define ICC_USEREX_CLASSES 0x200
     62 #define ICC_COOL_CLASSES 0x400
     63 #define ICC_INTERNET_CLASSES 0x800
     64 #define ICC_PAGESCROLLER_CLASS 0x1000
     65 #define ICC_NATIVEFNTCTL_CLASS 0x2000
     66 #define ICC_STANDARD_CLASSES 0x4000
     67 #define ICC_LINK_CLASS 0x8000
     68   WINCOMMCTRLAPI WINBOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *);
     69 
     70 #define ODT_HEADER 100
     71 #define ODT_TAB 101
     72 #define ODT_LISTVIEW 102
     73 
     74 #define LVM_FIRST 0x1000
     75 #define TV_FIRST 0x1100
     76 #define HDM_FIRST 0x1200
     77 #define TCM_FIRST 0x1300
     78 
     79 #define PGM_FIRST 0x1400
     80 #define ECM_FIRST 0x1500
     81 #define BCM_FIRST 0x1600
     82 #define CBM_FIRST 0x1700
     83 #define CCM_FIRST 0x2000
     84 #define CCM_LAST (CCM_FIRST+0x200)
     85 #define CCM_SETBKCOLOR (CCM_FIRST+1)
     86 #define CCM_SETCOLORSCHEME (CCM_FIRST+2)
     87 #define CCM_GETCOLORSCHEME (CCM_FIRST+3)
     88 #define CCM_GETDROPTARGET (CCM_FIRST+4)
     89 #define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
     90 #define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
     91 
     92   typedef struct tagCOLORSCHEME {
     93     DWORD dwSize;
     94     COLORREF clrBtnHighlight;
     95     COLORREF clrBtnShadow;
     96   } COLORSCHEME,*LPCOLORSCHEME;
     97 
     98 #define COMCTL32_VERSION 6
     99 
    100 #define CCM_SETVERSION (CCM_FIRST+0x7)
    101 #define CCM_GETVERSION (CCM_FIRST+0x8)
    102 #define CCM_SETNOTIFYWINDOW (CCM_FIRST+0x9)
    103 #define CCM_SETWINDOWTHEME (CCM_FIRST+0xb)
    104 #define CCM_DPISCALE (CCM_FIRST+0xc)
    105 
    106 #define INFOTIPSIZE 1024
    107 
    108 #define HANDLE_WM_NOTIFY(hwnd,wParam,lParam,fn) (fn)((hwnd),(int)(wParam),(NMHDR *)(lParam))
    109 #define FORWARD_WM_NOTIFY(hwnd,idFrom,pnmhdr,fn) (LRESULT)(fn)((hwnd),WM_NOTIFY,(WPARAM)(int)(idFrom),(LPARAM)(NMHDR *)(pnmhdr))
    110 
    111 #define NM_OUTOFMEMORY (NM_FIRST-1)
    112 #define NM_CLICK (NM_FIRST-2)
    113 #define NM_DBLCLK (NM_FIRST-3)
    114 #define NM_RETURN (NM_FIRST-4)
    115 #define NM_RCLICK (NM_FIRST-5)
    116 #define NM_RDBLCLK (NM_FIRST-6)
    117 #define NM_SETFOCUS (NM_FIRST-7)
    118 #define NM_KILLFOCUS (NM_FIRST-8)
    119 #define NM_CUSTOMDRAW (NM_FIRST-12)
    120 #define NM_HOVER (NM_FIRST-13)
    121 #define NM_NCHITTEST (NM_FIRST-14)
    122 #define NM_KEYDOWN (NM_FIRST-15)
    123 #define NM_RELEASEDCAPTURE (NM_FIRST-16)
    124 #define NM_SETCURSOR (NM_FIRST-17)
    125 #define NM_CHAR (NM_FIRST-18)
    126 #define NM_TOOLTIPSCREATED (NM_FIRST-19)
    127 #define NM_LDOWN (NM_FIRST-20)
    128 #define NM_RDOWN (NM_FIRST-21)
    129 #define NM_THEMECHANGED (NM_FIRST-22)
    130 
    131 #ifndef CCSIZEOF_STRUCT
    132 #define CCSIZEOF_STRUCT(structname,member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0))))+sizeof(((structname*)0)->member))
    133 #endif
    134 
    135   typedef struct tagNMTOOLTIPSCREATED {
    136     NMHDR hdr;
    137     HWND hwndToolTips;
    138   } NMTOOLTIPSCREATED,*LPNMTOOLTIPSCREATED;
    139 
    140   typedef struct tagNMMOUSE {
    141     NMHDR hdr;
    142     DWORD_PTR dwItemSpec;
    143     DWORD_PTR dwItemData;
    144     POINT pt;
    145     LPARAM dwHitInfo;
    146   } NMMOUSE,*LPNMMOUSE;
    147 
    148   typedef NMMOUSE NMCLICK;
    149   typedef LPNMMOUSE LPNMCLICK;
    150 
    151   typedef struct tagNMOBJECTNOTIFY {
    152     NMHDR hdr;
    153     int iItem;
    154 #ifdef __IID_DEFINED__
    155     const IID *piid;
    156 #else
    157     const void *piid;
    158 #endif
    159     void *pObject;
    160     HRESULT hResult;
    161     DWORD dwFlags;
    162   } NMOBJECTNOTIFY,*LPNMOBJECTNOTIFY;
    163 
    164   typedef struct tagNMKEY {
    165     NMHDR hdr;
    166     UINT nVKey;
    167     UINT uFlags;
    168   } NMKEY,*LPNMKEY;
    169 
    170   typedef struct tagNMCHAR {
    171     NMHDR hdr;
    172     UINT ch;
    173     DWORD dwItemPrev;
    174     DWORD dwItemNext;
    175   } NMCHAR,*LPNMCHAR;
    176 
    177 #define NM_FIRST (0U- 0U)
    178 #define NM_LAST (0U- 99U)
    179 
    180 #define LVN_FIRST (0U-100U)
    181 #define LVN_LAST (0U-199U)
    182 
    183 #define HDN_FIRST (0U-300U)
    184 #define HDN_LAST (0U-399U)
    185 
    186 #define TVN_FIRST (0U-400U)
    187 #define TVN_LAST (0U-499U)
    188 
    189 #define TTN_FIRST (0U-520U)
    190 #define TTN_LAST (0U-549U)
    191 
    192 #define TCN_FIRST (0U-550U)
    193 #define TCN_LAST (0U-580U)
    194 
    195 #ifndef CDN_FIRST
    196 #define CDN_FIRST (0U-601U)
    197 #define CDN_LAST (0U-699U)
    198 #endif
    199 
    200 #define TBN_FIRST (0U-700U)
    201 #define TBN_LAST (0U-720U)
    202 
    203 #define UDN_FIRST (0U-721)
    204 #define UDN_LAST (0U-740)
    205 
    206 #define MCN_FIRST (0U-750U)
    207 #define MCN_LAST (0U-759U)
    208 #define DTN_FIRST (0U-760U)
    209 #define DTN_LAST (0U-799U)
    210 #define CBEN_FIRST (0U-800U)
    211 #define CBEN_LAST (0U-830U)
    212 #define RBN_FIRST (0U-831U)
    213 #define RBN_LAST (0U-859U)
    214 
    215 #define IPN_FIRST (0U-860U)
    216 #define IPN_LAST (0U-879U)
    217 #define SBN_FIRST (0U-880U)
    218 #define SBN_LAST (0U-899U)
    219 #define PGN_FIRST (0U-900U)
    220 #define PGN_LAST (0U-950U)
    221 
    222 #ifndef WMN_FIRST
    223 #define WMN_FIRST (0U-1000U)
    224 #define WMN_LAST (0U-1200U)
    225 #endif
    226 
    227 #define BCN_FIRST (0U-1250U)
    228 #define BCN_LAST (0U-1350U)
    229 
    230 #define MSGF_COMMCTRL_BEGINDRAG 0x4200
    231 #define MSGF_COMMCTRL_SIZEHEADER 0x4201
    232 #define MSGF_COMMCTRL_DRAGSELECT 0x4202
    233 #define MSGF_COMMCTRL_TOOLBARCUST 0x4203
    234 
    235 #define CDRF_DODEFAULT 0x0
    236 #define CDRF_NEWFONT 0x2
    237 #define CDRF_SKIPDEFAULT 0x4
    238 
    239 #define CDRF_NOTIFYPOSTPAINT 0x10
    240 #define CDRF_NOTIFYITEMDRAW 0x20
    241 #define CDRF_NOTIFYSUBITEMDRAW 0x20
    242 #define CDRF_NOTIFYPOSTERASE 0x40
    243 
    244 #define CDDS_PREPAINT 0x1
    245 #define CDDS_POSTPAINT 0x2
    246 #define CDDS_PREERASE 0x3
    247 #define CDDS_POSTERASE 0x4
    248 #define CDDS_ITEM 0x10000
    249 #define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
    250 #define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
    251 #define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
    252 #define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
    253 #define CDDS_SUBITEM 0x20000
    254 
    255 #define CDIS_SELECTED 0x1
    256 #define CDIS_GRAYED 0x2
    257 #define CDIS_DISABLED 0x4
    258 #define CDIS_CHECKED 0x8
    259 #define CDIS_FOCUS 0x10
    260 #define CDIS_DEFAULT 0x20
    261 #define CDIS_HOT 0x40
    262 #define CDIS_MARKED 0x80
    263 #define CDIS_INDETERMINATE 0x100
    264 #define CDIS_SHOWKEYBOARDCUES 0x200
    265 
    266   typedef struct tagNMCUSTOMDRAWINFO {
    267     NMHDR hdr;
    268     DWORD dwDrawStage;
    269     HDC hdc;
    270     RECT rc;
    271     DWORD_PTR dwItemSpec;
    272     UINT uItemState;
    273     LPARAM lItemlParam;
    274   } NMCUSTOMDRAW,*LPNMCUSTOMDRAW;
    275 
    276   typedef struct tagNMTTCUSTOMDRAW {
    277     NMCUSTOMDRAW nmcd;
    278     UINT uDrawFlags;
    279   } NMTTCUSTOMDRAW,*LPNMTTCUSTOMDRAW;
    280 
    281 #ifndef NOIMAGEAPIS
    282 
    283 #define CLR_NONE __MSABI_LONG(0xffffffff)
    284 #define CLR_DEFAULT __MSABI_LONG(0xFF000000)
    285 
    286 #ifndef HIMAGELIST
    287   struct _IMAGELIST;
    288   typedef struct _IMAGELIST *HIMAGELIST;
    289 #endif
    290 
    291 #ifndef IMAGELISTDRAWPARAMS
    292   typedef struct _IMAGELISTDRAWPARAMS {
    293     DWORD cbSize;
    294     HIMAGELIST himl;
    295     int i;
    296     HDC hdcDst;
    297     int x;
    298     int y;
    299     int cx;
    300     int cy;
    301     int xBitmap;
    302     int yBitmap;
    303     COLORREF rgbBk;
    304     COLORREF rgbFg;
    305     UINT fStyle;
    306     DWORD dwRop;
    307     DWORD fState;
    308     DWORD Frame;
    309     COLORREF crEffect;
    310   } IMAGELISTDRAWPARAMS,*LPIMAGELISTDRAWPARAMS;
    311 
    312 #define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS,dwRop)
    313 #endif
    314 
    315 #define ILC_MASK 0x1
    316 #define ILC_COLOR 0x0
    317 #define ILC_COLORDDB 0xfe
    318 #define ILC_COLOR4 0x4
    319 #define ILC_COLOR8 0x8
    320 #define ILC_COLOR16 0x10
    321 #define ILC_COLOR24 0x18
    322 #define ILC_COLOR32 0x20
    323 #define ILC_PALETTE 0x800
    324 #define ILC_MIRROR 0x2000
    325 #define ILC_PERITEMMIRROR 0x8000
    326 
    327   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Create(int cx,int cy,UINT flags,int cInitial,int cGrow);
    328   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_Destroy(HIMAGELIST himl);
    329   WINCOMMCTRLAPI int WINAPI ImageList_GetImageCount(HIMAGELIST himl);
    330   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_SetImageCount(HIMAGELIST himl,UINT uNewCount);
    331   WINCOMMCTRLAPI int WINAPI ImageList_Add(HIMAGELIST himl,HBITMAP hbmImage,HBITMAP hbmMask);
    332   WINCOMMCTRLAPI int WINAPI ImageList_ReplaceIcon(HIMAGELIST himl,int i,HICON hicon);
    333   WINCOMMCTRLAPI COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST himl,COLORREF clrBk);
    334   WINCOMMCTRLAPI COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST himl);
    335   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST himl,int iImage,int iOverlay);
    336 #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
    337 
    338 #define ILD_NORMAL 0x0
    339 #define ILD_TRANSPARENT 0x1
    340 #define ILD_MASK 0x10
    341 #define ILD_IMAGE 0x20
    342 #define ILD_ROP 0x40
    343 #define ILD_BLEND25 0x2
    344 #define ILD_BLEND50 0x4
    345 #define ILD_OVERLAYMASK 0xf00
    346 #define INDEXTOOVERLAYMASK(i) ((i) << 8)
    347 #define ILD_PRESERVEALPHA 0x1000
    348 #define ILD_SCALE 0x2000
    349 #define ILD_DPISCALE 0x4000
    350 
    351 #define ILD_SELECTED ILD_BLEND50
    352 #define ILD_FOCUS ILD_BLEND25
    353 #define ILD_BLEND ILD_BLEND50
    354 #define CLR_HILIGHT CLR_DEFAULT
    355 
    356 #define ILS_NORMAL 0x0
    357 #define ILS_GLOW 0x1
    358 #define ILS_SHADOW 0x2
    359 #define ILS_SATURATE 0x4
    360 #define ILS_ALPHA 0x8
    361 
    362   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_Draw(HIMAGELIST himl,int i,HDC hdcDst,int x,int y,UINT fStyle);
    363   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_Replace(HIMAGELIST himl,int i,HBITMAP hbmImage,HBITMAP hbmMask);
    364   WINCOMMCTRLAPI int WINAPI ImageList_AddMasked(HIMAGELIST himl,HBITMAP hbmImage,COLORREF crMask);
    365   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_DrawEx(HIMAGELIST himl,int i,HDC hdcDst,int x,int y,int dx,int dy,COLORREF rgbBk,COLORREF rgbFg,UINT fStyle);
    366   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS *pimldp);
    367   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_Remove(HIMAGELIST himl,int i);
    368   WINCOMMCTRLAPI HICON WINAPI ImageList_GetIcon(HIMAGELIST himl,int i,UINT flags);
    369   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE hi,LPCSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags);
    370   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi,LPCWSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags);
    371 
    372 #define ImageList_LoadImage __MINGW_NAME_AW(ImageList_LoadImage)
    373 
    374 #define ILCF_MOVE 0x0
    375 #define ILCF_SWAP 0x1
    376   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_Copy(HIMAGELIST himlDst,int iDst,HIMAGELIST himlSrc,int iSrc,UINT uFlags);
    377   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_BeginDrag(HIMAGELIST himlTrack,int iTrack,int dxHotspot,int dyHotspot);
    378   WINCOMMCTRLAPI void WINAPI ImageList_EndDrag();
    379   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_DragEnter(HWND hwndLock,int x,int y);
    380   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_DragLeave(HWND hwndLock);
    381   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_DragMove(int x,int y);
    382   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST himlDrag,int iDrag,int dxHotspot,int dyHotspot);
    383   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_DragShowNolock(WINBOOL fShow);
    384   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_GetDragImage(POINT *ppt,POINT *pptHotspot);
    385 #define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
    386 #define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
    387 #define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
    388 
    389 #ifdef __IStream_INTERFACE_DEFINED__
    390   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Read(LPSTREAM pstm);
    391   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_Write(HIMAGELIST himl,LPSTREAM pstm);
    392 #define ILP_NORMAL 0
    393 #define ILP_DOWNLEVEL 1
    394   WINCOMMCTRLAPI HRESULT WINAPI ImageList_ReadEx(DWORD dwFlags,LPSTREAM pstm,REFIID riid,PVOID *ppv);
    395   WINCOMMCTRLAPI HRESULT WINAPI ImageList_WriteEx(HIMAGELIST himl,DWORD dwFlags,LPSTREAM pstm);
    396 #endif
    397 
    398 #ifndef IMAGEINFO
    399   typedef struct _IMAGEINFO {
    400     HBITMAP hbmImage;
    401     HBITMAP hbmMask;
    402     int Unused1;
    403     int Unused2;
    404     RECT rcImage;
    405   } IMAGEINFO,*LPIMAGEINFO;
    406 #endif
    407 
    408   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_GetIconSize(HIMAGELIST himl,int *cx,int *cy);
    409   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_SetIconSize(HIMAGELIST himl,int cx,int cy);
    410   WINCOMMCTRLAPI WINBOOL WINAPI ImageList_GetImageInfo(HIMAGELIST himl,int i,IMAGEINFO *pImageInfo);
    411   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST himl1,int i1,HIMAGELIST himl2,int i2,int dx,int dy);
    412   WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST himl);
    413 #endif
    414 
    415 #ifndef NOHEADER
    416 
    417 #define WC_HEADERA "SysHeader32"
    418 #define WC_HEADERW L"SysHeader32"
    419 
    420 #define WC_HEADER __MINGW_NAME_AW(WC_HEADER)
    421 
    422 #define HDS_HORZ 0x0
    423 #define HDS_BUTTONS 0x2
    424 #define HDS_HOTTRACK 0x4
    425 #define HDS_HIDDEN 0x8
    426 #define HDS_DRAGDROP 0x40
    427 #define HDS_FULLDRAG 0x80
    428 #define HDS_FILTERBAR 0x100
    429 #define HDS_FLAT 0x200
    430 #if (_WIN32_WINNT >= 0x0600)
    431 #define HDS_CHECKBOXES 0x400
    432 #define HDS_NOSIZING 0x800
    433 #define HDS_OVERFLOW 0x1000
    434 #endif
    435 
    436 #define HDFT_ISSTRING 0x0
    437 #define HDFT_ISNUMBER 0x1
    438 
    439 #define HDFT_HASNOVALUE 0x8000
    440 
    441 #define HD_TEXTFILTER __MINGW_NAME_AW(HD_TEXTFILTER)
    442 #define HDTEXTFILTER __MINGW_NAME_AW(HD_TEXTFILTER)
    443 #define LPHD_TEXTFILTER __MINGW_NAME_AW(LPHD_TEXTFILTER)
    444 #define LPHDTEXTFILTER __MINGW_NAME_AW(LPHD_TEXTFILTER)
    445 
    446   typedef struct _HD_TEXTFILTERA {
    447     LPSTR pszText;
    448     INT cchTextMax;
    449   } HD_TEXTFILTERA,*LPHD_TEXTFILTERA;
    450 
    451   typedef struct _HD_TEXTFILTERW {
    452     LPWSTR pszText;
    453     INT cchTextMax;
    454   } HD_TEXTFILTERW,*LPHD_TEXTFILTERW;
    455 
    456 #define HD_ITEMA HDITEMA
    457 #define HD_ITEMW HDITEMW
    458 #define HD_ITEM HDITEM
    459 
    460   typedef struct _HD_ITEMA {
    461     UINT mask;
    462     int cxy;
    463     LPSTR pszText;
    464     HBITMAP hbm;
    465     int cchTextMax;
    466     int fmt;
    467     LPARAM lParam;
    468     int iImage;
    469     int iOrder;
    470     UINT type;
    471     void  *pvFilter;
    472   } HDITEMA,*LPHDITEMA;
    473 
    474 #define HDITEMA_V1_SIZE CCSIZEOF_STRUCT(HDITEMA,lParam)
    475 #define HDITEMW_V1_SIZE CCSIZEOF_STRUCT(HDITEMW,lParam)
    476 
    477   typedef struct _HD_ITEMW {
    478     UINT mask;
    479     int cxy;
    480     LPWSTR pszText;
    481     HBITMAP hbm;
    482     int cchTextMax;
    483     int fmt;
    484     LPARAM lParam;
    485     int iImage;
    486     int iOrder;
    487     UINT type;
    488     void *pvFilter;
    489   } HDITEMW,*LPHDITEMW;
    490 
    491 #define HDITEM __MINGW_NAME_AW(HDITEM)
    492 #define LPHDITEM __MINGW_NAME_AW(LPHDITEM)
    493 
    494 #define HDITEM_V1_SIZE __MINGW_NAME_AW_EXT(HDITEM,_V1_SIZE)
    495 
    496 #define HDI_WIDTH 0x1
    497 #define HDI_HEIGHT HDI_WIDTH
    498 #define HDI_TEXT 0x2
    499 #define HDI_FORMAT 0x4
    500 #define HDI_LPARAM 0x8
    501 #define HDI_BITMAP 0x10
    502 #define HDI_IMAGE 0x20
    503 #define HDI_DI_SETITEM 0x40
    504 #define HDI_ORDER 0x80
    505 #define HDI_FILTER 0x100
    506 
    507 #define HDF_LEFT 0x0
    508 #define HDF_RIGHT 0x1
    509 #define HDF_CENTER 0x2
    510 #define HDF_JUSTIFYMASK 0x3
    511 #define HDF_RTLREADING 0x4
    512 
    513 #define HDF_OWNERDRAW 0x8000
    514 #define HDF_STRING 0x4000
    515 #define HDF_BITMAP 0x2000
    516 #define HDF_BITMAP_ON_RIGHT 0x1000
    517 #define HDF_IMAGE 0x800
    518 #define HDF_SORTUP 0x400
    519 #define HDF_SORTDOWN 0x200
    520 #if (_WIN32_WINNT >= 0x0600)
    521 #define HDF_CHECKBOX 0x40
    522 #define HDF_CHECKED 0x80
    523 #define HDF_FIXEDWIDTH 0x100
    524 #define HDF_SPLITBUTTON 0x1000000
    525 #endif
    526 
    527 #define HDM_GETITEMCOUNT (HDM_FIRST+0)
    528 #define Header_GetItemCount(hwndHD) (int)SNDMSG((hwndHD),HDM_GETITEMCOUNT,(WPARAM)0,(LPARAM)0)
    529 
    530 #define HDM_INSERTITEMA (HDM_FIRST+1)
    531 #define HDM_INSERTITEMW (HDM_FIRST+10)
    532 
    533 #define HDM_INSERTITEM __MINGW_NAME_AW(HDM_INSERTITEM)
    534 
    535 #define Header_InsertItem(hwndHD,i,phdi) (int)SNDMSG((hwndHD),HDM_INSERTITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM *)(phdi))
    536 
    537 #define HDM_DELETEITEM (HDM_FIRST+2)
    538 #define Header_DeleteItem(hwndHD,i) (WINBOOL)SNDMSG((hwndHD),HDM_DELETEITEM,(WPARAM)(int)(i),(LPARAM)0)
    539 
    540 #define HDM_GETITEMA (HDM_FIRST+3)
    541 #define HDM_GETITEMW (HDM_FIRST+11)
    542 
    543 #define HDM_GETITEM __MINGW_NAME_AW(HDM_GETITEM)
    544 
    545 #define Header_GetItem(hwndHD,i,phdi) (WINBOOL)SNDMSG((hwndHD),HDM_GETITEM,(WPARAM)(int)(i),(LPARAM)(HD_ITEM *)(phdi))
    546 
    547 #define HDM_SETITEMA (HDM_FIRST+4)
    548 #define HDM_SETITEMW (HDM_FIRST+12)
    549 
    550 #define HDM_SETITEM __MINGW_NAME_AW(HDM_SETITEM)
    551 
    552 #define Header_SetItem(hwndHD,i,phdi) (WINBOOL)SNDMSG((hwndHD),HDM_SETITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM *)(phdi))
    553 
    554 #define HD_LAYOUT HDLAYOUT
    555 
    556   typedef struct _HD_LAYOUT {
    557     RECT *prc;
    558     WINDOWPOS *pwpos;
    559   } HDLAYOUT,*LPHDLAYOUT;
    560 
    561 #define HDM_LAYOUT (HDM_FIRST+5)
    562 #define Header_Layout(hwndHD,playout) (WINBOOL)SNDMSG((hwndHD),HDM_LAYOUT,0,(LPARAM)(HD_LAYOUT *)(playout))
    563 
    564 #define HHT_NOWHERE 0x1
    565 #define HHT_ONHEADER 0x2
    566 #define HHT_ONDIVIDER 0x4
    567 #define HHT_ONDIVOPEN 0x8
    568 #define HHT_ONFILTER 0x10
    569 #define HHT_ONFILTERBUTTON 0x20
    570 #define HHT_ABOVE 0x100
    571 #define HHT_BELOW 0x200
    572 #define HHT_TORIGHT 0x400
    573 #define HHT_TOLEFT 0x800
    574 
    575 #define HD_HITTESTINFO HDHITTESTINFO
    576 
    577   typedef struct _HD_HITTESTINFO {
    578     POINT pt;
    579     UINT flags;
    580     int iItem;
    581   } HDHITTESTINFO,*LPHDHITTESTINFO;
    582 
    583 #define HDM_HITTEST (HDM_FIRST+6)
    584 
    585 #define HDM_GETITEMRECT (HDM_FIRST+7)
    586 #define Header_GetItemRect(hwnd,iItem,lprc) (WINBOOL)SNDMSG((hwnd),HDM_GETITEMRECT,(WPARAM)(iItem),(LPARAM)(lprc))
    587 
    588 #define HDM_SETIMAGELIST (HDM_FIRST+8)
    589 #define Header_SetImageList(hwnd,himl) (HIMAGELIST)SNDMSG((hwnd),HDM_SETIMAGELIST,0,(LPARAM)(himl))
    590 
    591 #define HDM_GETIMAGELIST (HDM_FIRST+9)
    592 #define Header_GetImageList(hwnd) (HIMAGELIST)SNDMSG((hwnd),HDM_GETIMAGELIST,0,0)
    593 
    594 #define HDM_ORDERTOINDEX (HDM_FIRST+15)
    595 #define Header_OrderToIndex(hwnd,i) (int)SNDMSG((hwnd),HDM_ORDERTOINDEX,(WPARAM)(i),0)
    596 
    597 #define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
    598 #define Header_CreateDragImage(hwnd,i) (HIMAGELIST)SNDMSG((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)(i),0)
    599 
    600 #define HDM_GETORDERARRAY (HDM_FIRST+17)
    601 #define Header_GetOrderArray(hwnd,iCount,lpi) (WINBOOL)SNDMSG((hwnd),HDM_GETORDERARRAY,(WPARAM)(iCount),(LPARAM)(lpi))
    602 
    603 #define HDM_SETORDERARRAY (HDM_FIRST+18)
    604 #define Header_SetOrderArray(hwnd,iCount,lpi) (WINBOOL)SNDMSG((hwnd),HDM_SETORDERARRAY,(WPARAM)(iCount),(LPARAM)(lpi))
    605 
    606 #define HDM_SETHOTDIVIDER (HDM_FIRST+19)
    607 #define Header_SetHotDivider(hwnd,fPos,dw) (int)SNDMSG((hwnd),HDM_SETHOTDIVIDER,(WPARAM)(fPos),(LPARAM)(dw))
    608 
    609 #define HDM_SETBITMAPMARGIN (HDM_FIRST+20)
    610 #define Header_SetBitmapMargin(hwnd,iWidth) (int)SNDMSG((hwnd),HDM_SETBITMAPMARGIN,(WPARAM)(iWidth),0)
    611 
    612 #define HDM_GETBITMAPMARGIN (HDM_FIRST+21)
    613 #define Header_GetBitmapMargin(hwnd) (int)SNDMSG((hwnd),HDM_GETBITMAPMARGIN,0,0)
    614 
    615 #define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
    616 #define Header_SetUnicodeFormat(hwnd,fUnicode) (WINBOOL)SNDMSG((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
    617 
    618 #define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
    619 #define Header_GetUnicodeFormat(hwnd) (WINBOOL)SNDMSG((hwnd),HDM_GETUNICODEFORMAT,0,0)
    620 
    621 #define HDM_SETFILTERCHANGETIMEOUT (HDM_FIRST+22)
    622 #define Header_SetFilterChangeTimeout(hwnd,i) (int)SNDMSG((hwnd),HDM_SETFILTERCHANGETIMEOUT,0,(LPARAM)(i))
    623 
    624 #define HDM_EDITFILTER (HDM_FIRST+23)
    625 #define Header_EditFilter(hwnd,i,fDiscardChanges) (int)SNDMSG((hwnd),HDM_EDITFILTER,(WPARAM)(i),MAKELPARAM(fDiscardChanges,0))
    626 
    627 #define HDM_CLEARFILTER (HDM_FIRST+24)
    628 #define Header_ClearFilter(hwnd,i) (int)SNDMSG((hwnd),HDM_CLEARFILTER,(WPARAM)(i),0)
    629 #define Header_ClearAllFilters(hwnd) (int)SNDMSG((hwnd),HDM_CLEARFILTER,(WPARAM)-1,0)
    630 
    631 #define HDN_ITEMCHANGINGA (HDN_FIRST-0)
    632 #define HDN_ITEMCHANGINGW (HDN_FIRST-20)
    633 #define HDN_ITEMCHANGEDA (HDN_FIRST-1)
    634 #define HDN_ITEMCHANGEDW (HDN_FIRST-21)
    635 #define HDN_ITEMCLICKA (HDN_FIRST-2)
    636 #define HDN_ITEMCLICKW (HDN_FIRST-22)
    637 #define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
    638 #define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
    639 #define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
    640 #define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
    641 #define HDN_BEGINTRACKA (HDN_FIRST-6)
    642 #define HDN_BEGINTRACKW (HDN_FIRST-26)
    643 #define HDN_ENDTRACKA (HDN_FIRST-7)
    644 #define HDN_ENDTRACKW (HDN_FIRST-27)
    645 #define HDN_TRACKA (HDN_FIRST-8)
    646 #define HDN_TRACKW (HDN_FIRST-28)
    647 #define HDN_GETDISPINFOA (HDN_FIRST-9)
    648 #define HDN_GETDISPINFOW (HDN_FIRST-29)
    649 #define HDN_BEGINDRAG (HDN_FIRST-10)
    650 #define HDN_ENDDRAG (HDN_FIRST-11)
    651 #define HDN_FILTERCHANGE (HDN_FIRST-12)
    652 #define HDN_FILTERBTNCLICK (HDN_FIRST-13)
    653 
    654 #define HDN_ITEMCHANGING __MINGW_NAME_AW(HDN_ITEMCHANGING)
    655 #define HDN_ITEMCHANGED __MINGW_NAME_AW(HDN_ITEMCHANGED)
    656 #define HDN_ITEMCLICK __MINGW_NAME_AW(HDN_ITEMCLICK)
    657 #define HDN_ITEMDBLCLICK __MINGW_NAME_AW(HDN_ITEMDBLCLICK)
    658 #define HDN_DIVIDERDBLCLICK __MINGW_NAME_AW(HDN_DIVIDERDBLCLICK)
    659 #define HDN_BEGINTRACK __MINGW_NAME_AW(HDN_BEGINTRACK)
    660 #define HDN_ENDTRACK __MINGW_NAME_AW(HDN_ENDTRACK)
    661 #define HDN_TRACK __MINGW_NAME_AW(HDN_TRACK)
    662 #define HDN_GETDISPINFO __MINGW_NAME_AW(HDN_GETDISPINFO)
    663 
    664 #define HD_NOTIFYA NMHEADERA
    665 #define HD_NOTIFYW NMHEADERW
    666 #define HD_NOTIFY NMHEADER
    667 
    668   typedef struct tagNMHEADERA {
    669     NMHDR hdr;
    670     int iItem;
    671     int iButton;
    672     HDITEMA *pitem;
    673   } NMHEADERA,*LPNMHEADERA;
    674 
    675   typedef struct tagNMHEADERW {
    676     NMHDR hdr;
    677     int iItem;
    678     int iButton;
    679     HDITEMW *pitem;
    680   } NMHEADERW,*LPNMHEADERW;
    681 
    682 #define NMHEADER __MINGW_NAME_AW(NMHEADER)
    683 #define LPNMHEADER __MINGW_NAME_AW(LPNMHEADER)
    684 
    685   typedef struct tagNMHDDISPINFOW {
    686     NMHDR hdr;
    687     int iItem;
    688     UINT mask;
    689     LPWSTR pszText;
    690     int cchTextMax;
    691     int iImage;
    692     LPARAM lParam;
    693   } NMHDDISPINFOW,*LPNMHDDISPINFOW;
    694 
    695   typedef struct tagNMHDDISPINFOA {
    696     NMHDR hdr;
    697     int iItem;
    698     UINT mask;
    699     LPSTR pszText;
    700     int cchTextMax;
    701     int iImage;
    702     LPARAM lParam;
    703   } NMHDDISPINFOA,*LPNMHDDISPINFOA;
    704 
    705 #define NMHDDISPINFO __MINGW_NAME_AW(NMHDDISPINFO)
    706 #define LPNMHDDISPINFO __MINGW_NAME_AW(LPNMHDDISPINFO)
    707 
    708   typedef struct tagNMHDFILTERBTNCLICK {
    709     NMHDR hdr;
    710     INT iItem;
    711     RECT rc;
    712   } NMHDFILTERBTNCLICK,*LPNMHDFILTERBTNCLICK;
    713 #endif
    714 
    715 #ifndef NOTOOLBAR
    716 
    717 #define TOOLBARCLASSNAMEW L"ToolbarWindow32"
    718 #define TOOLBARCLASSNAMEA "ToolbarWindow32"
    719 
    720 #define TOOLBARCLASSNAME __MINGW_NAME_AW(TOOLBARCLASSNAME)
    721 
    722   typedef struct _TBBUTTON {
    723     int iBitmap;
    724     int idCommand;
    725     BYTE fsState;
    726     BYTE fsStyle;
    727 #ifdef _WIN64
    728     BYTE bReserved[6];
    729 #else
    730     BYTE bReserved[2];
    731 #endif
    732     DWORD_PTR dwData;
    733     INT_PTR iString;
    734   } TBBUTTON,NEAR *PTBBUTTON,*LPTBBUTTON;
    735   typedef const TBBUTTON *LPCTBBUTTON;
    736 
    737   typedef struct _COLORMAP {
    738     COLORREF from;
    739     COLORREF to;
    740   } COLORMAP,*LPCOLORMAP;
    741 
    742   WINCOMMCTRLAPI HWND WINAPI CreateToolbarEx(HWND hwnd,DWORD ws,UINT wID,int nBitmaps,HINSTANCE hBMInst,UINT_PTR wBMID,LPCTBBUTTON lpButtons,int iNumButtons,int dxButton,int dyButton,int dxBitmap,int dyBitmap,UINT uStructSize);
    743   WINCOMMCTRLAPI HBITMAP WINAPI CreateMappedBitmap(HINSTANCE hInstance,INT_PTR idBitmap,UINT wFlags,LPCOLORMAP lpColorMap,int iNumMaps);
    744 
    745 #define CMB_MASKED 0x2
    746 #define TBSTATE_CHECKED 0x1
    747 #define TBSTATE_PRESSED 0x2
    748 #define TBSTATE_ENABLED 0x4
    749 #define TBSTATE_HIDDEN 0x8
    750 #define TBSTATE_INDETERMINATE 0x10
    751 #define TBSTATE_WRAP 0x20
    752 #define TBSTATE_ELLIPSES 0x40
    753 #define TBSTATE_MARKED 0x80
    754 
    755 #define TBSTYLE_BUTTON 0x0
    756 #define TBSTYLE_SEP 0x1
    757 #define TBSTYLE_CHECK 0x2
    758 #define TBSTYLE_GROUP 0x4
    759 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
    760 #define TBSTYLE_DROPDOWN 0x8
    761 #define TBSTYLE_AUTOSIZE 0x10
    762 #define TBSTYLE_NOPREFIX 0x20
    763 #define TBSTYLE_TOOLTIPS 0x100
    764 #define TBSTYLE_WRAPABLE 0x200
    765 #define TBSTYLE_ALTDRAG 0x400
    766 #define TBSTYLE_FLAT 0x800
    767 #define TBSTYLE_LIST 0x1000
    768 #define TBSTYLE_CUSTOMERASE 0x2000
    769 #define TBSTYLE_REGISTERDROP 0x4000
    770 #define TBSTYLE_TRANSPARENT 0x8000
    771 #define TBSTYLE_EX_DRAWDDARROWS 0x1
    772 
    773 #define BTNS_BUTTON TBSTYLE_BUTTON
    774 #define BTNS_SEP TBSTYLE_SEP
    775 #define BTNS_CHECK TBSTYLE_CHECK
    776 #define BTNS_GROUP TBSTYLE_GROUP
    777 #define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP
    778 #define BTNS_DROPDOWN TBSTYLE_DROPDOWN
    779 #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE
    780 #define BTNS_NOPREFIX TBSTYLE_NOPREFIX
    781 #define BTNS_SHOWTEXT 0x40
    782 #define BTNS_WHOLEDROPDOWN 0x80
    783 
    784 #define TBSTYLE_EX_MIXEDBUTTONS 0x8
    785 #define TBSTYLE_EX_HIDECLIPPEDBUTTONS 0x10
    786 #define TBSTYLE_EX_DOUBLEBUFFER 0x80
    787 
    788   typedef struct _NMTBCUSTOMDRAW {
    789     NMCUSTOMDRAW nmcd;
    790     HBRUSH hbrMonoDither;
    791     HBRUSH hbrLines;
    792     HPEN hpenLines;
    793     COLORREF clrText;
    794     COLORREF clrMark;
    795     COLORREF clrTextHighlight;
    796     COLORREF clrBtnFace;
    797     COLORREF clrBtnHighlight;
    798     COLORREF clrHighlightHotTrack;
    799     RECT rcText;
    800     int nStringBkMode;
    801     int nHLStringBkMode;
    802     int iListGap;
    803   } NMTBCUSTOMDRAW,*LPNMTBCUSTOMDRAW;
    804 
    805 #define TBCDRF_NOEDGES 0x10000
    806 #define TBCDRF_HILITEHOTTRACK 0x20000
    807 #define TBCDRF_NOOFFSET 0x40000
    808 #define TBCDRF_NOMARK 0x80000
    809 #define TBCDRF_NOETCHEDEFFECT 0x100000
    810 
    811 #define TBCDRF_BLENDICON 0x200000
    812 #define TBCDRF_NOBACKGROUND 0x400000
    813 
    814 #define TB_ENABLEBUTTON (WM_USER+1)
    815 #define TB_CHECKBUTTON (WM_USER+2)
    816 #define TB_PRESSBUTTON (WM_USER+3)
    817 #define TB_HIDEBUTTON (WM_USER+4)
    818 #define TB_INDETERMINATE (WM_USER+5)
    819 #define TB_MARKBUTTON (WM_USER+6)
    820 #define TB_ISBUTTONENABLED (WM_USER+9)
    821 #define TB_ISBUTTONCHECKED (WM_USER+10)
    822 #define TB_ISBUTTONPRESSED (WM_USER+11)
    823 #define TB_ISBUTTONHIDDEN (WM_USER+12)
    824 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
    825 #define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
    826 #define TB_SETSTATE (WM_USER+17)
    827 #define TB_GETSTATE (WM_USER+18)
    828 #define TB_ADDBITMAP (WM_USER+19)
    829 
    830   typedef struct tagTBADDBITMAP {
    831     HINSTANCE hInst;
    832     UINT_PTR nID;
    833   } TBADDBITMAP,*LPTBADDBITMAP;
    834 
    835 #define HINST_COMMCTRL ((HINSTANCE)-1)
    836 #define IDB_STD_SMALL_COLOR 0
    837 #define IDB_STD_LARGE_COLOR 1
    838 #define IDB_VIEW_SMALL_COLOR 4
    839 #define IDB_VIEW_LARGE_COLOR 5
    840 #define IDB_HIST_SMALL_COLOR 8
    841 #define IDB_HIST_LARGE_COLOR 9
    842 
    843 #define STD_CUT 0
    844 #define STD_COPY 1
    845 #define STD_PASTE 2
    846 #define STD_UNDO 3
    847 #define STD_REDOW 4
    848 #define STD_DELETE 5
    849 #define STD_FILENEW 6
    850 #define STD_FILEOPEN 7
    851 #define STD_FILESAVE 8
    852 #define STD_PRINTPRE 9
    853 #define STD_PROPERTIES 10
    854 #define STD_HELP 11
    855 #define STD_FIND 12
    856 #define STD_REPLACE 13
    857 #define STD_PRINT 14
    858 
    859 #define VIEW_LARGEICONS 0
    860 #define VIEW_SMALLICONS 1
    861 #define VIEW_LIST 2
    862 #define VIEW_DETAILS 3
    863 #define VIEW_SORTNAME 4
    864 #define VIEW_SORTSIZE 5
    865 #define VIEW_SORTDATE 6
    866 #define VIEW_SORTTYPE 7
    867 #define VIEW_PARENTFOLDER 8
    868 #define VIEW_NETCONNECT 9
    869 #define VIEW_NETDISCONNECT 10
    870 #define VIEW_NEWFOLDER 11
    871 #define VIEW_VIEWMENU 12
    872 #define HIST_BACK 0
    873 #define HIST_FORWARD 1
    874 #define HIST_FAVORITES 2
    875 #define HIST_ADDTOFAVORITES 3
    876 #define HIST_VIEWTREE 4
    877 
    878 #define TB_ADDBUTTONSA (WM_USER+20)
    879 #define TB_INSERTBUTTONA (WM_USER+21)
    880 #define TB_DELETEBUTTON (WM_USER+22)
    881 #define TB_GETBUTTON (WM_USER+23)
    882 #define TB_BUTTONCOUNT (WM_USER+24)
    883 #define TB_COMMANDTOINDEX (WM_USER+25)
    884 
    885   typedef struct tagTBSAVEPARAMSA {
    886     HKEY hkr;
    887     LPCSTR pszSubKey;
    888     LPCSTR pszValueName;
    889   } TBSAVEPARAMSA,*LPTBSAVEPARAMSA;
    890 
    891   typedef struct tagTBSAVEPARAMSW {
    892     HKEY hkr;
    893     LPCWSTR pszSubKey;
    894     LPCWSTR pszValueName;
    895   } TBSAVEPARAMSW,*LPTBSAVEPARAMW;
    896 
    897 #define TBSAVEPARAMS __MINGW_NAME_AW(TBSAVEPARAMS)
    898 #define LPTBSAVEPARAMS __MINGW_NAME_AW(LPTBSAVEPARAMS)
    899 
    900 #define TB_SAVERESTOREA (WM_USER+26)
    901 #define TB_SAVERESTOREW (WM_USER+76)
    902 #define TB_CUSTOMIZE (WM_USER+27)
    903 #define TB_ADDSTRINGA (WM_USER+28)
    904 #define TB_ADDSTRINGW (WM_USER+77)
    905 #define TB_GETITEMRECT (WM_USER+29)
    906 #define TB_BUTTONSTRUCTSIZE (WM_USER+30)
    907 #define TB_SETBUTTONSIZE (WM_USER+31)
    908 #define TB_SETBITMAPSIZE (WM_USER+32)
    909 #define TB_AUTOSIZE (WM_USER+33)
    910 #define TB_GETTOOLTIPS (WM_USER+35)
    911 #define TB_SETTOOLTIPS (WM_USER+36)
    912 #define TB_SETPARENT (WM_USER+37)
    913 #define TB_SETROWS (WM_USER+39)
    914 #define TB_GETROWS (WM_USER+40)
    915 #define TB_SETCMDID (WM_USER+42)
    916 #define TB_CHANGEBITMAP (WM_USER+43)
    917 #define TB_GETBITMAP (WM_USER+44)
    918 #define TB_GETBUTTONTEXTA (WM_USER+45)
    919 #define TB_GETBUTTONTEXTW (WM_USER+75)
    920 #define TB_REPLACEBITMAP (WM_USER+46)
    921 #define TB_SETINDENT (WM_USER+47)
    922 #define TB_SETIMAGELIST (WM_USER+48)
    923 #define TB_GETIMAGELIST (WM_USER+49)
    924 #define TB_LOADIMAGES (WM_USER+50)
    925 #define TB_GETRECT (WM_USER+51)
    926 #define TB_SETHOTIMAGELIST (WM_USER+52)
    927 #define TB_GETHOTIMAGELIST (WM_USER+53)
    928 #define TB_SETDISABLEDIMAGELIST (WM_USER+54)
    929 #define TB_GETDISABLEDIMAGELIST (WM_USER+55)
    930 #define TB_SETSTYLE (WM_USER+56)
    931 #define TB_GETSTYLE (WM_USER+57)
    932 #define TB_GETBUTTONSIZE (WM_USER+58)
    933 #define TB_SETBUTTONWIDTH (WM_USER+59)
    934 #define TB_SETMAXTEXTROWS (WM_USER+60)
    935 #define TB_GETTEXTROWS (WM_USER+61)
    936 
    937 #define TB_GETBUTTONTEXT __MINGW_NAME_AW(TB_GETBUTTONTEXT)
    938 #define TB_SAVERESTORE __MINGW_NAME_AW(TB_SAVERESTORE)
    939 #define TB_ADDSTRING __MINGW_NAME_AW(TB_ADDSTRING)
    940 
    941 #define TB_GETOBJECT (WM_USER+62)
    942 #define TB_GETHOTITEM (WM_USER+71)
    943 #define TB_SETHOTITEM (WM_USER+72)
    944 #define TB_SETANCHORHIGHLIGHT (WM_USER+73)
    945 #define TB_GETANCHORHIGHLIGHT (WM_USER+74)
    946 #define TB_MAPACCELERATORA (WM_USER+78)
    947 
    948   typedef struct {
    949     int iButton;
    950     DWORD dwFlags;
    951   } TBINSERTMARK,*LPTBINSERTMARK;
    952 #define TBIMHT_AFTER 0x1
    953 #define TBIMHT_BACKGROUND 0x2
    954 
    955 #define TB_GETINSERTMARK (WM_USER+79)
    956 #define TB_SETINSERTMARK (WM_USER+80)
    957 #define TB_INSERTMARKHITTEST (WM_USER+81)
    958 #define TB_MOVEBUTTON (WM_USER+82)
    959 #define TB_GETMAXSIZE (WM_USER+83)
    960 #define TB_SETEXTENDEDSTYLE (WM_USER+84)
    961 #define TB_GETEXTENDEDSTYLE (WM_USER+85)
    962 #define TB_GETPADDING (WM_USER+86)
    963 #define TB_SETPADDING (WM_USER+87)
    964 #define TB_SETINSERTMARKCOLOR (WM_USER+88)
    965 #define TB_GETINSERTMARKCOLOR (WM_USER+89)
    966 
    967 #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
    968 #define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
    969 
    970 #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
    971 #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
    972 
    973 #define TB_MAPACCELERATORW (WM_USER+90)
    974 
    975 #define TB_MAPACCELERATOR __MINGW_NAME_AW(TB_MAPACCELERATOR)
    976 
    977   typedef struct {
    978     HINSTANCE hInstOld;
    979     UINT_PTR nIDOld;
    980     HINSTANCE hInstNew;
    981     UINT_PTR nIDNew;
    982     int nButtons;
    983   } TBREPLACEBITMAP,*LPTBREPLACEBITMAP;
    984 
    985 #define TBBF_LARGE 0x1
    986 
    987 #define TB_GETBITMAPFLAGS (WM_USER+41)
    988 
    989 #define TBIF_IMAGE 0x1
    990 #define TBIF_TEXT 0x2
    991 #define TBIF_STATE 0x4
    992 #define TBIF_STYLE 0x8
    993 #define TBIF_LPARAM 0x10
    994 #define TBIF_COMMAND 0x20
    995 #define TBIF_SIZE 0x40
    996 #define TBIF_BYINDEX 0x80000000
    997 
    998   typedef struct {
    999     UINT cbSize;
   1000     DWORD dwMask;
   1001     int idCommand;
   1002     int iImage;
   1003     BYTE fsState;
   1004     BYTE fsStyle;
   1005     WORD cx;
   1006     DWORD_PTR lParam;
   1007     LPSTR pszText;
   1008     int cchText;
   1009   } TBBUTTONINFOA,*LPTBBUTTONINFOA;
   1010 
   1011   typedef struct {
   1012     UINT cbSize;
   1013     DWORD dwMask;
   1014     int idCommand;
   1015     int iImage;
   1016     BYTE fsState;
   1017     BYTE fsStyle;
   1018     WORD cx;
   1019     DWORD_PTR lParam;
   1020     LPWSTR pszText;
   1021     int cchText;
   1022   } TBBUTTONINFOW,*LPTBBUTTONINFOW;
   1023 
   1024 #define TBBUTTONINFO __MINGW_NAME_AW(TBBUTTONINFO)
   1025 #define LPTBBUTTONINFO __MINGW_NAME_AW(LPTBBUTTONINFO)
   1026 
   1027 #define TB_GETBUTTONINFOW (WM_USER+63)
   1028 #define TB_SETBUTTONINFOW (WM_USER+64)
   1029 #define TB_GETBUTTONINFOA (WM_USER+65)
   1030 #define TB_SETBUTTONINFOA (WM_USER+66)
   1031 
   1032 #define TB_GETBUTTONINFO __MINGW_NAME_AW(TB_GETBUTTONINFO)
   1033 #define TB_SETBUTTONINFO __MINGW_NAME_AW(TB_SETBUTTONINFO)
   1034 
   1035 #define TB_INSERTBUTTONW (WM_USER+67)
   1036 #define TB_ADDBUTTONSW (WM_USER+68)
   1037 
   1038 #define TB_HITTEST (WM_USER+69)
   1039 
   1040 #define TB_INSERTBUTTON __MINGW_NAME_AW(TB_INSERTBUTTON)
   1041 #define TB_ADDBUTTONS __MINGW_NAME_AW(TB_ADDBUTTONS)
   1042 
   1043 #define TB_SETDRAWTEXTFLAGS (WM_USER+70)
   1044 
   1045 #define TB_GETSTRINGW (WM_USER+91)
   1046 #define TB_GETSTRINGA (WM_USER+92)
   1047 
   1048 #define TB_GETSTRING __MINGW_NAME_AW(TB_GETSTRING)
   1049 
   1050 #define TB_SETHOTITEM2 (WM_USER+94)
   1051 #define TB_SETLISTGAP (WM_USER+96)
   1052 #define TB_GETIMAGELISTCOUNT (WM_USER+98)
   1053 #define TB_GETIDEALSIZE (WM_USER+99)
   1054 #define TB_TRANSLATEACCELERATOR CCM_TRANSLATEACCELERATOR
   1055 
   1056 #define TBMF_PAD 0x1
   1057 #define TBMF_BARPAD 0x2
   1058 #define TBMF_BUTTONSPACING 0x4
   1059 
   1060   typedef struct {
   1061     UINT cbSize;
   1062     DWORD dwMask;
   1063     int cxPad;
   1064     int cyPad;
   1065     int cxBarPad;
   1066     int cyBarPad;
   1067     int cxButtonSpacing;
   1068     int cyButtonSpacing;
   1069   } TBMETRICS,*LPTBMETRICS;
   1070 
   1071 #define TB_GETMETRICS (WM_USER+101)
   1072 #define TB_SETMETRICS (WM_USER+102)
   1073 #if (_WIN32_WINNT >= 0x600)
   1074 #define TB_GETITEMDROPDOWNRECT (WM_USER + 103)
   1075 #define TB_SETPRESSEDIMAGELIST (WM_USER + 104)
   1076 #define TB_GETPRESSEDIMAGELIST (WM_USER + 105)
   1077 #endif
   1078 #define TB_SETWINDOWTHEME CCM_SETWINDOWTHEME
   1079 
   1080 #define TBN_GETBUTTONINFOA (TBN_FIRST-0)
   1081 #define TBN_BEGINDRAG (TBN_FIRST-1)
   1082 #define TBN_ENDDRAG (TBN_FIRST-2)
   1083 #define TBN_BEGINADJUST (TBN_FIRST-3)
   1084 #define TBN_ENDADJUST (TBN_FIRST-4)
   1085 #define TBN_RESET (TBN_FIRST-5)
   1086 #define TBN_QUERYINSERT (TBN_FIRST-6)
   1087 #define TBN_QUERYDELETE (TBN_FIRST-7)
   1088 #define TBN_TOOLBARCHANGE (TBN_FIRST-8)
   1089 #define TBN_CUSTHELP (TBN_FIRST-9)
   1090 #define TBN_DROPDOWN (TBN_FIRST - 10)
   1091 #define TBN_GETOBJECT (TBN_FIRST - 12)
   1092   typedef struct tagNMTBHOTITEM {
   1093     NMHDR hdr;
   1094     int idOld;
   1095     int idNew;
   1096     DWORD dwFlags;
   1097   } NMTBHOTITEM,*LPNMTBHOTITEM;
   1098 
   1099 #define HICF_OTHER 0x0
   1100 #define HICF_MOUSE 0x1
   1101 #define HICF_ARROWKEYS 0x2
   1102 #define HICF_ACCELERATOR 0x4
   1103 #define HICF_DUPACCEL 0x8
   1104 #define HICF_ENTERING 0x10
   1105 #define HICF_LEAVING 0x20
   1106 #define HICF_RESELECT 0x40
   1107 #define HICF_LMOUSE 0x80
   1108 #define HICF_TOGGLEDROPDOWN 0x100
   1109 
   1110 #define TBN_HOTITEMCHANGE (TBN_FIRST - 13)
   1111 #define TBN_DRAGOUT (TBN_FIRST - 14)
   1112 #define TBN_DELETINGBUTTON (TBN_FIRST - 15)
   1113 #define TBN_GETDISPINFOA (TBN_FIRST - 16)
   1114 #define TBN_GETDISPINFOW (TBN_FIRST - 17)
   1115 #define TBN_GETINFOTIPA (TBN_FIRST - 18)
   1116 #define TBN_GETINFOTIPW (TBN_FIRST - 19)
   1117 #define TBN_GETBUTTONINFOW (TBN_FIRST - 20)
   1118 #define TBN_RESTORE (TBN_FIRST - 21)
   1119 #define TBN_SAVE (TBN_FIRST - 22)
   1120 #define TBN_INITCUSTOMIZE (TBN_FIRST - 23)
   1121 #define TBN_WRAPHOTITEM (TBN_FIRST - 24)
   1122 #define TBN_DUPACCELERATOR (TBN_FIRST - 25)
   1123 #define TBN_WRAPACCELERATOR (TBN_FIRST - 26)
   1124 #define TBN_DRAGOVER (TBN_FIRST - 27)
   1125 #define TBN_MAPACCELERATOR (TBN_FIRST - 28)
   1126 #define TBNRF_HIDEHELP 0x1
   1127 #define TBNRF_ENDCUSTOMIZE 0x2
   1128 
   1129   typedef struct tagNMTBSAVE {
   1130     NMHDR hdr;
   1131     DWORD *pData;
   1132     DWORD *pCurrent;
   1133     UINT cbData;
   1134     int iItem;
   1135     int cButtons;
   1136     TBBUTTON tbButton;
   1137   } NMTBSAVE,*LPNMTBSAVE;
   1138 
   1139   typedef struct tagNMTBRESTORE {
   1140     NMHDR hdr;
   1141     DWORD *pData;
   1142     DWORD *pCurrent;
   1143     UINT cbData;
   1144     int iItem;
   1145     int cButtons;
   1146     int cbBytesPerRecord;
   1147     TBBUTTON tbButton;
   1148   } NMTBRESTORE,*LPNMTBRESTORE;
   1149 
   1150   typedef struct tagNMTBGETINFOTIPA {
   1151     NMHDR hdr;
   1152     LPSTR pszText;
   1153     int cchTextMax;
   1154     int iItem;
   1155     LPARAM lParam;
   1156   } NMTBGETINFOTIPA,*LPNMTBGETINFOTIPA;
   1157 
   1158   typedef struct tagNMTBGETINFOTIPW {
   1159     NMHDR hdr;
   1160     LPWSTR pszText;
   1161     int cchTextMax;
   1162     int iItem;
   1163     LPARAM lParam;
   1164   } NMTBGETINFOTIPW,*LPNMTBGETINFOTIPW;
   1165 
   1166 #define TBN_GETINFOTIP __MINGW_NAME_AW(TBN_GETINFOTIP)
   1167 #define NMTBGETINFOTIP __MINGW_NAME_AW(NMTBGETINFOTIP)
   1168 #define LPNMTBGETINFOTIP __MINGW_NAME_AW(LPNMTBGETINFOTIP)
   1169 
   1170 #define TBNF_IMAGE 0x1
   1171 #define TBNF_TEXT 0x2
   1172 #define TBNF_DI_SETITEM 0x10000000
   1173 
   1174   typedef struct {
   1175     NMHDR hdr;
   1176     DWORD dwMask;
   1177     int idCommand;
   1178     DWORD_PTR lParam;
   1179     int iImage;
   1180     LPSTR pszText;
   1181     int cchText;
   1182   } NMTBDISPINFOA,*LPNMTBDISPINFOA;
   1183 
   1184   typedef struct {
   1185     NMHDR hdr;
   1186     DWORD dwMask;
   1187     int idCommand;
   1188     DWORD_PTR lParam;
   1189     int iImage;
   1190     LPWSTR pszText;
   1191     int cchText;
   1192   } NMTBDISPINFOW,*LPNMTBDISPINFOW;
   1193 
   1194 #define TBN_GETDISPINFO __MINGW_NAME_AW(TBN_GETDISPINFO)
   1195 #define NMTBDISPINFO __MINGW_NAME_AW(NMTBDISPINFO)
   1196 #define LPNMTBDISPINFO __MINGW_NAME_AW(LPNMTBDISPINFO)
   1197 
   1198 #define TBDDRET_DEFAULT 0
   1199 #define TBDDRET_NODEFAULT 1
   1200 #define TBDDRET_TREATPRESSED 2
   1201 
   1202 #define TBN_GETBUTTONINFO __MINGW_NAME_AW(TBN_GETBUTTONINFO)
   1203 
   1204 #define TBNOTIFYA NMTOOLBARA
   1205 #define TBNOTIFYW NMTOOLBARW
   1206 #define LPTBNOTIFYA LPNMTOOLBARA
   1207 #define LPTBNOTIFYW LPNMTOOLBARW
   1208 
   1209 #define TBNOTIFY NMTOOLBAR
   1210 #define LPTBNOTIFY LPNMTOOLBAR
   1211 
   1212   typedef struct tagNMTOOLBARA {
   1213     NMHDR hdr;
   1214     int iItem;
   1215     TBBUTTON tbButton;
   1216     int cchText;
   1217     LPSTR pszText;
   1218     RECT rcButton;
   1219   } NMTOOLBARA,*LPNMTOOLBARA;
   1220 
   1221   typedef struct tagNMTOOLBARW {
   1222     NMHDR hdr;
   1223     int iItem;
   1224     TBBUTTON tbButton;
   1225     int cchText;
   1226     LPWSTR pszText;
   1227     RECT rcButton;
   1228   } NMTOOLBARW,*LPNMTOOLBARW;
   1229 
   1230 #define NMTOOLBAR __MINGW_NAME_AW(NMTOOLBAR)
   1231 #define LPNMTOOLBAR __MINGW_NAME_AW(LPNMTOOLBAR)
   1232 
   1233 #endif
   1234 
   1235 #ifndef NOREBAR
   1236 
   1237 #define REBARCLASSNAMEW L"ReBarWindow32"
   1238 #define REBARCLASSNAMEA "ReBarWindow32"
   1239 
   1240 #define REBARCLASSNAME __MINGW_NAME_AW(REBARCLASSNAME)
   1241 
   1242 #define RBIM_IMAGELIST 0x1
   1243 
   1244 #define RBS_TOOLTIPS 0x100
   1245 #define RBS_VARHEIGHT 0x200
   1246 #define RBS_BANDBORDERS 0x400
   1247 #define RBS_FIXEDORDER 0x800
   1248 #define RBS_REGISTERDROP 0x1000
   1249 #define RBS_AUTOSIZE 0x2000
   1250 #define RBS_VERTICALGRIPPER 0x4000
   1251 #define RBS_DBLCLKTOGGLE 0x8000
   1252 
   1253   typedef struct tagREBARINFO {
   1254     UINT cbSize;
   1255     UINT fMask;
   1256 #ifndef NOIMAGEAPIS
   1257     HIMAGELIST himl;
   1258 #else
   1259     HANDLE himl;
   1260 #endif
   1261   } REBARINFO,*LPREBARINFO;
   1262 
   1263 #define RBBS_BREAK 0x1
   1264 #define RBBS_FIXEDSIZE 0x2
   1265 #define RBBS_CHILDEDGE 0x4
   1266 #define RBBS_HIDDEN 0x8
   1267 #define RBBS_NOVERT 0x10
   1268 #define RBBS_FIXEDBMP 0x20
   1269 #define RBBS_VARIABLEHEIGHT 0x40
   1270 #define RBBS_GRIPPERALWAYS 0x80
   1271 #define RBBS_NOGRIPPER 0x100
   1272 #define RBBS_USECHEVRON 0x200
   1273 #define RBBS_HIDETITLE 0x400
   1274 #define RBBS_TOPALIGN 0x800
   1275 
   1276 #define RBBIM_STYLE 0x1
   1277 #define RBBIM_COLORS 0x2
   1278 #define RBBIM_TEXT 0x4
   1279 #define RBBIM_IMAGE 0x8
   1280 #define RBBIM_CHILD 0x10
   1281 #define RBBIM_CHILDSIZE 0x20
   1282 #define RBBIM_SIZE 0x40
   1283 #define RBBIM_BACKGROUND 0x80
   1284 #define RBBIM_ID 0x100
   1285 #define RBBIM_IDEALSIZE 0x200
   1286 #define RBBIM_LPARAM 0x400
   1287 #define RBBIM_HEADERSIZE 0x800
   1288 
   1289   typedef struct tagREBARBANDINFOA {
   1290     UINT cbSize;
   1291     UINT fMask;
   1292     UINT fStyle;
   1293     COLORREF clrFore;
   1294     COLORREF clrBack;
   1295     LPSTR lpText;
   1296     UINT cch;
   1297     int iImage;
   1298     HWND hwndChild;
   1299     UINT cxMinChild;
   1300     UINT cyMinChild;
   1301     UINT cx;
   1302     HBITMAP hbmBack;
   1303     UINT wID;
   1304     UINT cyChild;
   1305     UINT cyMaxChild;
   1306     UINT cyIntegral;
   1307     UINT cxIdeal;
   1308     LPARAM lParam;
   1309     UINT cxHeader;
   1310   } REBARBANDINFOA,*LPREBARBANDINFOA;
   1311   typedef REBARBANDINFOA CONST *LPCREBARBANDINFOA;
   1312 
   1313 #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA,wID)
   1314 #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW,wID)
   1315 #define REBARBANDINFOA_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA,cxHeader)
   1316 #define REBARBANDINFOW_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW,cxHeader)
   1317 
   1318   typedef struct tagREBARBANDINFOW {
   1319     UINT cbSize;
   1320     UINT fMask;
   1321     UINT fStyle;
   1322     COLORREF clrFore;
   1323     COLORREF clrBack;
   1324     LPWSTR lpText;
   1325     UINT cch;
   1326     int iImage;
   1327     HWND hwndChild;
   1328     UINT cxMinChild;
   1329     UINT cyMinChild;
   1330     UINT cx;
   1331     HBITMAP hbmBack;
   1332     UINT wID;
   1333     UINT cyChild;
   1334     UINT cyMaxChild;
   1335     UINT cyIntegral;
   1336     UINT cxIdeal;
   1337     LPARAM lParam;
   1338     UINT cxHeader;
   1339   } REBARBANDINFOW,*LPREBARBANDINFOW;
   1340 
   1341   typedef REBARBANDINFOW CONST *LPCREBARBANDINFOW;
   1342 
   1343 #define REBARBANDINFO __MINGW_NAME_AW(REBARBANDINFO)
   1344 #define LPREBARBANDINFO __MINGW_NAME_AW(LPREBARBANDINFO)
   1345 #define LPCREBARBANDINFO __MINGW_NAME_AW(LPCREBARBANDINFO)
   1346 
   1347 #define REBARBANDINFO_V3_SIZE __MINGW_NAME_AW_EXT(REBARBANDINFO,_V3_SIZE)
   1348 
   1349 #define RB_INSERTBANDA (WM_USER+1)
   1350 #define RB_DELETEBAND (WM_USER+2)
   1351 #define RB_GETBARINFO (WM_USER+3)
   1352 #define RB_SETBARINFO (WM_USER+4)
   1353 #define RB_SETBANDINFOA (WM_USER+6)
   1354 #define RB_SETPARENT (WM_USER+7)
   1355 #define RB_HITTEST (WM_USER+8)
   1356 #define RB_GETRECT (WM_USER+9)
   1357 #define RB_INSERTBANDW (WM_USER+10)
   1358 #define RB_SETBANDINFOW (WM_USER+11)
   1359 #define RB_GETBANDCOUNT (WM_USER+12)
   1360 #define RB_GETROWCOUNT (WM_USER+13)
   1361 #define RB_GETROWHEIGHT (WM_USER+14)
   1362 #define RB_IDTOINDEX (WM_USER+16)
   1363 #define RB_GETTOOLTIPS (WM_USER+17)
   1364 #define RB_SETTOOLTIPS (WM_USER+18)
   1365 #define RB_SETBKCOLOR (WM_USER+19)
   1366 #define RB_GETBKCOLOR (WM_USER+20)
   1367 #define RB_SETTEXTCOLOR (WM_USER+21)
   1368 #define RB_GETTEXTCOLOR (WM_USER+22)
   1369 
   1370 #define RBSTR_CHANGERECT 0x1
   1371 
   1372 #define RB_SIZETORECT (WM_USER+23)
   1373 #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
   1374 #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
   1375 
   1376 #define RB_INSERTBAND __MINGW_NAME_AW(RB_INSERTBAND)
   1377 #define RB_SETBANDINFO __MINGW_NAME_AW(RB_SETBANDINFO)
   1378 
   1379 #define RB_BEGINDRAG (WM_USER+24)
   1380 #define RB_ENDDRAG (WM_USER+25)
   1381 #define RB_DRAGMOVE (WM_USER+26)
   1382 #define RB_GETBARHEIGHT (WM_USER+27)
   1383 #define RB_GETBANDINFOW (WM_USER+28)
   1384 #define RB_GETBANDINFOA (WM_USER+29)
   1385 
   1386 #define RB_GETBANDINFO __MINGW_NAME_AW(RB_GETBANDINFO)
   1387 
   1388 #define RB_MINIMIZEBAND (WM_USER+30)
   1389 #define RB_MAXIMIZEBAND (WM_USER+31)
   1390 #define RB_GETDROPTARGET (CCM_GETDROPTARGET)
   1391 #define RB_GETBANDBORDERS (WM_USER+34)
   1392 #define RB_SHOWBAND (WM_USER+35)
   1393 #define RB_SETPALETTE (WM_USER+37)
   1394 #define RB_GETPALETTE (WM_USER+38)
   1395 #define RB_MOVEBAND (WM_USER+39)
   1396 #define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
   1397 #define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
   1398 #define RB_GETBANDMARGINS (WM_USER+40)
   1399 #define RB_SETWINDOWTHEME CCM_SETWINDOWTHEME
   1400 #define RB_PUSHCHEVRON (WM_USER+43)
   1401 
   1402 #define RBN_HEIGHTCHANGE (RBN_FIRST - 0)
   1403 #define RBN_GETOBJECT (RBN_FIRST - 1)
   1404 #define RBN_LAYOUTCHANGED (RBN_FIRST - 2)
   1405 #define RBN_AUTOSIZE (RBN_FIRST - 3)
   1406 #define RBN_BEGINDRAG (RBN_FIRST - 4)
   1407 #define RBN_ENDDRAG (RBN_FIRST - 5)
   1408 #define RBN_DELETINGBAND (RBN_FIRST - 6)
   1409 #define RBN_DELETEDBAND (RBN_FIRST - 7)
   1410 #define RBN_CHILDSIZE (RBN_FIRST - 8)
   1411 #define RBN_CHEVRONPUSHED (RBN_FIRST - 10)
   1412 #define RBN_MINMAX (RBN_FIRST - 21)
   1413 #define RBN_AUTOBREAK (RBN_FIRST - 22)
   1414 
   1415   typedef struct tagNMREBARCHILDSIZE {
   1416     NMHDR hdr;
   1417     UINT uBand;
   1418     UINT wID;
   1419     RECT rcChild;
   1420     RECT rcBand;
   1421   } NMREBARCHILDSIZE,*LPNMREBARCHILDSIZE;
   1422 
   1423   typedef struct tagNMREBAR {
   1424     NMHDR hdr;
   1425     DWORD dwMask;
   1426     UINT uBand;
   1427     UINT fStyle;
   1428     UINT wID;
   1429     LPARAM lParam;
   1430   } NMREBAR,*LPNMREBAR;
   1431 
   1432 #define RBNM_ID 0x1
   1433 #define RBNM_STYLE 0x2
   1434 #define RBNM_LPARAM 0x4
   1435 
   1436   typedef struct tagNMRBAUTOSIZE {
   1437     NMHDR hdr;
   1438     WINBOOL fChanged;
   1439     RECT rcTarget;
   1440     RECT rcActual;
   1441   } NMRBAUTOSIZE,*LPNMRBAUTOSIZE;
   1442 
   1443   typedef struct tagNMREBARCHEVRON {
   1444     NMHDR hdr;
   1445     UINT uBand;
   1446     UINT wID;
   1447     LPARAM lParam;
   1448     RECT rc;
   1449     LPARAM lParamNM;
   1450   } NMREBARCHEVRON,*LPNMREBARCHEVRON;
   1451 
   1452 #define RBAB_AUTOSIZE 0x1
   1453 #define RBAB_ADDBAND 0x2
   1454 
   1455   typedef struct tagNMREBARAUTOBREAK {
   1456     NMHDR hdr;
   1457     UINT uBand;
   1458     UINT wID;
   1459     LPARAM lParam;
   1460     UINT uMsg;
   1461     UINT fStyleCurrent;
   1462     WINBOOL fAutoBreak;
   1463   } NMREBARAUTOBREAK,*LPNMREBARAUTOBREAK;
   1464 
   1465 #define RBHT_NOWHERE 0x1
   1466 #define RBHT_CAPTION 0x2
   1467 #define RBHT_CLIENT 0x3
   1468 #define RBHT_GRABBER 0x4
   1469 #define RBHT_CHEVRON 0x8
   1470 
   1471   typedef struct _RB_HITTESTINFO {
   1472     POINT pt;
   1473     UINT flags;
   1474     int iBand;
   1475   } RBHITTESTINFO,*LPRBHITTESTINFO;
   1476 #endif
   1477 
   1478 #ifndef NOTOOLTIPS
   1479 
   1480 #define TOOLTIPS_CLASSW L"tooltips_class32"
   1481 #define TOOLTIPS_CLASSA "tooltips_class32"
   1482 
   1483 #define TOOLTIPS_CLASS __MINGW_NAME_AW(TOOLTIPS_CLASS)
   1484 
   1485 #define LPTOOLINFOA LPTTTOOLINFOA
   1486 #define LPTOOLINFOW LPTTTOOLINFOW
   1487 #define TOOLINFOA TTTOOLINFOA
   1488 #define TOOLINFOW TTTOOLINFOW
   1489 
   1490 #define LPTOOLINFO LPTTTOOLINFO
   1491 #define TOOLINFO TTTOOLINFO
   1492 
   1493 #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA,lpszText)
   1494 #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW,lpszText)
   1495 #define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA,lParam)
   1496 #define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW,lParam)
   1497 #define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA,lpReserved)
   1498 #define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW,lpReserved)
   1499 
   1500   typedef struct tagTOOLINFOA {
   1501     UINT cbSize;
   1502     UINT uFlags;
   1503     HWND hwnd;
   1504     UINT_PTR uId;
   1505     RECT rect;
   1506     HINSTANCE hinst;
   1507     LPSTR lpszText;
   1508     LPARAM lParam;
   1509     void *lpReserved;
   1510   } TTTOOLINFOA,NEAR *PTOOLINFOA,*LPTTTOOLINFOA;
   1511 
   1512   typedef struct tagTOOLINFOW {
   1513     UINT cbSize;
   1514     UINT uFlags;
   1515     HWND hwnd;
   1516     UINT_PTR uId;
   1517     RECT rect;
   1518     HINSTANCE hinst;
   1519     LPWSTR lpszText;
   1520     LPARAM lParam;
   1521     void *lpReserved;
   1522   } TTTOOLINFOW,NEAR *PTOOLINFOW,*LPTTTOOLINFOW;
   1523 
   1524 #define TTTOOLINFO __MINGW_NAME_AW(TTTOOLINFO)
   1525 #define PTOOLINFO __MINGW_NAME_AW(PTOOLINFO)
   1526 #define LPTTTOOLINFO __MINGW_NAME_AW(LPTTTOOLINFO)
   1527 
   1528 #define TTTOOLINFO_V1_SIZE __MINGW_NAME_AW_EXT(TTTOOLINFO,_V1_SIZE)
   1529 
   1530 #define TTS_ALWAYSTIP 0x1
   1531 #define TTS_NOPREFIX 0x2
   1532 #define TTS_NOANIMATE 0x10
   1533 #define TTS_NOFADE 0x20
   1534 #define TTS_BALLOON 0x40
   1535 #define TTS_CLOSE 0x80
   1536 
   1537 #define TTF_IDISHWND 0x1
   1538 #define TTF_CENTERTIP 0x2
   1539 #define TTF_RTLREADING 0x4
   1540 #define TTF_SUBCLASS 0x10
   1541 #define TTF_TRACK 0x20
   1542 #define TTF_ABSOLUTE 0x80
   1543 #define TTF_TRANSPARENT 0x100
   1544 #define TTF_PARSELINKS 0x1000
   1545 #define TTF_DI_SETITEM 0x8000
   1546 
   1547 #define TTDT_AUTOMATIC 0
   1548 #define TTDT_RESHOW 1
   1549 #define TTDT_AUTOPOP 2
   1550 #define TTDT_INITIAL 3
   1551 
   1552 #define TTI_NONE 0
   1553 #define TTI_INFO 1
   1554 #define TTI_WARNING 2
   1555 #define TTI_ERROR 3
   1556 
   1557 #define TTM_ACTIVATE (WM_USER+1)
   1558 #define TTM_SETDELAYTIME (WM_USER+3)
   1559 #define TTM_ADDTOOLA (WM_USER+4)
   1560 #define TTM_ADDTOOLW (WM_USER+50)
   1561 #define TTM_DELTOOLA (WM_USER+5)
   1562 #define TTM_DELTOOLW (WM_USER+51)
   1563 #define TTM_NEWTOOLRECTA (WM_USER+6)
   1564 #define TTM_NEWTOOLRECTW (WM_USER+52)
   1565 #define TTM_RELAYEVENT (WM_USER+7)
   1566 
   1567 #define TTM_GETTOOLINFOA (WM_USER+8)
   1568 #define TTM_GETTOOLINFOW (WM_USER+53)
   1569 
   1570 #define TTM_SETTOOLINFOA (WM_USER+9)
   1571 #define TTM_SETTOOLINFOW (WM_USER+54)
   1572 
   1573 #define TTM_HITTESTA (WM_USER +10)
   1574 #define TTM_HITTESTW (WM_USER +55)
   1575 #define TTM_GETTEXTA (WM_USER +11)
   1576 #define TTM_GETTEXTW (WM_USER +56)
   1577 #define TTM_UPDATETIPTEXTA (WM_USER +12)
   1578 #define TTM_UPDATETIPTEXTW (WM_USER +57)
   1579 #define TTM_GETTOOLCOUNT (WM_USER +13)
   1580 #define TTM_ENUMTOOLSA (WM_USER +14)
   1581 #define TTM_ENUMTOOLSW (WM_USER +58)
   1582 #define TTM_GETCURRENTTOOLA (WM_USER+15)
   1583 #define TTM_GETCURRENTTOOLW (WM_USER+59)
   1584 #define TTM_WINDOWFROMPOINT (WM_USER+16)
   1585 #define TTM_TRACKACTIVATE (WM_USER+17)
   1586 #define TTM_TRACKPOSITION (WM_USER+18)
   1587 #define TTM_SETTIPBKCOLOR (WM_USER+19)
   1588 #define TTM_SETTIPTEXTCOLOR (WM_USER+20)
   1589 #define TTM_GETDELAYTIME (WM_USER+21)
   1590 #define TTM_GETTIPBKCOLOR (WM_USER+22)
   1591 #define TTM_GETTIPTEXTCOLOR (WM_USER+23)
   1592 #define TTM_SETMAXTIPWIDTH (WM_USER+24)
   1593 #define TTM_GETMAXTIPWIDTH (WM_USER+25)
   1594 #define TTM_SETMARGIN (WM_USER+26)
   1595 #define TTM_GETMARGIN (WM_USER+27)
   1596 #define TTM_POP (WM_USER+28)
   1597 #define TTM_UPDATE (WM_USER+29)
   1598 #define TTM_GETBUBBLESIZE (WM_USER+30)
   1599 #define TTM_ADJUSTRECT (WM_USER+31)
   1600 #define TTM_SETTITLEA (WM_USER+32)
   1601 #define TTM_SETTITLEW (WM_USER+33)
   1602 
   1603 #define TTM_POPUP (WM_USER+34)
   1604 #define TTM_GETTITLE (WM_USER+35)
   1605   typedef struct _TTGETTITLE {
   1606     DWORD dwSize;
   1607     UINT uTitleBitmap;
   1608     UINT cch;
   1609     WCHAR *pszTitle;
   1610   } TTGETTITLE,*PTTGETTITLE;
   1611 
   1612 #define TTM_ADDTOOL __MINGW_NAME_AW(TTM_ADDTOOL)
   1613 #define TTM_DELTOOL __MINGW_NAME_AW(TTM_DELTOOL)
   1614 #define TTM_NEWTOOLRECT __MINGW_NAME_AW(TTM_NEWTOOLRECT)
   1615 #define TTM_GETTOOLINFO __MINGW_NAME_AW(TTM_GETTOOLINFO)
   1616 #define TTM_SETTOOLINFO __MINGW_NAME_AW(TTM_SETTOOLINFO)
   1617 #define TTM_HITTEST __MINGW_NAME_AW(TTM_HITTEST)
   1618 #define TTM_GETTEXT __MINGW_NAME_AW(TTM_GETTEXT)
   1619 #define TTM_UPDATETIPTEXT __MINGW_NAME_AW(TTM_UPDATETIPTEXT)
   1620 #define TTM_ENUMTOOLS __MINGW_NAME_AW(TTM_ENUMTOOLS)
   1621 #define TTM_GETCURRENTTOOL __MINGW_NAME_AW(TTM_GETCURRENTTOOL)
   1622 #define TTM_SETTITLE __MINGW_NAME_AW(TTM_SETTITLE)
   1623 
   1624 #define TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME
   1625 
   1626 #define LPHITTESTINFOW LPTTHITTESTINFOW
   1627 #define LPHITTESTINFOA LPTTHITTESTINFOA
   1628 #define LPHITTESTINFO LPTTHITTESTINFO
   1629 
   1630   typedef struct _TT_HITTESTINFOA {
   1631     HWND hwnd;
   1632     POINT pt;
   1633     TTTOOLINFOA ti;
   1634   } TTHITTESTINFOA,*LPTTHITTESTINFOA;
   1635 
   1636   typedef struct _TT_HITTESTINFOW {
   1637     HWND hwnd;
   1638     POINT pt;
   1639     TTTOOLINFOW ti;
   1640   } TTHITTESTINFOW,*LPTTHITTESTINFOW;
   1641 
   1642 #define TTHITTESTINFO __MINGW_NAME_AW(TTHITTESTINFO)
   1643 #define LPTTHITTESTINFO __MINGW_NAME_AW(LPTTHITTESTINFO)
   1644 
   1645 #define TTN_GETDISPINFOA (TTN_FIRST - 0)
   1646 #define TTN_GETDISPINFOW (TTN_FIRST - 10)
   1647 #define TTN_SHOW (TTN_FIRST - 1)
   1648 #define TTN_POP (TTN_FIRST - 2)
   1649 #define TTN_LINKCLICK (TTN_FIRST - 3)
   1650 
   1651 #define TTN_GETDISPINFO __MINGW_NAME_AW(TTN_GETDISPINFO)
   1652 
   1653 #define TTN_NEEDTEXT TTN_GETDISPINFO
   1654 #define TTN_NEEDTEXTA TTN_GETDISPINFOA
   1655 #define TTN_NEEDTEXTW TTN_GETDISPINFOW
   1656 
   1657 #define TOOLTIPTEXTW NMTTDISPINFOW
   1658 #define TOOLTIPTEXTA NMTTDISPINFOA
   1659 #define LPTOOLTIPTEXTA LPNMTTDISPINFOA
   1660 #define LPTOOLTIPTEXTW LPNMTTDISPINFOW
   1661 
   1662 #define TOOLTIPTEXT NMTTDISPINFO
   1663 #define LPTOOLTIPTEXT LPNMTTDISPINFO
   1664 
   1665 #define NMTTDISPINFOA_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOA,uFlags)
   1666 #define NMTTDISPINFOW_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOW,uFlags)
   1667 
   1668   typedef struct tagNMTTDISPINFOA {
   1669     NMHDR hdr;
   1670     LPSTR lpszText;
   1671     char szText[80];
   1672     HINSTANCE hinst;
   1673     UINT uFlags;
   1674     LPARAM lParam;
   1675   } NMTTDISPINFOA,*LPNMTTDISPINFOA;
   1676 
   1677   typedef struct tagNMTTDISPINFOW {
   1678     NMHDR hdr;
   1679     LPWSTR lpszText;
   1680     WCHAR szText[80];
   1681     HINSTANCE hinst;
   1682     UINT uFlags;
   1683     LPARAM lParam;
   1684   } NMTTDISPINFOW,*LPNMTTDISPINFOW;
   1685 
   1686 
   1687 #define NMTTDISPINFO __MINGW_NAME_AW(NMTTDISPINFO)
   1688 #define LPNMTTDISPINFO __MINGW_NAME_AW(LPNMTTDISPINFO)
   1689 
   1690 #define NMTTDISPINFO_V1_SIZE __MINGW_NAME_AW_EXT(NMTTDISPINFO,_V1_SIZE)
   1691 #endif
   1692 
   1693 #ifndef NOSTATUSBAR
   1694 
   1695 #define SBARS_SIZEGRIP 0x100
   1696 #define SBARS_TOOLTIPS 0x800
   1697 #define SBT_TOOLTIPS 0x800
   1698 
   1699   WINCOMMCTRLAPI void WINAPI DrawStatusTextA(HDC hDC,LPCRECT lprc,LPCSTR pszText,UINT uFlags);
   1700   WINCOMMCTRLAPI void WINAPI DrawStatusTextW(HDC hDC,LPCRECT lprc,LPCWSTR pszText,UINT uFlags);
   1701 
   1702   WINCOMMCTRLAPI HWND WINAPI CreateStatusWindowA(LONG style,LPCSTR lpszText,HWND hwndParent,UINT wID);
   1703   WINCOMMCTRLAPI HWND WINAPI CreateStatusWindowW(LONG style,LPCWSTR lpszText,HWND hwndParent,UINT wID);
   1704 
   1705 #define CreateStatusWindow __MINGW_NAME_AW(CreateStatusWindow)
   1706 #define DrawStatusText __MINGW_NAME_AW(DrawStatusText)
   1707 
   1708 #define STATUSCLASSNAMEW L"msctls_statusbar32"
   1709 #define STATUSCLASSNAMEA "msctls_statusbar32"
   1710 
   1711 #define STATUSCLASSNAME __MINGW_NAME_AW(STATUSCLASSNAME)
   1712 
   1713 #define SB_SETTEXTA (WM_USER+1)
   1714 #define SB_SETTEXTW (WM_USER+11)
   1715 #define SB_GETTEXTA (WM_USER+2)
   1716 #define SB_GETTEXTW (WM_USER+13)
   1717 #define SB_GETTEXTLENGTHA (WM_USER+3)
   1718 #define SB_GETTEXTLENGTHW (WM_USER+12)
   1719 
   1720 #define SB_GETTEXT __MINGW_NAME_AW(SB_GETTEXT)
   1721 #define SB_SETTEXT __MINGW_NAME_AW(SB_SETTEXT)
   1722 #define SB_GETTEXTLENGTH __MINGW_NAME_AW(SB_GETTEXTLENGTH)
   1723 #define SB_SETTIPTEXT __MINGW_NAME_AW(SB_SETTIPTEXT)
   1724 #define SB_GETTIPTEXT __MINGW_NAME_AW(SB_GETTIPTEXT)
   1725 
   1726 #define SB_SETPARTS (WM_USER+4)
   1727 #define SB_GETPARTS (WM_USER+6)
   1728 #define SB_GETBORDERS (WM_USER+7)
   1729 #define SB_SETMINHEIGHT (WM_USER+8)
   1730 #define SB_SIMPLE (WM_USER+9)
   1731 #define SB_GETRECT (WM_USER+10)
   1732 #define SB_ISSIMPLE (WM_USER+14)
   1733 #define SB_SETICON (WM_USER+15)
   1734 #define SB_SETTIPTEXTA (WM_USER+16)
   1735 #define SB_SETTIPTEXTW (WM_USER+17)
   1736 #define SB_GETTIPTEXTA (WM_USER+18)
   1737 #define SB_GETTIPTEXTW (WM_USER+19)
   1738 #define SB_GETICON (WM_USER+20)
   1739 #define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
   1740 #define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
   1741 
   1742 #define SBT_OWNERDRAW 0x1000
   1743 #define SBT_NOBORDERS 0x100
   1744 #define SBT_POPOUT 0x200
   1745 #define SBT_RTLREADING 0x400
   1746 #define SBT_NOTABPARSING 0x800
   1747 
   1748 #define SB_SETBKCOLOR CCM_SETBKCOLOR
   1749 
   1750 #define SBN_SIMPLEMODECHANGE (SBN_FIRST - 0)
   1751 
   1752 #define SB_SIMPLEID 0xff
   1753 #endif
   1754 
   1755 #ifndef NOMENUHELP
   1756 
   1757   WINCOMMCTRLAPI void WINAPI MenuHelp(UINT uMsg,WPARAM wParam,LPARAM lParam,HMENU hMainMenu,HINSTANCE hInst,HWND hwndStatus,UINT *lpwIDs);
   1758   WINCOMMCTRLAPI WINBOOL WINAPI ShowHideMenuCtl(HWND hWnd,UINT_PTR uFlags,LPINT lpInfo);
   1759   WINCOMMCTRLAPI void WINAPI GetEffectiveClientRect(HWND hWnd,LPRECT lprc,const INT *lpInfo);
   1760 
   1761 #define MINSYSCOMMAND SC_SIZE
   1762 #endif
   1763 
   1764 #ifndef NOTRACKBAR
   1765 
   1766 #define TRACKBAR_CLASSA "msctls_trackbar32"
   1767 #define TRACKBAR_CLASSW L"msctls_trackbar32"
   1768 
   1769 #define TRACKBAR_CLASS __MINGW_NAME_AW(TRACKBAR_CLASS)
   1770 
   1771 #define TBS_AUTOTICKS 0x1
   1772 #define TBS_VERT 0x2
   1773 #define TBS_HORZ 0x0
   1774 #define TBS_TOP 0x4
   1775 #define TBS_BOTTOM 0x0
   1776 #define TBS_LEFT 0x4
   1777 #define TBS_RIGHT 0x0
   1778 #define TBS_BOTH 0x8
   1779 #define TBS_NOTICKS 0x10
   1780 #define TBS_ENABLESELRANGE 0x20
   1781 #define TBS_FIXEDLENGTH 0x40
   1782 #define TBS_NOTHUMB 0x80
   1783 #define TBS_TOOLTIPS 0x100
   1784 #define TBS_REVERSED 0x200
   1785 #define TBS_DOWNISLEFT 0x400
   1786 
   1787 #define TBM_GETPOS (WM_USER)
   1788 #define TBM_GETRANGEMIN (WM_USER+1)
   1789 #define TBM_GETRANGEMAX (WM_USER+2)
   1790 #define TBM_GETTIC (WM_USER+3)
   1791 #define TBM_SETTIC (WM_USER+4)
   1792 #define TBM_SETPOS (WM_USER+5)
   1793 #define TBM_SETRANGE (WM_USER+6)
   1794 #define TBM_SETRANGEMIN (WM_USER+7)
   1795 #define TBM_SETRANGEMAX (WM_USER+8)
   1796 #define TBM_CLEARTICS (WM_USER+9)
   1797 #define TBM_SETSEL (WM_USER+10)
   1798 #define TBM_SETSELSTART (WM_USER+11)
   1799 #define TBM_SETSELEND (WM_USER+12)
   1800 #define TBM_GETPTICS (WM_USER+14)
   1801 #define TBM_GETTICPOS (WM_USER+15)
   1802 #define TBM_GETNUMTICS (WM_USER+16)
   1803 #define TBM_GETSELSTART (WM_USER+17)
   1804 #define TBM_GETSELEND (WM_USER+18)
   1805 #define TBM_CLEARSEL (WM_USER+19)
   1806 #define TBM_SETTICFREQ (WM_USER+20)
   1807 #define TBM_SETPAGESIZE (WM_USER+21)
   1808 #define TBM_GETPAGESIZE (WM_USER+22)
   1809 #define TBM_SETLINESIZE (WM_USER+23)
   1810 #define TBM_GETLINESIZE (WM_USER+24)
   1811 #define TBM_GETTHUMBRECT (WM_USER+25)
   1812 #define TBM_GETCHANNELRECT (WM_USER+26)
   1813 #define TBM_SETTHUMBLENGTH (WM_USER+27)
   1814 #define TBM_GETTHUMBLENGTH (WM_USER+28)
   1815 #define TBM_SETTOOLTIPS (WM_USER+29)
   1816 #define TBM_GETTOOLTIPS (WM_USER+30)
   1817 #define TBM_SETTIPSIDE (WM_USER+31)
   1818 
   1819 #define TBTS_TOP 0
   1820 #define TBTS_LEFT 1
   1821 #define TBTS_BOTTOM 2
   1822 #define TBTS_RIGHT 3
   1823 
   1824 #define TBM_SETBUDDY (WM_USER+32)
   1825 #define TBM_GETBUDDY (WM_USER+33)
   1826 #define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
   1827 #define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
   1828 
   1829 #define TB_LINEUP 0
   1830 #define TB_LINEDOWN 1
   1831 #define TB_PAGEUP 2
   1832 #define TB_PAGEDOWN 3
   1833 #define TB_THUMBPOSITION 4
   1834 #define TB_THUMBTRACK 5
   1835 #define TB_TOP 6
   1836 #define TB_BOTTOM 7
   1837 #define TB_ENDTRACK 8
   1838 
   1839 #define TBCD_TICS 0x1
   1840 #define TBCD_THUMB 0x2
   1841 #define TBCD_CHANNEL 0x3
   1842 #endif
   1843 
   1844 #ifndef NODRAGLIST
   1845 
   1846   typedef struct tagDRAGLISTINFO {
   1847     UINT uNotification;
   1848     HWND hWnd;
   1849     POINT ptCursor;
   1850   } DRAGLISTINFO,*LPDRAGLISTINFO;
   1851 
   1852 #define DL_BEGINDRAG (WM_USER+133)
   1853 #define DL_DRAGGING (WM_USER+134)
   1854 #define DL_DROPPED (WM_USER+135)
   1855 #define DL_CANCELDRAG (WM_USER+136)
   1856 
   1857 #define DL_CURSORSET 0
   1858 #define DL_STOPCURSOR 1
   1859 #define DL_COPYCURSOR 2
   1860 #define DL_MOVECURSOR 3
   1861 
   1862 #define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
   1863 
   1864   WINCOMMCTRLAPI WINBOOL WINAPI MakeDragList(HWND hLB);
   1865   WINCOMMCTRLAPI void WINAPI DrawInsert(HWND handParent,HWND hLB,int nItem);
   1866 
   1867   WINCOMMCTRLAPI int WINAPI LBItemFromPt(HWND hLB,POINT pt,WINBOOL bAutoScroll);
   1868 #endif
   1869 
   1870 #ifndef NOUPDOWN
   1871 
   1872 #define UPDOWN_CLASSA "msctls_updown32"
   1873 #define UPDOWN_CLASSW L"msctls_updown32"
   1874 
   1875 #define UPDOWN_CLASS __MINGW_NAME_AW(UPDOWN_CLASS)
   1876 
   1877   typedef struct _UDACCEL {
   1878     UINT nSec;
   1879     UINT nInc;
   1880   } UDACCEL,*LPUDACCEL;
   1881 
   1882 #define UD_MAXVAL 0x7fff
   1883 #define UD_MINVAL (-UD_MAXVAL)
   1884 
   1885 #define UDS_WRAP 0x1
   1886 #define UDS_SETBUDDYINT 0x2
   1887 #define UDS_ALIGNRIGHT 0x4
   1888 #define UDS_ALIGNLEFT 0x8
   1889 #define UDS_AUTOBUDDY 0x10
   1890 #define UDS_ARROWKEYS 0x20
   1891 #define UDS_HORZ 0x40
   1892 #define UDS_NOTHOUSANDS 0x80
   1893 #define UDS_HOTTRACK 0x100
   1894 
   1895 #define UDM_SETRANGE (WM_USER+101)
   1896 #define UDM_GETRANGE (WM_USER+102)
   1897 #define UDM_SETPOS (WM_USER+103)
   1898 #define UDM_GETPOS (WM_USER+104)
   1899 #define UDM_SETBUDDY (WM_USER+105)
   1900 #define UDM_GETBUDDY (WM_USER+106)
   1901 #define UDM_SETACCEL (WM_USER+107)
   1902 #define UDM_GETACCEL (WM_USER+108)
   1903 #define UDM_SETBASE (WM_USER+109)
   1904 #define UDM_GETBASE (WM_USER+110)
   1905 #define UDM_SETRANGE32 (WM_USER+111)
   1906 #define UDM_GETRANGE32 (WM_USER+112)
   1907 #define UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
   1908 #define UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
   1909 #define UDM_SETPOS32 (WM_USER+113)
   1910 #define UDM_GETPOS32 (WM_USER+114)
   1911 
   1912   WINCOMMCTRLAPI HWND WINAPI CreateUpDownControl(DWORD dwStyle,int x,int y,int cx,int cy,HWND hParent,int nID,HINSTANCE hInst,HWND hBuddy,int nUpper,int nLower,int nPos);
   1913 
   1914 #define NM_UPDOWN NMUPDOWN
   1915 #define LPNM_UPDOWN LPNMUPDOWN
   1916 
   1917   typedef struct _NM_UPDOWN {
   1918     NMHDR hdr;
   1919     int iPos;
   1920     int iDelta;
   1921   } NMUPDOWN,*LPNMUPDOWN;
   1922 
   1923 #define UDN_DELTAPOS (UDN_FIRST - 1)
   1924 #endif
   1925 
   1926 #ifndef NOPROGRESS
   1927 
   1928 #define PROGRESS_CLASSA "msctls_progress32"
   1929 #define PROGRESS_CLASSW L"msctls_progress32"
   1930 
   1931 #define PROGRESS_CLASS __MINGW_NAME_AW(PROGRESS_CLASS)
   1932 
   1933 #define PBS_SMOOTH 0x1
   1934 #define PBS_VERTICAL 0x4
   1935 
   1936 #define PBM_SETRANGE (WM_USER+1)
   1937 #define PBM_SETPOS (WM_USER+2)
   1938 #define PBM_DELTAPOS (WM_USER+3)
   1939 #define PBM_SETSTEP (WM_USER+4)
   1940 #define PBM_STEPIT (WM_USER+5)
   1941 #define PBM_SETRANGE32 (WM_USER+6)
   1942   typedef struct {
   1943     int iLow;
   1944     int iHigh;
   1945   } PBRANGE,*PPBRANGE;
   1946 #define PBM_GETRANGE (WM_USER+7)
   1947 #define PBM_GETPOS (WM_USER+8)
   1948 #define PBM_SETBARCOLOR (WM_USER+9)
   1949 #define PBM_SETBKCOLOR CCM_SETBKCOLOR
   1950 
   1951 #define PBS_MARQUEE 0x8
   1952 #define PBM_SETMARQUEE (WM_USER+10)
   1953 
   1954 #if (_WIN32_WINNT >= 0x0600)
   1955 #define PBM_GETSTEP (WM_USER+13)
   1956 #define PBM_GETBKCOLOR (WM_USER+14)
   1957 #define PBM_GETBARCOLOR (WM_USER+15)
   1958 #define PBM_SETSTATE (WM_USER+16)
   1959 #define PBM_GETSTATE (WM_USER+17)
   1960 #define PBS_SMOOTHREVERSE 0x10
   1961 #define PBST_NORMAL 1
   1962 #define PBST_ERROR 2
   1963 #define PBST_PAUSED 3
   1964 #endif /* (_WIN32_WINNT >= 0x0600) */
   1965 
   1966 #endif /* !NOPROGRESS */
   1967 
   1968 
   1969 #ifndef NOHOTKEY
   1970 
   1971 #define HOTKEYF_SHIFT 0x1
   1972 #define HOTKEYF_CONTROL 0x2
   1973 #define HOTKEYF_ALT 0x4
   1974 #define HOTKEYF_EXT 0x8
   1975 #define HKCOMB_NONE 0x1
   1976 #define HKCOMB_S 0x2
   1977 #define HKCOMB_C 0x4
   1978 #define HKCOMB_A 0x8
   1979 #define HKCOMB_SC 0x10
   1980 #define HKCOMB_SA 0x20
   1981 #define HKCOMB_CA 0x40
   1982 #define HKCOMB_SCA 0x80
   1983 
   1984 #define HKM_SETHOTKEY (WM_USER+1)
   1985 #define HKM_GETHOTKEY (WM_USER+2)
   1986 #define HKM_SETRULES (WM_USER+3)
   1987 
   1988 #define HOTKEY_CLASSA "msctls_hotkey32"
   1989 #define HOTKEY_CLASSW L"msctls_hotkey32"
   1990 
   1991 #define HOTKEY_CLASS __MINGW_NAME_AW(HOTKEY_CLASS)
   1992 #endif
   1993 
   1994 #define CCS_TOP __MSABI_LONG(0x1)
   1995 #define CCS_NOMOVEY __MSABI_LONG(0x2)
   1996 #define CCS_BOTTOM __MSABI_LONG(0x3)
   1997 #define CCS_NORESIZE __MSABI_LONG(0x4)
   1998 #define CCS_NOPARENTALIGN __MSABI_LONG(0x8)
   1999 #define CCS_ADJUSTABLE __MSABI_LONG(0x20)
   2000 #define CCS_NODIVIDER __MSABI_LONG(0x40)
   2001 #define CCS_VERT __MSABI_LONG(0x80)
   2002 #define CCS_LEFT (CCS_VERT | CCS_TOP)
   2003 #define CCS_RIGHT (CCS_VERT | CCS_BOTTOM)
   2004 #define CCS_NOMOVEX (CCS_VERT | CCS_NOMOVEY)
   2005 
   2006 #ifndef NOLISTVIEW
   2007 
   2008 #define WC_LISTVIEWA "SysListView32"
   2009 #define WC_LISTVIEWW L"SysListView32"
   2010 
   2011 #define WC_LISTVIEW __MINGW_NAME_AW(WC_LISTVIEW)
   2012 
   2013 #define LVS_ICON 0x0
   2014 #define LVS_REPORT 0x1
   2015 #define LVS_SMALLICON 0x2
   2016 #define LVS_LIST 0x3
   2017 #define LVS_TYPEMASK 0x3
   2018 #define LVS_SINGLESEL 0x4
   2019 #define LVS_SHOWSELALWAYS 0x8
   2020 #define LVS_SORTASCENDING 0x10
   2021 #define LVS_SORTDESCENDING 0x20
   2022 #define LVS_SHAREIMAGELISTS 0x40
   2023 #define LVS_NOLABELWRAP 0x80
   2024 #define LVS_AUTOARRANGE 0x100
   2025 #define LVS_EDITLABELS 0x200
   2026 #define LVS_OWNERDATA 0x1000
   2027 #define LVS_NOSCROLL 0x2000
   2028 
   2029 #define LVS_TYPESTYLEMASK 0xfc00
   2030 
   2031 #define LVS_ALIGNTOP 0x0
   2032 #define LVS_ALIGNLEFT 0x800
   2033 #define LVS_ALIGNMASK 0xc00
   2034 
   2035 #define LVS_OWNERDRAWFIXED 0x400
   2036 #define LVS_NOCOLUMNHEADER 0x4000
   2037 #define LVS_NOSORTHEADER 0x8000
   2038 
   2039 #define LVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
   2040 #define ListView_SetUnicodeFormat(hwnd,fUnicode) (WINBOOL)SNDMSG((hwnd),LVM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
   2041 #define LVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
   2042 #define ListView_GetUnicodeFormat(hwnd) (WINBOOL)SNDMSG((hwnd),LVM_GETUNICODEFORMAT,0,0)
   2043 #define LVM_GETBKCOLOR (LVM_FIRST+0)
   2044 #define ListView_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETBKCOLOR,(WPARAM)0,(LPARAM)0)
   2045 #define LVM_SETBKCOLOR (LVM_FIRST+1)
   2046 #define ListView_SetBkColor(hwnd,clrBk) (WINBOOL)SNDMSG((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
   2047 #define LVM_GETIMAGELIST (LVM_FIRST+2)
   2048 #define ListView_GetImageList(hwnd,iImageList) (HIMAGELIST)SNDMSG((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),(LPARAM)0)
   2049 
   2050 #define LVSIL_NORMAL 0
   2051 #define LVSIL_SMALL 1
   2052 #define LVSIL_STATE 2
   2053 
   2054 #define LVM_SETIMAGELIST (LVM_FIRST+3)
   2055 #define ListView_SetImageList(hwnd,himl,iImageList) (HIMAGELIST)SNDMSG((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(HIMAGELIST)(himl))
   2056 
   2057 #define LVM_GETITEMCOUNT (LVM_FIRST+4)
   2058 #define ListView_GetItemCount(hwnd) (int)SNDMSG((hwnd),LVM_GETITEMCOUNT,(WPARAM)0,(LPARAM)0)
   2059 
   2060 #define LVIF_TEXT 0x1
   2061 #define LVIF_IMAGE 0x2
   2062 #define LVIF_PARAM 0x4
   2063 #define LVIF_STATE 0x8
   2064 #define LVIF_INDENT 0x10
   2065 #define LVIF_NORECOMPUTE 0x800
   2066 #define LVIF_GROUPID 0x100
   2067 #define LVIF_COLUMNS 0x200
   2068 
   2069 #define LVIS_FOCUSED 0x1
   2070 #define LVIS_SELECTED 0x2
   2071 #define LVIS_CUT 0x4
   2072 #define LVIS_DROPHILITED 0x8
   2073 #define LVIS_GLOW 0x10
   2074 #define LVIS_ACTIVATING 0x20
   2075 
   2076 #define LVIS_OVERLAYMASK 0xf00
   2077 #define LVIS_STATEIMAGEMASK 0xF000
   2078 
   2079 #define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
   2080 
   2081 #define I_INDENTCALLBACK (-1)
   2082 #define LV_ITEMA LVITEMA
   2083 #define LV_ITEMW LVITEMW
   2084 
   2085 #define I_GROUPIDCALLBACK (-1)
   2086 #define I_GROUPIDNONE (-2)
   2087 
   2088 #define LV_ITEM LVITEM
   2089 
   2090 #define LVITEMA_V1_SIZE CCSIZEOF_STRUCT(LVITEMA,lParam)
   2091 #define LVITEMW_V1_SIZE CCSIZEOF_STRUCT(LVITEMW,lParam)
   2092 
   2093   typedef struct tagLVITEMA {
   2094     UINT mask;
   2095     int iItem;
   2096     int iSubItem;
   2097     UINT state;
   2098     UINT stateMask;
   2099     LPSTR pszText;
   2100     int cchTextMax;
   2101     int iImage;
   2102     LPARAM lParam;
   2103     int iIndent;
   2104     int iGroupId;
   2105     UINT cColumns;
   2106     PUINT puColumns;
   2107   } LVITEMA,*LPLVITEMA;
   2108 
   2109   typedef struct tagLVITEMW
   2110   {
   2111     UINT mask;
   2112     int iItem;
   2113     int iSubItem;
   2114     UINT state;
   2115     UINT stateMask;
   2116     LPWSTR pszText;
   2117     int cchTextMax;
   2118     int iImage;
   2119     LPARAM lParam;
   2120     int iIndent;
   2121     int iGroupId;
   2122     UINT cColumns;
   2123     PUINT puColumns;
   2124   } LVITEMW,*LPLVITEMW;
   2125 
   2126 #define LVITEM __MINGW_NAME_AW(LVITEM)
   2127 #define LPLVITEM __MINGW_NAME_AW(LPLVITEM)
   2128 
   2129 #define LVITEM_V1_SIZE __MINGW_NAME_AW_EXT(LVITEM,_V1_SIZE)
   2130 
   2131 #define LPSTR_TEXTCALLBACKW ((LPWSTR)(INT_PTR)-1)
   2132 #define LPSTR_TEXTCALLBACKA ((LPSTR)(INT_PTR)-1)
   2133 
   2134 #define LPSTR_TEXTCALLBACK __MINGW_NAME_AW(LPSTR_TEXTCALLBACK)
   2135 
   2136 #define I_IMAGECALLBACK (-1)
   2137 #define I_IMAGENONE (-2)
   2138 #define I_COLUMNSCALLBACK ((UINT)-1)
   2139 
   2140 #define LVM_GETITEMA (LVM_FIRST+5)
   2141 #define LVM_GETITEMW (LVM_FIRST+75)
   2142 
   2143 #define LVM_GETITEM __MINGW_NAME_AW(LVM_GETITEM)
   2144 
   2145 #define ListView_GetItem(hwnd,pitem) (WINBOOL)SNDMSG((hwnd),LVM_GETITEM,0,(LPARAM)(LV_ITEM *)(pitem))
   2146 
   2147 #define LVM_SETITEMA (LVM_FIRST+6)
   2148 #define LVM_SETITEMW (LVM_FIRST+76)
   2149 
   2150 #define LVM_SETITEM __MINGW_NAME_AW(LVM_SETITEM)
   2151 
   2152 #define ListView_SetItem(hwnd,pitem) (WINBOOL)SNDMSG((hwnd),LVM_SETITEM,0,(LPARAM)(const LV_ITEM *)(pitem))
   2153 
   2154 #define LVM_INSERTITEMA (LVM_FIRST+7)
   2155 #define LVM_INSERTITEMW (LVM_FIRST+77)
   2156 
   2157 #define LVM_INSERTITEM __MINGW_NAME_AW(LVM_INSERTITEM)
   2158 
   2159 #define ListView_InsertItem(hwnd,pitem) (int)SNDMSG((hwnd),LVM_INSERTITEM,0,(LPARAM)(const LV_ITEM *)(pitem))
   2160 
   2161 #define LVM_DELETEITEM (LVM_FIRST+8)
   2162 #define ListView_DeleteItem(hwnd,i) (WINBOOL)SNDMSG((hwnd),LVM_DELETEITEM,(WPARAM)(int)(i),(LPARAM)0)
   2163 
   2164 #define LVM_DELETEALLITEMS (LVM_FIRST+9)
   2165 #define ListView_DeleteAllItems(hwnd) (WINBOOL)SNDMSG((hwnd),LVM_DELETEALLITEMS,(WPARAM)0,(LPARAM)0)
   2166 
   2167 #define LVM_GETCALLBACKMASK (LVM_FIRST+10)
   2168 #define ListView_GetCallbackMask(hwnd) (WINBOOL)SNDMSG((hwnd),LVM_GETCALLBACKMASK,0,0)
   2169 
   2170 #define LVM_SETCALLBACKMASK (LVM_FIRST+11)
   2171 #define ListView_SetCallbackMask(hwnd,mask) (WINBOOL)SNDMSG((hwnd),LVM_SETCALLBACKMASK,(WPARAM)(UINT)(mask),0)
   2172 
   2173 #define LVNI_ALL 0x0
   2174 #define LVNI_FOCUSED 0x1
   2175 #define LVNI_SELECTED 0x2
   2176 #define LVNI_CUT 0x4
   2177 #define LVNI_DROPHILITED 0x8
   2178 
   2179 #define LVNI_ABOVE 0x100
   2180 #define LVNI_BELOW 0x200
   2181 #define LVNI_TOLEFT 0x400
   2182 #define LVNI_TORIGHT 0x800
   2183 
   2184 #define LVM_GETNEXTITEM (LVM_FIRST+12)
   2185 #define ListView_GetNextItem(hwnd,i,flags) (int)SNDMSG((hwnd),LVM_GETNEXTITEM,(WPARAM)(int)(i),MAKELPARAM((flags),0))
   2186 
   2187 #define LVFI_PARAM 0x1
   2188 #define LVFI_STRING 0x2
   2189 #define LVFI_PARTIAL 0x8
   2190 #define LVFI_WRAP 0x20
   2191 #define LVFI_NEARESTXY 0x40
   2192 
   2193 #define LV_FINDINFOA LVFINDINFOA
   2194 #define LV_FINDINFOW LVFINDINFOW
   2195 #define LV_FINDINFO LVFINDINFO
   2196 
   2197   typedef struct tagLVFINDINFOA {
   2198     UINT flags;
   2199     LPCSTR psz;
   2200     LPARAM lParam;
   2201     POINT pt;
   2202     UINT vkDirection;
   2203   } LVFINDINFOA,*LPFINDINFOA;
   2204 
   2205   typedef struct tagLVFINDINFOW {
   2206     UINT flags;
   2207     LPCWSTR psz;
   2208     LPARAM lParam;
   2209     POINT pt;
   2210     UINT vkDirection;
   2211   } LVFINDINFOW,*LPFINDINFOW;
   2212 
   2213 #define LVFINDINFO __MINGW_NAME_AW(LVFINDINFO)
   2214 
   2215 #define LVM_FINDITEMA (LVM_FIRST+13)
   2216 #define LVM_FINDITEMW (LVM_FIRST+83)
   2217 
   2218 #define LVM_FINDITEM __MINGW_NAME_AW(LVM_FINDITEM)
   2219 
   2220 #define ListView_FindItem(hwnd,iStart,plvfi) (int)SNDMSG((hwnd),LVM_FINDITEM,(WPARAM)(int)(iStart),(LPARAM)(const LV_FINDINFO *)(plvfi))
   2221 
   2222 #define LVIR_BOUNDS 0
   2223 #define LVIR_ICON 1
   2224 #define LVIR_LABEL 2
   2225 #define LVIR_SELECTBOUNDS 3
   2226 
   2227 #define LVM_GETITEMRECT (LVM_FIRST+14)
   2228 #define ListView_GetItemRect(hwnd,i,prc,code) (WINBOOL)SNDMSG((hwnd),LVM_GETITEMRECT,(WPARAM)(int)(i),((prc) ? (((RECT *)(prc))->left = (code),(LPARAM)(RECT *)(prc)) : (LPARAM)(RECT *)NULL))
   2229 
   2230 #define LVM_SETITEMPOSITION (LVM_FIRST+15)
   2231 #define ListView_SetItemPosition(hwndLV,i,x,y) (WINBOOL)SNDMSG((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(int)(i),MAKELPARAM((x),(y)))
   2232 
   2233 #define LVM_GETITEMPOSITION (LVM_FIRST+16)
   2234 #define ListView_GetItemPosition(hwndLV,i,ppt) (WINBOOL)SNDMSG((hwndLV),LVM_GETITEMPOSITION,(WPARAM)(int)(i),(LPARAM)(POINT *)(ppt))
   2235 
   2236 #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
   2237 #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
   2238 
   2239 #define LVM_GETSTRINGWIDTH __MINGW_NAME_AW(LVM_GETSTRINGWIDTH)
   2240 
   2241 #define ListView_GetStringWidth(hwndLV,psz) (int)SNDMSG((hwndLV),LVM_GETSTRINGWIDTH,0,(LPARAM)(LPCTSTR)(psz))
   2242 
   2243 #define LVHT_NOWHERE 0x1
   2244 #define LVHT_ONITEMICON 0x2
   2245 #define LVHT_ONITEMLABEL 0x4
   2246 #define LVHT_ONITEMSTATEICON 0x8
   2247 #define LVHT_ONITEM (LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON)
   2248 
   2249 #define LVHT_ABOVE 0x8
   2250 #define LVHT_BELOW 0x10
   2251 #define LVHT_TORIGHT 0x20
   2252 #define LVHT_TOLEFT 0x40
   2253 
   2254 #define LV_HITTESTINFO LVHITTESTINFO
   2255 
   2256 #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
   2257 
   2258   typedef struct tagLVHITTESTINFO {
   2259     POINT pt;
   2260     UINT flags;
   2261     int iItem;
   2262     int iSubItem;
   2263   } LVHITTESTINFO,*LPLVHITTESTINFO;
   2264 
   2265 #define LVM_HITTEST (LVM_FIRST+18)
   2266 #define ListView_HitTest(hwndLV,pinfo) (int)SNDMSG((hwndLV),LVM_HITTEST,0,(LPARAM)(LV_HITTESTINFO *)(pinfo))
   2267 
   2268 #define LVM_ENSUREVISIBLE (LVM_FIRST+19)
   2269 #define ListView_EnsureVisible(hwndLV,i,fPartialOK) (WINBOOL)SNDMSG((hwndLV),LVM_ENSUREVISIBLE,(WPARAM)(int)(i),MAKELPARAM((fPartialOK),0))
   2270 
   2271 #define LVM_SCROLL (LVM_FIRST+20)
   2272 #define ListView_Scroll(hwndLV,dx,dy) (WINBOOL)SNDMSG((hwndLV),LVM_SCROLL,(WPARAM)(int)(dx),(LPARAM)(int)(dy))
   2273 
   2274 #define LVM_REDRAWITEMS (LVM_FIRST+21)
   2275 #define ListView_RedrawItems(hwndLV,iFirst,iLast) (WINBOOL)SNDMSG((hwndLV),LVM_REDRAWITEMS,(WPARAM)(int)(iFirst),(LPARAM)(int)(iLast))
   2276 
   2277 #define LVA_DEFAULT 0x0
   2278 #define LVA_ALIGNLEFT 0x1
   2279 #define LVA_ALIGNTOP 0x2
   2280 #define LVA_SNAPTOGRID 0x5
   2281 
   2282 #define LVM_ARRANGE (LVM_FIRST+22)
   2283 #define ListView_Arrange(hwndLV,code) (WINBOOL)SNDMSG((hwndLV),LVM_ARRANGE,(WPARAM)(UINT)(code),(LPARAM)0)
   2284 
   2285 #define LVM_EDITLABELA (LVM_FIRST+23)
   2286 #define LVM_EDITLABELW (LVM_FIRST+118)
   2287 
   2288 #define LVM_EDITLABEL __MINGW_NAME_AW(LVM_EDITLABEL)
   2289 
   2290 #define ListView_EditLabel(hwndLV,i) (HWND)SNDMSG((hwndLV),LVM_EDITLABEL,(WPARAM)(int)(i),(LPARAM)0)
   2291 
   2292 #define LVM_GETEDITCONTROL (LVM_FIRST+24)
   2293 #define ListView_GetEditControl(hwndLV) (HWND)SNDMSG((hwndLV),LVM_GETEDITCONTROL,(WPARAM)0,(LPARAM)0)
   2294 
   2295 #define LV_COLUMNA LVCOLUMNA
   2296 #define LV_COLUMNW LVCOLUMNW
   2297 #define LV_COLUMN LVCOLUMN
   2298 
   2299 #define LVCOLUMNA_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNA,iSubItem)
   2300 #define LVCOLUMNW_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNW,iSubItem)
   2301 
   2302   typedef struct tagLVCOLUMNA {
   2303     UINT mask;
   2304     int fmt;
   2305     int cx;
   2306     LPSTR pszText;
   2307     int cchTextMax;
   2308     int iSubItem;
   2309     int iImage;
   2310     int iOrder;
   2311   } LVCOLUMNA,*LPLVCOLUMNA;
   2312 
   2313   typedef struct tagLVCOLUMNW {
   2314     UINT mask;
   2315     int fmt;
   2316     int cx;
   2317     LPWSTR pszText;
   2318     int cchTextMax;
   2319     int iSubItem;
   2320     int iImage;
   2321     int iOrder;
   2322 # if (_WIN32_WINNT >= 0x0600)
   2323     int cxMin;
   2324     int cxDefault;
   2325     int cxIdeal;
   2326 # endif
   2327   } LVCOLUMNW,*LPLVCOLUMNW;
   2328 
   2329 #define LVCOLUMN __MINGW_NAME_AW(LVCOLUMN)
   2330 #define LPLVCOLUMN __MINGW_NAME_AW(LPLVCOLUMN)
   2331 
   2332 #define LVCOLUMN_V1_SIZE __MINGW_NAME_AW_EXT(LVCOLUMN,_V1_SIZE)
   2333 
   2334 #define LVCF_FMT 0x1
   2335 #define LVCF_WIDTH 0x2
   2336 #define LVCF_TEXT 0x4
   2337 #define LVCF_SUBITEM 0x8
   2338 #define LVCF_IMAGE 0x10
   2339 #define LVCF_ORDER 0x20
   2340 #if (_WIN32_WINNT >= 0x0600)
   2341 #define LVCF_MINWIDTH 0x40
   2342 #define LVCF_DEFAULTWIDTH 0x80
   2343 #define LVCF_IDEALWIDTH 0x100
   2344 #endif /* (_WIN32_WINNT >= 0x0600) */
   2345 
   2346 #define LVCFMT_LEFT 0x0
   2347 #define LVCFMT_RIGHT 0x1
   2348 #define LVCFMT_CENTER 0x2
   2349 #define LVCFMT_JUSTIFYMASK 0x3
   2350 #define LVCFMT_IMAGE 0x800
   2351 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
   2352 #define LVCFMT_COL_HAS_IMAGES 0x8000
   2353 #if (_WIN32_WINNT >= 0x0600)
   2354 #define LVCFMT_FIXED_WIDTH 0x100
   2355 #define LVCFMT_NO_DPI_SCALE 0x40000
   2356 #define LVCFMT_FIXED_RATIO 0x80000
   2357 #define LVCFMT_LINE_BREAK 0x100000
   2358 #define LVCFMT_FILL 0x200000
   2359 #define LVCFMT_WRAP 0x400000
   2360 #define LVCFMT_NO_TITLE 0x800000
   2361 #define LVCFMT_SPLITBUTTON 0x1000000
   2362 #define LVCFMT_TILE_PLACEMENTMASK (LVCFMT_LINE_BREAK|LVCFMT_FILL)
   2363 #endif /* (_WIN32_WINNT >= 0x0600) */
   2364 
   2365 #define LVM_GETCOLUMNA (LVM_FIRST+25)
   2366 #define LVM_GETCOLUMNW (LVM_FIRST+95)
   2367 
   2368 #define LVM_GETCOLUMN __MINGW_NAME_AW(LVM_GETCOLUMN)
   2369 
   2370 #define ListView_GetColumn(hwnd,iCol,pcol) (WINBOOL)SNDMSG((hwnd),LVM_GETCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(LV_COLUMN *)(pcol))
   2371 
   2372 #define LVM_SETCOLUMNA (LVM_FIRST+26)
   2373 #define LVM_SETCOLUMNW (LVM_FIRST+96)
   2374 
   2375 #define LVM_SETCOLUMN __MINGW_NAME_AW(LVM_SETCOLUMN)
   2376 
   2377 #define ListView_SetColumn(hwnd,iCol,pcol) (WINBOOL)SNDMSG((hwnd),LVM_SETCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(const LV_COLUMN *)(pcol))
   2378 
   2379 #define LVM_INSERTCOLUMNA (LVM_FIRST+27)
   2380 #define LVM_INSERTCOLUMNW (LVM_FIRST+97)
   2381 
   2382 #define LVM_INSERTCOLUMN __MINGW_NAME_AW(LVM_INSERTCOLUMN)
   2383 
   2384 #define ListView_InsertColumn(hwnd,iCol,pcol) (int)SNDMSG((hwnd),LVM_INSERTCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(const LV_COLUMN *)(pcol))
   2385 
   2386 #define LVM_DELETECOLUMN (LVM_FIRST+28)
   2387 #define ListView_DeleteColumn(hwnd,iCol) (WINBOOL)SNDMSG((hwnd),LVM_DELETECOLUMN,(WPARAM)(int)(iCol),0)
   2388 
   2389 #define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
   2390 #define ListView_GetColumnWidth(hwnd,iCol) (int)SNDMSG((hwnd),LVM_GETCOLUMNWIDTH,(WPARAM)(int)(iCol),0)
   2391 
   2392 #define LVSCW_AUTOSIZE -1
   2393 #define LVSCW_AUTOSIZE_USEHEADER -2
   2394 #define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
   2395 
   2396 #define ListView_SetColumnWidth(hwnd,iCol,cx) (WINBOOL)SNDMSG((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(int)(iCol),MAKELPARAM((cx),0))
   2397 
   2398 #define LVM_GETHEADER (LVM_FIRST+31)
   2399 #define ListView_GetHeader(hwnd) (HWND)SNDMSG((hwnd),LVM_GETHEADER,(WPARAM)0,(LPARAM)0)
   2400 #define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
   2401 #define ListView_CreateDragImage(hwnd,i,lpptUpLeft) (HIMAGELIST)SNDMSG((hwnd),LVM_CREATEDRAGIMAGE,(WPARAM)(int)(i),(LPARAM)(LPPOINT)(lpptUpLeft))
   2402 #define LVM_GETVIEWRECT (LVM_FIRST+34)
   2403 #define ListView_GetViewRect(hwnd,prc) (WINBOOL)SNDMSG((hwnd),LVM_GETVIEWRECT,0,(LPARAM)(RECT *)(prc))
   2404 #define LVM_GETTEXTCOLOR (LVM_FIRST+35)
   2405 #define ListView_GetTextColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETTEXTCOLOR,(WPARAM)0,(LPARAM)0)
   2406 #define LVM_SETTEXTCOLOR (LVM_FIRST+36)
   2407 #define ListView_SetTextColor(hwnd,clrText) (WINBOOL)SNDMSG((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrText))
   2408 #define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
   2409 #define ListView_GetTextBkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETTEXTBKCOLOR,(WPARAM)0,(LPARAM)0)
   2410 #define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
   2411 #define ListView_SetTextBkColor(hwnd,clrTextBk) (WINBOOL)SNDMSG((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrTextBk))
   2412 #define LVM_GETTOPINDEX (LVM_FIRST+39)
   2413 #define ListView_GetTopIndex(hwndLV) (int)SNDMSG((hwndLV),LVM_GETTOPINDEX,0,0)
   2414 #define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
   2415 #define ListView_GetCountPerPage(hwndLV) (int)SNDMSG((hwndLV),LVM_GETCOUNTPERPAGE,0,0)
   2416 #define LVM_GETORIGIN (LVM_FIRST+41)
   2417 #define ListView_GetOrigin(hwndLV,ppt) (WINBOOL)SNDMSG((hwndLV),LVM_GETORIGIN,(WPARAM)0,(LPARAM)(POINT *)(ppt))
   2418 #define LVM_UPDATE (LVM_FIRST+42)
   2419 #define ListView_Update(hwndLV,i) (WINBOOL)SNDMSG((hwndLV),LVM_UPDATE,(WPARAM)(i),(LPARAM)0)
   2420 #define LVM_SETITEMSTATE (LVM_FIRST+43)
   2421 #define ListView_SetItemState(hwndLV,i,data,mask) { LV_ITEM _ms_lvi; _ms_lvi.stateMask = mask; _ms_lvi.state = data; SNDMSG((hwndLV),LVM_SETITEMSTATE,(WPARAM)(i),(LPARAM)(LV_ITEM *)&_ms_lvi);}
   2422 #define ListView_SetCheckState(hwndLV,i,fCheck) ListView_SetItemState(hwndLV,i,INDEXTOSTATEIMAGEMASK((fCheck)?2:1),LVIS_STATEIMAGEMASK)
   2423 #define LVM_GETITEMSTATE (LVM_FIRST+44)
   2424 #define ListView_GetItemState(hwndLV,i,mask) (UINT)SNDMSG((hwndLV),LVM_GETITEMSTATE,(WPARAM)(i),(LPARAM)(mask))
   2425 #define ListView_GetCheckState(hwndLV,i) ((((UINT)(SNDMSG((hwndLV),LVM_GETITEMSTATE,(WPARAM)(i),LVIS_STATEIMAGEMASK))) >> 12) -1)
   2426 
   2427 #define LVM_GETITEMTEXTA (LVM_FIRST+45)
   2428 #define LVM_GETITEMTEXTW (LVM_FIRST+115)
   2429 
   2430 #define LVM_GETITEMTEXT __MINGW_NAME_AW(LVM_GETITEMTEXT)
   2431 
   2432 #define ListView_GetItemText(hwndLV,i,iSubItem_,pszText_,cchTextMax_) { LV_ITEM _ms_lvi; _ms_lvi.iSubItem = iSubItem_; _ms_lvi.cchTextMax = cchTextMax_; _ms_lvi.pszText = pszText_; SNDMSG((hwndLV),LVM_GETITEMTEXT,(WPARAM)(i),(LPARAM)(LV_ITEM *)&_ms_lvi);}
   2433 
   2434 #define LVM_SETITEMTEXTA (LVM_FIRST+46)
   2435 #define LVM_SETITEMTEXTW (LVM_FIRST+116)
   2436 
   2437 #define LVM_SETITEMTEXT __MINGW_NAME_AW(LVM_SETITEMTEXT)
   2438 
   2439 #define ListView_SetItemText(hwndLV,i,iSubItem_,pszText_) { LV_ITEM _ms_lvi; _ms_lvi.iSubItem = iSubItem_; _ms_lvi.pszText = pszText_; SNDMSG((hwndLV),LVM_SETITEMTEXT,(WPARAM)(i),(LPARAM)(LV_ITEM *)&_ms_lvi);}
   2440 
   2441 #define LVSICF_NOINVALIDATEALL 0x1
   2442 #define LVSICF_NOSCROLL 0x2
   2443 
   2444 #define LVM_SETITEMCOUNT (LVM_FIRST+47)
   2445 #define ListView_SetItemCount(hwndLV,cItems) SNDMSG((hwndLV),LVM_SETITEMCOUNT,(WPARAM)(cItems),0)
   2446 #define ListView_SetItemCountEx(hwndLV,cItems,dwFlags) SNDMSG((hwndLV),LVM_SETITEMCOUNT,(WPARAM)(cItems),(LPARAM)(dwFlags))
   2447 
   2448   typedef int (CALLBACK *PFNLVCOMPARE)(LPARAM,LPARAM,LPARAM);
   2449 
   2450 #define LVM_SORTITEMS (LVM_FIRST+48)
   2451 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) (WINBOOL)SNDMSG((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)(_lPrm),(LPARAM)(PFNLVCOMPARE)(_pfnCompare))
   2452 
   2453 #define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
   2454 #define ListView_SetItemPosition32(hwndLV,i,x0,y0) { POINT ptNewPos; ptNewPos.x = x0; ptNewPos.y = y0; SNDMSG((hwndLV),LVM_SETITEMPOSITION32,(WPARAM)(int)(i),(LPARAM)&ptNewPos); }
   2455 
   2456 #define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
   2457 #define ListView_GetSelectedCount(hwndLV) (UINT)SNDMSG((hwndLV),LVM_GETSELECTEDCOUNT,(WPARAM)0,(LPARAM)0)
   2458 
   2459 #define LVM_GETITEMSPACING (LVM_FIRST+51)
   2460 #define ListView_GetItemSpacing(hwndLV,fSmall) (DWORD)SNDMSG((hwndLV),LVM_GETITEMSPACING,fSmall,(LPARAM)0)
   2461 
   2462 #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
   2463 #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
   2464 
   2465 #define LVM_GETISEARCHSTRING __MINGW_NAME_AW(LVM_GETISEARCHSTRING)
   2466 
   2467 #define ListView_GetISearchString(hwndLV,lpsz) (WINBOOL)SNDMSG((hwndLV),LVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz))
   2468 
   2469 #define LVM_SETICONSPACING (LVM_FIRST+53)
   2470 
   2471 #define ListView_SetIconSpacing(hwndLV,cx,cy) (DWORD)SNDMSG((hwndLV),LVM_SETICONSPACING,0,MAKELONG(cx,cy))
   2472 #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
   2473 #define ListView_SetExtendedListViewStyle(hwndLV,dw) (DWORD)SNDMSG((hwndLV),LVM_SETEXTENDEDLISTVIEWSTYLE,0,dw)
   2474 #define ListView_SetExtendedListViewStyleEx(hwndLV,dwMask,dw) (DWORD)SNDMSG((hwndLV),LVM_SETEXTENDEDLISTVIEWSTYLE,dwMask,dw)
   2475 #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
   2476 #define ListView_GetExtendedListViewStyle(hwndLV) (DWORD)SNDMSG((hwndLV),LVM_GETEXTENDEDLISTVIEWSTYLE,0,0)
   2477 #define LVS_EX_GRIDLINES 0x1
   2478 #define LVS_EX_SUBITEMIMAGES 0x2
   2479 #define LVS_EX_CHECKBOXES 0x4
   2480 #define LVS_EX_TRACKSELECT 0x8
   2481 #define LVS_EX_HEADERDRAGDROP 0x10
   2482 #define LVS_EX_FULLROWSELECT 0x20
   2483 #define LVS_EX_ONECLICKACTIVATE 0x40
   2484 #define LVS_EX_TWOCLICKACTIVATE 0x80
   2485 #define LVS_EX_FLATSB 0x100
   2486 #define LVS_EX_REGIONAL 0x200
   2487 #define LVS_EX_INFOTIP 0x400
   2488 #define LVS_EX_UNDERLINEHOT 0x800
   2489 #define LVS_EX_UNDERLINECOLD 0x1000
   2490 #define LVS_EX_MULTIWORKAREAS 0x2000
   2491 #define LVS_EX_LABELTIP 0x4000
   2492 #define LVS_EX_BORDERSELECT 0x8000
   2493 #define LVS_EX_DOUBLEBUFFER 0x10000
   2494 #define LVS_EX_HIDELABELS 0x20000
   2495 #define LVS_EX_SINGLEROW 0x40000
   2496 #define LVS_EX_SNAPTOGRID 0x80000
   2497 #define LVS_EX_SIMPLESELECT 0x100000
   2498 #if _WIN32_WINNT >= 0x0600
   2499 #define LVS_EX_JUSTIFYCOLUMNS 0x200000
   2500 #define LVS_EX_TRANSPARENTBKGND 0x400000
   2501 #define LVS_EX_TRANSPARENTSHADOWTEXT 0x800000
   2502 #define LVS_EX_AUTOAUTOARRANGE 0x1000000
   2503 #define LVS_EX_HEADERINALLVIEWS 0x2000000
   2504 #define LVS_EX_AUTOCHECKSELECT 0x8000000
   2505 #define LVS_EX_AUTOSIZECOLUMNS 0x10000000
   2506 #define LVS_EX_COLUMNSNAPPOINTS 0x40000000
   2507 #define LVS_EX_COLUMNOVERFLOW 0x80000000
   2508 #endif
   2509 
   2510 #define LVM_GETSUBITEMRECT (LVM_FIRST+56)
   2511 #define ListView_GetSubItemRect(hwnd,iItem,iSubItem,code,prc) (WINBOOL)SNDMSG((hwnd),LVM_GETSUBITEMRECT,(WPARAM)(int)(iItem),((prc) ? ((((LPRECT)(prc))->top = iSubItem),(((LPRECT)(prc))->left = code),(LPARAM)(prc)) : (LPARAM)(LPRECT)NULL))
   2512 #define LVM_SUBITEMHITTEST (LVM_FIRST+57)
   2513 #define ListView_SubItemHitTest(hwnd,plvhti) (int)SNDMSG((hwnd),LVM_SUBITEMHITTEST,0,(LPARAM)(LPLVHITTESTINFO)(plvhti))
   2514 #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
   2515 #define ListView_SetColumnOrderArray(hwnd,iCount,pi) (WINBOOL)SNDMSG((hwnd),LVM_SETCOLUMNORDERARRAY,(WPARAM)(iCount),(LPARAM)(LPINT)(pi))
   2516 #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
   2517 #define ListView_GetColumnOrderArray(hwnd,iCount,pi) (WINBOOL)SNDMSG((hwnd),LVM_GETCOLUMNORDERARRAY,(WPARAM)(iCount),(LPARAM)(LPINT)(pi))
   2518 #define LVM_SETHOTITEM (LVM_FIRST+60)
   2519 #define ListView_SetHotItem(hwnd,i) (int)SNDMSG((hwnd),LVM_SETHOTITEM,(WPARAM)(i),0)
   2520 #define LVM_GETHOTITEM (LVM_FIRST+61)
   2521 #define ListView_GetHotItem(hwnd) (int)SNDMSG((hwnd),LVM_GETHOTITEM,0,0)
   2522 #define LVM_SETHOTCURSOR (LVM_FIRST+62)
   2523 #define ListView_SetHotCursor(hwnd,hcur) (HCURSOR)SNDMSG((hwnd),LVM_SETHOTCURSOR,0,(LPARAM)(hcur))
   2524 #define LVM_GETHOTCURSOR (LVM_FIRST+63)
   2525 #define ListView_GetHotCursor(hwnd) (HCURSOR)SNDMSG((hwnd),LVM_GETHOTCURSOR,0,0)
   2526 #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
   2527 #define ListView_ApproximateViewRect(hwnd,iWidth,iHeight,iCount) (DWORD)SNDMSG((hwnd),LVM_APPROXIMATEVIEWRECT,iCount,MAKELPARAM(iWidth,iHeight))
   2528 
   2529 #define LV_MAX_WORKAREAS 16
   2530 #define LVM_SETWORKAREAS (LVM_FIRST+65)
   2531 #define ListView_SetWorkAreas(hwnd,nWorkAreas,prc) (WINBOOL)SNDMSG((hwnd),LVM_SETWORKAREAS,(WPARAM)(int)(nWorkAreas),(LPARAM)(RECT *)(prc))
   2532 #define LVM_GETWORKAREAS (LVM_FIRST+70)
   2533 #define ListView_GetWorkAreas(hwnd,nWorkAreas,prc) (WINBOOL)SNDMSG((hwnd),LVM_GETWORKAREAS,(WPARAM)(int)(nWorkAreas),(LPARAM)(RECT *)(prc))
   2534 #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
   2535 #define ListView_GetNumberOfWorkAreas(hwnd,pnWorkAreas) (WINBOOL)SNDMSG((hwnd),LVM_GETNUMBEROFWORKAREAS,0,(LPARAM)(UINT *)(pnWorkAreas))
   2536 #define LVM_GETSELECTIONMARK (LVM_FIRST+66)
   2537 #define ListView_GetSelectionMark(hwnd) (int)SNDMSG((hwnd),LVM_GETSELECTIONMARK,0,0)
   2538 #define LVM_SETSELECTIONMARK (LVM_FIRST+67)
   2539 #define ListView_SetSelectionMark(hwnd,i) (int)SNDMSG((hwnd),LVM_SETSELECTIONMARK,0,(LPARAM)(i))
   2540 #define LVM_SETHOVERTIME (LVM_FIRST+71)
   2541 #define ListView_SetHoverTime(hwndLV,dwHoverTimeMs) (DWORD)SNDMSG((hwndLV),LVM_SETHOVERTIME,0,(LPARAM)(dwHoverTimeMs))
   2542 #define LVM_GETHOVERTIME (LVM_FIRST+72)
   2543 #define ListView_GetHoverTime(hwndLV) (DWORD)SNDMSG((hwndLV),LVM_GETHOVERTIME,0,0)
   2544 #define LVM_SETTOOLTIPS (LVM_FIRST+74)
   2545 #define ListView_SetToolTips(hwndLV,hwndNewHwnd) (HWND)SNDMSG((hwndLV),LVM_SETTOOLTIPS,(WPARAM)(hwndNewHwnd),0)
   2546 #define LVM_GETTOOLTIPS (LVM_FIRST+78)
   2547 #define ListView_GetToolTips(hwndLV) (HWND)SNDMSG((hwndLV),LVM_GETTOOLTIPS,0,0)
   2548 #define LVM_SORTITEMSEX (LVM_FIRST+81)
   2549 #define ListView_SortItemsEx(hwndLV,_pfnCompare,_lPrm) (WINBOOL)SNDMSG((hwndLV),LVM_SORTITEMSEX,(WPARAM)(LPARAM)(_lPrm),(LPARAM)(PFNLVCOMPARE)(_pfnCompare))
   2550 
   2551   typedef struct tagLVBKIMAGEA {
   2552     ULONG ulFlags;
   2553     HBITMAP hbm;
   2554     LPSTR pszImage;
   2555     UINT cchImageMax;
   2556     int xOffsetPercent;
   2557     int yOffsetPercent;
   2558   } LVBKIMAGEA,*LPLVBKIMAGEA;
   2559 
   2560   typedef struct tagLVBKIMAGEW {
   2561     ULONG ulFlags;
   2562     HBITMAP hbm;
   2563     LPWSTR pszImage;
   2564     UINT cchImageMax;
   2565     int xOffsetPercent;
   2566     int yOffsetPercent;
   2567   } LVBKIMAGEW,*LPLVBKIMAGEW;
   2568 
   2569 #define LVBKIF_SOURCE_NONE 0x0
   2570 #define LVBKIF_SOURCE_HBITMAP 0x1
   2571 #define LVBKIF_SOURCE_URL 0x2
   2572 #define LVBKIF_SOURCE_MASK 0x3
   2573 #define LVBKIF_STYLE_NORMAL 0x0
   2574 #define LVBKIF_STYLE_TILE 0x10
   2575 #define LVBKIF_STYLE_MASK 0x10
   2576 #define LVBKIF_FLAG_TILEOFFSET 0x100
   2577 #define LVBKIF_TYPE_WATERMARK 0x10000000
   2578 
   2579 #define LVM_SETBKIMAGEA (LVM_FIRST+68)
   2580 #define LVM_SETBKIMAGEW (LVM_FIRST+138)
   2581 #define LVM_GETBKIMAGEA (LVM_FIRST+69)
   2582 #define LVM_GETBKIMAGEW (LVM_FIRST+139)
   2583 
   2584 #define LVM_SETSELECTEDCOLUMN (LVM_FIRST+140)
   2585 #define ListView_SetSelectedColumn(hwnd,iCol) SNDMSG((hwnd),LVM_SETSELECTEDCOLUMN,(WPARAM)iCol,0)
   2586 #define LVM_SETTILEWIDTH (LVM_FIRST+141)
   2587 #define ListView_SetTileWidth(hwnd,cpWidth) SNDMSG((hwnd),LVM_SETTILEWIDTH,(WPARAM)cpWidth,0)
   2588 #define LV_VIEW_ICON 0x0
   2589 #define LV_VIEW_DETAILS 0x1
   2590 #define LV_VIEW_SMALLICON 0x2
   2591 #define LV_VIEW_LIST 0x3
   2592 #define LV_VIEW_TILE 0x4
   2593 #define LV_VIEW_MAX 0x4
   2594 #define LVM_SETVIEW (LVM_FIRST+142)
   2595 #define ListView_SetView(hwnd,iView) (DWORD)SNDMSG((hwnd),LVM_SETVIEW,(WPARAM)(DWORD)iView,0)
   2596 #define LVM_GETVIEW (LVM_FIRST+143)
   2597 #define ListView_GetView(hwnd) (DWORD)SNDMSG((hwnd),LVM_GETVIEW,0,0)
   2598 #define LVGF_NONE 0x0
   2599 #define LVGF_HEADER 0x1
   2600 #define LVGF_FOOTER 0x2
   2601 #define LVGF_STATE 0x4
   2602 #define LVGF_ALIGN 0x8
   2603 #define LVGF_GROUPID 0x10
   2604 
   2605 #define LVGS_NORMAL 0x0
   2606 #define LVGS_COLLAPSED 0x1
   2607 #define LVGS_HIDDEN 0x2
   2608 
   2609 #define LVGA_HEADER_LEFT 0x1
   2610 #define LVGA_HEADER_CENTER 0x2
   2611 #define LVGA_HEADER_RIGHT 0x4
   2612 #define LVGA_FOOTER_LEFT 0x8
   2613 #define LVGA_FOOTER_CENTER 0x10
   2614 #define LVGA_FOOTER_RIGHT 0x20
   2615 
   2616   typedef struct tagLVGROUP {
   2617     UINT cbSize;
   2618     UINT mask;
   2619     LPWSTR pszHeader;
   2620     int cchHeader;
   2621     LPWSTR pszFooter;
   2622     int cchFooter;
   2623     int iGroupId;
   2624     UINT stateMask;
   2625     UINT state;
   2626     UINT uAlign;
   2627   } LVGROUP,*PLVGROUP;
   2628 
   2629 #define LVM_INSERTGROUP (LVM_FIRST+145)
   2630 #define ListView_InsertGroup(hwnd,index,pgrp) SNDMSG((hwnd),LVM_INSERTGROUP,(WPARAM)index,(LPARAM)pgrp)
   2631 #define LVM_SETGROUPINFO (LVM_FIRST+147)
   2632 #define ListView_SetGroupInfo(hwnd,iGroupId,pgrp) SNDMSG((hwnd),LVM_SETGROUPINFO,(WPARAM)iGroupId,(LPARAM)pgrp)
   2633 #define LVM_GETGROUPINFO (LVM_FIRST+149)
   2634 #define ListView_GetGroupInfo(hwnd,iGroupId,pgrp) SNDMSG((hwnd),LVM_GETGROUPINFO,(WPARAM)iGroupId,(LPARAM)pgrp)
   2635 #define LVM_REMOVEGROUP (LVM_FIRST+150)
   2636 #define ListView_RemoveGroup(hwnd,iGroupId) SNDMSG((hwnd),LVM_REMOVEGROUP,(WPARAM)iGroupId,0)
   2637 #define LVM_MOVEGROUP (LVM_FIRST+151)
   2638 #define ListView_MoveGroup(hwnd,iGroupId,toIndex) SNDMSG((hwnd),LVM_MOVEGROUP,(WPARAM)iGroupId,(LPARAM)toIndex)
   2639 #define LVM_MOVEITEMTOGROUP (LVM_FIRST+154)
   2640 #define ListView_MoveItemToGroup(hwnd,idItemFrom,idGroupTo) SNDMSG((hwnd),LVM_MOVEITEMTOGROUP,(WPARAM)idItemFrom,(LPARAM)idGroupTo)
   2641 #define LVGMF_NONE 0x0
   2642 #define LVGMF_BORDERSIZE 0x1
   2643 #define LVGMF_BORDERCOLOR 0x2
   2644 #define LVGMF_TEXTCOLOR 0x4
   2645 
   2646   typedef struct tagLVGROUPMETRICS {
   2647     UINT cbSize;
   2648     UINT mask;
   2649     UINT Left;
   2650     UINT Top;
   2651     UINT Right;
   2652     UINT Bottom;
   2653     COLORREF crLeft;
   2654     COLORREF crTop;
   2655     COLORREF crRight;
   2656     COLORREF crBottom;
   2657     COLORREF crHeader;
   2658     COLORREF crFooter;
   2659   } LVGROUPMETRICS,*PLVGROUPMETRICS;
   2660 
   2661 #define LVM_SETGROUPMETRICS (LVM_FIRST+155)
   2662 #define ListView_SetGroupMetrics(hwnd,pGroupMetrics) SNDMSG((hwnd),LVM_SETGROUPMETRICS,0,(LPARAM)pGroupMetrics)
   2663 #define LVM_GETGROUPMETRICS (LVM_FIRST+156)
   2664 #define ListView_GetGroupMetrics(hwnd,pGroupMetrics) SNDMSG((hwnd),LVM_GETGROUPMETRICS,0,(LPARAM)pGroupMetrics)
   2665 #define LVM_ENABLEGROUPVIEW (LVM_FIRST+157)
   2666 #define ListView_EnableGroupView(hwnd,fEnable) SNDMSG((hwnd),LVM_ENABLEGROUPVIEW,(WPARAM)fEnable,0)
   2667 
   2668   typedef int (CALLBACK *PFNLVGROUPCOMPARE)(int,int,void *);
   2669 
   2670 #define LVM_SORTGROUPS (LVM_FIRST+158)
   2671 #define ListView_SortGroups(hwnd,_pfnGroupCompate,_plv) SNDMSG((hwnd),LVM_SORTGROUPS,(WPARAM)_pfnGroupCompate,(LPARAM)_plv)
   2672 
   2673   typedef struct tagLVINSERTGROUPSORTED {
   2674     PFNLVGROUPCOMPARE pfnGroupCompare;
   2675     void *pvData;
   2676     LVGROUP lvGroup;
   2677   } LVINSERTGROUPSORTED,*PLVINSERTGROUPSORTED;
   2678 
   2679 #define LVM_INSERTGROUPSORTED (LVM_FIRST+159)
   2680 #define ListView_InsertGroupSorted(hwnd,structInsert) SNDMSG((hwnd),LVM_INSERTGROUPSORTED,(WPARAM)structInsert,0)
   2681 #define LVM_REMOVEALLGROUPS (LVM_FIRST+160)
   2682 #define ListView_RemoveAllGroups(hwnd) SNDMSG((hwnd),LVM_REMOVEALLGROUPS,0,0)
   2683 #define LVM_HASGROUP (LVM_FIRST+161)
   2684 #define ListView_HasGroup(hwnd,dwGroupId) SNDMSG((hwnd),LVM_HASGROUP,dwGroupId,0)
   2685 
   2686 #define LVTVIF_AUTOSIZE 0x0
   2687 #define LVTVIF_FIXEDWIDTH 0x1
   2688 #define LVTVIF_FIXEDHEIGHT 0x2
   2689 #define LVTVIF_FIXEDSIZE 0x3
   2690 
   2691 #define LVTVIM_TILESIZE 0x1
   2692 #define LVTVIM_COLUMNS 0x2
   2693 #define LVTVIM_LABELMARGIN 0x4
   2694 
   2695   typedef struct tagLVTILEVIEWINFO {
   2696     UINT cbSize;
   2697     DWORD dwMask;
   2698     DWORD dwFlags;
   2699     SIZE sizeTile;
   2700     int cLines;
   2701     RECT rcLabelMargin;
   2702   } LVTILEVIEWINFO,*PLVTILEVIEWINFO;
   2703 
   2704   typedef struct tagLVTILEINFO {
   2705     UINT cbSize;
   2706     int iItem;
   2707     UINT cColumns;
   2708     PUINT puColumns;
   2709   } LVTILEINFO,*PLVTILEINFO;
   2710 
   2711 #define LVM_SETTILEVIEWINFO (LVM_FIRST+162)
   2712 #define ListView_SetTileViewInfo(hwnd,ptvi) SNDMSG((hwnd),LVM_SETTILEVIEWINFO,0,(LPARAM)ptvi)
   2713 #define LVM_GETTILEVIEWINFO (LVM_FIRST+163)
   2714 #define ListView_GetTileViewInfo(hwnd,ptvi) SNDMSG((hwnd),LVM_GETTILEVIEWINFO,0,(LPARAM)ptvi)
   2715 #define LVM_SETTILEINFO (LVM_FIRST+164)
   2716 #define ListView_SetTileInfo(hwnd,pti) SNDMSG((hwnd),LVM_SETTILEINFO,0,(LPARAM)pti)
   2717 #define LVM_GETTILEINFO (LVM_FIRST+165)
   2718 #define ListView_GetTileInfo(hwnd,pti) SNDMSG((hwnd),LVM_GETTILEINFO,0,(LPARAM)pti)
   2719 
   2720   typedef struct {
   2721     UINT cbSize;
   2722     DWORD dwFlags;
   2723     int iItem;
   2724     DWORD dwReserved;
   2725   } LVINSERTMARK,*LPLVINSERTMARK;
   2726 
   2727 #define LVIM_AFTER 0x1
   2728 
   2729 #define LVM_SETINSERTMARK (LVM_FIRST+166)
   2730 #define ListView_SetInsertMark(hwnd,lvim) (WINBOOL)SNDMSG((hwnd),LVM_SETINSERTMARK,(WPARAM) 0,(LPARAM) (lvim))
   2731 #define LVM_GETINSERTMARK (LVM_FIRST+167)
   2732 #define ListView_GetInsertMark(hwnd,lvim) (WINBOOL)SNDMSG((hwnd),LVM_GETINSERTMARK,(WPARAM) 0,(LPARAM) (lvim))
   2733 #define LVM_INSERTMARKHITTEST (LVM_FIRST+168)
   2734 #define ListView_InsertMarkHitTest(hwnd,point,lvim) (int)SNDMSG((hwnd),LVM_INSERTMARKHITTEST,(WPARAM)(LPPOINT)(point),(LPARAM)(LPLVINSERTMARK)(lvim))
   2735 #define LVM_GETINSERTMARKRECT (LVM_FIRST+169)
   2736 #define ListView_GetInsertMarkRect(hwnd,rc) (int)SNDMSG((hwnd),LVM_GETINSERTMARKRECT,(WPARAM)0,(LPARAM)(LPRECT)(rc))
   2737 #define LVM_SETINSERTMARKCOLOR (LVM_FIRST+170)
   2738 #define ListView_SetInsertMarkColor(hwnd,color) (COLORREF)SNDMSG((hwnd),LVM_SETINSERTMARKCOLOR,(WPARAM)0,(LPARAM)(COLORREF)(color))
   2739 #define LVM_GETINSERTMARKCOLOR (LVM_FIRST+171)
   2740 #define ListView_GetInsertMarkColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETINSERTMARKCOLOR,(WPARAM)0,(LPARAM)0)
   2741 
   2742   typedef struct tagLVSETINFOTIP {
   2743     UINT cbSize;
   2744     DWORD dwFlags;
   2745     LPWSTR pszText;
   2746     int iItem;
   2747     int iSubItem;
   2748   } LVSETINFOTIP,*PLVSETINFOTIP;
   2749 
   2750 #define LVM_SETINFOTIP (LVM_FIRST+173)
   2751 #define ListView_SetInfoTip(hwndLV,plvInfoTip) (WINBOOL)SNDMSG((hwndLV),LVM_SETINFOTIP,(WPARAM)0,(LPARAM)plvInfoTip)
   2752 #define LVM_GETSELECTEDCOLUMN (LVM_FIRST+174)
   2753 #define ListView_GetSelectedColumn(hwnd) (UINT)SNDMSG((hwnd),LVM_GETSELECTEDCOLUMN,0,0)
   2754 #define LVM_ISGROUPVIEWENABLED (LVM_FIRST+175)
   2755 #define ListView_IsGroupViewEnabled(hwnd) (WINBOOL)SNDMSG((hwnd),LVM_ISGROUPVIEWENABLED,0,0)
   2756 #define LVM_GETOUTLINECOLOR (LVM_FIRST+176)
   2757 #define ListView_GetOutlineColor(hwnd) (COLORREF)SNDMSG((hwnd),LVM_GETOUTLINECOLOR,0,0)
   2758 #define LVM_SETOUTLINECOLOR (LVM_FIRST+177)
   2759 #define ListView_SetOutlineColor(hwnd,color) (COLORREF)SNDMSG((hwnd),LVM_SETOUTLINECOLOR,(WPARAM)0,(LPARAM)(COLORREF)(color))
   2760 #define LVM_CANCELEDITLABEL (LVM_FIRST+179)
   2761 #define ListView_CancelEditLabel(hwnd) (VOID)SNDMSG((hwnd),LVM_CANCELEDITLABEL,(WPARAM)0,(LPARAM)0)
   2762 #define LVM_MAPINDEXTOID (LVM_FIRST+180)
   2763 #define ListView_MapIndexToID(hwnd,index) (UINT)SNDMSG((hwnd),LVM_MAPINDEXTOID,(WPARAM)index,(LPARAM)0)
   2764 #define LVM_MAPIDTOINDEX (LVM_FIRST+181)
   2765 #define ListView_MapIDToIndex(hwnd,id) (UINT)SNDMSG((hwnd),LVM_MAPIDTOINDEX,(WPARAM)id,(LPARAM)0)
   2766 #define LVM_ISITEMVISIBLE (LVM_FIRST+182)
   2767 #define ListView_IsItemVisible(hwnd,index) (UINT)SNDMSG((hwnd),LVM_ISITEMVISIBLE,(WPARAM)(index),(LPARAM)0)
   2768 
   2769 #define LVBKIMAGE __MINGW_NAME_AW(LVBKIMAGE)
   2770 #define LPLVBKIMAGE __MINGW_NAME_AW(LPLVBKIMAGE)
   2771 #define LVM_SETBKIMAGE __MINGW_NAME_AW(LVM_SETBKIMAGE)
   2772 #define LVM_GETBKIMAGE __MINGW_NAME_AW(LVM_GETBKIMAGE)
   2773 
   2774 #define ListView_SetBkImage(hwnd,plvbki) (WINBOOL)SNDMSG((hwnd),LVM_SETBKIMAGE,0,(LPARAM)(plvbki))
   2775 #define ListView_GetBkImage(hwnd,plvbki) (WINBOOL)SNDMSG((hwnd),LVM_GETBKIMAGE,0,(LPARAM)(plvbki))
   2776 
   2777 #define LPNM_LISTVIEW LPNMLISTVIEW
   2778 #define NM_LISTVIEW NMLISTVIEW
   2779 
   2780   typedef struct tagNMLISTVIEW {
   2781     NMHDR hdr;
   2782     int iItem;
   2783     int iSubItem;
   2784     UINT uNewState;
   2785     UINT uOldState;
   2786     UINT uChanged;
   2787     POINT ptAction;
   2788     LPARAM lParam;
   2789   } NMLISTVIEW,*LPNMLISTVIEW;
   2790 
   2791   typedef struct tagNMITEMACTIVATE {
   2792     NMHDR hdr;
   2793     int iItem;
   2794     int iSubItem;
   2795     UINT uNewState;
   2796     UINT uOldState;
   2797     UINT uChanged;
   2798     POINT ptAction;
   2799     LPARAM lParam;
   2800     UINT uKeyFlags;
   2801   } NMITEMACTIVATE,*LPNMITEMACTIVATE;
   2802 
   2803 #define LVKF_ALT 0x1
   2804 #define LVKF_CONTROL 0x2
   2805 #define LVKF_SHIFT 0x4
   2806 
   2807 #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLVCUSTOMDRW,clrTextBk)
   2808 
   2809   typedef struct tagNMLVCUSTOMDRAW {
   2810     NMCUSTOMDRAW nmcd;
   2811     COLORREF clrText;
   2812     COLORREF clrTextBk;
   2813     int iSubItem;
   2814     DWORD dwItemType;
   2815     COLORREF clrFace;
   2816     int iIconEffect;
   2817     int iIconPhase;
   2818     int iPartId;
   2819     int iStateId;
   2820     RECT rcText;
   2821     UINT uAlign;
   2822   } NMLVCUSTOMDRAW,*LPNMLVCUSTOMDRAW;
   2823 
   2824 #define LVCDI_ITEM 0x0
   2825 #define LVCDI_GROUP 0x1
   2826 
   2827 #define LVCDRF_NOSELECT 0x10000
   2828 #define LVCDRF_NOGROUPFRAME 0x20000
   2829 
   2830   typedef struct tagNMLVCACHEHINT {
   2831     NMHDR hdr;
   2832     int iFrom;
   2833     int iTo;
   2834   } NMLVCACHEHINT,*LPNMLVCACHEHINT;
   2835 
   2836 #define LPNM_CACHEHINT LPNMLVCACHEHINT
   2837 #define PNM_CACHEHINT LPNMLVCACHEHINT
   2838 #define NM_CACHEHINT NMLVCACHEHINT
   2839 
   2840   typedef struct tagNMLVFINDITEMA {
   2841     NMHDR hdr;
   2842     int iStart;
   2843     LVFINDINFOA lvfi;
   2844   } NMLVFINDITEMA,*LPNMLVFINDITEMA;
   2845 
   2846   typedef struct tagNMLVFINDITEMW {
   2847     NMHDR hdr;
   2848     int iStart;
   2849     LVFINDINFOW lvfi;
   2850   } NMLVFINDITEMW,*LPNMLVFINDITEMW;
   2851 
   2852 #define PNM_FINDITEMA LPNMLVFINDITEMA
   2853 #define LPNM_FINDITEMA LPNMLVFINDITEMA
   2854 #define NM_FINDITEMA NMLVFINDITEMA
   2855 
   2856 #define PNM_FINDITEMW LPNMLVFINDITEMW
   2857 #define LPNM_FINDITEMW LPNMLVFINDITEMW
   2858 #define NM_FINDITEMW NMLVFINDITEMW
   2859 
   2860 #define PNM_FINDITEM __MINGW_NAME_AW(PNM_FINDITEM)
   2861 #define LPNM_FINDITEM __MINGW_NAME_AW(LPNM_FINDITEM)
   2862 #define NM_FINDITEM __MINGW_NAME_AW(NM_FINDITEM)
   2863 #define NMLVFINDITEM __MINGW_NAME_AW(NMLVFINDITEM)
   2864 #define LPNMLVFINDITEM __MINGW_NAME_AW(LPNMLVFINDITEM)
   2865 
   2866   typedef struct tagNMLVODSTATECHANGE {
   2867     NMHDR hdr;
   2868     int iFrom;
   2869     int iTo;
   2870     UINT uNewState;
   2871     UINT uOldState;
   2872   } NMLVODSTATECHANGE,*LPNMLVODSTATECHANGE;
   2873 
   2874 #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
   2875 #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
   2876 #define NM_ODSTATECHANGE NMLVODSTATECHANGE
   2877 
   2878 #define LVN_ITEMCHANGING (LVN_FIRST-0)
   2879 #define LVN_ITEMCHANGED (LVN_FIRST-1)
   2880 #define LVN_INSERTITEM (LVN_FIRST-2)
   2881 #define LVN_DELETEITEM (LVN_FIRST-3)
   2882 #define LVN_DELETEALLITEMS (LVN_FIRST-4)
   2883 #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
   2884 #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
   2885 #define LVN_ENDLABELEDITA (LVN_FIRST-6)
   2886 #define LVN_ENDLABELEDITW (LVN_FIRST-76)
   2887 #define LVN_COLUMNCLICK (LVN_FIRST-8)
   2888 #define LVN_BEGINDRAG (LVN_FIRST-9)
   2889 #define LVN_BEGINRDRAG (LVN_FIRST-11)
   2890 
   2891 #define LVN_ODCACHEHINT (LVN_FIRST-13)
   2892 #define LVN_ODFINDITEMA (LVN_FIRST-52)
   2893 #define LVN_ODFINDITEMW (LVN_FIRST-79)
   2894 
   2895 #define LVN_ITEMACTIVATE (LVN_FIRST-14)
   2896 #define LVN_ODSTATECHANGED (LVN_FIRST-15)
   2897 
   2898 #define LVN_ODFINDITEM __MINGW_NAME_AW(LVN_ODFINDITEM)
   2899 
   2900 #define LVN_HOTTRACK (LVN_FIRST-21)
   2901 #define LVN_GETDISPINFOA (LVN_FIRST-50)
   2902 #define LVN_GETDISPINFOW (LVN_FIRST-77)
   2903 #define LVN_SETDISPINFOA (LVN_FIRST-51)
   2904 #define LVN_SETDISPINFOW (LVN_FIRST-78)
   2905 
   2906 #define LVN_BEGINLABELEDIT __MINGW_NAME_AW(LVN_BEGINLABELEDIT)
   2907 #define LVN_ENDLABELEDIT __MINGW_NAME_AW(LVN_ENDLABELEDIT)
   2908 #define LVN_GETDISPINFO __MINGW_NAME_AW(LVN_GETDISPINFO)
   2909 #define LVN_SETDISPINFO __MINGW_NAME_AW(LVN_SETDISPINFO)
   2910 
   2911 #define LVIF_DI_SETITEM 0x1000
   2912 
   2913 #define LV_DISPINFOA NMLVDISPINFOA
   2914 #define LV_DISPINFOW NMLVDISPINFOW
   2915 #define LV_DISPINFO NMLVDISPINFO
   2916 
   2917   typedef struct tagLVDISPINFO {
   2918     NMHDR hdr;
   2919     LVITEMA item;
   2920   } NMLVDISPINFOA,*LPNMLVDISPINFOA;
   2921 
   2922   typedef struct tagLVDISPINFOW {
   2923     NMHDR hdr;
   2924     LVITEMW item;
   2925   } NMLVDISPINFOW,*LPNMLVDISPINFOW;
   2926 
   2927 #define NMLVDISPINFO __MINGW_NAME_AW(NMLVDISPINFO)
   2928 
   2929 #define LVN_KEYDOWN (LVN_FIRST-55)
   2930 
   2931 #define LV_KEYDOWN NMLVKEYDOWN
   2932 
   2933 #include <pshpack1.h>
   2934 
   2935   typedef struct tagLVKEYDOWN {
   2936     NMHDR hdr;
   2937     WORD wVKey;
   2938     UINT flags;
   2939   } NMLVKEYDOWN,*LPNMLVKEYDOWN;
   2940 
   2941 #include <poppack.h>
   2942 
   2943 #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
   2944 
   2945   typedef struct tagNMLVGETINFOTIPA {
   2946     NMHDR hdr;
   2947     DWORD dwFlags;
   2948     LPSTR pszText;
   2949     int cchTextMax;
   2950     int iItem;
   2951     int iSubItem;
   2952     LPARAM lParam;
   2953   } NMLVGETINFOTIPA,*LPNMLVGETINFOTIPA;
   2954 
   2955   typedef struct tagNMLVGETINFOTIPW {
   2956     NMHDR hdr;
   2957     DWORD dwFlags;
   2958     LPWSTR pszText;
   2959     int cchTextMax;
   2960     int iItem;
   2961     int iSubItem;
   2962     LPARAM lParam;
   2963   } NMLVGETINFOTIPW,*LPNMLVGETINFOTIPW;
   2964 
   2965 #define LVGIT_UNFOLDED 0x1
   2966 
   2967 #define LVN_GETINFOTIPA (LVN_FIRST-57)
   2968 #define LVN_GETINFOTIPW (LVN_FIRST-58)
   2969 
   2970 #define LVN_GETINFOTIP __MINGW_NAME_AW(LVN_GETINFOTIP)
   2971 #define NMLVGETINFOTIP __MINGW_NAME_AW(NMLVGETINFOTIP)
   2972 #define LPNMLVGETINFOTIP __MINGW_NAME_AW(LPNMLVGETINFOTIP)
   2973 
   2974   typedef struct tagNMLVSCROLL {
   2975     NMHDR hdr;
   2976     int dx;
   2977     int dy;
   2978   } NMLVSCROLL,*LPNMLVSCROLL;
   2979 
   2980 #define LVN_BEGINSCROLL (LVN_FIRST-80)
   2981 #define LVN_ENDSCROLL (LVN_FIRST-81)
   2982 #endif
   2983 
   2984 #ifndef NOTREEVIEW
   2985 
   2986 #define WC_TREEVIEWA "SysTreeView32"
   2987 #define WC_TREEVIEWW L"SysTreeView32"
   2988 
   2989 #define WC_TREEVIEW __MINGW_NAME_AW(WC_TREEVIEW)
   2990 
   2991 #define TVS_HASBUTTONS 0x1
   2992 #define TVS_HASLINES 0x2
   2993 #define TVS_LINESATROOT 0x4
   2994 #define TVS_EDITLABELS 0x8
   2995 #define TVS_DISABLEDRAGDROP 0x10
   2996 #define TVS_SHOWSELALWAYS 0x20
   2997 #define TVS_RTLREADING 0x40
   2998 #define TVS_NOTOOLTIPS 0x80
   2999 #define TVS_CHECKBOXES 0x100
   3000 #define TVS_TRACKSELECT 0x200
   3001 #define TVS_SINGLEEXPAND 0x400
   3002 #define TVS_INFOTIP 0x800
   3003 #define TVS_FULLROWSELECT 0x1000
   3004 #define TVS_NOSCROLL 0x2000
   3005 #define TVS_NONEVENHEIGHT 0x4000
   3006 #define TVS_NOHSCROLL 0x8000
   3007 
   3008   typedef struct _TREEITEM *HTREEITEM;
   3009 
   3010 #define TVIF_TEXT 0x1
   3011 #define TVIF_IMAGE 0x2
   3012 #define TVIF_PARAM 0x4
   3013 #define TVIF_STATE 0x8
   3014 #define TVIF_HANDLE 0x10
   3015 #define TVIF_SELECTEDIMAGE 0x20
   3016 #define TVIF_CHILDREN 0x40
   3017 #define TVIF_INTEGRAL 0x80
   3018 #define TVIS_SELECTED 0x2
   3019 #define TVIS_CUT 0x4
   3020 #define TVIS_DROPHILITED 0x8
   3021 #define TVIS_BOLD 0x10
   3022 #define TVIS_EXPANDED 0x20
   3023 #define TVIS_EXPANDEDONCE 0x40
   3024 #define TVIS_EXPANDPARTIAL 0x80
   3025 #define TVIS_OVERLAYMASK 0xf00
   3026 #define TVIS_STATEIMAGEMASK 0xF000
   3027 #define TVIS_USERMASK 0xF000
   3028 
   3029 #define I_CHILDRENCALLBACK (-1)
   3030 
   3031 #define LPTV_ITEMW LPTVITEMW
   3032 #define LPTV_ITEMA LPTVITEMA
   3033 #define TV_ITEMW TVITEMW
   3034 #define TV_ITEMA TVITEMA
   3035 #define LPTV_ITEM LPTVITEM
   3036 #define TV_ITEM TVITEM
   3037 
   3038   typedef struct tagTVITEMA {
   3039     UINT mask;
   3040     HTREEITEM hItem;
   3041     UINT state;
   3042     UINT stateMask;
   3043     LPSTR pszText;
   3044     int cchTextMax;
   3045     int iImage;
   3046     int iSelectedImage;
   3047     int cChildren;
   3048     LPARAM lParam;
   3049   } TVITEMA,*LPTVITEMA;
   3050 
   3051   typedef struct tagTVITEMW {
   3052     UINT mask;
   3053     HTREEITEM hItem;
   3054     UINT state;
   3055     UINT stateMask;
   3056     LPWSTR pszText;
   3057     int cchTextMax;
   3058     int iImage;
   3059     int iSelectedImage;
   3060     int cChildren;
   3061     LPARAM lParam;
   3062   } TVITEMW,*LPTVITEMW;
   3063 
   3064   typedef struct tagTVITEMEXA {
   3065     UINT mask;
   3066     HTREEITEM hItem;
   3067     UINT state;
   3068     UINT stateMask;
   3069     LPSTR pszText;
   3070     int cchTextMax;
   3071     int iImage;
   3072     int iSelectedImage;
   3073     int cChildren;
   3074     LPARAM lParam;
   3075     int iIntegral;
   3076   } TVITEMEXA,*LPTVITEMEXA;
   3077 
   3078   typedef struct tagTVITEMEXW {
   3079     UINT mask;
   3080     HTREEITEM hItem;
   3081     UINT state;
   3082     UINT stateMask;
   3083     LPWSTR pszText;
   3084     int cchTextMax;
   3085     int iImage;
   3086     int iSelectedImage;
   3087     int cChildren;
   3088     LPARAM lParam;
   3089     int iIntegral;
   3090   } TVITEMEXW,*LPTVITEMEXW;
   3091 
   3092   __MINGW_TYPEDEF_AW(TVITEMEX)
   3093   __MINGW_TYPEDEF_AW(LPTVITEMEX)
   3094 
   3095 #define TVITEM __MINGW_NAME_AW(TVITEM)
   3096 #define LPTVITEM __MINGW_NAME_AW(LPTVITEM)
   3097 
   3098 #define TVI_ROOT ((HTREEITEM)(ULONG_PTR)-0x10000)
   3099 #define TVI_FIRST ((HTREEITEM)(ULONG_PTR)-0xffff)
   3100 #define TVI_LAST ((HTREEITEM)(ULONG_PTR)-0xfffe)
   3101 #define TVI_SORT ((HTREEITEM)(ULONG_PTR)-0xfffd)
   3102 
   3103 #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
   3104 #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
   3105 #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
   3106 #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
   3107 #define TV_INSERTSTRUCT TVINSERTSTRUCT
   3108 #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
   3109 
   3110 #define TVINSERTSTRUCTA_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTA,item)
   3111 #define TVINSERTSTRUCTW_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTW,item)
   3112 
   3113   typedef struct tagTVINSERTSTRUCTA {
   3114     HTREEITEM hParent;
   3115     HTREEITEM hInsertAfter;
   3116     __C89_NAMELESS union {
   3117       TVITEMEXA itemex;
   3118       TV_ITEMA item;
   3119     } DUMMYUNIONNAME;
   3120   } TVINSERTSTRUCTA,*LPTVINSERTSTRUCTA;
   3121 
   3122   typedef struct tagTVINSERTSTRUCTW {
   3123     HTREEITEM hParent;
   3124     HTREEITEM hInsertAfter;
   3125     __C89_NAMELESS union {
   3126       TVITEMEXW itemex;
   3127       TV_ITEMW item;
   3128     } DUMMYUNIONNAME;
   3129   } TVINSERTSTRUCTW,*LPTVINSERTSTRUCTW;
   3130 
   3131 
   3132 #define TVINSERTSTRUCT __MINGW_NAME_AW(TVINSERTSTRUCT)
   3133 #define LPTVINSERTSTRUCT __MINGW_NAME_AW(LPTVINSERTSTRUCT)
   3134 
   3135 #define TVINSERTSTRUCT_V1_SIZE __MINGW_NAME_AW_EXT(TVINSERTSTRUCT,_V1_SIZE)
   3136 
   3137 #define TVM_INSERTITEMA (TV_FIRST+0)
   3138 #define TVM_INSERTITEMW (TV_FIRST+50)
   3139 
   3140 #define TVM_INSERTITEM __MINGW_NAME_AW(TVM_INSERTITEM)
   3141 
   3142 #define TreeView_InsertItem(hwnd,lpis) (HTREEITEM)SNDMSG((hwnd),TVM_INSERTITEM,0,(LPARAM)(LPTV_INSERTSTRUCT)(lpis))
   3143 
   3144 #define TVM_DELETEITEM (TV_FIRST+1)
   3145 #define TreeView_DeleteItem(hwnd,hitem) (WINBOOL)SNDMSG((hwnd),TVM_DELETEITEM,0,(LPARAM)(HTREEITEM)(hitem))
   3146 
   3147 #define TreeView_DeleteAllItems(hwnd) (WINBOOL)SNDMSG((hwnd),TVM_DELETEITEM,0,(LPARAM)TVI_ROOT)
   3148 
   3149 #define TVM_EXPAND (TV_FIRST+2)
   3150 #define TreeView_Expand(hwnd,hitem,code) (WINBOOL)SNDMSG((hwnd),TVM_EXPAND,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
   3151 
   3152 #define TVE_COLLAPSE 0x1
   3153 #define TVE_EXPAND 0x2
   3154 #define TVE_TOGGLE 0x3
   3155 #define TVE_EXPANDPARTIAL 0x4000
   3156 #define TVE_COLLAPSERESET 0x8000
   3157 
   3158 #define TVM_GETITEMRECT (TV_FIRST+4)
   3159 #define TreeView_GetItemRect(hwnd,hitem,prc,code) (*(HTREEITEM *)prc = (hitem),(WINBOOL)SNDMSG((hwnd),TVM_GETITEMRECT,(WPARAM)(code),(LPARAM)(RECT *)(prc)))
   3160 
   3161 #define TVM_GETCOUNT (TV_FIRST+5)
   3162 #define TreeView_GetCount(hwnd) (UINT)SNDMSG((hwnd),TVM_GETCOUNT,0,0)
   3163 
   3164 #define TVM_GETINDENT (TV_FIRST+6)
   3165 #define TreeView_GetIndent(hwnd) (UINT)SNDMSG((hwnd),TVM_GETINDENT,0,0)
   3166 
   3167 #define TVM_SETINDENT (TV_FIRST+7)
   3168 #define TreeView_SetIndent(hwnd,indent) (WINBOOL)SNDMSG((hwnd),TVM_SETINDENT,(WPARAM)(indent),0)
   3169 
   3170 #define TVM_GETIMAGELIST (TV_FIRST+8)
   3171 #define TreeView_GetImageList(hwnd,iImage) (HIMAGELIST)SNDMSG((hwnd),TVM_GETIMAGELIST,iImage,0)
   3172 
   3173 #define TVSIL_NORMAL 0
   3174 #define TVSIL_STATE 2
   3175 
   3176 #define TVM_SETIMAGELIST (TV_FIRST+9)
   3177 #define TreeView_SetImageList(hwnd,himl,iImage) (HIMAGELIST)SNDMSG((hwnd),TVM_SETIMAGELIST,iImage,(LPARAM)(HIMAGELIST)(himl))
   3178 
   3179 #define TVM_GETNEXTITEM (TV_FIRST+10)
   3180 #define TreeView_GetNextItem(hwnd,hitem,code) (HTREEITEM)SNDMSG((hwnd),TVM_GETNEXTITEM,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
   3181 
   3182 #define TVGN_ROOT 0x0
   3183 #define TVGN_NEXT 0x1
   3184 #define TVGN_PREVIOUS 0x2
   3185 #define TVGN_PARENT 0x3
   3186 #define TVGN_CHILD 0x4
   3187 #define TVGN_FIRSTVISIBLE 0x5
   3188 #define TVGN_NEXTVISIBLE 0x6
   3189 #define TVGN_PREVIOUSVISIBLE 0x7
   3190 #define TVGN_DROPHILITE 0x8
   3191 #define TVGN_CARET 0x9
   3192 #define TVGN_LASTVISIBLE 0xa
   3193 
   3194 #define TVSI_NOSINGLEEXPAND 0x8000
   3195 
   3196 #define TreeView_GetChild(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_CHILD)
   3197 #define TreeView_GetNextSibling(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_NEXT)
   3198 #define TreeView_GetPrevSibling(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PREVIOUS)
   3199 #define TreeView_GetParent(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PARENT)
   3200 #define TreeView_GetFirstVisible(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_FIRSTVISIBLE)
   3201 #define TreeView_GetNextVisible(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_NEXTVISIBLE)
   3202 #define TreeView_GetPrevVisible(hwnd,hitem) TreeView_GetNextItem(hwnd,hitem,TVGN_PREVIOUSVISIBLE)
   3203 #define TreeView_GetSelection(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_CARET)
   3204 #define TreeView_GetDropHilight(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_DROPHILITE)
   3205 #define TreeView_GetRoot(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_ROOT)
   3206 #define TreeView_GetLastVisible(hwnd) TreeView_GetNextItem(hwnd,NULL,TVGN_LASTVISIBLE)
   3207 
   3208 #define TVM_SELECTITEM (TV_FIRST+11)
   3209 #define TreeView_Select(hwnd,hitem,code) (WINBOOL)SNDMSG((hwnd),TVM_SELECTITEM,(WPARAM)(code),(LPARAM)(HTREEITEM)(hitem))
   3210 
   3211 #define TreeView_SelectItem(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_CARET)
   3212 #define TreeView_SelectDropTarget(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_DROPHILITE)
   3213 #define TreeView_SelectSetFirstVisible(hwnd,hitem) TreeView_Select(hwnd,hitem,TVGN_FIRSTVISIBLE)
   3214 
   3215 #define TVM_GETITEMA (TV_FIRST+12)
   3216 #define TVM_GETITEMW (TV_FIRST+62)
   3217 
   3218 #define TVM_GETITEM __MINGW_NAME_AW(TVM_GETITEM)
   3219 
   3220 #define TreeView_GetItem(hwnd,pitem) (WINBOOL)SNDMSG((hwnd),TVM_GETITEM,0,(LPARAM)(TV_ITEM *)(pitem))
   3221 
   3222 #define TVM_SETITEMA (TV_FIRST+13)
   3223 #define TVM_SETITEMW (TV_FIRST+63)
   3224 
   3225 #define TVM_SETITEM __MINGW_NAME_AW(TVM_SETITEM)
   3226 
   3227 #define TreeView_SetItem(hwnd,pitem) (WINBOOL)SNDMSG((hwnd),TVM_SETITEM,0,(LPARAM)(const TV_ITEM *)(pitem))
   3228 
   3229 #define TVM_EDITLABELA (TV_FIRST+14)
   3230 #define TVM_EDITLABELW (TV_FIRST+65)
   3231 
   3232 #define TVM_EDITLABEL __MINGW_NAME_AW(TVM_EDITLABEL)
   3233 
   3234 #define TreeView_EditLabel(hwnd,hitem) (HWND)SNDMSG((hwnd),TVM_EDITLABEL,0,(LPARAM)(HTREEITEM)(hitem))
   3235 
   3236 #define TVM_GETEDITCONTROL (TV_FIRST+15)
   3237 #define TreeView_GetEditControl(hwnd) (HWND)SNDMSG((hwnd),TVM_GETEDITCONTROL,0,0)
   3238 
   3239 #define TVM_GETVISIBLECOUNT (TV_FIRST+16)
   3240 #define TreeView_GetVisibleCount(hwnd) (UINT)SNDMSG((hwnd),TVM_GETVISIBLECOUNT,0,0)
   3241 
   3242 #define TVM_HITTEST (TV_FIRST+17)
   3243 #define TreeView_HitTest(hwnd,lpht) (HTREEITEM)SNDMSG((hwnd),TVM_HITTEST,0,(LPARAM)(LPTV_HITTESTINFO)(lpht))
   3244 
   3245 #define LPTV_HITTESTINFO LPTVHITTESTINFO
   3246 #define TV_HITTESTINFO TVHITTESTINFO
   3247 
   3248   typedef struct tagTVHITTESTINFO {
   3249     POINT pt;
   3250     UINT flags;
   3251     HTREEITEM hItem;
   3252   } TVHITTESTINFO,*LPTVHITTESTINFO;
   3253 
   3254 #define TVHT_NOWHERE 0x1
   3255 #define TVHT_ONITEMICON 0x2
   3256 #define TVHT_ONITEMLABEL 0x4
   3257 #define TVHT_ONITEM (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON)
   3258 #define TVHT_ONITEMINDENT 0x8
   3259 #define TVHT_ONITEMBUTTON 0x10
   3260 #define TVHT_ONITEMRIGHT 0x20
   3261 #define TVHT_ONITEMSTATEICON 0x40
   3262 
   3263 #define TVHT_ABOVE 0x100
   3264 #define TVHT_BELOW 0x200
   3265 #define TVHT_TORIGHT 0x400
   3266 #define TVHT_TOLEFT 0x800
   3267 
   3268 #define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
   3269 #define TreeView_CreateDragImage(hwnd,hitem) (HIMAGELIST)SNDMSG((hwnd),TVM_CREATEDRAGIMAGE,0,(LPARAM)(HTREEITEM)(hitem))
   3270 
   3271 #define TVM_SORTCHILDREN (TV_FIRST+19)
   3272 #define TreeView_SortChildren(hwnd,hitem,recurse) (WINBOOL)SNDMSG((hwnd),TVM_SORTCHILDREN,(WPARAM)(recurse),(LPARAM)(HTREEITEM)(hitem))
   3273 
   3274 #define TVM_ENSUREVISIBLE (TV_FIRST+20)
   3275 #define TreeView_EnsureVisible(hwnd,hitem) (WINBOOL)SNDMSG((hwnd),TVM_ENSUREVISIBLE,0,(LPARAM)(HTREEITEM)(hitem))
   3276 
   3277 #define TVM_SORTCHILDRENCB (TV_FIRST+21)
   3278 #define TreeView_SortChildrenCB(hwnd,psort,recurse) (WINBOOL)SNDMSG((hwnd),TVM_SORTCHILDRENCB,(WPARAM)(recurse),(LPARAM)(LPTV_SORTCB)(psort))
   3279 
   3280 #define TVM_ENDEDITLABELNOW (TV_FIRST+22)
   3281 #define TreeView_EndEditLabelNow(hwnd,fCancel) (WINBOOL)SNDMSG((hwnd),TVM_ENDEDITLABELNOW,(WPARAM)(fCancel),0)
   3282 
   3283 #define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
   3284 #define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
   3285 
   3286 #define TVM_GETISEARCHSTRING __MINGW_NAME_AW(TVM_GETISEARCHSTRING)
   3287 
   3288 #define TVM_SETTOOLTIPS (TV_FIRST+24)
   3289 #define TreeView_SetToolTips(hwnd,hwndTT) (HWND)SNDMSG((hwnd),TVM_SETTOOLTIPS,(WPARAM)(hwndTT),0)
   3290 #define TVM_GETTOOLTIPS (TV_FIRST+25)
   3291 #define TreeView_GetToolTips(hwnd) (HWND)SNDMSG((hwnd),TVM_GETTOOLTIPS,0,0)
   3292 #define TreeView_GetISearchString(hwndTV,lpsz) (WINBOOL)SNDMSG((hwndTV),TVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz))
   3293 
   3294 #define TVM_SETINSERTMARK (TV_FIRST+26)
   3295 #define TreeView_SetInsertMark(hwnd,hItem,fAfter) (WINBOOL)SNDMSG((hwnd),TVM_SETINSERTMARK,(WPARAM) (fAfter),(LPARAM) (hItem))
   3296 #define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
   3297 #define TreeView_SetUnicodeFormat(hwnd,fUnicode) (WINBOOL)SNDMSG((hwnd),TVM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
   3298 #define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
   3299 #define TreeView_GetUnicodeFormat(hwnd) (WINBOOL)SNDMSG((hwnd),TVM_GETUNICODEFORMAT,0,0)
   3300 
   3301 #define TVM_SETITEMHEIGHT (TV_FIRST+27)
   3302 #define TreeView_SetItemHeight(hwnd,iHeight) (int)SNDMSG((hwnd),TVM_SETITEMHEIGHT,(WPARAM)(iHeight),0)
   3303 #define TVM_GETITEMHEIGHT (TV_FIRST+28)
   3304 #define TreeView_GetItemHeight(hwnd) (int)SNDMSG((hwnd),TVM_GETITEMHEIGHT,0,0)
   3305 #define TVM_SETBKCOLOR (TV_FIRST+29)
   3306 #define TreeView_SetBkColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETBKCOLOR,0,(LPARAM)(clr))
   3307 #define TVM_SETTEXTCOLOR (TV_FIRST+30)
   3308 #define TreeView_SetTextColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETTEXTCOLOR,0,(LPARAM)(clr))
   3309 #define TVM_GETBKCOLOR (TV_FIRST+31)
   3310 #define TreeView_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETBKCOLOR,0,0)
   3311 #define TVM_GETTEXTCOLOR (TV_FIRST+32)
   3312 #define TreeView_GetTextColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETTEXTCOLOR,0,0)
   3313 #define TVM_SETSCROLLTIME (TV_FIRST+33)
   3314 #define TreeView_SetScrollTime(hwnd,uTime) (UINT)SNDMSG((hwnd),TVM_SETSCROLLTIME,uTime,0)
   3315 #define TVM_GETSCROLLTIME (TV_FIRST+34)
   3316 #define TreeView_GetScrollTime(hwnd) (UINT)SNDMSG((hwnd),TVM_GETSCROLLTIME,0,0)
   3317 #define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
   3318 #define TreeView_SetInsertMarkColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETINSERTMARKCOLOR,0,(LPARAM)(clr))
   3319 #define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
   3320 #define TreeView_GetInsertMarkColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETINSERTMARKCOLOR,0,0)
   3321 
   3322 #define TreeView_SetItemState(hwndTV,hti,data,_mask) { TVITEM _ms_TVi; _ms_TVi.mask = TVIF_STATE; _ms_TVi.hItem = hti; _ms_TVi.stateMask = _mask; _ms_TVi.state = data; SNDMSG((hwndTV),TVM_SETITEM,0,(LPARAM)(TV_ITEM *)&_ms_TVi);}
   3323 #define TreeView_SetCheckState(hwndTV,hti,fCheck) TreeView_SetItemState(hwndTV,hti,INDEXTOSTATEIMAGEMASK((fCheck)?2:1),TVIS_STATEIMAGEMASK)
   3324 #define TVM_GETITEMSTATE (TV_FIRST+39)
   3325 #define TreeView_GetItemState(hwndTV,hti,mask) (UINT)SNDMSG((hwndTV),TVM_GETITEMSTATE,(WPARAM)(hti),(LPARAM)(mask))
   3326 #define TreeView_GetCheckState(hwndTV,hti) ((((UINT)(SNDMSG((hwndTV),TVM_GETITEMSTATE,(WPARAM)(hti),TVIS_STATEIMAGEMASK))) >> 12) -1)
   3327 #define TVM_SETLINECOLOR (TV_FIRST+40)
   3328 #define TreeView_SetLineColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),TVM_SETLINECOLOR,0,(LPARAM)(clr))
   3329 #define TVM_GETLINECOLOR (TV_FIRST+41)
   3330 #define TreeView_GetLineColor(hwnd) (COLORREF)SNDMSG((hwnd),TVM_GETLINECOLOR,0,0)
   3331 
   3332 #define TVM_MAPACCIDTOHTREEITEM (TV_FIRST+42)
   3333 #define TreeView_MapAccIDToHTREEITEM(hwnd,id) (HTREEITEM)SNDMSG((hwnd),TVM_MAPACCIDTOHTREEITEM,id,0)
   3334 
   3335 #define TVM_MAPHTREEITEMTOACCID (TV_FIRST+43)
   3336 #define TreeView_MapHTREEITEMToAccID(hwnd,htreeitem) (UINT)SNDMSG((hwnd),TVM_MAPHTREEITEMTOACCID,(WPARAM)htreeitem,0)
   3337 
   3338   typedef int (CALLBACK *PFNTVCOMPARE)(LPARAM lParam1,LPARAM lParam2,LPARAM lParamSort);
   3339 
   3340 #define LPTV_SORTCB LPTVSORTCB
   3341 #define TV_SORTCB TVSORTCB
   3342 
   3343   typedef struct tagTVSORTCB {
   3344     HTREEITEM hParent;
   3345     PFNTVCOMPARE lpfnCompare;
   3346     LPARAM lParam;
   3347   } TVSORTCB,*LPTVSORTCB;
   3348 
   3349 #define LPNM_TREEVIEWA LPNMTREEVIEWA
   3350 #define LPNM_TREEVIEWW LPNMTREEVIEWW
   3351 #define NM_TREEVIEWW NMTREEVIEWW
   3352 #define NM_TREEVIEWA NMTREEVIEWA
   3353 #define LPNM_TREEVIEW LPNMTREEVIEW
   3354 #define NM_TREEVIEW NMTREEVIEW
   3355 
   3356   typedef struct tagNMTREEVIEWA {
   3357     NMHDR hdr;
   3358     UINT action;
   3359     TVITEMA itemOld;
   3360     TVITEMA itemNew;
   3361     POINT ptDrag;
   3362   } NMTREEVIEWA,*LPNMTREEVIEWA;
   3363 
   3364   typedef struct tagNMTREEVIEWW {
   3365     NMHDR hdr;
   3366     UINT action;
   3367     TVITEMW itemOld;
   3368     TVITEMW itemNew;
   3369     POINT ptDrag;
   3370   } NMTREEVIEWW,*LPNMTREEVIEWW;
   3371 
   3372 #define NMTREEVIEW __MINGW_NAME_AW(NMTREEVIEW)
   3373 #define LPNMTREEVIEW __MINGW_NAME_AW(LPNMTREEVIEW)
   3374 
   3375 #define TVN_SELCHANGINGA (TVN_FIRST-1)
   3376 #define TVN_SELCHANGINGW (TVN_FIRST-50)
   3377 #define TVN_SELCHANGEDA (TVN_FIRST-2)
   3378 #define TVN_SELCHANGEDW (TVN_FIRST-51)
   3379 
   3380 #define TVC_UNKNOWN 0x0
   3381 #define TVC_BYMOUSE 0x1
   3382 #define TVC_BYKEYBOARD 0x2
   3383 
   3384 #define TVN_GETDISPINFOA (TVN_FIRST-3)
   3385 #define TVN_GETDISPINFOW (TVN_FIRST-52)
   3386 #define TVN_SETDISPINFOA (TVN_FIRST-4)
   3387 #define TVN_SETDISPINFOW (TVN_FIRST-53)
   3388 
   3389 #define TVIF_DI_SETITEM 0x1000
   3390 
   3391 #define TV_DISPINFOA NMTVDISPINFOA
   3392 #define TV_DISPINFOW NMTVDISPINFOW
   3393 #define TV_DISPINFO NMTVDISPINFO
   3394 
   3395   typedef struct tagTVDISPINFOA {
   3396     NMHDR hdr;
   3397     TVITEMA item;
   3398   } NMTVDISPINFOA,*LPNMTVDISPINFOA;
   3399 
   3400   typedef struct tagTVDISPINFOW {
   3401     NMHDR hdr;
   3402     TVITEMW item;
   3403   } NMTVDISPINFOW,*LPNMTVDISPINFOW;
   3404 
   3405 #define NMTVDISPINFO __MINGW_NAME_AW(NMTVDISPINFO)
   3406 #define LPNMTVDISPINFO __MINGW_NAME_AW(LPNMTVDISPINFO)
   3407 
   3408 #if (_WIN32_IE >= 0x0600)
   3409 
   3410 typedef struct tagTVDISPINFOEXA {
   3411     NMHDR hdr;
   3412     TVITEMEXA item;
   3413 } NMTVDISPINFOEXA, *LPNMTVDISPINFOEXA;
   3414 
   3415 typedef struct tagTVDISPINFOEXW {
   3416     NMHDR hdr;
   3417     TVITEMEXW item;
   3418 } NMTVDISPINFOEXW, *LPNMTVDISPINFOEXW;
   3419 
   3420 #define NMTVDISPINFOEX   __MINGW_NAME_AW(NMTVDISPINFOEX)
   3421 #define LPNMTVDISPINFOEX __MINGW_NAME_AW(LPNMTVDISPINFOEX)
   3422 
   3423 #define TV_DISPINFOEXA NMTVDISPINFOEXA
   3424 #define TV_DISPINFOEXW NMTVDISPINFOEXW
   3425 #define TV_DISPINFOEX  NMTVDISPINFOEX
   3426 
   3427 #endif /* (_WIN32_IE >= 0x0600) */
   3428 
   3429 #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
   3430 #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
   3431 #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
   3432 #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
   3433 #define TVN_BEGINDRAGA (TVN_FIRST-7)
   3434 #define TVN_BEGINDRAGW (TVN_FIRST-56)
   3435 #define TVN_BEGINRDRAGA (TVN_FIRST-8)
   3436 #define TVN_BEGINRDRAGW (TVN_FIRST-57)
   3437 #define TVN_DELETEITEMA (TVN_FIRST-9)
   3438 #define TVN_DELETEITEMW (TVN_FIRST-58)
   3439 #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
   3440 #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
   3441 #define TVN_ENDLABELEDITA (TVN_FIRST-11)
   3442 #define TVN_ENDLABELEDITW (TVN_FIRST-60)
   3443 #define TVN_KEYDOWN (TVN_FIRST-12)
   3444 #define TVN_GETINFOTIPA (TVN_FIRST-13)
   3445 #define TVN_GETINFOTIPW (TVN_FIRST-14)
   3446 #define TVN_SINGLEEXPAND (TVN_FIRST-15)
   3447 
   3448 #define TVNRET_DEFAULT 0
   3449 #define TVNRET_SKIPOLD 1
   3450 #define TVNRET_SKIPNEW 2
   3451 
   3452 #define TV_KEYDOWN NMTVKEYDOWN
   3453 
   3454 #include <pshpack1.h>
   3455 
   3456   typedef struct tagTVKEYDOWN {
   3457     NMHDR hdr;
   3458     WORD wVKey;
   3459     UINT flags;
   3460   } NMTVKEYDOWN,*LPNMTVKEYDOWN;
   3461 
   3462 #include <poppack.h>
   3463 
   3464 #define TVN_SELCHANGING __MINGW_NAME_AW(TVN_SELCHANGING)
   3465 #define TVN_SELCHANGED __MINGW_NAME_AW(TVN_SELCHANGED)
   3466 #define TVN_GETDISPINFO __MINGW_NAME_AW(TVN_GETDISPINFO)
   3467 #define TVN_SETDISPINFO __MINGW_NAME_AW(TVN_SETDISPINFO)
   3468 #define TVN_ITEMEXPANDING __MINGW_NAME_AW(TVN_ITEMEXPANDING)
   3469 #define TVN_ITEMEXPANDED __MINGW_NAME_AW(TVN_ITEMEXPANDED)
   3470 #define TVN_BEGINDRAG __MINGW_NAME_AW(TVN_BEGINDRAG)
   3471 #define TVN_BEGINRDRAG __MINGW_NAME_AW(TVN_BEGINRDRAG)
   3472 #define TVN_DELETEITEM __MINGW_NAME_AW(TVN_DELETEITEM)
   3473 #define TVN_BEGINLABELEDIT __MINGW_NAME_AW(TVN_BEGINLABELEDIT)
   3474 #define TVN_ENDLABELEDIT __MINGW_NAME_AW(TVN_ENDLABELEDIT)
   3475 
   3476 #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW,clrTextBk)
   3477 
   3478   typedef struct tagNMTVCUSTOMDRAW {
   3479     NMCUSTOMDRAW nmcd;
   3480     COLORREF clrText;
   3481     COLORREF clrTextBk;
   3482     int iLevel;
   3483   } NMTVCUSTOMDRAW,*LPNMTVCUSTOMDRAW;
   3484 
   3485   typedef struct tagNMTVGETINFOTIPA {
   3486     NMHDR hdr;
   3487     LPSTR pszText;
   3488     int cchTextMax;
   3489     HTREEITEM hItem;
   3490     LPARAM lParam;
   3491   } NMTVGETINFOTIPA,*LPNMTVGETINFOTIPA;
   3492 
   3493   typedef struct tagNMTVGETINFOTIPW {
   3494     NMHDR hdr;
   3495     LPWSTR pszText;
   3496     int cchTextMax;
   3497     HTREEITEM hItem;
   3498     LPARAM lParam;
   3499   } NMTVGETINFOTIPW,*LPNMTVGETINFOTIPW;
   3500 
   3501 #define TVN_GETINFOTIP __MINGW_NAME_AW(TVN_GETINFOTIP)
   3502 #define NMTVGETINFOTIP __MINGW_NAME_AW(NMTVGETINFOTIP)
   3503 #define LPNMTVGETINFOTIP __MINGW_NAME_AW(LPNMTVGETINFOTIP)
   3504 
   3505 #define TVCDRF_NOIMAGES 0x10000
   3506 #endif
   3507 
   3508 #ifndef NOUSEREXCONTROLS
   3509 
   3510 #define WC_COMBOBOXEXW L"ComboBoxEx32"
   3511 #define WC_COMBOBOXEXA "ComboBoxEx32"
   3512 
   3513 #define WC_COMBOBOXEX __MINGW_NAME_AW(WC_COMBOBOXEX)
   3514 
   3515 #define CBEIF_TEXT 0x1
   3516 #define CBEIF_IMAGE 0x2
   3517 #define CBEIF_SELECTEDIMAGE 0x4
   3518 #define CBEIF_OVERLAY 0x8
   3519 #define CBEIF_INDENT 0x10
   3520 #define CBEIF_LPARAM 0x20
   3521 
   3522 #define CBEIF_DI_SETITEM 0x10000000
   3523 
   3524   typedef struct tagCOMBOBOXEXITEMA {
   3525     UINT mask;
   3526     INT_PTR iItem;
   3527     LPSTR pszText;
   3528     int cchTextMax;
   3529     int iImage;
   3530     int iSelectedImage;
   3531     int iOverlay;
   3532     int iIndent;
   3533     LPARAM lParam;
   3534   } COMBOBOXEXITEMA,*PCOMBOBOXEXITEMA;
   3535   typedef COMBOBOXEXITEMA CONST *PCCOMBOEXITEMA;
   3536 
   3537   typedef struct tagCOMBOBOXEXITEMW
   3538   {
   3539     UINT mask;
   3540     INT_PTR iItem;
   3541     LPWSTR pszText;
   3542     int cchTextMax;
   3543     int iImage;
   3544     int iSelectedImage;
   3545     int iOverlay;
   3546     int iIndent;
   3547     LPARAM lParam;
   3548   } COMBOBOXEXITEMW,*PCOMBOBOXEXITEMW;
   3549   typedef COMBOBOXEXITEMW CONST *PCCOMBOEXITEMW;
   3550 
   3551 #define COMBOBOXEXITEM __MINGW_NAME_AW(COMBOBOXEXITEM)
   3552 #define PCOMBOBOXEXITEM __MINGW_NAME_AW(PCOMBOBOXEXITEM)
   3553 #define PCCOMBOBOXEXITEM __MINGW_NAME_AW(PCCOMBOBOXEXITEM)
   3554 
   3555 #define CBEM_INSERTITEMA (WM_USER+1)
   3556 #define CBEM_SETIMAGELIST (WM_USER+2)
   3557 #define CBEM_GETIMAGELIST (WM_USER+3)
   3558 #define CBEM_GETITEMA (WM_USER+4)
   3559 #define CBEM_SETITEMA (WM_USER+5)
   3560 #define CBEM_DELETEITEM CB_DELETESTRING
   3561 #define CBEM_GETCOMBOCONTROL (WM_USER+6)
   3562 #define CBEM_GETEDITCONTROL (WM_USER+7)
   3563 #define CBEM_SETEXSTYLE (WM_USER+8)
   3564 #define CBEM_SETEXTENDEDSTYLE (WM_USER+14)
   3565 #define CBEM_GETEXSTYLE (WM_USER+9)
   3566 #define CBEM_GETEXTENDEDSTYLE (WM_USER+9)
   3567 #define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
   3568 #define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
   3569 #define CBEM_HASEDITCHANGED (WM_USER+10)
   3570 #define CBEM_INSERTITEMW (WM_USER+11)
   3571 #define CBEM_SETITEMW (WM_USER+12)
   3572 #define CBEM_GETITEMW (WM_USER+13)
   3573 
   3574 #define CBEM_INSERTITEM __MINGW_NAME_AW(CBEM_INSERTITEM)
   3575 #define CBEM_SETITEM __MINGW_NAME_AW(CBEM_SETITEM)
   3576 #define CBEM_GETITEM __MINGW_NAME_AW(CBEM_GETITEM)
   3577 
   3578 #define CBEM_SETWINDOWTHEME CCM_SETWINDOWTHEME
   3579 
   3580 #define CBES_EX_NOEDITIMAGE 0x1
   3581 #define CBES_EX_NOEDITIMAGEINDENT 0x2
   3582 #define CBES_EX_PATHWORDBREAKPROC 0x4
   3583 #define CBES_EX_NOSIZELIMIT 0x8
   3584 #define CBES_EX_CASESENSITIVE 0x10
   3585 
   3586   typedef struct {
   3587     NMHDR hdr;
   3588     COMBOBOXEXITEMA ceItem;
   3589   } NMCOMBOBOXEXA,*PNMCOMBOBOXEXA;
   3590 
   3591   typedef struct {
   3592     NMHDR hdr;
   3593     COMBOBOXEXITEMW ceItem;
   3594   } NMCOMBOBOXEXW,*PNMCOMBOBOXEXW;
   3595 
   3596 #define NMCOMBOBOXEX __MINGW_NAME_AW(NMCOMBOBOXEX)
   3597 #define PNMCOMBOBOXEX __MINGW_NAME_AW(PNMCOMBOBOXEX)
   3598 #define CBEN_GETDISPINFO __MINGW_NAME_AW(CBEN_GETDISPINFO)
   3599 
   3600 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
   3601 #define CBEN_INSERTITEM (CBEN_FIRST - 1)
   3602 #define CBEN_DELETEITEM (CBEN_FIRST - 2)
   3603 #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
   3604 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
   3605 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
   3606 
   3607 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
   3608 
   3609 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
   3610 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
   3611 
   3612 #define CBEN_DRAGBEGIN __MINGW_NAME_AW(CBEN_DRAGBEGIN)
   3613 
   3614 #define CBEN_ENDEDIT __MINGW_NAME_AW(CBEN_ENDEDIT)
   3615 
   3616 #define CBENF_KILLFOCUS 1
   3617 #define CBENF_RETURN 2
   3618 #define CBENF_ESCAPE 3
   3619 #define CBENF_DROPDOWN 4
   3620 
   3621 #define CBEMAXSTRLEN 260
   3622 
   3623   typedef struct {
   3624     NMHDR hdr;
   3625     int iItemid;
   3626     WCHAR szText[CBEMAXSTRLEN];
   3627   }NMCBEDRAGBEGINW,*LPNMCBEDRAGBEGINW,*PNMCBEDRAGBEGINW;
   3628 
   3629   typedef struct {
   3630     NMHDR hdr;
   3631     int iItemid;
   3632     char szText[CBEMAXSTRLEN];
   3633   }NMCBEDRAGBEGINA,*LPNMCBEDRAGBEGINA,*PNMCBEDRAGBEGINA;
   3634 
   3635 #define NMCBEDRAGBEGIN __MINGW_NAME_AW(NMCBEDRAGBEGIN)
   3636 #define LPNMCBEDRAGBEGIN __MINGW_NAME_AW(LPNMCBEDRAGBEGIN)
   3637 #define PNMCBEDRAGBEGIN __MINGW_NAME_AW(PNMCBEDRAGBEGIN)
   3638 
   3639   typedef struct {
   3640     NMHDR hdr;
   3641     WINBOOL fChanged;
   3642     int iNewSelection;
   3643     WCHAR szText[CBEMAXSTRLEN];
   3644     int iWhy;
   3645   } NMCBEENDEDITW,*LPNMCBEENDEDITW,*PNMCBEENDEDITW;
   3646 
   3647   typedef struct {
   3648     NMHDR hdr;
   3649     WINBOOL fChanged;
   3650     int iNewSelection;
   3651     char szText[CBEMAXSTRLEN];
   3652     int iWhy;
   3653   } NMCBEENDEDITA,*LPNMCBEENDEDITA,*PNMCBEENDEDITA;
   3654 
   3655 #define NMCBEENDEDIT __MINGW_NAME_AW(NMCBEENDEDIT)
   3656 #define LPNMCBEENDEDIT __MINGW_NAME_AW(LPNMCBEENDEDIT)
   3657 #define PNMCBEENDEDIT __MINGW_NAME_AW(PNMCBEENDEDIT)
   3658 
   3659 #endif
   3660 
   3661 #ifndef NOTABCONTROL
   3662 
   3663 #define WC_TABCONTROLA "SysTabControl32"
   3664 #define WC_TABCONTROLW L"SysTabControl32"
   3665 #define WC_TABCONTROL __MINGW_NAME_AW(WC_TABCONTROL)
   3666 
   3667 #define TCS_SCROLLOPPOSITE 0x1
   3668 #define TCS_BOTTOM 0x2
   3669 #define TCS_RIGHT 0x2
   3670 #define TCS_MULTISELECT 0x4
   3671 #define TCS_FLATBUTTONS 0x8
   3672 #define TCS_FORCEICONLEFT 0x10
   3673 #define TCS_FORCELABELLEFT 0x20
   3674 #define TCS_HOTTRACK 0x40
   3675 #define TCS_VERTICAL 0x80
   3676 #define TCS_TABS 0x0
   3677 #define TCS_BUTTONS 0x100
   3678 #define TCS_SINGLELINE 0x0
   3679 #define TCS_MULTILINE 0x200
   3680 #define TCS_RIGHTJUSTIFY 0x0
   3681 #define TCS_FIXEDWIDTH 0x400
   3682 #define TCS_RAGGEDRIGHT 0x800
   3683 #define TCS_FOCUSONBUTTONDOWN 0x1000
   3684 #define TCS_OWNERDRAWFIXED 0x2000
   3685 #define TCS_TOOLTIPS 0x4000
   3686 #define TCS_FOCUSNEVER 0x8000
   3687 
   3688 #define TCS_EX_FLATSEPARATORS 0x1
   3689 #define TCS_EX_REGISTERDROP 0x2
   3690 
   3691 #define TCM_GETIMAGELIST (TCM_FIRST+2)
   3692 #define TabCtrl_GetImageList(hwnd) (HIMAGELIST)SNDMSG((hwnd),TCM_GETIMAGELIST,(WPARAM)0,(LPARAM)0)
   3693 
   3694 #define TCM_SETIMAGELIST (TCM_FIRST+3)
   3695 #define TabCtrl_SetImageList(hwnd,himl) (HIMAGELIST)SNDMSG((hwnd),TCM_SETIMAGELIST,0,(LPARAM)(HIMAGELIST)(himl))
   3696 
   3697 #define TCM_GETITEMCOUNT (TCM_FIRST+4)
   3698 #define TabCtrl_GetItemCount(hwnd) (int)SNDMSG((hwnd),TCM_GETITEMCOUNT,(WPARAM)0,(LPARAM)0)
   3699 
   3700 #define TCIF_TEXT 0x1
   3701 #define TCIF_IMAGE 0x2
   3702 #define TCIF_RTLREADING 0x4
   3703 #define TCIF_PARAM 0x8
   3704 #define TCIF_STATE 0x10
   3705 
   3706 #define TCIS_BUTTONPRESSED 0x1
   3707 #define TCIS_HIGHLIGHTED 0x2
   3708 
   3709 #define TC_ITEMHEADERA TCITEMHEADERA
   3710 #define TC_ITEMHEADERW TCITEMHEADERW
   3711 #define TC_ITEMHEADER TCITEMHEADER
   3712 
   3713   typedef struct tagTCITEMHEADERA {
   3714     UINT mask;
   3715     UINT lpReserved1;
   3716     UINT lpReserved2;
   3717     LPSTR pszText;
   3718     int cchTextMax;
   3719     int iImage;
   3720   } TCITEMHEADERA,*LPTCITEMHEADERA;
   3721 
   3722   typedef struct tagTCITEMHEADERW {
   3723     UINT mask;
   3724     UINT lpReserved1;
   3725     UINT lpReserved2;
   3726     LPWSTR pszText;
   3727     int cchTextMax;
   3728     int iImage;
   3729   } TCITEMHEADERW,*LPTCITEMHEADERW;
   3730 
   3731 #define TCITEMHEADER __MINGW_NAME_AW(TCITEMHEADER)
   3732 #define LPTCITEMHEADER __MINGW_NAME_AW(LPTCITEMHEADER)
   3733 
   3734 #define TC_ITEMA TCITEMA
   3735 #define TC_ITEMW TCITEMW
   3736 #define TC_ITEM TCITEM
   3737 
   3738   typedef struct tagTCITEMA {
   3739     UINT mask;
   3740     DWORD dwState;
   3741     DWORD dwStateMask;
   3742     LPSTR pszText;
   3743     int cchTextMax;
   3744     int iImage;
   3745     LPARAM lParam;
   3746   } TCITEMA,*LPTCITEMA;
   3747 
   3748   typedef struct tagTCITEMW {
   3749     UINT mask;
   3750     DWORD dwState;
   3751     DWORD dwStateMask;
   3752     LPWSTR pszText;
   3753     int cchTextMax;
   3754     int iImage;
   3755     LPARAM lParam;
   3756   } TCITEMW,*LPTCITEMW;
   3757 
   3758 #define TCITEM __MINGW_NAME_AW(TCITEM)
   3759 #define LPTCITEM __MINGW_NAME_AW(LPTCITEM)
   3760 
   3761 #define TCM_GETITEMA (TCM_FIRST+5)
   3762 #define TCM_GETITEMW (TCM_FIRST+60)
   3763 
   3764 #define TCM_GETITEM __MINGW_NAME_AW(TCM_GETITEM)
   3765 
   3766 #define TabCtrl_GetItem(hwnd,iItem,pitem) (WINBOOL)SNDMSG((hwnd),TCM_GETITEM,(WPARAM)(int)(iItem),(LPARAM)(TC_ITEM *)(pitem))
   3767 
   3768 #define TCM_SETITEMA (TCM_FIRST+6)
   3769 #define TCM_SETITEMW (TCM_FIRST+61)
   3770 
   3771 #define TCM_SETITEM __MINGW_NAME_AW(TCM_SETITEM)
   3772 
   3773 #define TabCtrl_SetItem(hwnd,iItem,pitem) (WINBOOL)SNDMSG((hwnd),TCM_SETITEM,(WPARAM)(int)(iItem),(LPARAM)(TC_ITEM *)(pitem))
   3774 
   3775 #define TCM_INSERTITEMA (TCM_FIRST+7)
   3776 #define TCM_INSERTITEMW (TCM_FIRST+62)
   3777 
   3778 #define TCM_INSERTITEM __MINGW_NAME_AW(TCM_INSERTITEM)
   3779 
   3780 #define TabCtrl_InsertItem(hwnd,iItem,pitem) (int)SNDMSG((hwnd),TCM_INSERTITEM,(WPARAM)(int)(iItem),(LPARAM)(const TC_ITEM *)(pitem))
   3781 
   3782 #define TCM_DELETEITEM (TCM_FIRST+8)
   3783 #define TabCtrl_DeleteItem(hwnd,i) (WINBOOL)SNDMSG((hwnd),TCM_DELETEITEM,(WPARAM)(int)(i),(LPARAM)0)
   3784 
   3785 #define TCM_DELETEALLITEMS (TCM_FIRST+9)
   3786 #define TabCtrl_DeleteAllItems(hwnd) (WINBOOL)SNDMSG((hwnd),TCM_DELETEALLITEMS,(WPARAM)0,(LPARAM)0)
   3787 
   3788 #define TCM_GETITEMRECT (TCM_FIRST+10)
   3789 #define TabCtrl_GetItemRect(hwnd,i,prc) (WINBOOL)SNDMSG((hwnd),TCM_GETITEMRECT,(WPARAM)(int)(i),(LPARAM)(RECT *)(prc))
   3790 
   3791 #define TCM_GETCURSEL (TCM_FIRST+11)
   3792 #define TabCtrl_GetCurSel(hwnd) (int)SNDMSG((hwnd),TCM_GETCURSEL,0,0)
   3793 
   3794 #define TCM_SETCURSEL (TCM_FIRST+12)
   3795 #define TabCtrl_SetCurSel(hwnd,i) (int)SNDMSG((hwnd),TCM_SETCURSEL,(WPARAM)(i),0)
   3796 
   3797 #define TCHT_NOWHERE 0x1
   3798 #define TCHT_ONITEMICON 0x2
   3799 #define TCHT_ONITEMLABEL 0x4
   3800 #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
   3801 
   3802 #define LPTC_HITTESTINFO LPTCHITTESTINFO
   3803 #define TC_HITTESTINFO TCHITTESTINFO
   3804 
   3805   typedef struct tagTCHITTESTINFO {
   3806     POINT pt;
   3807     UINT flags;
   3808   } TCHITTESTINFO,*LPTCHITTESTINFO;
   3809 
   3810 #define TCM_HITTEST (TCM_FIRST+13)
   3811 #define TabCtrl_HitTest(hwndTC,pinfo) (int)SNDMSG((hwndTC),TCM_HITTEST,0,(LPARAM)(TC_HITTESTINFO *)(pinfo))
   3812 #define TCM_SETITEMEXTRA (TCM_FIRST+14)
   3813 #define TabCtrl_SetItemExtra(hwndTC,cb) (WINBOOL)SNDMSG((hwndTC),TCM_SETITEMEXTRA,(WPARAM)(cb),(LPARAM)0)
   3814 #define TCM_ADJUSTRECT (TCM_FIRST+40)
   3815 #define TabCtrl_AdjustRect(hwnd,bLarger,prc) (int)SNDMSG(hwnd,TCM_ADJUSTRECT,(WPARAM)(WINBOOL)(bLarger),(LPARAM)(RECT *)prc)
   3816 #define TCM_SETITEMSIZE (TCM_FIRST+41)
   3817 #define TabCtrl_SetItemSize(hwnd,x,y) (DWORD)SNDMSG((hwnd),TCM_SETITEMSIZE,0,MAKELPARAM(x,y))
   3818 #define TCM_REMOVEIMAGE (TCM_FIRST+42)
   3819 #define TabCtrl_RemoveImage(hwnd,i) (void)SNDMSG((hwnd),TCM_REMOVEIMAGE,i,(LPARAM)0)
   3820 #define TCM_SETPADDING (TCM_FIRST+43)
   3821 #define TabCtrl_SetPadding(hwnd,cx,cy) (void)SNDMSG((hwnd),TCM_SETPADDING,0,MAKELPARAM(cx,cy))
   3822 #define TCM_GETROWCOUNT (TCM_FIRST+44)
   3823 #define TabCtrl_GetRowCount(hwnd) (int)SNDMSG((hwnd),TCM_GETROWCOUNT,(WPARAM)0,(LPARAM)0)
   3824 #define TCM_GETTOOLTIPS (TCM_FIRST+45)
   3825 #define TabCtrl_GetToolTips(hwnd) (HWND)SNDMSG((hwnd),TCM_GETTOOLTIPS,(WPARAM)0,(LPARAM)0)
   3826 #define TCM_SETTOOLTIPS (TCM_FIRST+46)
   3827 #define TabCtrl_SetToolTips(hwnd,hwndTT) (void)SNDMSG((hwnd),TCM_SETTOOLTIPS,(WPARAM)(hwndTT),(LPARAM)0)
   3828 #define TCM_GETCURFOCUS (TCM_FIRST+47)
   3829 #define TabCtrl_GetCurFocus(hwnd) (int)SNDMSG((hwnd),TCM_GETCURFOCUS,0,0)
   3830 #define TCM_SETCURFOCUS (TCM_FIRST+48)
   3831 #define TabCtrl_SetCurFocus(hwnd,i) SNDMSG((hwnd),TCM_SETCURFOCUS,i,0)
   3832 #define TCM_SETMINTABWIDTH (TCM_FIRST+49)
   3833 #define TabCtrl_SetMinTabWidth(hwnd,x) (int)SNDMSG((hwnd),TCM_SETMINTABWIDTH,0,x)
   3834 #define TCM_DESELECTALL (TCM_FIRST+50)
   3835 #define TabCtrl_DeselectAll(hwnd,fExcludeFocus) (void)SNDMSG((hwnd),TCM_DESELECTALL,fExcludeFocus,0)
   3836 #define TCM_HIGHLIGHTITEM (TCM_FIRST+51)
   3837 #define TabCtrl_HighlightItem(hwnd,i,fHighlight) (WINBOOL)SNDMSG((hwnd),TCM_HIGHLIGHTITEM,(WPARAM)(i),(LPARAM)MAKELONG (fHighlight,0))
   3838 #define TCM_SETEXTENDEDSTYLE (TCM_FIRST+52)
   3839 #define TabCtrl_SetExtendedStyle(hwnd,dw) (DWORD)SNDMSG((hwnd),TCM_SETEXTENDEDSTYLE,0,dw)
   3840 #define TCM_GETEXTENDEDSTYLE (TCM_FIRST+53)
   3841 #define TabCtrl_GetExtendedStyle(hwnd) (DWORD)SNDMSG((hwnd),TCM_GETEXTENDEDSTYLE,0,0)
   3842 #define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
   3843 #define TabCtrl_SetUnicodeFormat(hwnd,fUnicode) (WINBOOL)SNDMSG((hwnd),TCM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
   3844 #define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
   3845 #define TabCtrl_GetUnicodeFormat(hwnd) (WINBOOL)SNDMSG((hwnd),TCM_GETUNICODEFORMAT,0,0)
   3846 
   3847 #define TCN_KEYDOWN (TCN_FIRST - 0)
   3848 
   3849 #define TC_KEYDOWN NMTCKEYDOWN
   3850 
   3851 #include <pshpack1.h>
   3852 
   3853   typedef struct tagTCKEYDOWN {
   3854     NMHDR hdr;
   3855     WORD wVKey;
   3856     UINT flags;
   3857   } NMTCKEYDOWN;
   3858 
   3859 #include <poppack.h>
   3860 
   3861 #define TCN_SELCHANGE (TCN_FIRST - 1)
   3862 #define TCN_SELCHANGING (TCN_FIRST - 2)
   3863 #define TCN_GETOBJECT (TCN_FIRST - 3)
   3864 #define TCN_FOCUSCHANGE (TCN_FIRST - 4)
   3865 #endif
   3866 
   3867 #ifndef NOANIMATE
   3868 
   3869 #define ANIMATE_CLASSW L"SysAnimate32"
   3870 #define ANIMATE_CLASSA "SysAnimate32"
   3871 
   3872 #define ANIMATE_CLASS __MINGW_NAME_AW(ANIMATE_CLASS)
   3873 
   3874 #define ACS_CENTER 0x1
   3875 #define ACS_TRANSPARENT 0x2
   3876 #define ACS_AUTOPLAY 0x4
   3877 #define ACS_TIMER 0x8
   3878 
   3879 #define ACM_OPENA (WM_USER+100)
   3880 #define ACM_OPENW (WM_USER+103)
   3881 
   3882 #define ACM_OPEN __MINGW_NAME_AW(ACM_OPEN)
   3883 
   3884 #define ACM_PLAY (WM_USER+101)
   3885 #define ACM_STOP (WM_USER+102)
   3886 
   3887 #define ACN_START 1
   3888 #define ACN_STOP 2
   3889 
   3890 #define Animate_Create(hwndP,id,dwStyle,hInstance) CreateWindow(ANIMATE_CLASS,NULL,dwStyle,0,0,0,0,hwndP,(HMENU)(id),hInstance,NULL)
   3891 
   3892 #define Animate_Open(hwnd,szName) (WINBOOL)SNDMSG(hwnd,ACM_OPEN,0,(LPARAM)(LPTSTR)(szName))
   3893 #define Animate_OpenEx(hwnd,hInst,szName) (WINBOOL)SNDMSG(hwnd,ACM_OPEN,(WPARAM)(hInst),(LPARAM)(LPTSTR)(szName))
   3894 #define Animate_Play(hwnd,from,to,rep) (WINBOOL)SNDMSG(hwnd,ACM_PLAY,(WPARAM)(rep),(LPARAM)MAKELONG(from,to))
   3895 #define Animate_Stop(hwnd) (WINBOOL)SNDMSG(hwnd,ACM_STOP,0,0)
   3896 #define Animate_Close(hwnd) Animate_Open(hwnd,NULL)
   3897 #define Animate_Seek(hwnd,frame) Animate_Play(hwnd,frame,frame,1)
   3898 #endif
   3899 
   3900 #ifndef NOMONTHCAL
   3901 #define MONTHCAL_CLASSW L"SysMonthCal32"
   3902 #define MONTHCAL_CLASSA "SysMonthCal32"
   3903 
   3904 #define MONTHCAL_CLASS __MINGW_NAME_AW(MONTHCAL_CLASS)
   3905 
   3906   typedef DWORD MONTHDAYSTATE,*LPMONTHDAYSTATE;
   3907 
   3908 #define MCM_FIRST 0x1000
   3909 
   3910 #define MCM_GETCURSEL (MCM_FIRST+1)
   3911 #define MonthCal_GetCurSel(hmc,pst) (WINBOOL)SNDMSG(hmc,MCM_GETCURSEL,0,(LPARAM)(pst))
   3912 #define MCM_SETCURSEL (MCM_FIRST+2)
   3913 #define MonthCal_SetCurSel(hmc,pst) (WINBOOL)SNDMSG(hmc,MCM_SETCURSEL,0,(LPARAM)(pst))
   3914 #define MCM_GETMAXSELCOUNT (MCM_FIRST+3)
   3915 #define MonthCal_GetMaxSelCount(hmc) (DWORD)SNDMSG(hmc,MCM_GETMAXSELCOUNT,(WPARAM)0,(LPARAM)0)
   3916 #define MCM_SETMAXSELCOUNT (MCM_FIRST+4)
   3917 #define MonthCal_SetMaxSelCount(hmc,n) (WINBOOL)SNDMSG(hmc,MCM_SETMAXSELCOUNT,(WPARAM)(n),(LPARAM)0)
   3918 #define MCM_GETSELRANGE (MCM_FIRST+5)
   3919 #define MonthCal_GetSelRange(hmc,rgst) SNDMSG(hmc,MCM_GETSELRANGE,0,(LPARAM)(rgst))
   3920 #define MCM_SETSELRANGE (MCM_FIRST+6)
   3921 #define MonthCal_SetSelRange(hmc,rgst) SNDMSG(hmc,MCM_SETSELRANGE,0,(LPARAM)(rgst))
   3922 #define MCM_GETMONTHRANGE (MCM_FIRST+7)
   3923 #define MonthCal_GetMonthRange(hmc,gmr,rgst) (DWORD)SNDMSG(hmc,MCM_GETMONTHRANGE,(WPARAM)(gmr),(LPARAM)(rgst))
   3924 #define MCM_SETDAYSTATE (MCM_FIRST+8)
   3925 #define MonthCal_SetDayState(hmc,cbds,rgds) SNDMSG(hmc,MCM_SETDAYSTATE,(WPARAM)(cbds),(LPARAM)(rgds))
   3926 #define MCM_GETMINREQRECT (MCM_FIRST+9)
   3927 #define MonthCal_GetMinReqRect(hmc,prc) SNDMSG(hmc,MCM_GETMINREQRECT,0,(LPARAM)(prc))
   3928 #define MCM_SETCOLOR (MCM_FIRST+10)
   3929 #define MonthCal_SetColor(hmc,iColor,clr) SNDMSG(hmc,MCM_SETCOLOR,iColor,clr)
   3930 #define MCM_GETCOLOR (MCM_FIRST+11)
   3931 #define MonthCal_GetColor(hmc,iColor) SNDMSG(hmc,MCM_GETCOLOR,iColor,0)
   3932 
   3933 #define MCSC_BACKGROUND 0
   3934 #define MCSC_TEXT 1
   3935 #define MCSC_TITLEBK 2
   3936 #define MCSC_TITLETEXT 3
   3937 #define MCSC_MONTHBK 4
   3938 #define MCSC_TRAILINGTEXT 5
   3939 
   3940 #define MCM_SETTODAY (MCM_FIRST+12)
   3941 #define MonthCal_SetToday(hmc,pst) SNDMSG(hmc,MCM_SETTODAY,0,(LPARAM)(pst))
   3942 #define MCM_GETTODAY (MCM_FIRST+13)
   3943 #define MonthCal_GetToday(hmc,pst) (WINBOOL)SNDMSG(hmc,MCM_GETTODAY,0,(LPARAM)(pst))
   3944 #define MCM_HITTEST (MCM_FIRST+14)
   3945 #define MonthCal_HitTest(hmc,pinfo) SNDMSG(hmc,MCM_HITTEST,0,(LPARAM)(PMCHITTESTINFO)(pinfo))
   3946 
   3947   typedef struct {
   3948     UINT cbSize;
   3949     POINT pt;
   3950 
   3951     UINT uHit;
   3952     SYSTEMTIME st;
   3953   } MCHITTESTINFO,*PMCHITTESTINFO;
   3954 
   3955 #define MCHT_TITLE 0x10000
   3956 #define MCHT_CALENDAR 0x20000
   3957 #define MCHT_TODAYLINK 0x30000
   3958 
   3959 #define MCHT_NEXT 0x1000000
   3960 #define MCHT_PREV 0x2000000
   3961 
   3962 #define MCHT_NOWHERE 0x0
   3963 
   3964 #define MCHT_TITLEBK (MCHT_TITLE)
   3965 #define MCHT_TITLEMONTH (MCHT_TITLE | 0x1)
   3966 #define MCHT_TITLEYEAR (MCHT_TITLE | 0x2)
   3967 #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x3)
   3968 #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x3)
   3969 
   3970 #define MCHT_CALENDARBK (MCHT_CALENDAR)
   3971 #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x1)
   3972 #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
   3973 #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
   3974 #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x2)
   3975 #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x3)
   3976 
   3977 #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST+15)
   3978 #define MonthCal_SetFirstDayOfWeek(hmc,iDay) SNDMSG(hmc,MCM_SETFIRSTDAYOFWEEK,0,iDay)
   3979 #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST+16)
   3980 #define MonthCal_GetFirstDayOfWeek(hmc) (DWORD)SNDMSG(hmc,MCM_GETFIRSTDAYOFWEEK,0,0)
   3981 #define MCM_GETRANGE (MCM_FIRST+17)
   3982 #define MonthCal_GetRange(hmc,rgst) (DWORD)SNDMSG(hmc,MCM_GETRANGE,0,(LPARAM)(rgst))
   3983 #define MCM_SETRANGE (MCM_FIRST+18)
   3984 #define MonthCal_SetRange(hmc,gd,rgst) (WINBOOL)SNDMSG(hmc,MCM_SETRANGE,(WPARAM)(gd),(LPARAM)(rgst))
   3985 #define MCM_GETMONTHDELTA (MCM_FIRST+19)
   3986 #define MonthCal_GetMonthDelta(hmc) (int)SNDMSG(hmc,MCM_GETMONTHDELTA,0,0)
   3987 #define MCM_SETMONTHDELTA (MCM_FIRST+20)
   3988 #define MonthCal_SetMonthDelta(hmc,n) (int)SNDMSG(hmc,MCM_SETMONTHDELTA,n,0)
   3989 #define MCM_GETMAXTODAYWIDTH (MCM_FIRST+21)
   3990 #define MonthCal_GetMaxTodayWidth(hmc) (DWORD)SNDMSG(hmc,MCM_GETMAXTODAYWIDTH,0,0)
   3991 #define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
   3992 #define MonthCal_SetUnicodeFormat(hwnd,fUnicode) (WINBOOL)SNDMSG((hwnd),MCM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
   3993 #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
   3994 #define MonthCal_GetUnicodeFormat(hwnd) (WINBOOL)SNDMSG((hwnd),MCM_GETUNICODEFORMAT,0,0)
   3995 
   3996   typedef struct tagNMSELCHANGE {
   3997     NMHDR nmhdr;
   3998     SYSTEMTIME stSelStart;
   3999     SYSTEMTIME stSelEnd;
   4000   } NMSELCHANGE,*LPNMSELCHANGE;
   4001 
   4002 #define MCN_SELCHANGE (MCN_FIRST+1)
   4003 
   4004   typedef struct tagNMDAYSTATE {
   4005     NMHDR nmhdr;
   4006     SYSTEMTIME stStart;
   4007     int cDayState;
   4008 
   4009     LPMONTHDAYSTATE prgDayState;
   4010   } NMDAYSTATE,*LPNMDAYSTATE;
   4011 
   4012 #define MCN_GETDAYSTATE (MCN_FIRST+3)
   4013 
   4014   typedef NMSELCHANGE NMSELECT,*LPNMSELECT;
   4015 
   4016 #define MCN_SELECT (MCN_FIRST+4)
   4017 
   4018 #define MCS_DAYSTATE 0x1
   4019 #define MCS_MULTISELECT 0x2
   4020 #define MCS_WEEKNUMBERS 0x4
   4021 #define MCS_NOTODAYCIRCLE 0x8
   4022 #define MCS_NOTODAY 0x10
   4023 
   4024 #define GMR_VISIBLE 0
   4025 #define GMR_DAYSTATE 1
   4026 #endif
   4027 
   4028 #ifndef NODATETIMEPICK
   4029 #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
   4030 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
   4031 
   4032 #define DATETIMEPICK_CLASS __MINGW_NAME_AW(DATETIMEPICK_CLASS)
   4033 
   4034 #define DTM_FIRST 0x1000
   4035 
   4036 #define DTM_GETSYSTEMTIME (DTM_FIRST+1)
   4037 #define DateTime_GetSystemtime(hdp,pst) (DWORD)SNDMSG(hdp,DTM_GETSYSTEMTIME,0,(LPARAM)(pst))
   4038 #define DTM_SETSYSTEMTIME (DTM_FIRST+2)
   4039 #define DateTime_SetSystemtime(hdp,gd,pst) (WINBOOL)SNDMSG(hdp,DTM_SETSYSTEMTIME,(WPARAM)(gd),(LPARAM)(pst))
   4040 #define DTM_GETRANGE (DTM_FIRST+3)
   4041 #define DateTime_GetRange(hdp,rgst) (DWORD)SNDMSG(hdp,DTM_GETRANGE,0,(LPARAM)(rgst))
   4042 #define DTM_SETRANGE (DTM_FIRST+4)
   4043 #define DateTime_SetRange(hdp,gd,rgst) (WINBOOL)SNDMSG(hdp,DTM_SETRANGE,(WPARAM)(gd),(LPARAM)(rgst))
   4044 #define DTM_SETFORMATA (DTM_FIRST+5)
   4045 #define DTM_SETFORMATW (DTM_FIRST+50)
   4046 
   4047 #define DTM_SETFORMAT __MINGW_NAME_AW(DTM_SETFORMAT)
   4048 
   4049 #define DateTime_SetFormat(hdp,sz) (WINBOOL)SNDMSG(hdp,DTM_SETFORMAT,0,(LPARAM)(sz))
   4050 
   4051 #define DTM_SETMCCOLOR (DTM_FIRST+6)
   4052 #define DateTime_SetMonthCalColor(hdp,iColor,clr) SNDMSG(hdp,DTM_SETMCCOLOR,iColor,clr)
   4053 #define DTM_GETMCCOLOR (DTM_FIRST+7)
   4054 #define DateTime_GetMonthCalColor(hdp,iColor) SNDMSG(hdp,DTM_GETMCCOLOR,iColor,0)
   4055 #define DTM_GETMONTHCAL (DTM_FIRST+8)
   4056 #define DateTime_GetMonthCal(hdp) (HWND)SNDMSG(hdp,DTM_GETMONTHCAL,0,0)
   4057 #define DTM_SETMCFONT (DTM_FIRST+9)
   4058 #define DateTime_SetMonthCalFont(hdp,hfont,fRedraw) SNDMSG(hdp,DTM_SETMCFONT,(WPARAM)(hfont),(LPARAM)(fRedraw))
   4059 #define DTM_GETMCFONT (DTM_FIRST+10)
   4060 #define DateTime_GetMonthCalFont(hdp) SNDMSG(hdp,DTM_GETMCFONT,0,0)
   4061 
   4062 #define DTS_UPDOWN 0x1
   4063 #define DTS_SHOWNONE 0x2
   4064 #define DTS_SHORTDATEFORMAT 0x0
   4065 #define DTS_LONGDATEFORMAT 0x4
   4066 #define DTS_SHORTDATECENTURYFORMAT 0xc
   4067 #define DTS_TIMEFORMAT 0x9
   4068 #define DTS_APPCANPARSE 0x10
   4069 #define DTS_RIGHTALIGN 0x20
   4070 
   4071 #define DTN_DATETIMECHANGE (DTN_FIRST+1)
   4072   typedef struct tagNMDATETIMECHANGE {
   4073     NMHDR nmhdr;
   4074     DWORD dwFlags;
   4075     SYSTEMTIME st;
   4076   } NMDATETIMECHANGE,*LPNMDATETIMECHANGE;
   4077 
   4078 #define DTN_USERSTRINGA (DTN_FIRST+2)
   4079 #define DTN_USERSTRINGW (DTN_FIRST+15)
   4080   typedef struct tagNMDATETIMESTRINGA {
   4081     NMHDR nmhdr;
   4082     LPCSTR pszUserString;
   4083     SYSTEMTIME st;
   4084     DWORD dwFlags;
   4085   } NMDATETIMESTRINGA,*LPNMDATETIMESTRINGA;
   4086 
   4087   typedef struct tagNMDATETIMESTRINGW {
   4088     NMHDR nmhdr;
   4089     LPCWSTR pszUserString;
   4090     SYSTEMTIME st;
   4091     DWORD dwFlags;
   4092   } NMDATETIMESTRINGW,*LPNMDATETIMESTRINGW;
   4093 
   4094 #define DTN_USERSTRING __MINGW_NAME_AW(DTN_USERSTRING)
   4095 #define NMDATETIMESTRING __MINGW_NAME_AW(NMDATETIMESTRING)
   4096 #define LPNMDATETIMESTRING __MINGW_NAME_AW(LPNMDATETIMESTRING)
   4097 
   4098 #define DTN_WMKEYDOWNA (DTN_FIRST+3)
   4099 #define DTN_WMKEYDOWNW (DTN_FIRST+16)
   4100   typedef struct tagNMDATETIMEWMKEYDOWNA {
   4101     NMHDR nmhdr;
   4102     int nVirtKey;
   4103     LPCSTR pszFormat;
   4104     SYSTEMTIME st;
   4105   } NMDATETIMEWMKEYDOWNA,*LPNMDATETIMEWMKEYDOWNA;
   4106 
   4107   typedef struct tagNMDATETIMEWMKEYDOWNW {
   4108     NMHDR nmhdr;
   4109     int nVirtKey;
   4110     LPCWSTR pszFormat;
   4111     SYSTEMTIME st;
   4112   } NMDATETIMEWMKEYDOWNW,*LPNMDATETIMEWMKEYDOWNW;
   4113 
   4114 #define DTN_WMKEYDOWN __MINGW_NAME_AW(DTN_WMKEYDOWN)
   4115 #define NMDATETIMEWMKEYDOWN __MINGW_NAME_AW(NMDATETIMEWMKEYDOWN)
   4116 #define LPNMDATETIMEWMKEYDOWN __MINGW_NAME_AW(LPNMDATETIMEWMKEYDOWN)
   4117 
   4118 #define DTN_FORMATA (DTN_FIRST+4)
   4119 #define DTN_FORMATW (DTN_FIRST+17)
   4120   typedef struct tagNMDATETIMEFORMATA {
   4121     NMHDR nmhdr;
   4122     LPCSTR pszFormat;
   4123     SYSTEMTIME st;
   4124     LPCSTR pszDisplay;
   4125     CHAR szDisplay[64];
   4126   } NMDATETIMEFORMATA,*LPNMDATETIMEFORMATA;
   4127 
   4128   typedef struct tagNMDATETIMEFORMATW {
   4129     NMHDR nmhdr;
   4130     LPCWSTR pszFormat;
   4131     SYSTEMTIME st;
   4132     LPCWSTR pszDisplay;
   4133     WCHAR szDisplay[64];
   4134   } NMDATETIMEFORMATW,*LPNMDATETIMEFORMATW;
   4135 
   4136 #define DTN_FORMAT __MINGW_NAME_AW(DTN_FORMAT)
   4137 #define NMDATETIMEFORMAT __MINGW_NAME_AW(NMDATETIMEFORMAT)
   4138 #define LPNMDATETIMEFORMAT __MINGW_NAME_AW(LPNMDATETIMEFORMAT)
   4139 
   4140 #define DTN_FORMATQUERYA (DTN_FIRST+5)
   4141 #define DTN_FORMATQUERYW (DTN_FIRST+18)
   4142   typedef struct tagNMDATETIMEFORMATQUERYA {
   4143     NMHDR nmhdr;
   4144     LPCSTR pszFormat;
   4145     SIZE szMax;
   4146   } NMDATETIMEFORMATQUERYA,*LPNMDATETIMEFORMATQUERYA;
   4147 
   4148   typedef struct tagNMDATETIMEFORMATQUERYW {
   4149     NMHDR nmhdr;
   4150     LPCWSTR pszFormat;
   4151     SIZE szMax;
   4152   } NMDATETIMEFORMATQUERYW,*LPNMDATETIMEFORMATQUERYW;
   4153 
   4154 #define DTN_FORMATQUERY __MINGW_NAME_AW(DTN_FORMATQUERY)
   4155 #define NMDATETIMEFORMATQUERY __MINGW_NAME_AW(NMDATETIMEFORMATQUERY)
   4156 #define LPNMDATETIMEFORMATQUERY __MINGW_NAME_AW(LPNMDATETIMEFORMATQUERY)
   4157 
   4158 #define DTN_DROPDOWN (DTN_FIRST+6)
   4159 #define DTN_CLOSEUP (DTN_FIRST+7)
   4160 
   4161 #define GDTR_MIN 0x1
   4162 #define GDTR_MAX 0x2
   4163 
   4164 #define GDT_ERROR -1
   4165 #define GDT_VALID 0
   4166 #define GDT_NONE 1
   4167 
   4168 #ifndef NOIPADDRESS
   4169 #define IPM_CLEARADDRESS (WM_USER+100)
   4170 #define IPM_SETADDRESS (WM_USER+101)
   4171 #define IPM_GETADDRESS (WM_USER+102)
   4172 #define IPM_SETRANGE (WM_USER+103)
   4173 #define IPM_SETFOCUS (WM_USER+104)
   4174 #define IPM_ISBLANK (WM_USER+105)
   4175 
   4176 #define WC_IPADDRESSW L"SysIPAddress32"
   4177 #define WC_IPADDRESSA "SysIPAddress32"
   4178 
   4179 #define WC_IPADDRESS __MINGW_NAME_AW(WC_IPADDRESS)
   4180 
   4181 #define IPN_FIELDCHANGED (IPN_FIRST - 0)
   4182   typedef struct tagNMIPADDRESS {
   4183     NMHDR hdr;
   4184     int iField;
   4185     int iValue;
   4186   } NMIPADDRESS,*LPNMIPADDRESS;
   4187 
   4188 #define MAKEIPRANGE(low,high) ((LPARAM)(WORD)(((BYTE)(high) << 8)+(BYTE)(low)))
   4189 
   4190 #define MAKEIPADDRESS(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
   4191 
   4192 #define FIRST_IPADDRESS(x) ((x>>24) & 0xff)
   4193 #define SECOND_IPADDRESS(x) ((x>>16) & 0xff)
   4194 #define THIRD_IPADDRESS(x) ((x>>8) & 0xff)
   4195 #define FOURTH_IPADDRESS(x) (x & 0xff)
   4196 #endif
   4197 
   4198 #ifndef NOPAGESCROLLER
   4199 #define WC_PAGESCROLLERW L"SysPager"
   4200 #define WC_PAGESCROLLERA "SysPager"
   4201 
   4202 #define WC_PAGESCROLLER __MINGW_NAME_AW(WC_PAGESCROLLER)
   4203 
   4204 #define PGS_VERT 0x0
   4205 #define PGS_HORZ 0x1
   4206 #define PGS_AUTOSCROLL 0x2
   4207 #define PGS_DRAGNDROP 0x4
   4208 
   4209 #define PGF_INVISIBLE 0
   4210 #define PGF_NORMAL 1
   4211 #define PGF_GRAYED 2
   4212 #define PGF_DEPRESSED 4
   4213 #define PGF_HOT 8
   4214 
   4215 #define PGB_TOPORLEFT 0
   4216 #define PGB_BOTTOMORRIGHT 1
   4217 
   4218 #define PGM_SETCHILD (PGM_FIRST+1)
   4219 #define Pager_SetChild(hwnd,hwndChild) (void)SNDMSG((hwnd),PGM_SETCHILD,0,(LPARAM)(hwndChild))
   4220 
   4221 #define PGM_RECALCSIZE (PGM_FIRST+2)
   4222 #define Pager_RecalcSize(hwnd) (void)SNDMSG((hwnd),PGM_RECALCSIZE,0,0)
   4223 
   4224 #define PGM_FORWARDMOUSE (PGM_FIRST+3)
   4225 #define Pager_ForwardMouse(hwnd,bForward) (void)SNDMSG((hwnd),PGM_FORWARDMOUSE,(WPARAM)(bForward),0)
   4226 
   4227 #define PGM_SETBKCOLOR (PGM_FIRST+4)
   4228 #define Pager_SetBkColor(hwnd,clr) (COLORREF)SNDMSG((hwnd),PGM_SETBKCOLOR,0,(LPARAM)(clr))
   4229 
   4230 #define PGM_GETBKCOLOR (PGM_FIRST+5)
   4231 #define Pager_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd),PGM_GETBKCOLOR,0,0)
   4232 
   4233 #define PGM_SETBORDER (PGM_FIRST+6)
   4234 #define Pager_SetBorder(hwnd,iBorder) (int)SNDMSG((hwnd),PGM_SETBORDER,0,(LPARAM)(iBorder))
   4235 
   4236 #define PGM_GETBORDER (PGM_FIRST+7)
   4237 #define Pager_GetBorder(hwnd) (int)SNDMSG((hwnd),PGM_GETBORDER,0,0)
   4238 
   4239 #define PGM_SETPOS (PGM_FIRST+8)
   4240 #define Pager_SetPos(hwnd,iPos) (int)SNDMSG((hwnd),PGM_SETPOS,0,(LPARAM)(iPos))
   4241 
   4242 #define PGM_GETPOS (PGM_FIRST+9)
   4243 #define Pager_GetPos(hwnd) (int)SNDMSG((hwnd),PGM_GETPOS,0,0)
   4244 
   4245 #define PGM_SETBUTTONSIZE (PGM_FIRST+10)
   4246 #define Pager_SetButtonSize(hwnd,iSize) (int)SNDMSG((hwnd),PGM_SETBUTTONSIZE,0,(LPARAM)(iSize))
   4247 
   4248 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
   4249 #define Pager_GetButtonSize(hwnd) (int)SNDMSG((hwnd),PGM_GETBUTTONSIZE,0,0)
   4250 
   4251 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
   4252 #define Pager_GetButtonState(hwnd,iButton) (DWORD)SNDMSG((hwnd),PGM_GETBUTTONSTATE,0,(LPARAM)(iButton))
   4253 
   4254 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
   4255 #define Pager_GetDropTarget(hwnd,ppdt) (void)SNDMSG((hwnd),PGM_GETDROPTARGET,0,(LPARAM)(ppdt))
   4256 
   4257 #define PGN_SCROLL (PGN_FIRST-1)
   4258 
   4259 #define PGF_SCROLLUP 1
   4260 #define PGF_SCROLLDOWN 2
   4261 #define PGF_SCROLLLEFT 4
   4262 #define PGF_SCROLLRIGHT 8
   4263 
   4264 #define PGK_SHIFT 1
   4265 #define PGK_CONTROL 2
   4266 #define PGK_MENU 4
   4267 
   4268 #include <pshpack1.h>
   4269 
   4270   typedef struct {
   4271     NMHDR hdr;
   4272     WORD fwKeys;
   4273     RECT rcParent;
   4274     int iDir;
   4275     int iXpos;
   4276     int iYpos;
   4277     int iScroll;
   4278   }NMPGSCROLL,*LPNMPGSCROLL;
   4279 
   4280 #include <poppack.h>
   4281 
   4282 #define PGN_CALCSIZE (PGN_FIRST-2)
   4283 
   4284 #define PGF_CALCWIDTH 1
   4285 #define PGF_CALCHEIGHT 2
   4286 
   4287   typedef struct {
   4288     NMHDR hdr;
   4289     DWORD dwFlag;
   4290     int iWidth;
   4291     int iHeight;
   4292   }NMPGCALCSIZE,*LPNMPGCALCSIZE;
   4293 
   4294 #define PGN_HOTITEMCHANGE (PGN_FIRST-3)
   4295 
   4296   typedef struct tagNMPGHOTITEM
   4297   {
   4298     NMHDR hdr;
   4299     int idOld;
   4300     int idNew;
   4301     DWORD dwFlags;
   4302   } NMPGHOTITEM,*LPNMPGHOTITEM;
   4303 #endif
   4304 
   4305 #ifndef NONATIVEFONTCTL
   4306 
   4307 #define WC_NATIVEFONTCTLW L"NativeFontCtl"
   4308 #define WC_NATIVEFONTCTLA "NativeFontCtl"
   4309 
   4310 #define WC_NATIVEFONTCTL __MINGW_NAME_AW(WC_NATIVEFONTCTL)
   4311 
   4312 #define NFS_EDIT 0x1
   4313 #define NFS_STATIC 0x2
   4314 #define NFS_LISTCOMBO 0x4
   4315 #define NFS_BUTTON 0x8
   4316 #define NFS_ALL 0x10
   4317 #define NFS_USEFONTASSOC 0x20
   4318 #endif
   4319 
   4320 #ifndef NOBUTTON
   4321 #define WC_BUTTONA "Button"
   4322 #define WC_BUTTONW L"Button"
   4323 
   4324 #define WC_BUTTON __MINGW_NAME_AW(WC_BUTTON)
   4325 
   4326 #define BUTTON_IMAGELIST_ALIGN_LEFT 0
   4327 #define BUTTON_IMAGELIST_ALIGN_RIGHT 1
   4328 #define BUTTON_IMAGELIST_ALIGN_TOP 2
   4329 #define BUTTON_IMAGELIST_ALIGN_BOTTOM 3
   4330 #define BUTTON_IMAGELIST_ALIGN_CENTER 4
   4331 
   4332   typedef struct {
   4333     HIMAGELIST himl;
   4334     RECT margin;
   4335     UINT uAlign;
   4336   } BUTTON_IMAGELIST,*PBUTTON_IMAGELIST;
   4337 
   4338 #define BCM_GETIDEALSIZE (BCM_FIRST+0x1)
   4339 #define Button_GetIdealSize(hwnd,psize) (WINBOOL)SNDMSG((hwnd),BCM_GETIDEALSIZE,0,(LPARAM)(psize))
   4340 
   4341 #define BCM_SETIMAGELIST (BCM_FIRST+0x2)
   4342 #define Button_SetImageList(hwnd,pbuttonImagelist) (WINBOOL)SNDMSG((hwnd),BCM_SETIMAGELIST,0,(LPARAM)(pbuttonImagelist))
   4343 
   4344 #define BCM_GETIMAGELIST (BCM_FIRST+0x3)
   4345 #define Button_GetImageList(hwnd,pbuttonImagelist) (WINBOOL)SNDMSG((hwnd),BCM_GETIMAGELIST,0,(LPARAM)(pbuttonImagelist))
   4346 
   4347 #define BCM_SETTEXTMARGIN (BCM_FIRST+0x4)
   4348 #define Button_SetTextMargin(hwnd,pmargin) (WINBOOL)SNDMSG((hwnd),BCM_SETTEXTMARGIN,0,(LPARAM)(pmargin))
   4349 #define BCM_GETTEXTMARGIN (BCM_FIRST+0x5)
   4350 #define Button_GetTextMargin(hwnd,pmargin) (WINBOOL)SNDMSG((hwnd),BCM_GETTEXTMARGIN,0,(LPARAM)(pmargin))
   4351 
   4352 #define BCM_SETNOTE (BCM_FIRST+0x9)
   4353 #define Button_SetNote(hwnd, psz) \
   4354   (WINBOOL)SNDMSG((hwnd), BCM_SETNOTE, 0, (LPARAM)(psz))
   4355 #define BCM_GETNOTE (BCM_FIRST + 0xa)
   4356 #define Button_GetNote(hwnd, psz, pcc) \
   4357   (WINBOOL)SNDMSG((hwnd), BCM_GETNOTE, (WPARAM)pcc, (LPARAM)psz)
   4358 #define BCM_GETNOTELENGTH (BCM_FIRST + 0xb)
   4359 #define Button_GetNoteLength(hwnd) \
   4360   (LRESULT)SNDMSG((hwnd), BCM_GETNOTELENGTH, 0, 0)
   4361 #define BCM_SETSHIELD (BCM_FIRST + 0xc)
   4362 #define Button_SetElevationRequiredState(hwnd, fRequired) \
   4363   (LRESULT)SNDMSG((hwnd), BCM_SETSHIELD, 0, (LPARAM)fRequired)
   4364 
   4365 #define BCM_SETDROPDOWNSTATE (BCM_FIRST + 0x6)
   4366 #define Button_SetDropDownState(hwnd, fDropDown) \
   4367    (WINBOOL)SNDMSG((hwnd), BCM_SETDROPDOWNSTATE, (WPARAM)fDropDown, 0)
   4368 #define BCM_SETSPLITINFO (BCM_FIRST + 0x7)
   4369 #define Button_SetSplitInfo(hwnd,psi) \
   4370    (WINBOOL)SNDMSG((hwnd), BCM_SETSPLITINFO, 0, (LPARAM)psi)
   4371 #define BCM_GETSPLITINFO (BCM_FIRST + 0x8)
   4372 #define Button_GetSplitInfo(hwnd,psi) \
   4373    (WINBOOL)SNDMSG((hwnd), BCM_GETSPLITINFO, 0, (LPARAM)psi)
   4374 
   4375   typedef struct tagNMBCHOTITEM {
   4376     NMHDR hdr;
   4377     DWORD dwFlags;
   4378   } NMBCHOTITEM,*LPNMBCHOTITEM;
   4379 
   4380 #define BCN_HOTITEMCHANGE (BCN_FIRST+0x1)
   4381 
   4382 #define BST_HOT 0x200
   4383 
   4384 /* Vista and 6.0 version new Button control styles.  */
   4385 #define BS_SPLITBUTTON          0xc
   4386 #define BS_DEFSPLITBUTTON       0xd
   4387 #define BS_COMMANDLINK          0xe
   4388 #define BS_DEFCOMMANDLINK       0xf
   4389 
   4390 #define BST_DROPDOWNPUSHED 0x400
   4391 
   4392 #define BCSIF_GLYPH 0x1
   4393 #define BCSIF_IMAGE 0x2
   4394 #define BCSIF_STYLE 0x4
   4395 #define BCSIF_SIZE 0x8
   4396 
   4397 #define BCSS_NOSPLIT 0x1
   4398 #define BCSS_STRETCH 0x2
   4399 #define BCSS_ALIGNLEFT 0x4
   4400 #define BCSS_IMAGE 0x8
   4401 
   4402 #define BCN_DROPDOWN (BCN_FIRST + 0x2)
   4403 
   4404 #define BCCL_NOGLYPH (HIMAGELIST)((size_t) -1)
   4405 
   4406 typedef struct tagBUTTON_SPLITINFO
   4407 {
   4408   UINT mask;
   4409   HIMAGELIST himlGlyph;
   4410   UINT uSplitStyle;
   4411   SIZE size;
   4412 } BUTTON_SPLITINFO, *PBUTTON_SPLITINFO;
   4413 
   4414 #endif
   4415 
   4416 #ifndef NOSTATIC
   4417 #define WC_STATICA "Static"
   4418 #define WC_STATICW L"Static"
   4419 
   4420 #define WC_STATIC __MINGW_NAME_AW(WC_STATIC)
   4421 
   4422 #ifndef NOEDIT
   4423 #define WC_EDITA "Edit"
   4424 #define WC_EDITW L"Edit"
   4425 
   4426 #define WC_EDIT __MINGW_NAME_AW(WC_EDIT)
   4427 
   4428 #define EM_SETCUEBANNER (ECM_FIRST+1)
   4429 #define Edit_SetCueBannerText(hwnd,lpcwText) (WINBOOL)SNDMSG((hwnd),EM_SETCUEBANNER,0,(LPARAM)(lpcwText))
   4430 #define EM_GETCUEBANNER (ECM_FIRST+2)
   4431 #define Edit_GetCueBannerText(hwnd,lpwText,cchText) (WINBOOL)SNDMSG((hwnd),EM_GETCUEBANNER,(WPARAM)(lpwText),(LPARAM)(cchText))
   4432 
   4433   typedef struct _tagEDITBALLOONTIP {
   4434     DWORD cbStruct;
   4435     LPCWSTR pszTitle;
   4436     LPCWSTR pszText;
   4437     INT ttiIcon;
   4438   } EDITBALLOONTIP,*PEDITBALLOONTIP;
   4439 #define EM_SHOWBALLOONTIP (ECM_FIRST+3)
   4440 #define Edit_ShowBalloonTip(hwnd,peditballoontip) (WINBOOL)SNDMSG((hwnd),EM_SHOWBALLOONTIP,0,(LPARAM)(peditballoontip))
   4441 #define EM_HIDEBALLOONTIP (ECM_FIRST+4)
   4442 #define Edit_HideBalloonTip(hwnd) (WINBOOL)SNDMSG((hwnd),EM_HIDEBALLOONTIP,0,0)
   4443 #endif
   4444 
   4445 #ifndef NOLISTBOX
   4446 #define WC_LISTBOXA "ListBox"
   4447 #define WC_LISTBOXW L"ListBox"
   4448 
   4449 #define WC_LISTBOX __MINGW_NAME_AW(WC_LISTBOX)
   4450 
   4451 #endif
   4452 
   4453 #ifndef NOCOMBOBOX
   4454 #define WC_COMBOBOXA "ComboBox"
   4455 #define WC_COMBOBOXW L"ComboBox"
   4456 
   4457 #define WC_COMBOBOX __MINGW_NAME_AW(WC_COMBOBOX)
   4458 
   4459 #endif
   4460 
   4461 #define CB_SETMINVISIBLE (CBM_FIRST+1)
   4462 #define CB_GETMINVISIBLE (CBM_FIRST+2)
   4463 
   4464 #define ComboBox_SetMinVisible(hwnd,iMinVisible) (WINBOOL)SNDMSG((hwnd),CB_SETMINVISIBLE,(WPARAM)iMinVisible,0)
   4465 #define ComboBox_GetMinVisible(hwnd) (int)SNDMSG((hwnd),CB_GETMINVISIBLE,0,0)
   4466 
   4467 #ifndef NOSCROLLBAR
   4468 #define WC_SCROLLBARA "ScrollBar"
   4469 #define WC_SCROLLBARW L"ScrollBar"
   4470 
   4471 #define WC_SCROLLBAR __MINGW_NAME_AW(WC_SCROLLBAR)
   4472 
   4473 #endif
   4474 
   4475 #define INVALID_LINK_INDEX (-1)
   4476 #define MAX_LINKID_TEXT 48
   4477 #define L_MAX_URL_LENGTH (2048+32+sizeof("://"))
   4478 
   4479 #define WC_LINK L"SysLink"
   4480 
   4481 #define LWS_TRANSPARENT 0x1
   4482 #define LWS_IGNORERETURN 0x2
   4483 
   4484 #define LIF_ITEMINDEX 0x1
   4485 #define LIF_STATE 0x2
   4486 #define LIF_ITEMID 0x4
   4487 #define LIF_URL 0x8
   4488 
   4489 #define LIS_FOCUSED 0x1
   4490 #define LIS_ENABLED 0x2
   4491 #define LIS_VISITED 0x4
   4492 
   4493   typedef struct tagLITEM {
   4494     UINT mask;
   4495     int iLink;
   4496     UINT state;
   4497     UINT stateMask;
   4498     WCHAR szID[MAX_LINKID_TEXT];
   4499     WCHAR szUrl[L_MAX_URL_LENGTH];
   4500   } LITEM,*PLITEM;
   4501 
   4502   typedef struct tagLHITTESTINFO {
   4503     POINT pt;
   4504     LITEM item;
   4505   } LHITTESTINFO,*PLHITTESTINFO;
   4506 
   4507   typedef struct tagNMLINK {
   4508     NMHDR hdr;
   4509     LITEM item;
   4510   } NMLINK,*PNMLINK;
   4511 
   4512 #define LM_HITTEST (WM_USER+0x300)
   4513 #define LM_GETIDEALHEIGHT (WM_USER+0x301)
   4514 #define LM_SETITEM (WM_USER+0x302)
   4515 #define LM_GETITEM (WM_USER+0x303)
   4516 
   4517 #ifndef NOMUI
   4518   void WINAPI InitMUILanguage(LANGID uiLang);
   4519   LANGID WINAPI GetMUILanguage(void);
   4520 #endif
   4521 #endif
   4522 
   4523 #define DA_LAST (0x7fffffff)
   4524 #define DPA_APPEND (0x7fffffff)
   4525 #define DPA_ERR (-1)
   4526 
   4527 #define DSA_APPEND (0x7fffffff)
   4528 #define DSA_ERR (-1)
   4529 
   4530   typedef struct _DSA *HDSA;
   4531 
   4532   typedef int (CALLBACK *PFNDPAENUMCALLBACK)(void *p,void *pData);
   4533   typedef int (CALLBACK *PFNDSAENUMCALLBACK)(void *p,void *pData);
   4534 
   4535   WINCOMMCTRLAPI HDSA WINAPI DSA_Create(int cbItem,int cItemGrow);
   4536   WINCOMMCTRLAPI WINBOOL WINAPI DSA_Destroy(HDSA hdsa);
   4537   WINCOMMCTRLAPI void WINAPI DSA_DestroyCallback(HDSA hdsa,PFNDSAENUMCALLBACK pfnCB,void *pData);
   4538   WINCOMMCTRLAPI PVOID WINAPI DSA_GetItemPtr(HDSA hdsa,int i);
   4539   WINCOMMCTRLAPI int WINAPI DSA_InsertItem(HDSA hdsa,int i,void *pitem);
   4540 
   4541   typedef struct _DPA *HDPA;
   4542 
   4543   WINCOMMCTRLAPI HDPA WINAPI DPA_Create(int cItemGrow);
   4544   WINCOMMCTRLAPI WINBOOL WINAPI DPA_Destroy(HDPA hdpa);
   4545   WINCOMMCTRLAPI PVOID WINAPI DPA_DeletePtr(HDPA hdpa,int i);
   4546   WINCOMMCTRLAPI WINBOOL WINAPI DPA_DeleteAllPtrs(HDPA hdpa);
   4547   WINCOMMCTRLAPI void WINAPI DPA_EnumCallback(HDPA hdpa,PFNDPAENUMCALLBACK pfnCB,void *pData);
   4548   WINCOMMCTRLAPI void WINAPI DPA_DestroyCallback(HDPA hdpa,PFNDPAENUMCALLBACK pfnCB,void *pData);
   4549   WINCOMMCTRLAPI WINBOOL WINAPI DPA_SetPtr(HDPA hdpa,int i,void *p);
   4550   WINCOMMCTRLAPI int WINAPI DPA_InsertPtr(HDPA hdpa,int i,void *p);
   4551   WINCOMMCTRLAPI PVOID WINAPI DPA_GetPtr(HDPA hdpa,INT_PTR i);
   4552 
   4553   typedef int (CALLBACK *PFNDPACOMPARE)(void *p1,void *p2,LPARAM lParam);
   4554 
   4555   WINCOMMCTRLAPI WINBOOL WINAPI DPA_Sort(HDPA hdpa,PFNDPACOMPARE pfnCompare,LPARAM lParam);
   4556 
   4557 #define DPAS_SORTED 0x1
   4558 #define DPAS_INSERTBEFORE 0x2
   4559 #define DPAS_INSERTAFTER 0x4
   4560 
   4561   WINCOMMCTRLAPI int WINAPI DPA_Search(HDPA hdpa,void *pFind,int iStart,PFNDPACOMPARE pfnCompare,LPARAM lParam,UINT options);
   4562   WINCOMMCTRLAPI WINBOOL WINAPI Str_SetPtrW(LPWSTR *ppsz,LPCWSTR psz);
   4563 
   4564 typedef struct _DPASTREAMINFO {
   4565   int iPos;
   4566   void *pvItem;
   4567 } DPASTREAMINFO;
   4568 
   4569 struct IStream;
   4570 typedef HRESULT (CALLBACK *PFNDPASTREAM)(DPASTREAMINFO*, struct IStream*, void*);
   4571 typedef void* (CALLBACK *PFNDPAMERGE)(UINT, void*, void*, LPARAM);
   4572 typedef const void* (CALLBACK *PFNDPAMERGECONST)(UINT, const void*, const void*, LPARAM);
   4573 
   4574   WINCOMMCTRLAPI HRESULT WINAPI DPA_LoadStream(HDPA * phdpa, PFNDPASTREAM pfn, struct IStream * pstream, void *pvInstData);
   4575   WINCOMMCTRLAPI HRESULT WINAPI DPA_SaveStream(HDPA hdpa, PFNDPASTREAM pfn, struct IStream * pstream, void *pvInstData);
   4576   WINCOMMCTRLAPI WINBOOL WINAPI DPA_Grow(HDPA pdpa, int cp);
   4577   WINCOMMCTRLAPI int WINAPI DPA_InsertPtr(HDPA hdpa, int i, void *p);
   4578   WINCOMMCTRLAPI PVOID WINAPI DPA_GetPtr(HDPA hdpa, INT_PTR i);
   4579   WINCOMMCTRLAPI WINBOOL WINAPI DPA_SetPtr(HDPA hdpa, int i, void *p);
   4580   WINCOMMCTRLAPI int WINAPI DPA_GetPtrIndex(HDPA hdpa, const void *p);
   4581 
   4582 #define DPA_GetPtrCount(hdpa) (*(int *)(hdpa))
   4583 #define DPA_SetPtrCount(hdpa, cItems) (*(int *)(hdpa) = (cItems))
   4584 #define DPA_GetPtrPtr(hdpa) (*((void * **)((BYTE *)(hdpa) + sizeof(void *))))
   4585 #define DPA_AppendPtr(hdpa, pitem) DPA_InsertPtr(hdpa, DA_LAST, pitem)
   4586 #define DPA_FastDeleteLastPtr(hdpa) (--*(int *)(hdpa))
   4587 #define DPA_FastGetPtr(hdpa, i) (DPA_GetPtrPtr(hdpa)[i])
   4588 
   4589 #define DPAM_SORTED    1
   4590 #define DPAM_NORMAL    2
   4591 #define DPAM_UNION     4
   4592 #define DPAM_INTERSECT 8
   4593 
   4594 #define DPAMM_MERGE    1
   4595 #define DPAMM_DELETE   2
   4596 #define DPAMM_INSERT   3
   4597 
   4598 #ifndef NOTRACKMOUSEEVENT
   4599 
   4600 #ifndef WM_MOUSEHOVER
   4601 #define WM_MOUSEHOVER 0x2a1
   4602 #define WM_MOUSELEAVE 0x2a3
   4603 #endif
   4604 
   4605 #ifndef TME_HOVER
   4606 
   4607 #define TME_HOVER 0x1
   4608 #define TME_LEAVE 0x2
   4609 #define TME_NONCLIENT 0x10
   4610 #define TME_QUERY 0x40000000
   4611 #define TME_CANCEL 0x80000000
   4612 
   4613 #define HOVER_DEFAULT 0xffffffff
   4614 
   4615   typedef struct tagTRACKMOUSEEVENT {
   4616     DWORD cbSize;
   4617     DWORD dwFlags;
   4618     HWND hwndTrack;
   4619     DWORD dwHoverTime;
   4620   } TRACKMOUSEEVENT,*LPTRACKMOUSEEVENT;
   4621 #endif
   4622 
   4623   WINCOMMCTRLAPI WINBOOL WINAPI _TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack);
   4624 #endif
   4625 
   4626 #ifndef NOFLATSBAPIS
   4627 
   4628 #define WSB_PROP_CYVSCROLL __MSABI_LONG(0x1)
   4629 #define WSB_PROP_CXHSCROLL __MSABI_LONG(0x2)
   4630 #define WSB_PROP_CYHSCROLL __MSABI_LONG(0x4)
   4631 #define WSB_PROP_CXVSCROLL __MSABI_LONG(0x8)
   4632 #define WSB_PROP_CXHTHUMB __MSABI_LONG(0x10)
   4633 #define WSB_PROP_CYVTHUMB __MSABI_LONG(0x20)
   4634 #define WSB_PROP_VBKGCOLOR __MSABI_LONG(0x40)
   4635 #define WSB_PROP_HBKGCOLOR __MSABI_LONG(0x80)
   4636 #define WSB_PROP_VSTYLE __MSABI_LONG(0x100)
   4637 #define WSB_PROP_HSTYLE __MSABI_LONG(0x200)
   4638 #define WSB_PROP_WINSTYLE __MSABI_LONG(0x400)
   4639 #define WSB_PROP_PALETTE __MSABI_LONG(0x800)
   4640 #define WSB_PROP_MASK __MSABI_LONG(0xfff)
   4641 
   4642 #define FSB_FLAT_MODE 2
   4643 #define FSB_ENCARTA_MODE 1
   4644 #define FSB_REGULAR_MODE 0
   4645 
   4646   WINCOMMCTRLAPI WINBOOL WINAPI FlatSB_EnableScrollBar(HWND,int,UINT);
   4647   WINCOMMCTRLAPI WINBOOL WINAPI FlatSB_ShowScrollBar(HWND,int code,WINBOOL);
   4648   WINCOMMCTRLAPI WINBOOL WINAPI FlatSB_GetScrollRange(HWND,int code,LPINT,LPINT);
   4649   WINCOMMCTRLAPI WINBOOL WINAPI FlatSB_GetScrollInfo(HWND,int code,LPSCROLLINFO);
   4650   WINCOMMCTRLAPI int WINAPI FlatSB_GetScrollPos(HWND,int code);
   4651   WINCOMMCTRLAPI WINBOOL WINAPI FlatSB_GetScrollProp(HWND,int propIndex,LPINT);
   4652 #ifdef _WIN64
   4653   WINCOMMCTRLAPI WINBOOL WINAPI FlatSB_GetScrollPropPtr(HWND,int propIndex,PINT_PTR);
   4654 #else
   4655 #define FlatSB_GetScrollPropPtr FlatSB_GetScrollProp
   4656 #endif
   4657 
   4658   WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollPos(HWND,int code,int pos,WINBOOL fRedraw);
   4659   WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollInfo(HWND,int code,LPSCROLLINFO,WINBOOL fRedraw);
   4660   WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollRange(HWND,int code,int min,int max,WINBOOL fRedraw);
   4661   WINCOMMCTRLAPI WINBOOL WINAPI FlatSB_SetScrollProp(HWND,UINT index,INT_PTR newValue,WINBOOL);
   4662 #define FlatSB_SetScrollPropPtr FlatSB_SetScrollProp
   4663   WINCOMMCTRLAPI WINBOOL WINAPI InitializeFlatSB(HWND);
   4664   WINCOMMCTRLAPI HRESULT WINAPI UninitializeFlatSB(HWND);
   4665 #endif
   4666 #endif
   4667 
   4668   typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam,UINT_PTR uIdSubclass,DWORD_PTR dwRefData);
   4669 
   4670   WINBOOL WINAPI SetWindowSubclass(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass,DWORD_PTR dwRefData);
   4671   WINBOOL WINAPI GetWindowSubclass(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass,DWORD_PTR *pdwRefData);
   4672   WINBOOL WINAPI RemoveWindowSubclass(HWND hWnd,SUBCLASSPROC pfnSubclass,UINT_PTR uIdSubclass);
   4673   LRESULT WINAPI DefSubclassProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
   4674   int WINAPI DrawShadowText(HDC hdc,LPCWSTR pszText,UINT cch,RECT *prc,DWORD dwFlags,COLORREF crText,COLORREF crShadow,int ixOffset,int iyOffset);
   4675 
   4676 #ifdef __cplusplus
   4677 }
   4678 #endif
   4679 #endif
   4680 #endif
   4681