Artifact Content

Not logged in

Artifact 6ba0cccf1cb3b0a818afa34c2e900aef26829bf1


module win32.commctrl;

// Translated from Microsoft Platform SDK August 2001 Edition
// by Y.Tomino (demoonlit@inter7.jp)

import win32.winuser;
alias void _PSP;
alias void _IMAGELIST;
alias void _TREEITEM;
alias LPTBSAVEPARAMW LPTBSAVEPARAMSW;
alias PCCOMBOEXITEMA PCCOMBOBOXEXITEMA;
alias PCCOMBOEXITEMW PCCOMBOBOXEXITEMW;
enum : uint { 
  NM_FIRST = 0,
  SB_SETTIPTEXTA = WM_USER + 16,
  SB_SETTIPTEXTW = WM_USER + 17,
  SB_GETTIPTEXTA = WM_USER + 18,
  SB_GETTIPTEXTW = WM_USER + 19,
  TVHT_ONITEMSTATEICON = 0x0040,
  CBEN_FIRST = 0U - 800U,
  CBEN_GETDISPINFOA = CBEN_FIRST - 0,
  CBEN_GETDISPINFOW = CBEN_FIRST - 7
}
// inline #include <prsht.h>
// ----

// #ifndef _PRSHT_H_
// #define _PRSHT_H_

// #ifndef _WINRESRC_
// #ifndef _WIN32_IE
// #...
// #else
// #if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
// #...
// #endif
// #endif
// #endif

// #ifndef WINCOMMCTRLAPI
// #if !defined(_COMCTL32_) && defined(_WIN32)
// #define WINCOMMCTRLAPI DECLSPEC_IMPORT
// #else
// #...
// #endif
// #endif // WINCOMMCTRLAPI

// #ifndef CCSIZEOF_STRUCT
// #define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
// #endif

// #ifndef DUMMYUNIONNAME
// #ifdef NONAMELESSUNION
// #...
// #...
// #...
// #...
// #...
// #else
// #define DUMMYUNIONNAME
// #define DUMMYUNIONNAME2
// #define DUMMYUNIONNAME3
// #define DUMMYUNIONNAME4
// #define DUMMYUNIONNAME5
// #endif
// #endif // DUMMYUNIONNAME

// #ifdef _WIN64
// #...
// #else
align(4):
// #endif

// #ifdef __cplusplus
// extern "C" {
// #endif

// #ifndef SNDMSG
// #ifdef __cplusplus
// #ifndef _MAC
// #define SNDMSG ::SendMessage
// #else
// #...
// #endif
// #else
// #ifndef _MAC
// #...
// #else
// #...
// #endif
// #endif
// #endif // ifndef SNDMSG

enum : uint { MAXPROPPAGES = 100 }

// struct _PSP;
alias _PSP* HPROPSHEETPAGE;

// #ifndef MIDL_PASS
// struct _PROPSHEETPAGEA;
// struct _PROPSHEETPAGEW;
// #endif

extern(Windows) alias UINT function(HWND hwnd, UINT uMsg,  _PROPSHEETPAGEA *ppsp) LPFNPSPCALLBACKA;
extern(Windows) alias UINT function(HWND hwnd, UINT uMsg,  _PROPSHEETPAGEW *ppsp) LPFNPSPCALLBACKW;

// #ifdef UNICODE
alias LPFNPSPCALLBACKW LPFNPSPCALLBACK;
// #else
// #...
// #endif

enum : uint { PSP_DEFAULT = 0x00000000 }
enum : uint { PSP_DLGINDIRECT = 0x00000001 }
enum : uint { PSP_USEHICON = 0x00000002 }
enum : uint { PSP_USEICONID = 0x00000004 }
enum : uint { PSP_USETITLE = 0x00000008 }
enum : uint { PSP_RTLREADING = 0x00000010 }

enum : uint { PSP_HASHELP = 0x00000020 }
enum : uint { PSP_USEREFPARENT = 0x00000040 }
enum : uint { PSP_USECALLBACK = 0x00000080 }
enum : uint { PSP_PREMATURE = 0x00000400 }

// #if (_WIN32_IE >= 0x0400)

enum : uint { PSP_HIDEHEADER = 0x00000800 }
enum : uint { PSP_USEHEADERTITLE = 0x00001000 }
enum : uint { PSP_USEHEADERSUBTITLE = 0x00002000 }

// #endif
// #if (_WIN32_WINNT >= 0x0501) || ISOLATION_AWARE_ENABLED
enum : uint { PSP_USEFUSIONCONTEXT = 0x00004000 }
// #endif

// #if (_WIN32_IE >= 0x0500)
enum : uint { PSPCB_ADDREF = 0 }
// #endif
enum : uint { PSPCB_RELEASE = 1 }
enum : uint { PSPCB_CREATE = 2 }

// #define PROPSHEETPAGEA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, pcRefParent)
// #define PROPSHEETPAGEW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, pcRefParent)

// #define PROPSHEETPAGEA_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, pszHeaderSubTitle)
// #define PROPSHEETPAGEW_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, pszHeaderSubTitle)

// #ifdef _WIN32
alias LPCDLGTEMPLATE PROPSHEETPAGE_RESOURCE;
// #else
// ...
// #endif

// #define PROPSHEETPAGEA_V1_FIELDS DWORD dwSize; DWORD dwFlags; HINSTANCE hInstance; union { LPCSTR pszTemplate; PROPSHEETPAGE_RESOURCE pResource; } DUMMYUNIONNAME; union { HICON hIcon; LPCSTR pszIcon; } DUMMYUNIONNAME2; LPCSTR pszTitle; DLGPROC pfnDlgProc; LPARAM lParam; LPFNPSPCALLBACKA pfnCallback; UINT *pcRefParent;
// #define PROPSHEETPAGEW_V1_FIELDS DWORD dwSize; DWORD dwFlags; HINSTANCE hInstance; union { LPCWSTR pszTemplate; PROPSHEETPAGE_RESOURCE pResource; } DUMMYUNIONNAME; union { HICON hIcon; LPCWSTR pszIcon; } DUMMYUNIONNAME2; LPCWSTR pszTitle; DLGPROC pfnDlgProc; LPARAM lParam; LPFNPSPCALLBACKW pfnCallback; UINT *pcRefParent;
// #if (_WIN32_WINNT >= 0x0501) || ISOLATION_AWARE_ENABLED
alias _PROPSHEETPAGEA_V3 _PROPSHEETPAGEA;
alias _PROPSHEETPAGEW_V3 _PROPSHEETPAGEW;
// #elif (_WIN32_IE >= 0x0400)
// #...
// #...
// #else
// #...
// #...
// #endif

struct _PROPSHEETPAGEA_V1 {
  DWORD dwSize;
  DWORD dwFlags;
  HINSTANCE hInstance;
  union {
    LPCSTR pszTemplate;
    PROPSHEETPAGE_RESOURCE pResource;
  }
  union {
    HICON hIcon;
    LPCSTR pszIcon;
  }
  LPCSTR pszTitle;
  DLGPROC pfnDlgProc;
  LPARAM lParam;
  LPFNPSPCALLBACKA pfnCallback;
  UINT* pcRefParent;
}
alias _PROPSHEETPAGEA_V1 PROPSHEETPAGEA_V1;
alias _PROPSHEETPAGEA_V1* LPPROPSHEETPAGEA_V1;

alias PROPSHEETPAGEA_V1* LPCPROPSHEETPAGEA_V1;

struct _PROPSHEETPAGEA_V2 {
  DWORD dwSize;
  DWORD dwFlags;
  HINSTANCE hInstance;
  union {
    LPCSTR pszTemplate;
    PROPSHEETPAGE_RESOURCE pResource;
  }
  union {
    HICON hIcon;
    LPCSTR pszIcon;
  }
  LPCSTR pszTitle;
  DLGPROC pfnDlgProc;
  LPARAM lParam;
  LPFNPSPCALLBACKA pfnCallback;
  UINT* pcRefParent;

  LPCSTR pszHeaderTitle;
  LPCSTR pszHeaderSubTitle;
}
alias _PROPSHEETPAGEA_V2 PROPSHEETPAGEA_V2;
alias _PROPSHEETPAGEA_V2* LPPROPSHEETPAGEA_V2;

alias PROPSHEETPAGEA_V2* LPCPROPSHEETPAGEA_V2;

struct _PROPSHEETPAGEA_V3 {
  DWORD dwSize;
  DWORD dwFlags;
  HINSTANCE hInstance;
  union {
    LPCSTR pszTemplate;
    PROPSHEETPAGE_RESOURCE pResource;
  }
  union {
    HICON hIcon;
    LPCSTR pszIcon;
  }
  LPCSTR pszTitle;
  DLGPROC pfnDlgProc;
  LPARAM lParam;
  LPFNPSPCALLBACKA pfnCallback;
  UINT* pcRefParent;

  LPCSTR pszHeaderTitle;
  LPCSTR pszHeaderSubTitle;

  HANDLE hActCtx;
}
alias _PROPSHEETPAGEA_V3 PROPSHEETPAGEA_V3;
alias _PROPSHEETPAGEA_V3* LPPROPSHEETPAGEA_V3;

alias PROPSHEETPAGEA_V3* LPCPROPSHEETPAGEA_V3;

struct _PROPSHEETPAGEW_V1 {
  DWORD dwSize;
  DWORD dwFlags;
  HINSTANCE hInstance;
  union {
    LPCWSTR pszTemplate;
    PROPSHEETPAGE_RESOURCE pResource;
  }
  union {
    HICON hIcon;
    LPCWSTR pszIcon;
  }
  LPCWSTR pszTitle;
  DLGPROC pfnDlgProc;
  LPARAM lParam;
  LPFNPSPCALLBACKW pfnCallback;
  UINT* pcRefParent;
}
alias _PROPSHEETPAGEW_V1 PROPSHEETPAGEW_V1;
alias _PROPSHEETPAGEW_V1* LPPROPSHEETPAGEW_V1;

alias PROPSHEETPAGEW_V1* LPCPROPSHEETPAGEW_V1;

struct _PROPSHEETPAGEW_V2 {
  DWORD dwSize;
  DWORD dwFlags;
  HINSTANCE hInstance;
  union {
    LPCWSTR pszTemplate;
    PROPSHEETPAGE_RESOURCE pResource;
  }
  union {
    HICON hIcon;
    LPCWSTR pszIcon;
  }
  LPCWSTR pszTitle;
  DLGPROC pfnDlgProc;
  LPARAM lParam;
  LPFNPSPCALLBACKW pfnCallback;
  UINT* pcRefParent;

  LPCWSTR pszHeaderTitle;
  LPCWSTR pszHeaderSubTitle;
}
alias _PROPSHEETPAGEW_V2 PROPSHEETPAGEW_V2;
alias _PROPSHEETPAGEW_V2* LPPROPSHEETPAGEW_V2;

alias PROPSHEETPAGEW_V2* LPCPROPSHEETPAGEW_V2;

struct _PROPSHEETPAGEW_V3 {
  DWORD dwSize;
  DWORD dwFlags;
  HINSTANCE hInstance;
  union {
    LPCWSTR pszTemplate;
    PROPSHEETPAGE_RESOURCE pResource;
  }
  union {
    HICON hIcon;
    LPCWSTR pszIcon;
  }
  LPCWSTR pszTitle;
  DLGPROC pfnDlgProc;
  LPARAM lParam;
  LPFNPSPCALLBACKW pfnCallback;
  UINT* pcRefParent;

  LPCWSTR pszHeaderTitle;
  LPCWSTR pszHeaderSubTitle;

  HANDLE hActCtx;
}
alias _PROPSHEETPAGEW_V3 PROPSHEETPAGEW_V3;
alias _PROPSHEETPAGEW_V3* LPPROPSHEETPAGEW_V3;

alias PROPSHEETPAGEW_V3* LPCPROPSHEETPAGEW_V3;

alias PROPSHEETPAGEA_V3 PROPSHEETPAGEA_LATEST;
alias PROPSHEETPAGEW_V3 PROPSHEETPAGEW_LATEST;
alias LPPROPSHEETPAGEA_V3 LPPROPSHEETPAGEA_LATEST;
alias LPPROPSHEETPAGEW_V3 LPPROPSHEETPAGEW_LATEST;
alias LPCPROPSHEETPAGEA_V3 LPCPROPSHEETPAGEA_LATEST;
alias LPCPROPSHEETPAGEW_V3 LPCPROPSHEETPAGEW_LATEST;

// #if (_WIN32_WINNT >= 0x0501) || ISOLATION_AWARE_ENABLED
alias PROPSHEETPAGEA_V3 PROPSHEETPAGEA;
alias PROPSHEETPAGEW_V3 PROPSHEETPAGEW;
alias LPPROPSHEETPAGEA_V3 LPPROPSHEETPAGEA;
alias LPPROPSHEETPAGEW_V3 LPPROPSHEETPAGEW;
alias LPCPROPSHEETPAGEA_V3 LPCPROPSHEETPAGEA;
alias LPCPROPSHEETPAGEW_V3 LPCPROPSHEETPAGEW;
// #elif (_WIN32_IE >= 0x0400)
// ...
// #else
// ...
// #endif

// #if 0 // IEUNIX reserved.

// #if __STDC__ || defined (NONAMELESSUNION)
// #...
// #else
// #...
// #endif
// #endif

// #ifdef UNICODE
alias PROPSHEETPAGEW PROPSHEETPAGE;
alias LPPROPSHEETPAGEW LPPROPSHEETPAGE;
alias LPCPROPSHEETPAGEW LPCPROPSHEETPAGE;
// #define PROPSHEETPAGE_V1_SIZE PROPSHEETPAGEW_V1_SIZE
// #define PROPSHEETPAGE_V2_SIZE PROPSHEETPAGEW_V2_SIZE
alias PROPSHEETPAGEW_V1 PROPSHEETPAGE_V1;
alias LPPROPSHEETPAGEW_V1 LPPROPSHEETPAGE_V1;
alias LPCPROPSHEETPAGEW_V1 LPCPROPSHEETPAGE_V1;
alias PROPSHEETPAGEW_V2 PROPSHEETPAGE_V2;
alias LPPROPSHEETPAGEW_V2 LPPROPSHEETPAGE_V2;
alias LPCPROPSHEETPAGEW_V2 LPCPROPSHEETPAGE_V2;
alias PROPSHEETPAGEW_V3 PROPSHEETPAGE_V3;
alias LPPROPSHEETPAGEW_V3 LPPROPSHEETPAGE_V3;
alias LPCPROPSHEETPAGEW_V3 LPCPROPSHEETPAGE_V3;
alias PROPSHEETPAGEW_LATEST PROPSHEETPAGE_LATEST;
alias LPPROPSHEETPAGEW_LATEST LPPROPSHEETPAGE_LATEST;
alias LPCPROPSHEETPAGEW_LATEST LPCPROPSHEETPAGE_LATEST;
// #else
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #endif

enum : uint { PSH_DEFAULT = 0x00000000 }
enum : uint { PSH_PROPTITLE = 0x00000001 }
enum : uint { PSH_USEHICON = 0x00000002 }
enum : uint { PSH_USEICONID = 0x00000004 }
enum : uint { PSH_PROPSHEETPAGE = 0x00000008 }
enum : uint { PSH_WIZARDHASFINISH = 0x00000010 }
enum : uint { PSH_WIZARD = 0x00000020 }
enum : uint { PSH_USEPSTARTPAGE = 0x00000040 }
enum : uint { PSH_NOAPPLYNOW = 0x00000080 }
enum : uint { PSH_USECALLBACK = 0x00000100 }
enum : uint { PSH_HASHELP = 0x00000200 }
enum : uint { PSH_MODELESS = 0x00000400 }
enum : uint { PSH_RTLREADING = 0x00000800 }
enum : uint { PSH_WIZARDCONTEXTHELP = 0x00001000 }

// #if (_WIN32_IE >= 0x0400)

// #if (_WIN32_IE < 0x0500)
// #...
// #else
enum : uint { PSH_WIZARD97 = 0x01000000 }
// #endif

enum : uint { PSH_WATERMARK = 0x00008000 }
enum : uint { PSH_USEHBMWATERMARK = 0x00010000 }
enum : uint { PSH_USEHPLWATERMARK = 0x00020000 }
enum : uint { PSH_STRETCHWATERMARK = 0x00040000 }
enum : uint { PSH_HEADER = 0x00080000 }
enum : uint { PSH_USEHBMHEADER = 0x00100000 }
enum : uint { PSH_USEPAGELANG = 0x00200000 }

// #endif

// #if (_WIN32_IE >= 0x0500)

enum : uint { PSH_WIZARD_LITE = 0x00400000 }
enum : uint { PSH_NOCONTEXTHELP = 0x02000000 }

// #endif

extern(Windows) alias int function(HWND, UINT, LPARAM) PFNPROPSHEETCALLBACK;

// #define PROPSHEETHEADERA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERA, pfnCallback)
// #define PROPSHEETHEADERW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERW, pfnCallback)

// #define PROPSHEETHEADERA_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERA, DUMMYUNION5_MEMBER(hbmHeader))
// #define PROPSHEETHEADERW_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERW, DUMMYUNION5_MEMBER(hbmHeader))

struct _PROPSHEETHEADERA {
  DWORD dwSize;
  DWORD dwFlags;
  HWND hwndParent;
  HINSTANCE hInstance;
union {
  HICON hIcon;
  LPCSTR pszIcon;
}

  LPCSTR pszCaption;
  UINT nPages;
union {
  UINT nStartPage;
  LPCSTR pStartPage;
}

union {
  LPCPROPSHEETPAGEA ppsp;
  HPROPSHEETPAGE *phpage;
}

  PFNPROPSHEETCALLBACK pfnCallback;
// #if (_WIN32_IE >= 0x0400)
union {
  HBITMAP hbmWatermark;
  LPCSTR pszbmWatermark;
}

  HPALETTE hplWatermark;
union {
  HBITMAP hbmHeader;
  LPCSTR pszbmHeader;
}

// #endif
}
alias _PROPSHEETHEADERA PROPSHEETHEADERA;
alias _PROPSHEETHEADERA* LPPROPSHEETHEADERA;

alias PROPSHEETHEADERA* LPCPROPSHEETHEADERA;

struct _PROPSHEETHEADERW {
  DWORD dwSize;
  DWORD dwFlags;
  HWND hwndParent;
  HINSTANCE hInstance;
union {
  HICON hIcon;
  LPCWSTR pszIcon;
}

  LPCWSTR pszCaption;
  UINT nPages;
union {
  UINT nStartPage;
  LPCWSTR pStartPage;
}

union {
  LPCPROPSHEETPAGEW ppsp;
  HPROPSHEETPAGE *phpage;
}

  PFNPROPSHEETCALLBACK pfnCallback;
// #if (_WIN32_IE >= 0x0400)
union {
  HBITMAP hbmWatermark;
  LPCWSTR pszbmWatermark;
}

  HPALETTE hplWatermark;
union {
  HBITMAP hbmHeader;
  LPCWSTR pszbmHeader;
}

// #endif
}
alias _PROPSHEETHEADERW PROPSHEETHEADERW;
alias _PROPSHEETHEADERW* LPPROPSHEETHEADERW;

alias PROPSHEETHEADERW* LPCPROPSHEETHEADERW;

// #if 0 //IEUNIX reserved.

// #if __STDC__ || defined (NONAMELESSUNION)
// #...
// #...
// #else
// #...
// #...
// #endif
// #endif

// #ifdef UNICODE
alias PROPSHEETHEADERW PROPSHEETHEADER;
alias LPPROPSHEETHEADERW LPPROPSHEETHEADER;
alias LPCPROPSHEETHEADERW LPCPROPSHEETHEADER;
// #define PROPSHEETHEADER_V1_SIZE PROPSHEETHEADERW_V1_SIZE
// #define PROPSHEETHEADER_V2_SIZE PROPSHEETHEADERW_V2_SIZE
// #else
// #...
// #...
// #...
// #...
// #...
// #endif

enum : uint { PSCB_INITIALIZED = 1 }
enum : uint { PSCB_PRECREATE = 2 }

// #if (_WIN32_IE >= 0x560)

enum : uint { PSCB_BUTTONPRESSED = 3 }
// #endif  // _WIN32_IE >= 0x560

extern(Windows) export HPROPSHEETPAGE CreatePropertySheetPageA(LPCPROPSHEETPAGEA constPropSheetPagePointer);
extern(Windows) export HPROPSHEETPAGE CreatePropertySheetPageW(LPCPROPSHEETPAGEW constPropSheetPagePointer);
extern(Windows) export BOOL DestroyPropertySheetPage(HPROPSHEETPAGE);

extern(Windows) export INT_PTR PropertySheetA(LPCPROPSHEETHEADERA);

extern(Windows) export INT_PTR PropertySheetW(LPCPROPSHEETHEADERW);

// #ifdef UNICODE
alias CreatePropertySheetPageW CreatePropertySheetPage;
alias PropertySheetW PropertySheet;
// #else
// #...
// #...
// #endif

extern(Windows) alias BOOL function(HPROPSHEETPAGE, LPARAM) LPFNADDPROPSHEETPAGE;
extern(Windows) alias BOOL function(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM) LPFNADDPROPSHEETPAGES;

struct _PSHNOTIFY {
  NMHDR hdr;
  LPARAM lParam;
}
alias _PSHNOTIFY PSHNOTIFY;
alias _PSHNOTIFY* LPPSHNOTIFY;

enum : uint { PSN_FIRST = 0U-200U }
enum : uint { PSN_LAST = 0U-299U }

enum : uint { PSN_SETACTIVE = PSN_FIRST-0 }
enum : uint { PSN_KILLACTIVE = PSN_FIRST-1 }

enum : uint { PSN_APPLY = PSN_FIRST-2 }
enum : uint { PSN_RESET = PSN_FIRST-3 }

enum : uint { PSN_HELP = PSN_FIRST-5 }
enum : uint { PSN_WIZBACK = PSN_FIRST-6 }
enum : uint { PSN_WIZNEXT = PSN_FIRST-7 }
enum : uint { PSN_WIZFINISH = PSN_FIRST-8 }
enum : uint { PSN_QUERYCANCEL = PSN_FIRST-9 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { PSN_GETOBJECT = PSN_FIRST-10 }
// #endif // 0x0400
// #if (_WIN32_IE >= 0x0500)
enum : uint { PSN_TRANSLATEACCELERATOR = PSN_FIRST-12 }
enum : uint { PSN_QUERYINITIALFOCUS = PSN_FIRST-13 }
// #endif // 0x0500

enum : uint { PSNRET_NOERROR = 0 }
enum : uint { PSNRET_INVALID = 1 }
enum : uint { PSNRET_INVALID_NOCHANGEPAGE = 2 }
enum : uint { PSNRET_MESSAGEHANDLED = 3 }

enum : uint { PSM_SETCURSEL = WM_USER + 101 }
// #define PropSheet_SetCurSel(hDlg, hpage, index) SNDMSG(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)

enum : uint { PSM_REMOVEPAGE = WM_USER + 102 }
// #define PropSheet_RemovePage(hDlg, index, hpage) SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)

enum : uint { PSM_ADDPAGE = WM_USER + 103 }
// #define PropSheet_AddPage(hDlg, hpage) SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)

enum : uint { PSM_CHANGED = WM_USER + 104 }
// #define PropSheet_Changed(hDlg, hwnd) SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)

enum : uint { PSM_RESTARTWINDOWS = WM_USER + 105 }
// #define PropSheet_RestartWindows(hDlg) SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)

enum : uint { PSM_REBOOTSYSTEM = WM_USER + 106 }
// #define PropSheet_RebootSystem(hDlg) SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)

enum : uint { PSM_CANCELTOCLOSE = WM_USER + 107 }
// #define PropSheet_CancelToClose(hDlg) PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)

enum : uint { PSM_QUERYSIBLINGS = WM_USER + 108 }
// #define PropSheet_QuerySiblings(hDlg, wParam, lParam) SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)

enum : uint { PSM_UNCHANGED = WM_USER + 109 }
// #define PropSheet_UnChanged(hDlg, hwnd) SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)

enum : uint { PSM_APPLY = WM_USER + 110 }
// #define PropSheet_Apply(hDlg) SNDMSG(hDlg, PSM_APPLY, 0, 0L)

enum : uint { PSM_SETTITLEA = WM_USER + 111 }
enum : uint { PSM_SETTITLEW = WM_USER + 120 }

// #ifdef UNICODE
alias PSM_SETTITLEW PSM_SETTITLE;
// #else
// #...
// #endif

// #define PropSheet_SetTitle(hDlg, wStyle, lpszText) SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)(lpszText))

enum : uint { PSM_SETWIZBUTTONS = WM_USER + 112 }
// #define PropSheet_SetWizButtons(hDlg, dwFlags) PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)

enum : uint { PSWIZB_BACK = 0x00000001 }
enum : uint { PSWIZB_NEXT = 0x00000002 }
enum : uint { PSWIZB_FINISH = 0x00000004 }
enum : uint { PSWIZB_DISABLEDFINISH = 0x00000008 }

enum : uint { PSM_PRESSBUTTON = WM_USER + 113 }
// #define PropSheet_PressButton(hDlg, iButton) PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)

enum : uint { PSBTN_BACK = 0 }
enum : uint { PSBTN_NEXT = 1 }
enum : uint { PSBTN_FINISH = 2 }
enum : uint { PSBTN_OK = 3 }
enum : uint { PSBTN_APPLYNOW = 4 }
enum : uint { PSBTN_CANCEL = 5 }
enum : uint { PSBTN_HELP = 6 }
enum : uint { PSBTN_MAX = 6 }

enum : uint { PSM_SETCURSELID = WM_USER + 114 }
// #define PropSheet_SetCurSelByID(hDlg, id) SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)

enum : uint { PSM_SETFINISHTEXTA = WM_USER + 115 }
enum : uint { PSM_SETFINISHTEXTW = WM_USER + 121 }

// #ifdef UNICODE
alias PSM_SETFINISHTEXTW PSM_SETFINISHTEXT;
// #else
// #...
// #endif

// #define PropSheet_SetFinishText(hDlg, lpszText) SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)

enum : uint { PSM_GETTABCONTROL = WM_USER + 116 }
// #define PropSheet_GetTabControl(hDlg) (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)

enum : uint { PSM_ISDIALOGMESSAGE = WM_USER + 117 }
// #define PropSheet_IsDialogMessage(hDlg, pMsg) (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)

enum : uint { PSM_GETCURRENTPAGEHWND = WM_USER + 118 }
// #define PropSheet_GetCurrentPageHwnd(hDlg) (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)

enum : uint { PSM_INSERTPAGE = WM_USER + 119 }
// #define PropSheet_InsertPage(hDlg, index, hpage) SNDMSG(hDlg, PSM_INSERTPAGE, (WPARAM)(index), (LPARAM)(hpage))

// #if (_WIN32_IE >= 0x0500)
enum : uint { PSM_SETHEADERTITLEA = WM_USER + 125 }
enum : uint { PSM_SETHEADERTITLEW = WM_USER + 126 }

// #ifdef UNICODE
alias PSM_SETHEADERTITLEW PSM_SETHEADERTITLE;
// #else
// #...
// #endif

// #define PropSheet_SetHeaderTitle(hDlg, index, lpszText) SNDMSG(hDlg, PSM_SETHEADERTITLE, (WPARAM)(index), (LPARAM)(lpszText))

enum : uint { PSM_SETHEADERSUBTITLEA = WM_USER + 127 }
enum : uint { PSM_SETHEADERSUBTITLEW = WM_USER + 128 }

// #ifdef UNICODE
alias PSM_SETHEADERSUBTITLEW PSM_SETHEADERSUBTITLE;
// #else
// #...
// #endif

// #define PropSheet_SetHeaderSubTitle(hDlg, index, lpszText) SNDMSG(hDlg, PSM_SETHEADERSUBTITLE, (WPARAM)(index), (LPARAM)(lpszText))

enum : uint { PSM_HWNDTOINDEX = WM_USER + 129 }
// #define PropSheet_HwndToIndex(hDlg, hwnd) (int)SNDMSG(hDlg, PSM_HWNDTOINDEX, (WPARAM)(hwnd), 0)

enum : uint { PSM_INDEXTOHWND = WM_USER + 130 }
// #define PropSheet_IndexToHwnd(hDlg, i) (HWND)SNDMSG(hDlg, PSM_INDEXTOHWND, (WPARAM)(i), 0)

enum : uint { PSM_PAGETOINDEX = WM_USER + 131 }
// #define PropSheet_PageToIndex(hDlg, hpage) (int)SNDMSG(hDlg, PSM_PAGETOINDEX, 0, (LPARAM)(hpage))

enum : uint { PSM_INDEXTOPAGE = WM_USER + 132 }
// #define PropSheet_IndexToPage(hDlg, i) (HPROPSHEETPAGE)SNDMSG(hDlg, PSM_INDEXTOPAGE, (WPARAM)(i), 0)

enum : uint { PSM_IDTOINDEX = WM_USER + 133 }
// #define PropSheet_IdToIndex(hDlg, id) (int)SNDMSG(hDlg, PSM_IDTOINDEX, 0, (LPARAM)(id))

enum : uint { PSM_INDEXTOID = WM_USER + 134 }
// #define PropSheet_IndexToId(hDlg, i) SNDMSG(hDlg, PSM_INDEXTOID, (WPARAM)(i), 0)

enum : uint { PSM_GETRESULT = WM_USER + 135 }
// #define PropSheet_GetResult(hDlg) SNDMSG(hDlg, PSM_GETRESULT, 0, 0)

enum : uint { PSM_RECALCPAGESIZES = WM_USER + 136 }
// #define PropSheet_RecalcPageSizes(hDlg) SNDMSG(hDlg, PSM_RECALCPAGESIZES, 0, 0)
// #endif // 0x0500

enum : uint { ID_PSRESTARTWINDOWS = 0x2 }
enum : uint { ID_PSREBOOTSYSTEM = ID_PSRESTARTWINDOWS | 0x1 }

enum : uint { WIZ_CXDLG = 276 }
enum : uint { WIZ_CYDLG = 140 }

enum : uint { WIZ_CXBMP = 80 }

enum : uint { WIZ_BODYX = 92 }
enum : uint { WIZ_BODYCX = 184 }

enum : uint { PROP_SM_CXDLG = 212 }
enum : uint { PROP_SM_CYDLG = 188 }

enum : uint { PROP_MED_CXDLG = 227 }
enum : uint { PROP_MED_CYDLG = 215 }

enum : uint { PROP_LG_CXDLG = 252 }
enum : uint { PROP_LG_CYDLG = 218 }

// #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
// #if ISOLATION_AWARE_ENABLED

// #if !defined(ISOLATION_AWARE_INLINE)
// #if defined(__cplusplus)
// #...
// #else
// #...
// #endif
// #endif

// ...

// #ifndef CCSIZEOF_STRUCT
// #...
// #endif

// ...

// #if defined(UNICODE)

// #...
// #...

// #else /* UNICODE */

// #...
// #...

// #endif /* UNICODE */

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// #...
// #...
// #...
// #...
// #...

// #endif /* ISOLATION_AWARE_ENABLED */
// #endif /* RC */

// #ifdef __cplusplus
// }
// #endif

align:

// #endif  // _PRSHT_H_

// ----

// #ifndef _INC_COMMCTRL
// #define _INC_COMMCTRL

// #ifndef _WINRESRC_
// #ifndef _WIN32_IE
// #...
// #else
// #if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
// #...
// #endif
// #endif
// #endif

// #ifndef _HRESULT_DEFINED
// #define _HRESULT_DEFINED
alias LONG HRESULT;
// #endif // _HRESULT_DEFINED

// #ifndef NOUSER

// #ifndef WINCOMMCTRLAPI
// #if !defined(_COMCTL32_) && defined(_WIN32)
// #define WINCOMMCTRLAPI DECLSPEC_IMPORT
// #else
// #...
// #endif
// #endif // WINCOMMCTRLAPI

// #ifndef DUMMYUNIONNAME
// #ifdef NONAMELESSUNION
// #...
// #...
// #...
// #...
// #...
// #else
// #define DUMMYUNIONNAME
// #define DUMMYUNIONNAME2
// #define DUMMYUNIONNAME3
// #define DUMMYUNIONNAME4
// #define DUMMYUNIONNAME5
// #endif
// #endif // DUMMYUNIONNAME

// #ifdef __cplusplus
// extern "C" {
// #endif

// #include <prsht.h>

// #ifndef SNDMSG
// #ifdef __cplusplus
// #ifndef _MAC
// #define SNDMSG ::SendMessage
// #else
// #...
// #endif
// #else
// #ifndef _MAC
// #...
// #else
// #...
// #endif //_MAC
// #endif
// #endif // ifndef SNDMSG

// #ifdef _MAC
// #ifndef RC_INVOKED
// #ifndef _WLM_NOFORCE_LIBS

// #ifndef _WLMDLL
//     #ifdef _DEBUG
// #...
//     #else
// #...
//     #endif
// #...
//     #else
//     #ifdef _DEBUG
// #...
//     #else
// #...
//     #endif
// #endif // _WLMDLL

// #endif // _WLM_NOFORCE_LIBS
// #endif // RC_INVOKED
// #endif //_MAC

extern(Windows) export void InitCommonControls();

// #if (_WIN32_IE >= 0x0300)
struct tagINITCOMMONCONTROLSEX {
  DWORD dwSize;
  DWORD dwICC;
}
alias tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX;
alias tagINITCOMMONCONTROLSEX* LPINITCOMMONCONTROLSEX;

enum : uint { ICC_LISTVIEW_CLASSES = 0x00000001 }
enum : uint { ICC_TREEVIEW_CLASSES = 0x00000002 }
enum : uint { ICC_BAR_CLASSES = 0x00000004 }
enum : uint { ICC_TAB_CLASSES = 0x00000008 }
enum : uint { ICC_UPDOWN_CLASS = 0x00000010 }
enum : uint { ICC_PROGRESS_CLASS = 0x00000020 }
enum : uint { ICC_HOTKEY_CLASS = 0x00000040 }
enum : uint { ICC_ANIMATE_CLASS = 0x00000080 }
enum : uint { ICC_WIN95_CLASSES = 0x000000FF }
enum : uint { ICC_DATE_CLASSES = 0x00000100 }
enum : uint { ICC_USEREX_CLASSES = 0x00000200 }
enum : uint { ICC_COOL_CLASSES = 0x00000400 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { ICC_INTERNET_CLASSES = 0x00000800 }
enum : uint { ICC_PAGESCROLLER_CLASS = 0x00001000 }
enum : uint { ICC_NATIVEFNTCTL_CLASS = 0x00002000 }
// #endif
// #if (_WIN32_WINNT >= 0x501)
enum : uint { ICC_STANDARD_CLASSES = 0x00004000 }
enum : uint { ICC_LINK_CLASS = 0x00008000 }
// #endif

extern(Windows) export BOOL InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
// #endif      // _WIN32_IE >= 0x0300

enum : uint { ODT_HEADER = 100 }
enum : uint { ODT_TAB = 101 }
enum : uint { ODT_LISTVIEW = 102 }

enum : uint { LVM_FIRST = 0x1000 }
enum : uint { TV_FIRST = 0x1100 }
enum : uint { HDM_FIRST = 0x1200 }
enum : uint { TCM_FIRST = 0x1300 }

// #if (_WIN32_IE >= 0x0400)
enum : uint { PGM_FIRST = 0x1400 }
// #if (_WIN32_WINNT >= 0x501)
enum : uint { ECM_FIRST = 0x1500 }
enum : uint { BCM_FIRST = 0x1600 }
enum : uint { CBM_FIRST = 0x1700 }
// #endif
enum : uint { CCM_FIRST = 0x2000 }
enum : uint { CCM_LAST = CCM_FIRST + 0x200 }

enum : uint { CCM_SETBKCOLOR = CCM_FIRST + 1 }

struct tagCOLORSCHEME {
  DWORD dwSize;
  COLORREF clrBtnHighlight;
  COLORREF clrBtnShadow;
}
alias tagCOLORSCHEME COLORSCHEME;
alias tagCOLORSCHEME* LPCOLORSCHEME;

enum : uint { CCM_SETCOLORSCHEME = CCM_FIRST + 2 }
enum : uint { CCM_GETCOLORSCHEME = CCM_FIRST + 3 }
enum : uint { CCM_GETDROPTARGET = CCM_FIRST + 4 }
enum : uint { CCM_SETUNICODEFORMAT = CCM_FIRST + 5 }
enum : uint { CCM_GETUNICODEFORMAT = CCM_FIRST + 6 }

// #if (_WIN32_IE >= 0x0500)
// #if (_WIN32_WINNT >= 0x501)
enum : uint { COMCTL32_VERSION = 6 }
// #else
// #...
// #endif

enum : uint { CCM_SETVERSION = CCM_FIRST + 0x7 }
enum : uint { CCM_GETVERSION = CCM_FIRST + 0x8 }
enum : uint { CCM_SETNOTIFYWINDOW = CCM_FIRST + 0x9 }
// #if (_WIN32_WINNT >= 0x501)
enum : uint { CCM_SETWINDOWTHEME = CCM_FIRST + 0xb }
enum : uint { CCM_DPISCALE = CCM_FIRST + 0xc }
// #endif 
// #endif // (_WIN32_IE >= 0x0500)

// #endif // (_WIN32_IE >= 0x0400)

// #if (_WIN32_IE >= 0x0400)

enum : uint { INFOTIPSIZE = 1024 }
// #endif

// #define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) (fn)((hwnd), (int)(wParam), (NMHDR *)(lParam))
// #define FORWARD_WM_NOTIFY(hwnd, idFrom, pnmhdr, fn) (LRESULT)(fn)((hwnd), WM_NOTIFY, (WPARAM)(int)(idFrom), (LPARAM)(NMHDR *)(pnmhdr))

enum : uint { NM_OUTOFMEMORY = NM_FIRST-1 }
enum : uint { NM_CLICK = NM_FIRST-2 }
enum : uint { NM_DBLCLK = NM_FIRST-3 }
enum : uint { NM_RETURN = NM_FIRST-4 }
enum : uint { NM_RCLICK = NM_FIRST-5 }
enum : uint { NM_RDBLCLK = NM_FIRST-6 }
enum : uint { NM_SETFOCUS = NM_FIRST-7 }
enum : uint { NM_KILLFOCUS = NM_FIRST-8 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { NM_CUSTOMDRAW = NM_FIRST-12 }
enum : uint { NM_HOVER = NM_FIRST-13 }
// #endif
// #if (_WIN32_IE >= 0x0400)
enum : uint { NM_NCHITTEST = NM_FIRST-14 }
enum : uint { NM_KEYDOWN = NM_FIRST-15 }
enum : uint { NM_RELEASEDCAPTURE = NM_FIRST-16 }
enum : uint { NM_SETCURSOR = NM_FIRST-17 }
enum : uint { NM_CHAR = NM_FIRST-18 }
// #endif
// #if (_WIN32_IE >= 0x0401)
enum : uint { NM_TOOLTIPSCREATED = NM_FIRST-19 }
// #endif
// #if (_WIN32_IE >= 0x0500)
enum : uint { NM_LDOWN = NM_FIRST-20 }
enum : uint { NM_RDOWN = NM_FIRST-21 }
enum : uint { NM_THEMECHANGED = NM_FIRST-22 }
// #endif

// #ifndef CCSIZEOF_STRUCT
// #define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
// #endif

// #if (_WIN32_IE >= 0x0401)
struct tagNMTOOLTIPSCREATED {
  NMHDR hdr;
  HWND hwndToolTips;
}
alias tagNMTOOLTIPSCREATED NMTOOLTIPSCREATED;
alias tagNMTOOLTIPSCREATED* LPNMTOOLTIPSCREATED;

// #endif

// #if (_WIN32_IE >= 0x0400)
struct tagNMMOUSE {
  NMHDR hdr;
  DWORD_PTR dwItemSpec;
  DWORD_PTR dwItemData;
  POINT pt;
  LPARAM dwHitInfo;
}
alias tagNMMOUSE NMMOUSE;
alias tagNMMOUSE* LPNMMOUSE;

alias NMMOUSE NMCLICK;
alias LPNMMOUSE LPNMCLICK;

struct tagNMOBJECTNOTIFY {
  NMHDR hdr;
  int iItem;
// #ifdef __IID_DEFINED__
  IID* piid;
// #else
// ...
// #endif
  void *pObject;
  HRESULT hResult;
  DWORD dwFlags;
}
alias tagNMOBJECTNOTIFY NMOBJECTNOTIFY;
alias tagNMOBJECTNOTIFY* LPNMOBJECTNOTIFY;

struct tagNMKEY {
  NMHDR hdr;
  UINT nVKey;
  UINT uFlags;
}
alias tagNMKEY NMKEY;
alias tagNMKEY* LPNMKEY;

struct tagNMCHAR {
  NMHDR hdr;
  UINT ch;
  DWORD dwItemPrev;
  DWORD dwItemNext;
}
alias tagNMCHAR NMCHAR;
alias tagNMCHAR* LPNMCHAR;

// #endif           // _WIN32_IE >= 0x0400

// #define NM_FIRST (0U- 0U)
enum : uint { NM_LAST = 0U- 99U }

enum : uint { LVN_FIRST = 0U-100U }
enum : uint { LVN_LAST = 0U-199U }

enum : uint { HDN_FIRST = 0U-300U }
enum : uint { HDN_LAST = 0U-399U }

enum : uint { TVN_FIRST = 0U-400U }
enum : uint { TVN_LAST = 0U-499U }

enum : uint { TTN_FIRST = 0U-520U }
enum : uint { TTN_LAST = 0U-549U }

enum : uint { TCN_FIRST = 0U-550U }
enum : uint { TCN_LAST = 0U-580U }

enum : uint { CDN_FIRST = 0U-601U }
enum : uint { CDN_LAST = 0U-699U }

enum : uint { TBN_FIRST = 0U-700U }
enum : uint { TBN_LAST = 0U-720U }

enum : uint { UDN_FIRST = 0U-721 }
enum : uint { UDN_LAST = 0U-740 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { MCN_FIRST = 0U-750U }
enum : uint { MCN_LAST = 0U-759U }

enum : uint { DTN_FIRST = 0U-760U }
enum : uint { DTN_LAST = 0U-799U }

// #define CBEN_FIRST (0U-800U)
enum : uint { CBEN_LAST = 0U-830U }

enum : uint { RBN_FIRST = 0U-831U }
enum : uint { RBN_LAST = 0U-859U }
// #endif

// #if (_WIN32_IE >= 0x0400)
enum : uint { IPN_FIRST = 0U-860U }
enum : uint { IPN_LAST = 0U-879U }

enum : uint { SBN_FIRST = 0U-880U }
enum : uint { SBN_LAST = 0U-899U }

enum : uint { PGN_FIRST = 0U-900U }
enum : uint { PGN_LAST = 0U-950U }

// #endif

// #if (_WIN32_IE >= 0x0500)
// #ifndef WMN_FIRST
enum : uint { WMN_FIRST = 0U-1000U }
enum : uint { WMN_LAST = 0U-1200U }
// #endif
// #endif

// #if (_WIN32_WINNT >= 0x0501)
enum : uint { BCN_FIRST = 0U-1250U }
enum : uint { BCN_LAST = 0U-1350U }
// #endif

enum : uint { MSGF_COMMCTRL_BEGINDRAG = 0x4200 }
enum : uint { MSGF_COMMCTRL_SIZEHEADER = 0x4201 }
enum : uint { MSGF_COMMCTRL_DRAGSELECT = 0x4202 }
enum : uint { MSGF_COMMCTRL_TOOLBARCUST = 0x4203 }

// #if (_WIN32_IE >= 0x0300)

enum : uint { CDRF_DODEFAULT = 0x00000000 }
enum : uint { CDRF_NEWFONT = 0x00000002 }
enum : uint { CDRF_SKIPDEFAULT = 0x00000004 }

enum : uint { CDRF_NOTIFYPOSTPAINT = 0x00000010 }
enum : uint { CDRF_NOTIFYITEMDRAW = 0x00000020 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { CDRF_NOTIFYSUBITEMDRAW = 0x00000020 }
// #endif
enum : uint { CDRF_NOTIFYPOSTERASE = 0x00000040 }

enum : uint { CDDS_PREPAINT = 0x00000001 }
enum : uint { CDDS_POSTPAINT = 0x00000002 }
enum : uint { CDDS_PREERASE = 0x00000003 }
enum : uint { CDDS_POSTERASE = 0x00000004 }

enum : uint { CDDS_ITEM = 0x00010000 }
enum : uint { CDDS_ITEMPREPAINT = CDDS_ITEM | CDDS_PREPAINT }
enum : uint { CDDS_ITEMPOSTPAINT = CDDS_ITEM | CDDS_POSTPAINT }
enum : uint { CDDS_ITEMPREERASE = CDDS_ITEM | CDDS_PREERASE }
enum : uint { CDDS_ITEMPOSTERASE = CDDS_ITEM | CDDS_POSTERASE }
// #if (_WIN32_IE >= 0x0400)
enum : uint { CDDS_SUBITEM = 0x00020000 }
// #endif

enum : uint { CDIS_SELECTED = 0x0001 }
enum : uint { CDIS_GRAYED = 0x0002 }
enum : uint { CDIS_DISABLED = 0x0004 }
enum : uint { CDIS_CHECKED = 0x0008 }
enum : uint { CDIS_FOCUS = 0x0010 }
enum : uint { CDIS_DEFAULT = 0x0020 }
enum : uint { CDIS_HOT = 0x0040 }
enum : uint { CDIS_MARKED = 0x0080 }
enum : uint { CDIS_INDETERMINATE = 0x0100 }
// #if (_WIN32_WINNT >= 0x501)
enum : uint { CDIS_SHOWKEYBOARDCUES = 0x0200 }
// #endif

struct tagNMCUSTOMDRAWINFO {
  NMHDR hdr;
  DWORD dwDrawStage;
  HDC hdc;
  RECT rc;
  DWORD_PTR dwItemSpec;
  UINT uItemState;
  LPARAM lItemlParam;
}
alias tagNMCUSTOMDRAWINFO NMCUSTOMDRAW;
alias tagNMCUSTOMDRAWINFO* LPNMCUSTOMDRAW;

struct tagNMTTCUSTOMDRAW {
  NMCUSTOMDRAW nmcd;
  UINT uDrawFlags;
}
alias tagNMTTCUSTOMDRAW NMTTCUSTOMDRAW;
alias tagNMTTCUSTOMDRAW* LPNMTTCUSTOMDRAW;

// #endif      // _WIN32_IE >= 0x0300

// #ifndef NOIMAGEAPIS

enum : uint { CLR_NONE = 0xFFFFFFFF }
enum : uint { CLR_DEFAULT = 0xFF000000 }

// #ifndef HIMAGELIST
// struct _IMAGELIST;
alias _IMAGELIST* HIMAGELIST;
// #endif

// #ifndef IMAGELISTDRAWPARAMS
// #if (_WIN32_IE >= 0x0300)
struct _IMAGELISTDRAWPARAMS {
  DWORD cbSize;
  HIMAGELIST himl;
  int i;
  HDC hdcDst;
  int x;
  int y;
  int cx;
  int cy;
  int xBitmap;
  int yBitmap;
  COLORREF rgbBk;
  COLORREF rgbFg;
  UINT fStyle;
  DWORD dwRop;
// #if (_WIN32_WINNT >= 0x501)
  DWORD fState;
  DWORD Frame;
  COLORREF crEffect;
// #endif
}
alias _IMAGELISTDRAWPARAMS IMAGELISTDRAWPARAMS;
alias _IMAGELISTDRAWPARAMS* LPIMAGELISTDRAWPARAMS;

// #define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS, dwRop)

// #endif      // _WIN32_IE >= 0x0300
// #endif

enum : uint { ILC_MASK = 0x00000001 }
enum : uint { ILC_COLOR = 0x00000000 }
enum : uint { ILC_COLORDDB = 0x000000FE }
enum : uint { ILC_COLOR4 = 0x00000004 }
enum : uint { ILC_COLOR8 = 0x00000008 }
enum : uint { ILC_COLOR16 = 0x00000010 }
enum : uint { ILC_COLOR24 = 0x00000018 }
enum : uint { ILC_COLOR32 = 0x00000020 }
enum : uint { ILC_PALETTE = 0x00000800 }
// #if (_WIN32_WINNT >= 0x501)
enum : uint { ILC_MIRROR = 0x00002000 }
enum : uint { ILC_PERITEMMIRROR = 0x00008000 }
// #endif	
extern(Windows) export HIMAGELIST ImageList_Create(int cx, int cy, UINT flags, int cInitial, int cGrow);
extern(Windows) export BOOL ImageList_Destroy(HIMAGELIST himl);

extern(Windows) export int ImageList_GetImageCount(HIMAGELIST himl);
// #if (_WIN32_IE >= 0x0300)
extern(Windows) export BOOL ImageList_SetImageCount(HIMAGELIST himl, UINT uNewCount);
// #endif

extern(Windows) export int ImageList_Add(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask);

extern(Windows) export int ImageList_ReplaceIcon(HIMAGELIST himl, int i, HICON hicon);
extern(Windows) export COLORREF ImageList_SetBkColor(HIMAGELIST himl, COLORREF clrBk);
extern(Windows) export COLORREF ImageList_GetBkColor(HIMAGELIST himl);
extern(Windows) export BOOL ImageList_SetOverlayImage(HIMAGELIST himl, int iImage, int iOverlay);

// #define ImageList_AddIcon(himl, hicon) ImageList_ReplaceIcon(himl, -1, hicon)

enum : uint { ILD_NORMAL = 0x00000000 }
enum : uint { ILD_TRANSPARENT = 0x00000001 }
enum : uint { ILD_MASK = 0x00000010 }
enum : uint { ILD_IMAGE = 0x00000020 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { ILD_ROP = 0x00000040 }
// #endif
enum : uint { ILD_BLEND25 = 0x00000002 }
enum : uint { ILD_BLEND50 = 0x00000004 }
enum : uint { ILD_OVERLAYMASK = 0x00000F00 }
uint INDEXTOOVERLAYMASK(uint i){ return i << 8; }
enum : uint { ILD_PRESERVEALPHA = 0x00001000 }
enum : uint { ILD_SCALE = 0x00002000 }
enum : uint { ILD_DPISCALE = 0x00004000 }

alias ILD_BLEND50 ILD_SELECTED;
alias ILD_BLEND25 ILD_FOCUS;
alias ILD_BLEND50 ILD_BLEND;
alias CLR_DEFAULT CLR_HILIGHT;

enum : uint { ILS_NORMAL = 0x00000000 }
enum : uint { ILS_GLOW = 0x00000001 }
enum : uint { ILS_SHADOW = 0x00000002 }
enum : uint { ILS_SATURATE = 0x00000004 }
enum : uint { ILS_ALPHA = 0x00000008 }

extern(Windows) export BOOL ImageList_Draw(HIMAGELIST himl, int i, HDC hdcDst, int x, int y, UINT fStyle);

// #ifdef _WIN32

extern(Windows) export BOOL ImageList_Replace(HIMAGELIST himl, int i, HBITMAP hbmImage, HBITMAP hbmMask);

extern(Windows) export int ImageList_AddMasked(HIMAGELIST himl, HBITMAP hbmImage, COLORREF crMask);
extern(Windows) export BOOL ImageList_DrawEx(HIMAGELIST himl, int i, HDC hdcDst, int x, int y, int dx, int dy, COLORREF rgbBk, COLORREF rgbFg, UINT fStyle);
// #if (_WIN32_IE >= 0x0300)
extern(Windows) export BOOL ImageList_DrawIndirect(IMAGELISTDRAWPARAMS* pimldp);
// #endif
extern(Windows) export BOOL ImageList_Remove(HIMAGELIST himl, int i);
extern(Windows) export HICON ImageList_GetIcon(HIMAGELIST himl, int i, UINT flags);
extern(Windows) export HIMAGELIST ImageList_LoadImageA(HINSTANCE hi, LPCSTR lpbmp, int cx, int cGrow, COLORREF crMask, UINT uType, UINT uFlags);
extern(Windows) export HIMAGELIST ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, int cx, int cGrow, COLORREF crMask, UINT uType, UINT uFlags);

// #ifdef UNICODE
alias ImageList_LoadImageW ImageList_LoadImage;
// #else
// #...
// #endif

// #if (_WIN32_IE >= 0x0300)
enum : uint { ILCF_MOVE = 0x00000000 }
enum : uint { ILCF_SWAP = 0x00000001 }
extern(Windows) export BOOL ImageList_Copy(HIMAGELIST himlDst, int iDst, HIMAGELIST himlSrc, int iSrc, UINT uFlags);
// #endif

extern(Windows) export BOOL ImageList_BeginDrag(HIMAGELIST himlTrack, int iTrack, int dxHotspot, int dyHotspot);
extern(Windows) export void ImageList_EndDrag();
extern(Windows) export BOOL ImageList_DragEnter(HWND hwndLock, int x, int y);
extern(Windows) export BOOL ImageList_DragLeave(HWND hwndLock);
extern(Windows) export BOOL ImageList_DragMove(int x, int y);
extern(Windows) export BOOL ImageList_SetDragCursorImage(HIMAGELIST himlDrag, int iDrag, int dxHotspot, int dyHotspot);

extern(Windows) export BOOL ImageList_DragShowNolock(BOOL fShow);
extern(Windows) export HIMAGELIST ImageList_GetDragImage(POINT *ppt,POINT *pptHotspot);

// #define ImageList_RemoveAll(himl) ImageList_Remove(himl, -1)
// #define ImageList_ExtractIcon(hi, himl, i) ImageList_GetIcon(himl, i, 0)
// #define ImageList_LoadBitmap(hi, lpbmp, cx, cGrow, crMask) ImageList_LoadImage(hi, lpbmp, cx, cGrow, crMask, IMAGE_BITMAP, 0)

// #ifdef __IStream_INTERFACE_DEFINED__

// ...

// #if (_WIN32_WINNT >= 0x0501)
// #...
// #...

// ...
// #endif

// #endif

// #ifndef IMAGEINFO
struct _IMAGEINFO {
  HBITMAP hbmImage;
  HBITMAP hbmMask;
  int Unused1;
  int Unused2;
  RECT rcImage;
}
alias _IMAGEINFO IMAGEINFO;
alias _IMAGEINFO* LPIMAGEINFO;

// #endif

extern(Windows) export BOOL ImageList_GetIconSize(HIMAGELIST himl, int *cx, int *cy);
extern(Windows) export BOOL ImageList_SetIconSize(HIMAGELIST himl, int cx, int cy);
extern(Windows) export BOOL ImageList_GetImageInfo(HIMAGELIST himl, int i, IMAGEINFO *pImageInfo);
extern(Windows) export HIMAGELIST ImageList_Merge(HIMAGELIST himl1, int i1, HIMAGELIST himl2, int i2, int dx, int dy);
// #if (_WIN32_IE >= 0x0400)
extern(Windows) export HIMAGELIST ImageList_Duplicate(HIMAGELIST himl);
// #endif

// #endif

// #endif

// #ifndef NOHEADER

// #ifdef _WIN32
const char[] WC_HEADERA = "SysHeader32";
const wchar[] WC_HEADERW = "SysHeader32";

// #ifdef UNICODE
alias WC_HEADERW WC_HEADER;
// #else
// #...
// #endif

// #else
// #...
// #endif

enum : uint { HDS_HORZ = 0x0000 }
enum : uint { HDS_BUTTONS = 0x0002 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { HDS_HOTTRACK = 0x0004 }
// #endif
enum : uint { HDS_HIDDEN = 0x0008 }

// #if (_WIN32_IE >= 0x0300)
enum : uint { HDS_DRAGDROP = 0x0040 }
enum : uint { HDS_FULLDRAG = 0x0080 }
// #endif
// #if (_WIN32_IE >= 0x0500)
enum : uint { HDS_FILTERBAR = 0x0100 }
// #endif

// #if (_WIN32_WINNT >= 0x501)
enum : uint { HDS_FLAT = 0x0200 }
// #endif

// #if (_WIN32_IE >= 0x0500)

enum : uint { HDFT_ISSTRING = 0x0000 }
enum : uint { HDFT_ISNUMBER = 0x0001 }

enum : uint { HDFT_HASNOVALUE = 0x8000 }

// #ifdef UNICODE
alias HD_TEXTFILTERW HD_TEXTFILTER;
alias HD_TEXTFILTERW HDTEXTFILTER;
alias LPHD_TEXTFILTERW LPHD_TEXTFILTER;
alias LPHD_TEXTFILTERW LPHDTEXTFILTER;
// #else
// #...
// #...
// #...
// #...
// #endif

struct _HD_TEXTFILTERA {
  LPSTR pszText;
  INT cchTextMax;
}
alias _HD_TEXTFILTERA HD_TEXTFILTERA;
alias _HD_TEXTFILTERA* LPHD_TEXTFILTERA;

struct _HD_TEXTFILTERW {
  LPWSTR pszText;
  INT cchTextMax;
}
alias _HD_TEXTFILTERW HD_TEXTFILTERW;
alias _HD_TEXTFILTERW* LPHD_TEXTFILTERW;

// #endif  // _WIN32_IE >= 0x0500

// #if (_WIN32_IE >= 0x0300)
alias HDITEMA HD_ITEMA;
alias HDITEMW HD_ITEMW;
// #else
// #...
// #...
// #endif
alias HDITEM HD_ITEM;

struct _HD_ITEMA {
  UINT mask;
  int cxy;
  LPSTR pszText;
  HBITMAP hbm;
  int cchTextMax;
  int fmt;
  LPARAM lParam;
// #if (_WIN32_IE >= 0x0300)
  int iImage;
  int iOrder;
// #endif
// #if (_WIN32_IE >= 0x0500)
  UINT type;
  void *  pvFilter;
// #endif
}
alias _HD_ITEMA HDITEMA;
alias _HD_ITEMA* LPHDITEMA;

// #define HDITEMA_V1_SIZE CCSIZEOF_STRUCT(HDITEMA, lParam)
// #define HDITEMW_V1_SIZE CCSIZEOF_STRUCT(HDITEMW, lParam)

struct _HD_ITEMW {
  UINT mask;
  int cxy;
  LPWSTR pszText;
  HBITMAP hbm;
  int cchTextMax;
  int fmt;
  LPARAM lParam;
// #if (_WIN32_IE >= 0x0300)
  int iImage;
  int iOrder;
// #endif
// #if (_WIN32_IE >= 0x0500)
  UINT type;
  void *  pvFilter;
// #endif
}
alias _HD_ITEMW HDITEMW;
alias _HD_ITEMW* LPHDITEMW;

// #ifdef UNICODE
alias HDITEMW HDITEM;
alias LPHDITEMW LPHDITEM;
// #define HDITEM_V1_SIZE HDITEMW_V1_SIZE
// #else
// #...
// #...
// #...
// #endif

enum : uint { HDI_WIDTH = 0x0001 }
alias HDI_WIDTH HDI_HEIGHT;
enum : uint { HDI_TEXT = 0x0002 }
enum : uint { HDI_FORMAT = 0x0004 }
enum : uint { HDI_LPARAM = 0x0008 }
enum : uint { HDI_BITMAP = 0x0010 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { HDI_IMAGE = 0x0020 }
enum : uint { HDI_DI_SETITEM = 0x0040 }
enum : uint { HDI_ORDER = 0x0080 }
// #endif
// #if (_WIN32_IE >= 0x0500)
enum : uint { HDI_FILTER = 0x0100 }
// #endif

enum : uint { HDF_LEFT = 0x0000 }
enum : uint { HDF_RIGHT = 0x0001 }
enum : uint { HDF_CENTER = 0x0002 }
enum : uint { HDF_JUSTIFYMASK = 0x0003 }
enum : uint { HDF_RTLREADING = 0x0004 }

enum : uint { HDF_OWNERDRAW = 0x8000 }
enum : uint { HDF_STRING = 0x4000 }
enum : uint { HDF_BITMAP = 0x2000 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { HDF_BITMAP_ON_RIGHT = 0x1000 }
enum : uint { HDF_IMAGE = 0x0800 }
// #endif

// #if (_WIN32_WINNT >= 0x501)
enum : uint { HDF_SORTUP = 0x0400 }
enum : uint { HDF_SORTDOWN = 0x0200 }
// #endif

enum : uint { HDM_GETITEMCOUNT = HDM_FIRST + 0 }
// #define Header_GetItemCount(hwndHD) (int)SNDMSG((hwndHD), HDM_GETITEMCOUNT, 0, 0L)

enum : uint { HDM_INSERTITEMA = HDM_FIRST + 1 }
enum : uint { HDM_INSERTITEMW = HDM_FIRST + 10 }

// #ifdef UNICODE
alias HDM_INSERTITEMW HDM_INSERTITEM;
// #else
// #...
// #endif

// #define Header_InsertItem(hwndHD, i, phdi) (int)SNDMSG((hwndHD), HDM_INSERTITEM, (WPARAM)(int)(i), (LPARAM)(const HD_ITEM *)(phdi))

enum : uint { HDM_DELETEITEM = HDM_FIRST + 2 }
// #define Header_DeleteItem(hwndHD, i) (BOOL)SNDMSG((hwndHD), HDM_DELETEITEM, (WPARAM)(int)(i), 0L)

enum : uint { HDM_GETITEMA = HDM_FIRST + 3 }
enum : uint { HDM_GETITEMW = HDM_FIRST + 11 }

// #ifdef UNICODE
alias HDM_GETITEMW HDM_GETITEM;
// #else
// #...
// #endif

// #define Header_GetItem(hwndHD, i, phdi) (BOOL)SNDMSG((hwndHD), HDM_GETITEM, (WPARAM)(int)(i), (LPARAM)(HD_ITEM *)(phdi))

enum : uint { HDM_SETITEMA = HDM_FIRST + 4 }
enum : uint { HDM_SETITEMW = HDM_FIRST + 12 }

// #ifdef UNICODE
alias HDM_SETITEMW HDM_SETITEM;
// #else
// #...
// #endif

// #define Header_SetItem(hwndHD, i, phdi) (BOOL)SNDMSG((hwndHD), HDM_SETITEM, (WPARAM)(int)(i), (LPARAM)(const HD_ITEM *)(phdi))

// #if (_WIN32_IE >= 0x0300)
alias HDLAYOUT HD_LAYOUT;
// #else
// #...
// #endif

struct _HD_LAYOUT {
  RECT *prc;
  WINDOWPOS *pwpos;
}
alias _HD_LAYOUT HDLAYOUT;
alias _HD_LAYOUT* LPHDLAYOUT;

enum : uint { HDM_LAYOUT = HDM_FIRST + 5 }
// #define Header_Layout(hwndHD, playout) (BOOL)SNDMSG((hwndHD), HDM_LAYOUT, 0, (LPARAM)(HD_LAYOUT *)(playout))

enum : uint { HHT_NOWHERE = 0x0001 }
enum : uint { HHT_ONHEADER = 0x0002 }
enum : uint { HHT_ONDIVIDER = 0x0004 }
enum : uint { HHT_ONDIVOPEN = 0x0008 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { HHT_ONFILTER = 0x0010 }
enum : uint { HHT_ONFILTERBUTTON = 0x0020 }
// #endif
enum : uint { HHT_ABOVE = 0x0100 }
enum : uint { HHT_BELOW = 0x0200 }
enum : uint { HHT_TORIGHT = 0x0400 }
enum : uint { HHT_TOLEFT = 0x0800 }

// #if (_WIN32_IE >= 0x0300)
alias HDHITTESTINFO HD_HITTESTINFO;
// #else
// #...
// #endif

struct _HD_HITTESTINFO {
  POINT pt;
  UINT flags;
  int iItem;
}
alias _HD_HITTESTINFO HDHITTESTINFO;
alias _HD_HITTESTINFO* LPHDHITTESTINFO;

enum : uint { HDM_HITTEST = HDM_FIRST + 6 }

// #if (_WIN32_IE >= 0x0300)

enum : uint { HDM_GETITEMRECT = HDM_FIRST + 7 }
// #define Header_GetItemRect(hwnd, iItem, lprc) (BOOL)SNDMSG((hwnd), HDM_GETITEMRECT, (WPARAM)(iItem), (LPARAM)(lprc))

enum : uint { HDM_SETIMAGELIST = HDM_FIRST + 8 }
// #define Header_SetImageList(hwnd, himl) (HIMAGELIST)SNDMSG((hwnd), HDM_SETIMAGELIST, 0, (LPARAM)(himl))

enum : uint { HDM_GETIMAGELIST = HDM_FIRST + 9 }
// #define Header_GetImageList(hwnd) (HIMAGELIST)SNDMSG((hwnd), HDM_GETIMAGELIST, 0, 0)

enum : uint { HDM_ORDERTOINDEX = HDM_FIRST + 15 }
// #define Header_OrderToIndex(hwnd, i) (int)SNDMSG((hwnd), HDM_ORDERTOINDEX, (WPARAM)(i), 0)

enum : uint { HDM_CREATEDRAGIMAGE = HDM_FIRST + 16 }
// #define Header_CreateDragImage(hwnd, i) (HIMAGELIST)SNDMSG((hwnd), HDM_CREATEDRAGIMAGE, (WPARAM)(i), 0)

enum : uint { HDM_GETORDERARRAY = HDM_FIRST + 17 }
// #define Header_GetOrderArray(hwnd, iCount, lpi) (BOOL)SNDMSG((hwnd), HDM_GETORDERARRAY, (WPARAM)(iCount), (LPARAM)(lpi))

enum : uint { HDM_SETORDERARRAY = HDM_FIRST + 18 }
// #define Header_SetOrderArray(hwnd, iCount, lpi) (BOOL)SNDMSG((hwnd), HDM_SETORDERARRAY, (WPARAM)(iCount), (LPARAM)(lpi))

enum : uint { HDM_SETHOTDIVIDER = HDM_FIRST + 19 }
// #define Header_SetHotDivider(hwnd, fPos, dw) (int)SNDMSG((hwnd), HDM_SETHOTDIVIDER, (WPARAM)(fPos), (LPARAM)(dw))

// #endif      // _WIN32_IE >= 0x0300

// #if (_WIN32_IE >= 0x0500)

enum : uint { HDM_SETBITMAPMARGIN = HDM_FIRST + 20 }
// #define Header_SetBitmapMargin(hwnd, iWidth) (int)SNDMSG((hwnd), HDM_SETBITMAPMARGIN, (WPARAM)(iWidth), 0)

enum : uint { HDM_GETBITMAPMARGIN = HDM_FIRST + 21 }
// #define Header_GetBitmapMargin(hwnd) (int)SNDMSG((hwnd), HDM_GETBITMAPMARGIN, 0, 0)
// #endif

// #if (_WIN32_IE >= 0x0400)
alias CCM_SETUNICODEFORMAT HDM_SETUNICODEFORMAT;
// #define Header_SetUnicodeFormat(hwnd, fUnicode) (BOOL)SNDMSG((hwnd), HDM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)

alias CCM_GETUNICODEFORMAT HDM_GETUNICODEFORMAT;
// #define Header_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd), HDM_GETUNICODEFORMAT, 0, 0)
// #endif

// #if (_WIN32_IE >= 0x0500)
enum : uint { HDM_SETFILTERCHANGETIMEOUT = HDM_FIRST+22 }
// #define Header_SetFilterChangeTimeout(hwnd, i) (int)SNDMSG((hwnd), HDM_SETFILTERCHANGETIMEOUT, 0, (LPARAM)(i))

enum : uint { HDM_EDITFILTER = HDM_FIRST+23 }
// #define Header_EditFilter(hwnd, i, fDiscardChanges) (int)SNDMSG((hwnd), HDM_EDITFILTER, (WPARAM)(i), MAKELPARAM(fDiscardChanges, 0))

enum : uint { HDM_CLEARFILTER = HDM_FIRST+24 }
// #define Header_ClearFilter(hwnd, i) (int)SNDMSG((hwnd), HDM_CLEARFILTER, (WPARAM)(i), 0)
// #define Header_ClearAllFilters(hwnd) (int)SNDMSG((hwnd), HDM_CLEARFILTER, (WPARAM)-1, 0)
// #endif

enum : uint { HDN_ITEMCHANGINGA = HDN_FIRST-0 }
enum : uint { HDN_ITEMCHANGINGW = HDN_FIRST-20 }
enum : uint { HDN_ITEMCHANGEDA = HDN_FIRST-1 }
enum : uint { HDN_ITEMCHANGEDW = HDN_FIRST-21 }
enum : uint { HDN_ITEMCLICKA = HDN_FIRST-2 }
enum : uint { HDN_ITEMCLICKW = HDN_FIRST-22 }
enum : uint { HDN_ITEMDBLCLICKA = HDN_FIRST-3 }
enum : uint { HDN_ITEMDBLCLICKW = HDN_FIRST-23 }
enum : uint { HDN_DIVIDERDBLCLICKA = HDN_FIRST-5 }
enum : uint { HDN_DIVIDERDBLCLICKW = HDN_FIRST-25 }
enum : uint { HDN_BEGINTRACKA = HDN_FIRST-6 }
enum : uint { HDN_BEGINTRACKW = HDN_FIRST-26 }
enum : uint { HDN_ENDTRACKA = HDN_FIRST-7 }
enum : uint { HDN_ENDTRACKW = HDN_FIRST-27 }
enum : uint { HDN_TRACKA = HDN_FIRST-8 }
enum : uint { HDN_TRACKW = HDN_FIRST-28 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { HDN_GETDISPINFOA = HDN_FIRST-9 }
enum : uint { HDN_GETDISPINFOW = HDN_FIRST-29 }
enum : uint { HDN_BEGINDRAG = HDN_FIRST-10 }
enum : uint { HDN_ENDDRAG = HDN_FIRST-11 }
// #endif
// #if (_WIN32_IE >= 0x0500)
enum : uint { HDN_FILTERCHANGE = HDN_FIRST-12 }
enum : uint { HDN_FILTERBTNCLICK = HDN_FIRST-13 }
// #endif

// #ifdef UNICODE
alias HDN_ITEMCHANGINGW HDN_ITEMCHANGING;
alias HDN_ITEMCHANGEDW HDN_ITEMCHANGED;
alias HDN_ITEMCLICKW HDN_ITEMCLICK;
alias HDN_ITEMDBLCLICKW HDN_ITEMDBLCLICK;
alias HDN_DIVIDERDBLCLICKW HDN_DIVIDERDBLCLICK;
alias HDN_BEGINTRACKW HDN_BEGINTRACK;
alias HDN_ENDTRACKW HDN_ENDTRACK;
alias HDN_TRACKW HDN_TRACK;
// #if (_WIN32_IE >= 0x0300)
alias HDN_GETDISPINFOW HDN_GETDISPINFO;
// #endif
// #else
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #if (_WIN32_IE >= 0x0300)
// #...
// #endif
// #endif

// #if (_WIN32_IE >= 0x0300)
alias NMHEADERA HD_NOTIFYA;
alias NMHEADERW HD_NOTIFYW;
// #else
// #...
// #...
// #...
// #...
// #endif
alias NMHEADER HD_NOTIFY;

struct tagNMHEADERA {
  NMHDR hdr;
  int iItem;
  int iButton;
  HDITEMA *pitem;
}
alias tagNMHEADERA NMHEADERA;
alias tagNMHEADERA* LPNMHEADERA;

struct tagNMHEADERW {
  NMHDR hdr;
  int iItem;
  int iButton;
  HDITEMW *pitem;
}
alias tagNMHEADERW NMHEADERW;
alias tagNMHEADERW* LPNMHEADERW;

// #ifdef UNICODE
alias NMHEADERW NMHEADER;
alias LPNMHEADERW LPNMHEADER;
// #else
// #...
// #...
// #endif

struct tagNMHDDISPINFOW {
  NMHDR hdr;
  int iItem;
  UINT mask;
  LPWSTR pszText;
  int cchTextMax;
  int iImage;
  LPARAM lParam;
}
alias tagNMHDDISPINFOW NMHDDISPINFOW;
alias tagNMHDDISPINFOW* LPNMHDDISPINFOW;

struct tagNMHDDISPINFOA {
  NMHDR hdr;
  int iItem;
  UINT mask;
  LPSTR pszText;
  int cchTextMax;
  int iImage;
  LPARAM lParam;
}
alias tagNMHDDISPINFOA NMHDDISPINFOA;
alias tagNMHDDISPINFOA* LPNMHDDISPINFOA;

// #ifdef UNICODE
alias NMHDDISPINFOW NMHDDISPINFO;
alias LPNMHDDISPINFOW LPNMHDDISPINFO;
// #else
// #...
// #...
// #endif

// #if (_WIN32_IE >= 0x0500)
struct tagNMHDFILTERBTNCLICK {
  NMHDR hdr;
  INT iItem;
  RECT rc;
}
alias tagNMHDFILTERBTNCLICK NMHDFILTERBTNCLICK;
alias tagNMHDFILTERBTNCLICK* LPNMHDFILTERBTNCLICK;

// #endif

// #endif      // NOHEADER

// #ifndef NOTOOLBAR

// #ifdef _WIN32
const wchar[] TOOLBARCLASSNAMEW = "ToolbarWindow32";
const char[] TOOLBARCLASSNAMEA = "ToolbarWindow32";

// #ifdef  UNICODE
alias TOOLBARCLASSNAMEW TOOLBARCLASSNAME;
// #else
// #...
// #endif

// #else
// #...
// #endif

struct _TBBUTTON {
  int iBitmap;
  int idCommand;
  BYTE fsState;
  BYTE fsStyle;
// #ifdef _WIN64
// ...
// #elif defined(_WIN32)
  BYTE bReserved[2];
// #endif
  DWORD_PTR dwData;
  INT_PTR iString;
}
alias _TBBUTTON TBBUTTON;
alias _TBBUTTON* PTBBUTTON;
alias _TBBUTTON* LPTBBUTTON;

alias TBBUTTON* LPCTBBUTTON;

struct _COLORMAP {
  COLORREF from;
  COLORREF to;
}
alias _COLORMAP COLORMAP;
alias _COLORMAP* LPCOLORMAP;

extern(Windows) export HWND 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);

extern(Windows) export HBITMAP CreateMappedBitmap(HINSTANCE hInstance, INT_PTR idBitmap,
  UINT wFlags, LPCOLORMAP lpColorMap,
  int iNumMaps);

enum : uint { CMB_MASKED = 0x02 }
enum : uint { TBSTATE_CHECKED = 0x01 }
enum : uint { TBSTATE_PRESSED = 0x02 }
enum : uint { TBSTATE_ENABLED = 0x04 }
enum : uint { TBSTATE_HIDDEN = 0x08 }
enum : uint { TBSTATE_INDETERMINATE = 0x10 }
enum : uint { TBSTATE_WRAP = 0x20 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TBSTATE_ELLIPSES = 0x40 }
// #endif
// #if (_WIN32_IE >= 0x0400)
enum : uint { TBSTATE_MARKED = 0x80 }
// #endif

enum : uint { TBSTYLE_BUTTON = 0x0000 }
enum : uint { TBSTYLE_SEP = 0x0001 }
enum : uint { TBSTYLE_CHECK = 0x0002 }
enum : uint { TBSTYLE_GROUP = 0x0004 }
enum : uint { TBSTYLE_CHECKGROUP = TBSTYLE_GROUP | TBSTYLE_CHECK }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TBSTYLE_DROPDOWN = 0x0008 }
// #endif
// #if (_WIN32_IE >= 0x0400)
enum : uint { TBSTYLE_AUTOSIZE = 0x0010 }
enum : uint { TBSTYLE_NOPREFIX = 0x0020 }
// #endif

enum : uint { TBSTYLE_TOOLTIPS = 0x0100 }
enum : uint { TBSTYLE_WRAPABLE = 0x0200 }
enum : uint { TBSTYLE_ALTDRAG = 0x0400 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TBSTYLE_FLAT = 0x0800 }
enum : uint { TBSTYLE_LIST = 0x1000 }
enum : uint { TBSTYLE_CUSTOMERASE = 0x2000 }
// #endif
// #if (_WIN32_IE >= 0x0400)
enum : uint { TBSTYLE_REGISTERDROP = 0x4000 }
enum : uint { TBSTYLE_TRANSPARENT = 0x8000 }
enum : uint { TBSTYLE_EX_DRAWDDARROWS = 0x00000001 }
// #endif

// #if (_WIN32_IE >= 0x0500)
alias TBSTYLE_BUTTON BTNS_BUTTON;
alias TBSTYLE_SEP BTNS_SEP;
alias TBSTYLE_CHECK BTNS_CHECK;
alias TBSTYLE_GROUP BTNS_GROUP;
alias TBSTYLE_CHECKGROUP BTNS_CHECKGROUP;
alias TBSTYLE_DROPDOWN BTNS_DROPDOWN;
alias TBSTYLE_AUTOSIZE BTNS_AUTOSIZE;
alias TBSTYLE_NOPREFIX BTNS_NOPREFIX;
// #if (_WIN32_IE >= 0x0501)
enum : uint { BTNS_SHOWTEXT = 0x0040 }
// #endif  // 0x0501
enum : uint { BTNS_WHOLEDROPDOWN = 0x0080 }
// #endif

// #if (_WIN32_IE >= 0x0501)
enum : uint { TBSTYLE_EX_MIXEDBUTTONS = 0x00000008 }
enum : uint { TBSTYLE_EX_HIDECLIPPEDBUTTONS = 0x00000010 }
// #endif  // 0x0501

// #if (_WIN32_WINNT >= 0x501)
enum : uint { TBSTYLE_EX_DOUBLEBUFFER = 0x00000080 }
// #endif

// #if (_WIN32_IE >= 0x0400)

struct _NMTBCUSTOMDRAW {
  NMCUSTOMDRAW nmcd;
  HBRUSH hbrMonoDither;
  HBRUSH hbrLines;
  HPEN hpenLines;

  COLORREF clrText;
  COLORREF clrMark;
  COLORREF clrTextHighlight;
  COLORREF clrBtnFace;
  COLORREF clrBtnHighlight;
  COLORREF clrHighlightHotTrack;

  RECT rcText;

  int nStringBkMode;
  int nHLStringBkMode;
// #if (_WIN32_WINNT >= 0x501)
  int iListGap;
// #endif
}
alias _NMTBCUSTOMDRAW NMTBCUSTOMDRAW;
alias _NMTBCUSTOMDRAW* LPNMTBCUSTOMDRAW;

enum : uint { TBCDRF_NOEDGES = 0x00010000 }
enum : uint { TBCDRF_HILITEHOTTRACK = 0x00020000 }
enum : uint { TBCDRF_NOOFFSET = 0x00040000 }
enum : uint { TBCDRF_NOMARK = 0x00080000 }
enum : uint { TBCDRF_NOETCHEDEFFECT = 0x00100000 }
// #endif

// #if (_WIN32_IE >= 0x0500)
enum : uint { TBCDRF_BLENDICON = 0x00200000 }
enum : uint { TBCDRF_NOBACKGROUND = 0x00400000 }
// #endif

enum : uint { TB_ENABLEBUTTON = WM_USER + 1 }
enum : uint { TB_CHECKBUTTON = WM_USER + 2 }
enum : uint { TB_PRESSBUTTON = WM_USER + 3 }
enum : uint { TB_HIDEBUTTON = WM_USER + 4 }
enum : uint { TB_INDETERMINATE = WM_USER + 5 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { TB_MARKBUTTON = WM_USER + 6 }
// #endif
enum : uint { TB_ISBUTTONENABLED = WM_USER + 9 }
enum : uint { TB_ISBUTTONCHECKED = WM_USER + 10 }
enum : uint { TB_ISBUTTONPRESSED = WM_USER + 11 }
enum : uint { TB_ISBUTTONHIDDEN = WM_USER + 12 }
enum : uint { TB_ISBUTTONINDETERMINATE = WM_USER + 13 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { TB_ISBUTTONHIGHLIGHTED = WM_USER + 14 }
// #endif
enum : uint { TB_SETSTATE = WM_USER + 17 }
enum : uint { TB_GETSTATE = WM_USER + 18 }
enum : uint { TB_ADDBITMAP = WM_USER + 19 }

// #ifdef _WIN32
struct tagTBADDBITMAP {
  HINSTANCE hInst;
  UINT_PTR nID;
}
alias tagTBADDBITMAP TBADDBITMAP;
alias tagTBADDBITMAP* LPTBADDBITMAP;

HINSTANCE HINST_COMMCTRL = cast(HINSTANCE)(-1);
enum : uint { IDB_STD_SMALL_COLOR = 0 }
enum : uint { IDB_STD_LARGE_COLOR = 1 }
enum : uint { IDB_VIEW_SMALL_COLOR = 4 }
enum : uint { IDB_VIEW_LARGE_COLOR = 5 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { IDB_HIST_SMALL_COLOR = 8 }
enum : uint { IDB_HIST_LARGE_COLOR = 9 }
// #endif

enum : uint { STD_CUT = 0 }
enum : uint { STD_COPY = 1 }
enum : uint { STD_PASTE = 2 }
enum : uint { STD_UNDO = 3 }
enum : uint { STD_REDOW = 4 }
enum : uint { STD_DELETE = 5 }
enum : uint { STD_FILENEW = 6 }
enum : uint { STD_FILEOPEN = 7 }
enum : uint { STD_FILESAVE = 8 }
enum : uint { STD_PRINTPRE = 9 }
enum : uint { STD_PROPERTIES = 10 }
enum : uint { STD_HELP = 11 }
enum : uint { STD_FIND = 12 }
enum : uint { STD_REPLACE = 13 }
enum : uint { STD_PRINT = 14 }

enum : uint { VIEW_LARGEICONS = 0 }
enum : uint { VIEW_SMALLICONS = 1 }
enum : uint { VIEW_LIST = 2 }
enum : uint { VIEW_DETAILS = 3 }
enum : uint { VIEW_SORTNAME = 4 }
enum : uint { VIEW_SORTSIZE = 5 }
enum : uint { VIEW_SORTDATE = 6 }
enum : uint { VIEW_SORTTYPE = 7 }
enum : uint { VIEW_PARENTFOLDER = 8 }
enum : uint { VIEW_NETCONNECT = 9 }
enum : uint { VIEW_NETDISCONNECT = 10 }
enum : uint { VIEW_NEWFOLDER = 11 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { VIEW_VIEWMENU = 12 }
// #endif

// #if (_WIN32_IE >= 0x0300)
enum : uint { HIST_BACK = 0 }
enum : uint { HIST_FORWARD = 1 }
enum : uint { HIST_FAVORITES = 2 }
enum : uint { HIST_ADDTOFAVORITES = 3 }
enum : uint { HIST_VIEWTREE = 4 }
// #endif

// #endif

// #if (_WIN32_IE >= 0x0400)
enum : uint { TB_ADDBUTTONSA = WM_USER + 20 }
enum : uint { TB_INSERTBUTTONA = WM_USER + 21 }
// #else
// #...
// #...
// #endif

enum : uint { TB_DELETEBUTTON = WM_USER + 22 }
enum : uint { TB_GETBUTTON = WM_USER + 23 }
enum : uint { TB_BUTTONCOUNT = WM_USER + 24 }
enum : uint { TB_COMMANDTOINDEX = WM_USER + 25 }

// #ifdef _WIN32

struct tagTBSAVEPARAMSA {
  HKEY hkr;
  LPCSTR pszSubKey;
  LPCSTR pszValueName;
}
alias tagTBSAVEPARAMSA TBSAVEPARAMSA;
alias tagTBSAVEPARAMSA* LPTBSAVEPARAMSA;

struct tagTBSAVEPARAMSW {
  HKEY hkr;
  LPCWSTR pszSubKey;
  LPCWSTR pszValueName;
}
alias tagTBSAVEPARAMSW TBSAVEPARAMSW;
alias tagTBSAVEPARAMSW* LPTBSAVEPARAMW;

// #ifdef UNICODE
alias TBSAVEPARAMSW TBSAVEPARAMS;
alias LPTBSAVEPARAMSW LPTBSAVEPARAMS;
// #else
// #...
// #...
// #endif

// #endif  // _WIN32

enum : uint { TB_SAVERESTOREA = WM_USER + 26 }
enum : uint { TB_SAVERESTOREW = WM_USER + 76 }
enum : uint { TB_CUSTOMIZE = WM_USER + 27 }
enum : uint { TB_ADDSTRINGA = WM_USER + 28 }
enum : uint { TB_ADDSTRINGW = WM_USER + 77 }
enum : uint { TB_GETITEMRECT = WM_USER + 29 }
enum : uint { TB_BUTTONSTRUCTSIZE = WM_USER + 30 }
enum : uint { TB_SETBUTTONSIZE = WM_USER + 31 }
enum : uint { TB_SETBITMAPSIZE = WM_USER + 32 }
enum : uint { TB_AUTOSIZE = WM_USER + 33 }
enum : uint { TB_GETTOOLTIPS = WM_USER + 35 }
enum : uint { TB_SETTOOLTIPS = WM_USER + 36 }
enum : uint { TB_SETPARENT = WM_USER + 37 }
enum : uint { TB_SETROWS = WM_USER + 39 }
enum : uint { TB_GETROWS = WM_USER + 40 }
enum : uint { TB_SETCMDID = WM_USER + 42 }
enum : uint { TB_CHANGEBITMAP = WM_USER + 43 }
enum : uint { TB_GETBITMAP = WM_USER + 44 }
enum : uint { TB_GETBUTTONTEXTA = WM_USER + 45 }
enum : uint { TB_GETBUTTONTEXTW = WM_USER + 75 }
enum : uint { TB_REPLACEBITMAP = WM_USER + 46 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TB_SETINDENT = WM_USER + 47 }
enum : uint { TB_SETIMAGELIST = WM_USER + 48 }
enum : uint { TB_GETIMAGELIST = WM_USER + 49 }
enum : uint { TB_LOADIMAGES = WM_USER + 50 }
enum : uint { TB_GETRECT = WM_USER + 51 }
enum : uint { TB_SETHOTIMAGELIST = WM_USER + 52 }
enum : uint { TB_GETHOTIMAGELIST = WM_USER + 53 }
enum : uint { TB_SETDISABLEDIMAGELIST = WM_USER + 54 }
enum : uint { TB_GETDISABLEDIMAGELIST = WM_USER + 55 }
enum : uint { TB_SETSTYLE = WM_USER + 56 }
enum : uint { TB_GETSTYLE = WM_USER + 57 }
enum : uint { TB_GETBUTTONSIZE = WM_USER + 58 }
enum : uint { TB_SETBUTTONWIDTH = WM_USER + 59 }
enum : uint { TB_SETMAXTEXTROWS = WM_USER + 60 }
enum : uint { TB_GETTEXTROWS = WM_USER + 61 }
// #endif      // _WIN32_IE >= 0x0300

// #ifdef UNICODE
alias TB_GETBUTTONTEXTW TB_GETBUTTONTEXT;
alias TB_SAVERESTOREW TB_SAVERESTORE;
alias TB_ADDSTRINGW TB_ADDSTRING;
// #else
// #...
// #...
// #...
// #endif
// #if (_WIN32_IE >= 0x0400)
enum : uint { TB_GETOBJECT = WM_USER + 62 }
enum : uint { TB_GETHOTITEM = WM_USER + 71 }
enum : uint { TB_SETHOTITEM = WM_USER + 72 }
enum : uint { TB_SETANCHORHIGHLIGHT = WM_USER + 73 }
enum : uint { TB_GETANCHORHIGHLIGHT = WM_USER + 74 }
enum : uint { TB_MAPACCELERATORA = WM_USER + 78 }

struct _0 {
  int iButton;
  DWORD dwFlags;
}
alias _0 TBINSERTMARK;
alias _0* LPTBINSERTMARK;

enum : uint { TBIMHT_AFTER = 0x00000001 }
enum : uint { TBIMHT_BACKGROUND = 0x00000002 }

enum : uint { TB_GETINSERTMARK = WM_USER + 79 }
enum : uint { TB_SETINSERTMARK = WM_USER + 80 }
enum : uint { TB_INSERTMARKHITTEST = WM_USER + 81 }
enum : uint { TB_MOVEBUTTON = WM_USER + 82 }
enum : uint { TB_GETMAXSIZE = WM_USER + 83 }
enum : uint { TB_SETEXTENDEDSTYLE = WM_USER + 84 }
enum : uint { TB_GETEXTENDEDSTYLE = WM_USER + 85 }
enum : uint { TB_GETPADDING = WM_USER + 86 }
enum : uint { TB_SETPADDING = WM_USER + 87 }
enum : uint { TB_SETINSERTMARKCOLOR = WM_USER + 88 }
enum : uint { TB_GETINSERTMARKCOLOR = WM_USER + 89 }

alias CCM_SETCOLORSCHEME TB_SETCOLORSCHEME;
alias CCM_GETCOLORSCHEME TB_GETCOLORSCHEME;

alias CCM_SETUNICODEFORMAT TB_SETUNICODEFORMAT;
alias CCM_GETUNICODEFORMAT TB_GETUNICODEFORMAT;

enum : uint { TB_MAPACCELERATORW = WM_USER + 90 }
// #ifdef UNICODE
alias TB_MAPACCELERATORW TB_MAPACCELERATOR;
// #else
// #...
// #endif

// #endif  // _WIN32_IE >= 0x0400

struct _1 {
  HINSTANCE hInstOld;
  UINT_PTR nIDOld;
  HINSTANCE hInstNew;
  UINT_PTR nIDNew;
  int nButtons;
}
alias _1 TBREPLACEBITMAP;
alias _1* LPTBREPLACEBITMAP;

// #ifdef _WIN32

enum : uint { TBBF_LARGE = 0x0001 }

enum : uint { TB_GETBITMAPFLAGS = WM_USER + 41 }

// #if (_WIN32_IE >= 0x0400)
enum : uint { TBIF_IMAGE = 0x00000001 }
enum : uint { TBIF_TEXT = 0x00000002 }
enum : uint { TBIF_STATE = 0x00000004 }
enum : uint { TBIF_STYLE = 0x00000008 }
enum : uint { TBIF_LPARAM = 0x00000010 }
enum : uint { TBIF_COMMAND = 0x00000020 }
enum : uint { TBIF_SIZE = 0x00000040 }

// #if (_WIN32_IE >= 0x0500)
enum : uint { TBIF_BYINDEX = 0x80000000 }
// #endif

struct _2 {
  UINT cbSize;
  DWORD dwMask;
  int idCommand;
  int iImage;
  BYTE fsState;
  BYTE fsStyle;
  WORD cx;
  DWORD_PTR lParam;
  LPSTR pszText;
  int cchText;
}
alias _2 TBBUTTONINFOA;
alias _2* LPTBBUTTONINFOA;

struct _3 {
  UINT cbSize;
  DWORD dwMask;
  int idCommand;
  int iImage;
  BYTE fsState;
  BYTE fsStyle;
  WORD cx;
  DWORD_PTR lParam;
  LPWSTR pszText;
  int cchText;
}
alias _3 TBBUTTONINFOW;
alias _3* LPTBBUTTONINFOW;

// #ifdef UNICODE
alias TBBUTTONINFOW TBBUTTONINFO;
alias LPTBBUTTONINFOW LPTBBUTTONINFO;
// #else
// #...
// #...
// #endif

enum : uint { TB_GETBUTTONINFOW = WM_USER + 63 }
enum : uint { TB_SETBUTTONINFOW = WM_USER + 64 }
enum : uint { TB_GETBUTTONINFOA = WM_USER + 65 }
enum : uint { TB_SETBUTTONINFOA = WM_USER + 66 }
// #ifdef UNICODE
alias TB_GETBUTTONINFOW TB_GETBUTTONINFO;
alias TB_SETBUTTONINFOW TB_SETBUTTONINFO;
// #else
// #...
// #...
// #endif

enum : uint { TB_INSERTBUTTONW = WM_USER + 67 }
enum : uint { TB_ADDBUTTONSW = WM_USER + 68 }

enum : uint { TB_HITTEST = WM_USER + 69 }

// #ifdef UNICODE
alias TB_INSERTBUTTONW TB_INSERTBUTTON;
alias TB_ADDBUTTONSW TB_ADDBUTTONS;
// #else
// #...
// #...
// #endif

enum : uint { TB_SETDRAWTEXTFLAGS = WM_USER + 70 }

// #endif  // _WIN32_IE >= 0x0400

// #if (_WIN32_IE >= 0x0500)

enum : uint { TB_GETSTRINGW = WM_USER + 91 }
enum : uint { TB_GETSTRINGA = WM_USER + 92 }
// #ifdef UNICODE
alias TB_GETSTRINGW TB_GETSTRING;
// #else
// #...
// #endif

// #endif  // _WIN32_IE >= 0x0500

// #if (_WIN32_WINNT >= 0x501)
enum : uint { TBMF_PAD = 0x00000001 }
enum : uint { TBMF_BARPAD = 0x00000002 }
enum : uint { TBMF_BUTTONSPACING = 0x00000004 }

struct _4 {
  UINT cbSize;
  DWORD dwMask;
  int cxPad;
  int cyPad;
  int cxBarPad;
  int cyBarPad;
  int cxButtonSpacing;
  int cyButtonSpacing;
}
alias _4 TBMETRICS;
alias _4* LPTBMETRICS;

enum : uint { TB_GETMETRICS = WM_USER + 101 }
enum : uint { TB_SETMETRICS = WM_USER + 102 }
// #endif

// #if (_WIN32_WINNT >= 0x501)
alias CCM_SETWINDOWTHEME TB_SETWINDOWTHEME;
// #endif

enum : uint { TBN_GETBUTTONINFOA = TBN_FIRST-0 }
enum : uint { TBN_BEGINDRAG = TBN_FIRST-1 }
enum : uint { TBN_ENDDRAG = TBN_FIRST-2 }
enum : uint { TBN_BEGINADJUST = TBN_FIRST-3 }
enum : uint { TBN_ENDADJUST = TBN_FIRST-4 }
enum : uint { TBN_RESET = TBN_FIRST-5 }
enum : uint { TBN_QUERYINSERT = TBN_FIRST-6 }
enum : uint { TBN_QUERYDELETE = TBN_FIRST-7 }
enum : uint { TBN_TOOLBARCHANGE = TBN_FIRST-8 }
enum : uint { TBN_CUSTHELP = TBN_FIRST-9 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TBN_DROPDOWN = TBN_FIRST - 10 }
// #endif
// #if (_WIN32_IE >= 0x0400)
enum : uint { TBN_GETOBJECT = TBN_FIRST - 12 }

struct tagNMTBHOTITEM {
  NMHDR hdr;
  int idOld;
  int idNew;
  DWORD dwFlags;
}
alias tagNMTBHOTITEM NMTBHOTITEM;
alias tagNMTBHOTITEM* LPNMTBHOTITEM;

enum : uint { HICF_OTHER = 0x00000000 }
enum : uint { HICF_MOUSE = 0x00000001 }
enum : uint { HICF_ARROWKEYS = 0x00000002 }
enum : uint { HICF_ACCELERATOR = 0x00000004 }
enum : uint { HICF_DUPACCEL = 0x00000008 }
enum : uint { HICF_ENTERING = 0x00000010 }
enum : uint { HICF_LEAVING = 0x00000020 }
enum : uint { HICF_RESELECT = 0x00000040 }
enum : uint { HICF_LMOUSE = 0x00000080 }
enum : uint { HICF_TOGGLEDROPDOWN = 0x00000100 }

enum : uint { TBN_HOTITEMCHANGE = TBN_FIRST - 13 }
enum : uint { TBN_DRAGOUT = TBN_FIRST - 14 }
enum : uint { TBN_DELETINGBUTTON = TBN_FIRST - 15 }
enum : uint { TBN_GETDISPINFOA = TBN_FIRST - 16 }
enum : uint { TBN_GETDISPINFOW = TBN_FIRST - 17 }
enum : uint { TBN_GETINFOTIPA = TBN_FIRST - 18 }
enum : uint { TBN_GETINFOTIPW = TBN_FIRST - 19 }
enum : uint { TBN_GETBUTTONINFOW = TBN_FIRST - 20 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { TBN_RESTORE = TBN_FIRST - 21 }
enum : uint { TBN_SAVE = TBN_FIRST - 22 }
enum : uint { TBN_INITCUSTOMIZE = TBN_FIRST - 23 }
enum : uint { TBNRF_HIDEHELP = 0x00000001 }
enum : uint { TBNRF_ENDCUSTOMIZE = 0x00000002 }
// #endif // (_WIN32_IE >= 0x0500)

// #if (_WIN32_IE >= 0x0500)

struct tagNMTBSAVE {
  NMHDR hdr;
  DWORD * pData;
  DWORD * pCurrent;
  UINT cbData;
  int iItem;
  int cButtons;
  TBBUTTON tbButton;
}
alias tagNMTBSAVE NMTBSAVE;
alias tagNMTBSAVE* LPNMTBSAVE;

struct tagNMTBRESTORE {
  NMHDR hdr;
  DWORD * pData;
  DWORD * pCurrent;
  UINT cbData;
  int iItem;
  int cButtons;
  int cbBytesPerRecord;
  TBBUTTON tbButton;
}
alias tagNMTBRESTORE NMTBRESTORE;
alias tagNMTBRESTORE* LPNMTBRESTORE;

// #endif // (_WIN32_IE >= 0x0500)

struct tagNMTBGETINFOTIPA {
  NMHDR hdr;
  LPSTR pszText;
  int cchTextMax;
  int iItem;
  LPARAM lParam;
}
alias tagNMTBGETINFOTIPA NMTBGETINFOTIPA;
alias tagNMTBGETINFOTIPA* LPNMTBGETINFOTIPA;

struct tagNMTBGETINFOTIPW {
  NMHDR hdr;
  LPWSTR pszText;
  int cchTextMax;
  int iItem;
  LPARAM lParam;
}
alias tagNMTBGETINFOTIPW NMTBGETINFOTIPW;
alias tagNMTBGETINFOTIPW* LPNMTBGETINFOTIPW;

// #ifdef UNICODE
alias TBN_GETINFOTIPW TBN_GETINFOTIP;
alias NMTBGETINFOTIPW NMTBGETINFOTIP;
alias LPNMTBGETINFOTIPW LPNMTBGETINFOTIP;
// #else
// #...
// #...
// #...
// #endif

enum : uint { TBNF_IMAGE = 0x00000001 }
enum : uint { TBNF_TEXT = 0x00000002 }
enum : uint { TBNF_DI_SETITEM = 0x10000000 }

struct _5 {
  NMHDR hdr;
  DWORD dwMask;
  int idCommand;
  DWORD_PTR lParam;
  int iImage;
  LPSTR pszText;
  int cchText;
}
alias _5 NMTBDISPINFOA;
alias _5* LPNMTBDISPINFOA;

struct _6 {
  NMHDR hdr;
  DWORD dwMask;
  int idCommand;
  DWORD_PTR lParam;
  int iImage;
  LPWSTR pszText;
  int cchText;
}
alias _6 NMTBDISPINFOW;
alias _6* LPNMTBDISPINFOW;

// #ifdef UNICODE
alias TBN_GETDISPINFOW TBN_GETDISPINFO;
alias NMTBDISPINFOW NMTBDISPINFO;
alias LPNMTBDISPINFOW LPNMTBDISPINFO;
// #else
// #...
// #...
// #...
// #endif

enum : uint { TBDDRET_DEFAULT = 0 }
enum : uint { TBDDRET_NODEFAULT = 1 }
enum : uint { TBDDRET_TREATPRESSED = 2 }

// #endif

// #ifdef UNICODE
alias TBN_GETBUTTONINFOW TBN_GETBUTTONINFO;
// #else
// #...
// #endif

// #if (_WIN32_IE >= 0x0300)
alias NMTOOLBARA TBNOTIFYA;
alias NMTOOLBARW TBNOTIFYW;
alias LPNMTOOLBARA LPTBNOTIFYA;
alias LPNMTOOLBARW LPTBNOTIFYW;
// #else
// #...
// #...
// #...
// #...
// #...
// #...
// #endif

alias NMTOOLBAR TBNOTIFY;
alias LPNMTOOLBAR LPTBNOTIFY;

// #if (_WIN32_IE >= 0x0300)
struct tagNMTOOLBARA {
  NMHDR hdr;
  int iItem;
  TBBUTTON tbButton;
  int cchText;
  LPSTR pszText;
// #if (_WIN32_IE >= 0x500)
  RECT rcButton;
// #endif
}
alias tagNMTOOLBARA NMTOOLBARA;
alias tagNMTOOLBARA* LPNMTOOLBARA;

// #endif

// #if (_WIN32_IE >= 0x0300)
struct tagNMTOOLBARW {
  NMHDR hdr;
  int iItem;
  TBBUTTON tbButton;
  int cchText;
  LPWSTR pszText;
// #if (_WIN32_IE >= 0x500)
  RECT rcButton;
// #endif
}
alias tagNMTOOLBARW NMTOOLBARW;
alias tagNMTOOLBARW* LPNMTOOLBARW;

// #endif

// #ifdef UNICODE
alias NMTOOLBARW NMTOOLBAR;
alias LPNMTOOLBARW LPNMTOOLBAR;
// #else
// #...
// #...
// #endif

// #endif

// #endif      // NOTOOLBAR

// #if (_WIN32_IE >= 0x0300)

// #ifndef NOREBAR

// #ifdef _WIN32
const wchar[] REBARCLASSNAMEW = "ReBarWindow32";
const char[] REBARCLASSNAMEA = "ReBarWindow32";

// #ifdef  UNICODE
alias REBARCLASSNAMEW REBARCLASSNAME;
// #else
// #...
// #endif

// #else
// #...
// #endif

enum : uint { RBIM_IMAGELIST = 0x00000001 }

// #if (_WIN32_IE >= 0x0400)
enum : uint { RBS_TOOLTIPS = 0x0100 }
enum : uint { RBS_VARHEIGHT = 0x0200 }
enum : uint { RBS_BANDBORDERS = 0x0400 }
enum : uint { RBS_FIXEDORDER = 0x0800 }
enum : uint { RBS_REGISTERDROP = 0x1000 }
enum : uint { RBS_AUTOSIZE = 0x2000 }
enum : uint { RBS_VERTICALGRIPPER = 0x4000 }
enum : uint { RBS_DBLCLKTOGGLE = 0x8000 }
// #else
// #...
// #...
// #...
// #...
// #endif      // _WIN32_IE >= 0x0400

struct tagREBARINFO {
  UINT cbSize;
  UINT fMask;
// #ifndef NOIMAGEAPIS
  HIMAGELIST himl;
// #else
// ...
// #endif
}
alias tagREBARINFO REBARINFO;
alias tagREBARINFO* LPREBARINFO;

enum : uint { RBBS_BREAK = 0x00000001 }
enum : uint { RBBS_FIXEDSIZE = 0x00000002 }
enum : uint { RBBS_CHILDEDGE = 0x00000004 }
enum : uint { RBBS_HIDDEN = 0x00000008 }
enum : uint { RBBS_NOVERT = 0x00000010 }
enum : uint { RBBS_FIXEDBMP = 0x00000020 }
// #if (_WIN32_IE >= 0x0400)               //
enum : uint { RBBS_VARIABLEHEIGHT = 0x00000040 }
enum : uint { RBBS_GRIPPERALWAYS = 0x00000080 }
enum : uint { RBBS_NOGRIPPER = 0x00000100 }
// #if (_WIN32_IE >= 0x0500)               //
enum : uint { RBBS_USECHEVRON = 0x00000200 }
// #if (_WIN32_IE >= 0x0501)               //
enum : uint { RBBS_HIDETITLE = 0x00000400 }
enum : uint { RBBS_TOPALIGN = 0x00000800 }
// #endif // 0x0501                        //
// #endif // 0x0500                        //
// #endif // 0x0400                        //

enum : uint { RBBIM_STYLE = 0x00000001 }
enum : uint { RBBIM_COLORS = 0x00000002 }
enum : uint { RBBIM_TEXT = 0x00000004 }
enum : uint { RBBIM_IMAGE = 0x00000008 }
enum : uint { RBBIM_CHILD = 0x00000010 }
enum : uint { RBBIM_CHILDSIZE = 0x00000020 }
enum : uint { RBBIM_SIZE = 0x00000040 }
enum : uint { RBBIM_BACKGROUND = 0x00000080 }
enum : uint { RBBIM_ID = 0x00000100 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { RBBIM_IDEALSIZE = 0x00000200 }
enum : uint { RBBIM_LPARAM = 0x00000400 }
enum : uint { RBBIM_HEADERSIZE = 0x00000800 }
// #endif

struct tagREBARBANDINFOA {
  UINT cbSize;
  UINT fMask;
  UINT fStyle;
  COLORREF clrFore;
  COLORREF clrBack;
  LPSTR lpText;
  UINT cch;
  int iImage;
  HWND hwndChild;
  UINT cxMinChild;
  UINT cyMinChild;
  UINT cx;
  HBITMAP hbmBack;
  UINT wID;
// #if (_WIN32_IE >= 0x0400)
  UINT cyChild;
  UINT cyMaxChild;
  UINT cyIntegral;
  UINT cxIdeal;
  LPARAM lParam;
  UINT cxHeader;
// #endif
}
alias tagREBARBANDINFOA REBARBANDINFOA;
alias tagREBARBANDINFOA* LPREBARBANDINFOA;

alias REBARBANDINFOA* LPCREBARBANDINFOA;

// #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
// #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)

struct tagREBARBANDINFOW {
  UINT cbSize;
  UINT fMask;
  UINT fStyle;
  COLORREF clrFore;
  COLORREF clrBack;
  LPWSTR lpText;
  UINT cch;
  int iImage;
  HWND hwndChild;
  UINT cxMinChild;
  UINT cyMinChild;
  UINT cx;
  HBITMAP hbmBack;
  UINT wID;
// #if (_WIN32_IE >= 0x0400)
  UINT cyChild;
  UINT cyMaxChild;
  UINT cyIntegral;
  UINT cxIdeal;
  LPARAM lParam;
  UINT cxHeader;
// #endif
}
alias tagREBARBANDINFOW REBARBANDINFOW;
alias tagREBARBANDINFOW* LPREBARBANDINFOW;

alias REBARBANDINFOW* LPCREBARBANDINFOW;

// #ifdef UNICODE
alias REBARBANDINFOW REBARBANDINFO;
alias LPREBARBANDINFOW LPREBARBANDINFO;
alias LPCREBARBANDINFOW LPCREBARBANDINFO;
// #define REBARBANDINFO_V3_SIZE REBARBANDINFOW_V3_SIZE
// #else
// #...
// #...
// #...
// #...
// #endif

enum : uint { RB_INSERTBANDA = WM_USER + 1 }
enum : uint { RB_DELETEBAND = WM_USER + 2 }
enum : uint { RB_GETBARINFO = WM_USER + 3 }
enum : uint { RB_SETBARINFO = WM_USER + 4 }
// #if (_WIN32_IE < 0x0400)
// #...
// #endif
enum : uint { RB_SETBANDINFOA = WM_USER + 6 }
enum : uint { RB_SETPARENT = WM_USER + 7 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { RB_HITTEST = WM_USER + 8 }
enum : uint { RB_GETRECT = WM_USER + 9 }
// #endif
enum : uint { RB_INSERTBANDW = WM_USER + 10 }
enum : uint { RB_SETBANDINFOW = WM_USER + 11 }
enum : uint { RB_GETBANDCOUNT = WM_USER + 12 }
enum : uint { RB_GETROWCOUNT = WM_USER + 13 }
enum : uint { RB_GETROWHEIGHT = WM_USER + 14 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { RB_IDTOINDEX = WM_USER + 16 }
enum : uint { RB_GETTOOLTIPS = WM_USER + 17 }
enum : uint { RB_SETTOOLTIPS = WM_USER + 18 }
enum : uint { RB_SETBKCOLOR = WM_USER + 19 }
enum : uint { RB_GETBKCOLOR = WM_USER + 20 }
enum : uint { RB_SETTEXTCOLOR = WM_USER + 21 }
enum : uint { RB_GETTEXTCOLOR = WM_USER + 22 }

// #if (_WIN32_WINNT >= 0x0501)
enum : uint { RBSTR_CHANGERECT = 0x0001 }
// #endif

enum : uint { RB_SIZETORECT = WM_USER + 23 }
// #endif      // _WIN32_IE >= 0x0400

alias CCM_SETCOLORSCHEME RB_SETCOLORSCHEME;
alias CCM_GETCOLORSCHEME RB_GETCOLORSCHEME;

// #ifdef UNICODE
alias RB_INSERTBANDW RB_INSERTBAND;
alias RB_SETBANDINFOW RB_SETBANDINFO;
// #else
// #...
// #...
// #endif

// #if (_WIN32_IE >= 0x0400)

enum : uint { RB_BEGINDRAG = WM_USER + 24 }
enum : uint { RB_ENDDRAG = WM_USER + 25 }
enum : uint { RB_DRAGMOVE = WM_USER + 26 }
enum : uint { RB_GETBARHEIGHT = WM_USER + 27 }
enum : uint { RB_GETBANDINFOW = WM_USER + 28 }
enum : uint { RB_GETBANDINFOA = WM_USER + 29 }

// #ifdef UNICODE
alias RB_GETBANDINFOW RB_GETBANDINFO;
// #else
// #...
// #endif

enum : uint { RB_MINIMIZEBAND = WM_USER + 30 }
enum : uint { RB_MAXIMIZEBAND = WM_USER + 31 }

enum : uint { RB_GETDROPTARGET = CCM_GETDROPTARGET }

enum : uint { RB_GETBANDBORDERS = WM_USER + 34 }

enum : uint { RB_SHOWBAND = WM_USER + 35 }
enum : uint { RB_SETPALETTE = WM_USER + 37 }
enum : uint { RB_GETPALETTE = WM_USER + 38 }
enum : uint { RB_MOVEBAND = WM_USER + 39 }

alias CCM_SETUNICODEFORMAT RB_SETUNICODEFORMAT;
alias CCM_GETUNICODEFORMAT RB_GETUNICODEFORMAT;

// #endif      // _WIN32_IE >= 0x0400

// #if (_WIN32_WINNT >= 0x501)
enum : uint { RB_GETBANDMARGINS = WM_USER + 40 }
alias CCM_SETWINDOWTHEME RB_SETWINDOWTHEME;
// #endif

// #if (_WIN32_IE >= 0x0500)
enum : uint { RB_PUSHCHEVRON = WM_USER + 43 }
// #endif      // _WIN32_IE >= 0x0500

enum : uint { RBN_HEIGHTCHANGE = RBN_FIRST - 0 }

// #if (_WIN32_IE >= 0x0400)
enum : uint { RBN_GETOBJECT = RBN_FIRST - 1 }
enum : uint { RBN_LAYOUTCHANGED = RBN_FIRST - 2 }
enum : uint { RBN_AUTOSIZE = RBN_FIRST - 3 }
enum : uint { RBN_BEGINDRAG = RBN_FIRST - 4 }
enum : uint { RBN_ENDDRAG = RBN_FIRST - 5 }
enum : uint { RBN_DELETINGBAND = RBN_FIRST - 6 }
enum : uint { RBN_DELETEDBAND = RBN_FIRST - 7 }
enum : uint { RBN_CHILDSIZE = RBN_FIRST - 8 }

// #if (_WIN32_IE >= 0x0500)
enum : uint { RBN_CHEVRONPUSHED = RBN_FIRST - 10 }
// #endif      // _WIN32_IE >= 0x0500

// #if (_WIN32_IE >= 0x0500)
enum : uint { RBN_MINMAX = RBN_FIRST - 21 }
// #endif

// #if (_WIN32_WINNT >= 0x0501)
enum : uint { RBN_AUTOBREAK = RBN_FIRST - 22 }
// #endif

struct tagNMREBARCHILDSIZE {
  NMHDR hdr;
  UINT uBand;
  UINT wID;
  RECT rcChild;
  RECT rcBand;
}
alias tagNMREBARCHILDSIZE NMREBARCHILDSIZE;
alias tagNMREBARCHILDSIZE* LPNMREBARCHILDSIZE;

struct tagNMREBAR {
  NMHDR hdr;
  DWORD dwMask;
  UINT uBand;
  UINT fStyle;
  UINT wID;
  LPARAM lParam;
}
alias tagNMREBAR NMREBAR;
alias tagNMREBAR* LPNMREBAR;

enum : uint { RBNM_ID = 0x00000001 }
enum : uint { RBNM_STYLE = 0x00000002 }
enum : uint { RBNM_LPARAM = 0x00000004 }

struct tagNMRBAUTOSIZE {
  NMHDR hdr;
  BOOL fChanged;
  RECT rcTarget;
  RECT rcActual;
}
alias tagNMRBAUTOSIZE NMRBAUTOSIZE;
alias tagNMRBAUTOSIZE* LPNMRBAUTOSIZE;

// #if (_WIN32_IE >= 0x0500)
struct tagNMREBARCHEVRON {
  NMHDR hdr;
  UINT uBand;
  UINT wID;
  LPARAM lParam;
  RECT rc;
  LPARAM lParamNM;
}
alias tagNMREBARCHEVRON NMREBARCHEVRON;
alias tagNMREBARCHEVRON* LPNMREBARCHEVRON;

// #endif

// #if (_WIN32_WINNT >= 0x0501)
enum : uint { RBAB_AUTOSIZE = 0x0001 }
enum : uint { RBAB_ADDBAND = 0x0002 }

struct tagNMREBARAUTOBREAK {
  NMHDR hdr;
  UINT uBand;
  UINT wID;
  LPARAM lParam;
  UINT uMsg;
  UINT fStyleCurrent;
  BOOL fAutoBreak;
}
alias tagNMREBARAUTOBREAK NMREBARAUTOBREAK;
alias tagNMREBARAUTOBREAK* LPNMREBARAUTOBREAK;

// #endif

enum : uint { RBHT_NOWHERE = 0x0001 }
enum : uint { RBHT_CAPTION = 0x0002 }
enum : uint { RBHT_CLIENT = 0x0003 }
enum : uint { RBHT_GRABBER = 0x0004 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { RBHT_CHEVRON = 0x0008 }
// #endif

struct _RB_HITTESTINFO {
  POINT pt;
  UINT flags;
  int iBand;
}
alias _RB_HITTESTINFO RBHITTESTINFO;
alias _RB_HITTESTINFO* LPRBHITTESTINFO;

// #endif      // _WIN32_IE >= 0x0400

// #endif      // NOREBAR

// #endif      // _WIN32_IE >= 0x0300

// #ifndef NOTOOLTIPS

// #ifdef _WIN32

const wchar[] TOOLTIPS_CLASSW = "tooltips_class32";
const char[] TOOLTIPS_CLASSA = "tooltips_class32";

// #ifdef UNICODE
alias TOOLTIPS_CLASSW TOOLTIPS_CLASS;
// #else
// #...
// #endif

// #else
// #...
// #endif

// #if (_WIN32_IE >= 0x0300)
alias LPTTTOOLINFOA LPTOOLINFOA;
alias LPTTTOOLINFOW LPTOOLINFOW;
alias TTTOOLINFOA TOOLINFOA;
alias TTTOOLINFOW TOOLINFOW;
// #else
// #...
// #...
// #...
// #...
// #endif

alias LPTTTOOLINFO LPTOOLINFO;
alias TTTOOLINFO TOOLINFO;

// #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
// #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
// #define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lParam)
// #define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lParam)
// #define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpReserved)
// #define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpReserved)

struct tagTOOLINFOA {
  UINT cbSize;
  UINT uFlags;
  HWND hwnd;
  UINT_PTR uId;
  RECT rect;
  HINSTANCE hinst;
  LPSTR lpszText;
// #if (_WIN32_IE >= 0x0300)
  LPARAM lParam;
// #endif
// #if (_WIN32_WINNT >= 0x0501)
  void *lpReserved;
// #endif
}
alias tagTOOLINFOA TTTOOLINFOA;
alias tagTOOLINFOA* PTOOLINFOA;
alias tagTOOLINFOA* LPTTTOOLINFOA;

struct tagTOOLINFOW {
  UINT cbSize;
  UINT uFlags;
  HWND hwnd;
  UINT_PTR uId;
  RECT rect;
  HINSTANCE hinst;
  LPWSTR lpszText;
// #if (_WIN32_IE >= 0x0300)
  LPARAM lParam;
// #endif
// #if (_WIN32_WINNT >= 0x0501)
  void *lpReserved;
// #endif
}
alias tagTOOLINFOW TTTOOLINFOW;
alias tagTOOLINFOW* PTOOLINFOW;
alias tagTOOLINFOW* LPTTTOOLINFOW;

// #ifdef UNICODE
alias TTTOOLINFOW TTTOOLINFO;
alias PTOOLINFOW PTOOLINFO;
alias LPTTTOOLINFOW LPTTTOOLINFO;
// #define TTTOOLINFO_V1_SIZE TTTOOLINFOW_V1_SIZE
// #else
// #...
// #...
// #...
// #...
// #endif

enum : uint { TTS_ALWAYSTIP = 0x01 }
enum : uint { TTS_NOPREFIX = 0x02 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { TTS_NOANIMATE = 0x10 }
enum : uint { TTS_NOFADE = 0x20 }
enum : uint { TTS_BALLOON = 0x40 }
enum : uint { TTS_CLOSE = 0x80 }
// #endif

enum : uint { TTF_IDISHWND = 0x0001 }

enum : uint { TTF_CENTERTIP = 0x0002 }
enum : uint { TTF_RTLREADING = 0x0004 }
enum : uint { TTF_SUBCLASS = 0x0010 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TTF_TRACK = 0x0020 }
enum : uint { TTF_ABSOLUTE = 0x0080 }
enum : uint { TTF_TRANSPARENT = 0x0100 }
// #if (_WIN32_IE >= 0x0501)
enum : uint { TTF_PARSELINKS = 0x1000 }
// #endif // _WIN32_IE >= 0x0501
enum : uint { TTF_DI_SETITEM = 0x8000 }
// #endif      // _WIN32_IE >= 0x0300

enum : uint { TTDT_AUTOMATIC = 0 }
enum : uint { TTDT_RESHOW = 1 }
enum : uint { TTDT_AUTOPOP = 2 }
enum : uint { TTDT_INITIAL = 3 }

enum : uint { TTI_NONE = 0 }
enum : uint { TTI_INFO = 1 }
enum : uint { TTI_WARNING = 2 }
enum : uint { TTI_ERROR = 3 }

enum : uint { TTM_ACTIVATE = WM_USER + 1 }
enum : uint { TTM_SETDELAYTIME = WM_USER + 3 }
enum : uint { TTM_ADDTOOLA = WM_USER + 4 }
enum : uint { TTM_ADDTOOLW = WM_USER + 50 }
enum : uint { TTM_DELTOOLA = WM_USER + 5 }
enum : uint { TTM_DELTOOLW = WM_USER + 51 }
enum : uint { TTM_NEWTOOLRECTA = WM_USER + 6 }
enum : uint { TTM_NEWTOOLRECTW = WM_USER + 52 }
enum : uint { TTM_RELAYEVENT = WM_USER + 7 }

enum : uint { TTM_GETTOOLINFOA = WM_USER + 8 }
enum : uint { TTM_GETTOOLINFOW = WM_USER + 53 }

enum : uint { TTM_SETTOOLINFOA = WM_USER + 9 }
enum : uint { TTM_SETTOOLINFOW = WM_USER + 54 }

enum : uint { TTM_HITTESTA = WM_USER +10 }
enum : uint { TTM_HITTESTW = WM_USER +55 }
enum : uint { TTM_GETTEXTA = WM_USER +11 }
enum : uint { TTM_GETTEXTW = WM_USER +56 }
enum : uint { TTM_UPDATETIPTEXTA = WM_USER +12 }
enum : uint { TTM_UPDATETIPTEXTW = WM_USER +57 }
enum : uint { TTM_GETTOOLCOUNT = WM_USER +13 }
enum : uint { TTM_ENUMTOOLSA = WM_USER +14 }
enum : uint { TTM_ENUMTOOLSW = WM_USER +58 }
enum : uint { TTM_GETCURRENTTOOLA = WM_USER + 15 }
enum : uint { TTM_GETCURRENTTOOLW = WM_USER + 59 }
enum : uint { TTM_WINDOWFROMPOINT = WM_USER + 16 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TTM_TRACKACTIVATE = WM_USER + 17 }
enum : uint { TTM_TRACKPOSITION = WM_USER + 18 }
enum : uint { TTM_SETTIPBKCOLOR = WM_USER + 19 }
enum : uint { TTM_SETTIPTEXTCOLOR = WM_USER + 20 }
enum : uint { TTM_GETDELAYTIME = WM_USER + 21 }
enum : uint { TTM_GETTIPBKCOLOR = WM_USER + 22 }
enum : uint { TTM_GETTIPTEXTCOLOR = WM_USER + 23 }
enum : uint { TTM_SETMAXTIPWIDTH = WM_USER + 24 }
enum : uint { TTM_GETMAXTIPWIDTH = WM_USER + 25 }
enum : uint { TTM_SETMARGIN = WM_USER + 26 }
enum : uint { TTM_GETMARGIN = WM_USER + 27 }
enum : uint { TTM_POP = WM_USER + 28 }
// #endif
// #if (_WIN32_IE >= 0x0400)
enum : uint { TTM_UPDATE = WM_USER + 29 }
// #endif
// #if (_WIN32_IE >= 0x0500)
enum : uint { TTM_GETBUBBLESIZE = WM_USER + 30 }
enum : uint { TTM_ADJUSTRECT = WM_USER + 31 }
enum : uint { TTM_SETTITLEA = WM_USER + 32 }
enum : uint { TTM_SETTITLEW = WM_USER + 33 }
// #endif

// #if (_WIN32_WINNT >= 0x0501)
enum : uint { TTM_POPUP = WM_USER + 34 }
enum : uint { TTM_GETTITLE = WM_USER + 35 }

struct _TTGETTITLE {
  DWORD dwSize;
  UINT uTitleBitmap;
  UINT cch;
  WCHAR * pszTitle;
}
alias _TTGETTITLE TTGETTITLE;
alias _TTGETTITLE* PTTGETTITLE;

// #endif

// #ifdef UNICODE
alias TTM_ADDTOOLW TTM_ADDTOOL;
alias TTM_DELTOOLW TTM_DELTOOL;
alias TTM_NEWTOOLRECTW TTM_NEWTOOLRECT;
alias TTM_GETTOOLINFOW TTM_GETTOOLINFO;
alias TTM_SETTOOLINFOW TTM_SETTOOLINFO;
alias TTM_HITTESTW TTM_HITTEST;
alias TTM_GETTEXTW TTM_GETTEXT;
alias TTM_UPDATETIPTEXTW TTM_UPDATETIPTEXT;
alias TTM_ENUMTOOLSW TTM_ENUMTOOLS;
alias TTM_GETCURRENTTOOLW TTM_GETCURRENTTOOL;
// #if (_WIN32_IE >= 0x0500)
alias TTM_SETTITLEW TTM_SETTITLE;
// #endif
// #else
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #if (_WIN32_IE >= 0x0500)
// #...
// #endif
// #endif

// #if (_WIN32_WINNT >= 0x501)
alias CCM_SETWINDOWTHEME TTM_SETWINDOWTHEME;
// #endif

// #if (_WIN32_IE >= 0x0300)
alias LPTTHITTESTINFOW LPHITTESTINFOW;
alias LPTTHITTESTINFOA LPHITTESTINFOA;
// #else
// #...
// #...
// #endif

alias LPTTHITTESTINFO LPHITTESTINFO;

struct _TT_HITTESTINFOA {
  HWND hwnd;
  POINT pt;
  TTTOOLINFOA ti;
}
alias _TT_HITTESTINFOA TTHITTESTINFOA;
alias _TT_HITTESTINFOA* LPTTHITTESTINFOA;

struct _TT_HITTESTINFOW {
  HWND hwnd;
  POINT pt;
  TTTOOLINFOW ti;
}
alias _TT_HITTESTINFOW TTHITTESTINFOW;
alias _TT_HITTESTINFOW* LPTTHITTESTINFOW;

// #ifdef UNICODE
alias TTHITTESTINFOW TTHITTESTINFO;
alias LPTTHITTESTINFOW LPTTHITTESTINFO;
// #else
// #...
// #...
// #endif

enum : uint { TTN_GETDISPINFOA = TTN_FIRST - 0 }
enum : uint { TTN_GETDISPINFOW = TTN_FIRST - 10 }
enum : uint { TTN_SHOW = TTN_FIRST - 1 }
enum : uint { TTN_POP = TTN_FIRST - 2 }
enum : uint { TTN_LINKCLICK = TTN_FIRST - 3 }

// #ifdef UNICODE
alias TTN_GETDISPINFOW TTN_GETDISPINFO;
// #else
// #...
// #endif

alias TTN_GETDISPINFO TTN_NEEDTEXT;
alias TTN_GETDISPINFOA TTN_NEEDTEXTA;
alias TTN_GETDISPINFOW TTN_NEEDTEXTW;

// #if (_WIN32_IE >= 0x0300)
alias NMTTDISPINFOW TOOLTIPTEXTW;
alias NMTTDISPINFOA TOOLTIPTEXTA;
alias LPNMTTDISPINFOA LPTOOLTIPTEXTA;
alias LPNMTTDISPINFOW LPTOOLTIPTEXTW;
// #else
// #...
// #...
// #...
// #...
// #...
// #...
// #endif

alias NMTTDISPINFO TOOLTIPTEXT;
alias LPNMTTDISPINFO LPTOOLTIPTEXT;

// #define NMTTDISPINFOA_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOA, uFlags)
// #define NMTTDISPINFOW_V1_SIZE CCSIZEOF_STRUCT(NMTTDISPINFOW, uFlags)

struct tagNMTTDISPINFOA {
  NMHDR hdr;
  LPSTR lpszText;
  char szText[80];
  HINSTANCE hinst;
  UINT uFlags;
// #if (_WIN32_IE >= 0x0300)
  LPARAM lParam;
// #endif
}
alias tagNMTTDISPINFOA NMTTDISPINFOA;
alias tagNMTTDISPINFOA* LPNMTTDISPINFOA;

struct tagNMTTDISPINFOW {
  NMHDR hdr;
  LPWSTR lpszText;
  WCHAR szText[80];
  HINSTANCE hinst;
  UINT uFlags;
// #if (_WIN32_IE >= 0x0300)
  LPARAM lParam;
// #endif
}
alias tagNMTTDISPINFOW NMTTDISPINFOW;
alias tagNMTTDISPINFOW* LPNMTTDISPINFOW;

// #ifdef UNICODE
alias NMTTDISPINFOW NMTTDISPINFO;
alias LPNMTTDISPINFOW LPNMTTDISPINFO;
// #define NMTTDISPINFO_V1_SIZE NMTTDISPINFOW_V1_SIZE
// #else
// #...
// #...
// #...
// #endif

// #endif      // NOTOOLTIPS

// #ifndef NOSTATUSBAR

enum : uint { SBARS_SIZEGRIP = 0x0100 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { SBARS_TOOLTIPS = 0x0800 }
// #endif

// #if (_WIN32_IE >= 0x0400)

enum : uint { SBT_TOOLTIPS = 0x0800 }
// #endif

extern(Windows) export void DrawStatusTextA(HDC hDC, LPRECT lprc, LPCSTR pszText, UINT uFlags);
extern(Windows) export void DrawStatusTextW(HDC hDC, LPRECT lprc, LPCWSTR pszText, UINT uFlags);

extern(Windows) export HWND CreateStatusWindowA(LONG style, LPCSTR lpszText, HWND hwndParent, UINT wID);
extern(Windows) export HWND CreateStatusWindowW(LONG style, LPCWSTR lpszText, HWND hwndParent, UINT wID);

// #ifdef UNICODE
alias CreateStatusWindowW CreateStatusWindow;
alias DrawStatusTextW DrawStatusText;
// #else
// #...
// #...
// #endif

// #ifdef _WIN32
const wchar[] STATUSCLASSNAMEW = "msctls_statusbar32";
const char[] STATUSCLASSNAMEA = "msctls_statusbar32";

// #ifdef UNICODE
alias STATUSCLASSNAMEW STATUSCLASSNAME;
// #else
// #...
// #endif

// #else
// #...
// #endif

enum : uint { SB_SETTEXTA = WM_USER+1 }
enum : uint { SB_SETTEXTW = WM_USER+11 }
enum : uint { SB_GETTEXTA = WM_USER+2 }
enum : uint { SB_GETTEXTW = WM_USER+13 }
enum : uint { SB_GETTEXTLENGTHA = WM_USER+3 }
enum : uint { SB_GETTEXTLENGTHW = WM_USER+12 }

// #ifdef UNICODE
alias SB_GETTEXTW SB_GETTEXT;
alias SB_SETTEXTW SB_SETTEXT;
alias SB_GETTEXTLENGTHW SB_GETTEXTLENGTH;
// #if (_WIN32_IE >= 0x0400)
alias SB_SETTIPTEXTW SB_SETTIPTEXT;
alias SB_GETTIPTEXTW SB_GETTIPTEXT;
// #endif
// #else
// #...
// #...
// #...
// #if (_WIN32_IE >= 0x0400)
// #...
// #...
// #endif
// #endif

enum : uint { SB_SETPARTS = WM_USER+4 }
enum : uint { SB_GETPARTS = WM_USER+6 }
enum : uint { SB_GETBORDERS = WM_USER+7 }
enum : uint { SB_SETMINHEIGHT = WM_USER+8 }
enum : uint { SB_SIMPLE = WM_USER+9 }
enum : uint { SB_GETRECT = WM_USER+10 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { SB_ISSIMPLE = WM_USER+14 }
// #endif
// #if (_WIN32_IE >= 0x0400)
enum : uint { SB_SETICON = WM_USER+15 }
// #define SB_SETTIPTEXTA (WM_USER+16)
// #define SB_SETTIPTEXTW (WM_USER+17)
// #define SB_GETTIPTEXTA (WM_USER+18)
// #define SB_GETTIPTEXTW (WM_USER+19)
enum : uint { SB_GETICON = WM_USER+20 }
alias CCM_SETUNICODEFORMAT SB_SETUNICODEFORMAT;
alias CCM_GETUNICODEFORMAT SB_GETUNICODEFORMAT;
// #endif

enum : uint { SBT_OWNERDRAW = 0x1000 }
enum : uint { SBT_NOBORDERS = 0x0100 }
enum : uint { SBT_POPOUT = 0x0200 }
enum : uint { SBT_RTLREADING = 0x0400 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { SBT_NOTABPARSING = 0x0800 }
// #endif

alias CCM_SETBKCOLOR SB_SETBKCOLOR;

// #if (_WIN32_IE >= 0x0400)
enum : uint { SBN_SIMPLEMODECHANGE = SBN_FIRST - 0 }
// #endif

// #if (_WIN32_IE >= 0x0500)

enum : uint { SB_SIMPLEID = 0x00ff }
// #endif

// #endif      // NOSTATUSBAR

// #ifndef NOMENUHELP

extern(Windows) export void MenuHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu, HINSTANCE hInst, HWND hwndStatus, UINT *lpwIDs);
extern(Windows) export BOOL ShowHideMenuCtl(HWND hWnd, UINT_PTR uFlags, LPINT lpInfo);
extern(Windows) export void GetEffectiveClientRect(HWND hWnd, LPRECT lprc, LPINT lpInfo);

alias SC_SIZE MINSYSCOMMAND;

// #endif

// #ifndef NOTRACKBAR

// #ifdef _WIN32

const char[] TRACKBAR_CLASSA = "msctls_trackbar32";
const wchar[] TRACKBAR_CLASSW = "msctls_trackbar32";

// #ifdef UNICODE
alias TRACKBAR_CLASSW TRACKBAR_CLASS;
// #else
// #...
// #endif

// #else
// #...
// #endif

enum : uint { TBS_AUTOTICKS = 0x0001 }
enum : uint { TBS_VERT = 0x0002 }
enum : uint { TBS_HORZ = 0x0000 }
enum : uint { TBS_TOP = 0x0004 }
enum : uint { TBS_BOTTOM = 0x0000 }
enum : uint { TBS_LEFT = 0x0004 }
enum : uint { TBS_RIGHT = 0x0000 }
enum : uint { TBS_BOTH = 0x0008 }
enum : uint { TBS_NOTICKS = 0x0010 }
enum : uint { TBS_ENABLESELRANGE = 0x0020 }
enum : uint { TBS_FIXEDLENGTH = 0x0040 }
enum : uint { TBS_NOTHUMB = 0x0080 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TBS_TOOLTIPS = 0x0100 }
// #endif
// #if (_WIN32_IE >= 0x0500)
enum : uint { TBS_REVERSED = 0x0200 }
// #endif

// #if (_WIN32_IE >= 0x0501)
enum : uint { TBS_DOWNISLEFT = 0x0400 }
// #endif

enum : uint { TBM_GETPOS = WM_USER }
enum : uint { TBM_GETRANGEMIN = WM_USER+1 }
enum : uint { TBM_GETRANGEMAX = WM_USER+2 }
enum : uint { TBM_GETTIC = WM_USER+3 }
enum : uint { TBM_SETTIC = WM_USER+4 }
enum : uint { TBM_SETPOS = WM_USER+5 }
enum : uint { TBM_SETRANGE = WM_USER+6 }
enum : uint { TBM_SETRANGEMIN = WM_USER+7 }
enum : uint { TBM_SETRANGEMAX = WM_USER+8 }
enum : uint { TBM_CLEARTICS = WM_USER+9 }
enum : uint { TBM_SETSEL = WM_USER+10 }
enum : uint { TBM_SETSELSTART = WM_USER+11 }
enum : uint { TBM_SETSELEND = WM_USER+12 }
enum : uint { TBM_GETPTICS = WM_USER+14 }
enum : uint { TBM_GETTICPOS = WM_USER+15 }
enum : uint { TBM_GETNUMTICS = WM_USER+16 }
enum : uint { TBM_GETSELSTART = WM_USER+17 }
enum : uint { TBM_GETSELEND = WM_USER+18 }
enum : uint { TBM_CLEARSEL = WM_USER+19 }
enum : uint { TBM_SETTICFREQ = WM_USER+20 }
enum : uint { TBM_SETPAGESIZE = WM_USER+21 }
enum : uint { TBM_GETPAGESIZE = WM_USER+22 }
enum : uint { TBM_SETLINESIZE = WM_USER+23 }
enum : uint { TBM_GETLINESIZE = WM_USER+24 }
enum : uint { TBM_GETTHUMBRECT = WM_USER+25 }
enum : uint { TBM_GETCHANNELRECT = WM_USER+26 }
enum : uint { TBM_SETTHUMBLENGTH = WM_USER+27 }
enum : uint { TBM_GETTHUMBLENGTH = WM_USER+28 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TBM_SETTOOLTIPS = WM_USER+29 }
enum : uint { TBM_GETTOOLTIPS = WM_USER+30 }
enum : uint { TBM_SETTIPSIDE = WM_USER+31 }

enum : uint { TBTS_TOP = 0 }
enum : uint { TBTS_LEFT = 1 }
enum : uint { TBTS_BOTTOM = 2 }
enum : uint { TBTS_RIGHT = 3 }

enum : uint { TBM_SETBUDDY = WM_USER+32 }
enum : uint { TBM_GETBUDDY = WM_USER+33 }
// #endif
// #if (_WIN32_IE >= 0x0400)
alias CCM_SETUNICODEFORMAT TBM_SETUNICODEFORMAT;
alias CCM_GETUNICODEFORMAT TBM_GETUNICODEFORMAT;
// #endif

enum : uint { TB_LINEUP = 0 }
enum : uint { TB_LINEDOWN = 1 }
enum : uint { TB_PAGEUP = 2 }
enum : uint { TB_PAGEDOWN = 3 }
enum : uint { TB_THUMBPOSITION = 4 }
enum : uint { TB_THUMBTRACK = 5 }
enum : uint { TB_TOP = 6 }
enum : uint { TB_BOTTOM = 7 }
enum : uint { TB_ENDTRACK = 8 }

// #if (_WIN32_IE >= 0x0300)

enum : uint { TBCD_TICS = 0x0001 }
enum : uint { TBCD_THUMB = 0x0002 }
enum : uint { TBCD_CHANNEL = 0x0003 }
// #endif

// #endif // trackbar

// #ifndef NODRAGLIST

struct tagDRAGLISTINFO {
  UINT uNotification;
  HWND hWnd;
  POINT ptCursor;
}
alias tagDRAGLISTINFO DRAGLISTINFO;
alias tagDRAGLISTINFO* LPDRAGLISTINFO;

enum : uint { DL_BEGINDRAG = WM_USER+133 }
enum : uint { DL_DRAGGING = WM_USER+134 }
enum : uint { DL_DROPPED = WM_USER+135 }
enum : uint { DL_CANCELDRAG = WM_USER+136 }

enum : uint { DL_CURSORSET = 0 }
enum : uint { DL_STOPCURSOR = 1 }
enum : uint { DL_COPYCURSOR = 2 }
enum : uint { DL_MOVECURSOR = 3 }

const TCHAR[] DRAGLISTMSGSTRING = "commctrl_DragListMsg";

extern(Windows) export BOOL MakeDragList(HWND hLB);
extern(Windows) export void DrawInsert(HWND handParent, HWND hLB, int nItem);

extern(Windows) export int LBItemFromPt(HWND hLB, POINT pt, BOOL bAutoScroll);

// #endif

// #ifndef NOUPDOWN

// #ifdef _WIN32

const char[] UPDOWN_CLASSA = "msctls_updown32";
const wchar[] UPDOWN_CLASSW = "msctls_updown32";

// #ifdef UNICODE
alias UPDOWN_CLASSW UPDOWN_CLASS;
// #else
// #...
// #endif

// #else
// #...
// #endif

struct _UDACCEL {
  UINT nSec;
  UINT nInc;
}
alias _UDACCEL UDACCEL;
alias _UDACCEL* LPUDACCEL;

enum : uint { UD_MAXVAL = 0x7fff }
enum : uint { UD_MINVAL = -UD_MAXVAL }

enum : uint { UDS_WRAP = 0x0001 }
enum : uint { UDS_SETBUDDYINT = 0x0002 }
enum : uint { UDS_ALIGNRIGHT = 0x0004 }
enum : uint { UDS_ALIGNLEFT = 0x0008 }
enum : uint { UDS_AUTOBUDDY = 0x0010 }
enum : uint { UDS_ARROWKEYS = 0x0020 }
enum : uint { UDS_HORZ = 0x0040 }
enum : uint { UDS_NOTHOUSANDS = 0x0080 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { UDS_HOTTRACK = 0x0100 }
// #endif

enum : uint { UDM_SETRANGE = WM_USER+101 }
enum : uint { UDM_GETRANGE = WM_USER+102 }
enum : uint { UDM_SETPOS = WM_USER+103 }
enum : uint { UDM_GETPOS = WM_USER+104 }
enum : uint { UDM_SETBUDDY = WM_USER+105 }
enum : uint { UDM_GETBUDDY = WM_USER+106 }
enum : uint { UDM_SETACCEL = WM_USER+107 }
enum : uint { UDM_GETACCEL = WM_USER+108 }
enum : uint { UDM_SETBASE = WM_USER+109 }
enum : uint { UDM_GETBASE = WM_USER+110 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { UDM_SETRANGE32 = WM_USER+111 }
enum : uint { UDM_GETRANGE32 = WM_USER+112 }
alias CCM_SETUNICODEFORMAT UDM_SETUNICODEFORMAT;
alias CCM_GETUNICODEFORMAT UDM_GETUNICODEFORMAT;
// #endif
// #if (_WIN32_IE >= 0x0500)
enum : uint { UDM_SETPOS32 = WM_USER+113 }
enum : uint { UDM_GETPOS32 = WM_USER+114 }
// #endif

extern(Windows) export HWND 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);

// #if (_WIN32_IE >= 0x0300)
alias NMUPDOWN NM_UPDOWN;
alias LPNMUPDOWN LPNM_UPDOWN;
// #else
// #...
// #...
// #endif

struct _NM_UPDOWN {
  NMHDR hdr;
  int iPos;
  int iDelta;
}
alias _NM_UPDOWN NMUPDOWN;
alias _NM_UPDOWN* LPNMUPDOWN;

enum : uint { UDN_DELTAPOS = UDN_FIRST - 1 }

// #endif  // NOUPDOWN

// #ifndef NOPROGRESS

// #ifdef _WIN32

const char[] PROGRESS_CLASSA = "msctls_progress32";
const wchar[] PROGRESS_CLASSW = "msctls_progress32";

// #ifdef UNICODE
alias PROGRESS_CLASSW PROGRESS_CLASS;
// #else
// #...
// #endif

// #else
// #...
// #endif

// #if (_WIN32_IE >= 0x0300)
enum : uint { PBS_SMOOTH = 0x01 }
enum : uint { PBS_VERTICAL = 0x04 }
// #endif

enum : uint { PBM_SETRANGE = WM_USER+1 }
enum : uint { PBM_SETPOS = WM_USER+2 }
enum : uint { PBM_DELTAPOS = WM_USER+3 }
enum : uint { PBM_SETSTEP = WM_USER+4 }
enum : uint { PBM_STEPIT = WM_USER+5 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { PBM_SETRANGE32 = WM_USER+6 }
struct _7 {
  int iLow;
  int iHigh;
}
alias _7 PBRANGE;
alias _7* PPBRANGE;

enum : uint { PBM_GETRANGE = WM_USER+7 }
enum : uint { PBM_GETPOS = WM_USER+8 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { PBM_SETBARCOLOR = WM_USER+9 }
// #endif      // _WIN32_IE >= 0x0400
alias CCM_SETBKCOLOR PBM_SETBKCOLOR;
// #endif      // _WIN32_IE >= 0x0300

// #endif  // NOPROGRESS

// #ifndef NOHOTKEY

enum : uint { HOTKEYF_SHIFT = 0x01 }
enum : uint { HOTKEYF_CONTROL = 0x02 }
enum : uint { HOTKEYF_ALT = 0x04 }
// #ifdef _MAC
// #...
// #else
enum : uint { HOTKEYF_EXT = 0x08 }
// #endif

enum : uint { HKCOMB_NONE = 0x0001 }
enum : uint { HKCOMB_S = 0x0002 }
enum : uint { HKCOMB_C = 0x0004 }
enum : uint { HKCOMB_A = 0x0008 }
enum : uint { HKCOMB_SC = 0x0010 }
enum : uint { HKCOMB_SA = 0x0020 }
enum : uint { HKCOMB_CA = 0x0040 }
enum : uint { HKCOMB_SCA = 0x0080 }

enum : uint { HKM_SETHOTKEY = WM_USER+1 }
enum : uint { HKM_GETHOTKEY = WM_USER+2 }
enum : uint { HKM_SETRULES = WM_USER+3 }

// #ifdef _WIN32

const char[] HOTKEY_CLASSA = "msctls_hotkey32";
const wchar[] HOTKEY_CLASSW = "msctls_hotkey32";

// #ifdef UNICODE
alias HOTKEY_CLASSW HOTKEY_CLASS;
// #else
// #...
// #endif

// #else
// #...
// #endif

// #endif  // NOHOTKEY

enum : uint { CCS_TOP = 0x00000001 }
enum : uint { CCS_NOMOVEY = 0x00000002 }
enum : uint { CCS_BOTTOM = 0x00000003 }
enum : uint { CCS_NORESIZE = 0x00000004 }
enum : uint { CCS_NOPARENTALIGN = 0x00000008 }
enum : uint { CCS_ADJUSTABLE = 0x00000020 }
enum : uint { CCS_NODIVIDER = 0x00000040 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { CCS_VERT = 0x00000080 }
enum : uint { CCS_LEFT = CCS_VERT | CCS_TOP }
enum : uint { CCS_RIGHT = CCS_VERT | CCS_BOTTOM }
enum : uint { CCS_NOMOVEX = CCS_VERT | CCS_NOMOVEY }
// #endif

// #ifndef NOLISTVIEW

// #ifdef _WIN32

const char[] WC_LISTVIEWA = "SysListView32";
const wchar[] WC_LISTVIEWW = "SysListView32";

// #ifdef UNICODE
alias WC_LISTVIEWW WC_LISTVIEW;
// #else
// #...
// #endif

// #else
// #...
// #endif

enum : uint { LVS_ICON = 0x0000 }
enum : uint { LVS_REPORT = 0x0001 }
enum : uint { LVS_SMALLICON = 0x0002 }
enum : uint { LVS_LIST = 0x0003 }
enum : uint { LVS_TYPEMASK = 0x0003 }
enum : uint { LVS_SINGLESEL = 0x0004 }
enum : uint { LVS_SHOWSELALWAYS = 0x0008 }
enum : uint { LVS_SORTASCENDING = 0x0010 }
enum : uint { LVS_SORTDESCENDING = 0x0020 }
enum : uint { LVS_SHAREIMAGELISTS = 0x0040 }
enum : uint { LVS_NOLABELWRAP = 0x0080 }
enum : uint { LVS_AUTOARRANGE = 0x0100 }
enum : uint { LVS_EDITLABELS = 0x0200 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { LVS_OWNERDATA = 0x1000 }
// #endif
enum : uint { LVS_NOSCROLL = 0x2000 }

enum : uint { LVS_TYPESTYLEMASK = 0xfc00 }

enum : uint { LVS_ALIGNTOP = 0x0000 }
enum : uint { LVS_ALIGNLEFT = 0x0800 }
enum : uint { LVS_ALIGNMASK = 0x0c00 }

enum : uint { LVS_OWNERDRAWFIXED = 0x0400 }
enum : uint { LVS_NOCOLUMNHEADER = 0x4000 }
enum : uint { LVS_NOSORTHEADER = 0x8000 }

// #if (_WIN32_IE >= 0x0400)
alias CCM_SETUNICODEFORMAT LVM_SETUNICODEFORMAT;
// #define ListView_SetUnicodeFormat(hwnd, fUnicode) (BOOL)SNDMSG((hwnd), LVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)

alias CCM_GETUNICODEFORMAT LVM_GETUNICODEFORMAT;
// #define ListView_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd), LVM_GETUNICODEFORMAT, 0, 0)
// #endif

enum : uint { LVM_GETBKCOLOR = LVM_FIRST + 0 }
// #define ListView_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd), LVM_GETBKCOLOR, 0, 0L)

enum : uint { LVM_SETBKCOLOR = LVM_FIRST + 1 }
// #define ListView_SetBkColor(hwnd, clrBk) (BOOL)SNDMSG((hwnd), LVM_SETBKCOLOR, 0, (LPARAM)(COLORREF)(clrBk))

enum : uint { LVM_GETIMAGELIST = LVM_FIRST + 2 }
// #define ListView_GetImageList(hwnd, iImageList) (HIMAGELIST)SNDMSG((hwnd), LVM_GETIMAGELIST, (WPARAM)(INT)(iImageList), 0L)

enum : uint { LVSIL_NORMAL = 0 }
enum : uint { LVSIL_SMALL = 1 }
enum : uint { LVSIL_STATE = 2 }

enum : uint { LVM_SETIMAGELIST = LVM_FIRST + 3 }
// #define ListView_SetImageList(hwnd, himl, iImageList) (HIMAGELIST)SNDMSG((hwnd), LVM_SETIMAGELIST, (WPARAM)(iImageList), (LPARAM)(HIMAGELIST)(himl))

enum : uint { LVM_GETITEMCOUNT = LVM_FIRST + 4 }
// #define ListView_GetItemCount(hwnd) (int)SNDMSG((hwnd), LVM_GETITEMCOUNT, 0, 0L)

enum : uint { LVIF_TEXT = 0x0001 }
enum : uint { LVIF_IMAGE = 0x0002 }
enum : uint { LVIF_PARAM = 0x0004 }
enum : uint { LVIF_STATE = 0x0008 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { LVIF_INDENT = 0x0010 }
enum : uint { LVIF_NORECOMPUTE = 0x0800 }
// #endif
// #if (_WIN32_WINNT >= 0x501)
enum : uint { LVIF_GROUPID = 0x0100 }
enum : uint { LVIF_COLUMNS = 0x0200 }
// #endif

enum : uint { LVIS_FOCUSED = 0x0001 }
enum : uint { LVIS_SELECTED = 0x0002 }
enum : uint { LVIS_CUT = 0x0004 }
enum : uint { LVIS_DROPHILITED = 0x0008 }
enum : uint { LVIS_GLOW = 0x0010 }
enum : uint { LVIS_ACTIVATING = 0x0020 }

enum : uint { LVIS_OVERLAYMASK = 0x0F00 }
enum : uint { LVIS_STATEIMAGEMASK = 0xF000 }

uint INDEXTOSTATEIMAGEMASK(uint i){ return i << 12; }

// #if (_WIN32_IE >= 0x0300)
enum { I_INDENTCALLBACK = -1 }
alias LVITEMA LV_ITEMA;
alias LVITEMW LV_ITEMW;
// #else
// #...
// #...
// #...
// #...
// #endif

// #if (_WIN32_WINNT >= 0x501)
enum { I_GROUPIDCALLBACK = -1 }
enum { I_GROUPIDNONE = -2 }
// #endif
alias LVITEM LV_ITEM;

// #define LVITEMA_V1_SIZE CCSIZEOF_STRUCT(LVITEMA, lParam)
// #define LVITEMW_V1_SIZE CCSIZEOF_STRUCT(LVITEMW, lParam)

struct tagLVITEMA {
  UINT mask;
  int iItem;
  int iSubItem;
  UINT state;
  UINT stateMask;
  LPSTR pszText;
  int cchTextMax;
  int iImage;
  LPARAM lParam;
// #if (_WIN32_IE >= 0x0300)
  int iIndent;
// #endif
// #if (_WIN32_WINNT >= 0x501)
  int iGroupId;
  UINT cColumns;
  PUINT puColumns;
// #endif
}
alias tagLVITEMA LVITEMA;
alias tagLVITEMA* LPLVITEMA;

struct tagLVITEMW {
  UINT mask;
  int iItem;
  int iSubItem;
  UINT state;
  UINT stateMask;
  LPWSTR pszText;
  int cchTextMax;
  int iImage;
  LPARAM lParam;
// #if (_WIN32_IE >= 0x0300)
  int iIndent;
// #endif
// #if (_WIN32_WINNT >= 0x501)
  int iGroupId;
  UINT cColumns;
  PUINT puColumns;
// #endif
}
alias tagLVITEMW LVITEMW;
alias tagLVITEMW* LPLVITEMW;

// #ifdef UNICODE
alias LVITEMW LVITEM;
alias LPLVITEMW LPLVITEM;
// #define LVITEM_V1_SIZE LVITEMW_V1_SIZE
// #else
// #...
// #...
// #...
// #endif

const LPWSTR LPSTR_TEXTCALLBACKW = cast(LPWSTR)-1;
const LPSTR LPSTR_TEXTCALLBACKA = cast(LPSTR)-1;
// #ifdef UNICODE
alias LPSTR_TEXTCALLBACKW LPSTR_TEXTCALLBACK;
// #else
// #...
// #endif

enum { I_IMAGECALLBACK = -1 }
// #if (_WIN32_IE >= 0x0501)
enum { I_IMAGENONE = -2 }
// #endif  // 0x0501

// #if (_WIN32_WINNT >= 0x501)

enum : uint { I_COLUMNSCALLBACK = cast(UINT)-1 }
// #endif

enum : uint { LVM_GETITEMA = LVM_FIRST + 5 }
enum : uint { LVM_GETITEMW = LVM_FIRST + 75 }
// #ifdef UNICODE
alias LVM_GETITEMW LVM_GETITEM;
// #else
// #...
// #endif

// #define ListView_GetItem(hwnd, pitem) (BOOL)SNDMSG((hwnd), LVM_GETITEM, 0, (LPARAM)(LV_ITEM *)(pitem))

enum : uint { LVM_SETITEMA = LVM_FIRST + 6 }
enum : uint { LVM_SETITEMW = LVM_FIRST + 76 }
// #ifdef UNICODE
alias LVM_SETITEMW LVM_SETITEM;
// #else
// #...
// #endif

// #define ListView_SetItem(hwnd, pitem) (BOOL)SNDMSG((hwnd), LVM_SETITEM, 0, (LPARAM)(const LV_ITEM *)(pitem))

enum : uint { LVM_INSERTITEMA = LVM_FIRST + 7 }
enum : uint { LVM_INSERTITEMW = LVM_FIRST + 77 }
// #ifdef UNICODE
alias LVM_INSERTITEMW LVM_INSERTITEM;
// #else
// #...
// #endif
// #define ListView_InsertItem(hwnd, pitem) (int)SNDMSG((hwnd), LVM_INSERTITEM, 0, (LPARAM)(const LV_ITEM *)(pitem))

enum : uint { LVM_DELETEITEM = LVM_FIRST + 8 }
// #define ListView_DeleteItem(hwnd, i) (BOOL)SNDMSG((hwnd), LVM_DELETEITEM, (WPARAM)(int)(i), 0L)

enum : uint { LVM_DELETEALLITEMS = LVM_FIRST + 9 }
// #define ListView_DeleteAllItems(hwnd) (BOOL)SNDMSG((hwnd), LVM_DELETEALLITEMS, 0, 0L)

enum : uint { LVM_GETCALLBACKMASK = LVM_FIRST + 10 }
// #define ListView_GetCallbackMask(hwnd) (BOOL)SNDMSG((hwnd), LVM_GETCALLBACKMASK, 0, 0)

enum : uint { LVM_SETCALLBACKMASK = LVM_FIRST + 11 }
// #define ListView_SetCallbackMask(hwnd, mask) (BOOL)SNDMSG((hwnd), LVM_SETCALLBACKMASK, (WPARAM)(UINT)(mask), 0)

enum : uint { LVNI_ALL = 0x0000 }
enum : uint { LVNI_FOCUSED = 0x0001 }
enum : uint { LVNI_SELECTED = 0x0002 }
enum : uint { LVNI_CUT = 0x0004 }
enum : uint { LVNI_DROPHILITED = 0x0008 }

enum : uint { LVNI_ABOVE = 0x0100 }
enum : uint { LVNI_BELOW = 0x0200 }
enum : uint { LVNI_TOLEFT = 0x0400 }
enum : uint { LVNI_TORIGHT = 0x0800 }

enum : uint { LVM_GETNEXTITEM = LVM_FIRST + 12 }
// #define ListView_GetNextItem(hwnd, i, flags) (int)SNDMSG((hwnd), LVM_GETNEXTITEM, (WPARAM)(int)(i), MAKELPARAM((flags), 0))

enum : uint { LVFI_PARAM = 0x0001 }
enum : uint { LVFI_STRING = 0x0002 }
enum : uint { LVFI_PARTIAL = 0x0008 }
enum : uint { LVFI_WRAP = 0x0020 }
enum : uint { LVFI_NEARESTXY = 0x0040 }

// #if (_WIN32_IE >= 0x0300)
alias LVFINDINFOA LV_FINDINFOA;
alias LVFINDINFOW LV_FINDINFOW;
// #else
// #...
// #...
// #...
// #...
// #endif

alias LVFINDINFO LV_FINDINFO;

struct tagLVFINDINFOA {
  UINT flags;
  LPCSTR psz;
  LPARAM lParam;
  POINT pt;
  UINT vkDirection;
}
alias tagLVFINDINFOA LVFINDINFOA;
alias tagLVFINDINFOA* LPFINDINFOA;

struct tagLVFINDINFOW {
  UINT flags;
  LPCWSTR psz;
  LPARAM lParam;
  POINT pt;
  UINT vkDirection;
}
alias tagLVFINDINFOW LVFINDINFOW;
alias tagLVFINDINFOW* LPFINDINFOW;

// #ifdef UNICODE
alias LVFINDINFOW LVFINDINFO;
// #else
// #...
// #endif

enum : uint { LVM_FINDITEMA = LVM_FIRST + 13 }
enum : uint { LVM_FINDITEMW = LVM_FIRST + 83 }
// #ifdef UNICODE
alias LVM_FINDITEMW LVM_FINDITEM;
// #else
// #...
// #endif

// #define ListView_FindItem(hwnd, iStart, plvfi) (int)SNDMSG((hwnd), LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LV_FINDINFO *)(plvfi))

enum : uint { LVIR_BOUNDS = 0 }
enum : uint { LVIR_ICON = 1 }
enum : uint { LVIR_LABEL = 2 }
enum : uint { LVIR_SELECTBOUNDS = 3 }

enum : uint { LVM_GETITEMRECT = LVM_FIRST + 14 }
// #define ListView_GetItemRect(hwnd, i, prc, code) (BOOL)SNDMSG((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), ((prc) ? (((RECT *)(prc))->left = (code),(LPARAM)(RECT *)(prc)) : (LPARAM)(RECT *)NULL))

enum : uint { LVM_SETITEMPOSITION = LVM_FIRST + 15 }
// #define ListView_SetItemPosition(hwndLV, i, x, y) (BOOL)SNDMSG((hwndLV), LVM_SETITEMPOSITION, (WPARAM)(int)(i), MAKELPARAM((x), (y)))

enum : uint { LVM_GETITEMPOSITION = LVM_FIRST + 16 }
// #define ListView_GetItemPosition(hwndLV, i, ppt) (BOOL)SNDMSG((hwndLV), LVM_GETITEMPOSITION, (WPARAM)(int)(i), (LPARAM)(POINT *)(ppt))

enum : uint { LVM_GETSTRINGWIDTHA = LVM_FIRST + 17 }
enum : uint { LVM_GETSTRINGWIDTHW = LVM_FIRST + 87 }
// #ifdef UNICODE
alias LVM_GETSTRINGWIDTHW LVM_GETSTRINGWIDTH;
// #else
// #...
// #endif

// #define ListView_GetStringWidth(hwndLV, psz) (int)SNDMSG((hwndLV), LVM_GETSTRINGWIDTH, 0, (LPARAM)(LPCTSTR)(psz))

enum : uint { LVHT_NOWHERE = 0x0001 }
enum : uint { LVHT_ONITEMICON = 0x0002 }
enum : uint { LVHT_ONITEMLABEL = 0x0004 }
enum : uint { LVHT_ONITEMSTATEICON = 0x0008 }
enum : uint { LVHT_ONITEM = LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON }

enum : uint { LVHT_ABOVE = 0x0008 }
enum : uint { LVHT_BELOW = 0x0010 }
enum : uint { LVHT_TORIGHT = 0x0020 }
enum : uint { LVHT_TOLEFT = 0x0040 }

// #if (_WIN32_IE >= 0x0300)
alias LVHITTESTINFO LV_HITTESTINFO;
// #else
// #...
// #...
// #endif

// #define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO, iItem)

struct tagLVHITTESTINFO {
  POINT pt;
  UINT flags;
  int iItem;
// #if (_WIN32_IE >= 0x0300)
  int iSubItem;
// #endif
}
alias tagLVHITTESTINFO LVHITTESTINFO;
alias tagLVHITTESTINFO* LPLVHITTESTINFO;

enum : uint { LVM_HITTEST = LVM_FIRST + 18 }
// #define ListView_HitTest(hwndLV, pinfo) (int)SNDMSG((hwndLV), LVM_HITTEST, 0, (LPARAM)(LV_HITTESTINFO *)(pinfo))

enum : uint { LVM_ENSUREVISIBLE = LVM_FIRST + 19 }
// #define ListView_EnsureVisible(hwndLV, i, fPartialOK) (BOOL)SNDMSG((hwndLV), LVM_ENSUREVISIBLE, (WPARAM)(int)(i), MAKELPARAM((fPartialOK), 0))

enum : uint { LVM_SCROLL = LVM_FIRST + 20 }
// #define ListView_Scroll(hwndLV, dx, dy) (BOOL)SNDMSG((hwndLV), LVM_SCROLL, (WPARAM)(int)(dx), (LPARAM)(int)(dy))

enum : uint { LVM_REDRAWITEMS = LVM_FIRST + 21 }
// #define ListView_RedrawItems(hwndLV, iFirst, iLast) (BOOL)SNDMSG((hwndLV), LVM_REDRAWITEMS, (WPARAM)(int)(iFirst), (LPARAM)(int)(iLast))

enum : uint { LVA_DEFAULT = 0x0000 }
enum : uint { LVA_ALIGNLEFT = 0x0001 }
enum : uint { LVA_ALIGNTOP = 0x0002 }
enum : uint { LVA_SNAPTOGRID = 0x0005 }

enum : uint { LVM_ARRANGE = LVM_FIRST + 22 }
// #define ListView_Arrange(hwndLV, code) (BOOL)SNDMSG((hwndLV), LVM_ARRANGE, (WPARAM)(UINT)(code), 0L)

enum : uint { LVM_EDITLABELA = LVM_FIRST + 23 }
enum : uint { LVM_EDITLABELW = LVM_FIRST + 118 }
// #ifdef UNICODE
alias LVM_EDITLABELW LVM_EDITLABEL;
// #else
// #...
// #endif

// #define ListView_EditLabel(hwndLV, i) (HWND)SNDMSG((hwndLV), LVM_EDITLABEL, (WPARAM)(int)(i), 0L)

enum : uint { LVM_GETEDITCONTROL = LVM_FIRST + 24 }
// #define ListView_GetEditControl(hwndLV) (HWND)SNDMSG((hwndLV), LVM_GETEDITCONTROL, 0, 0L)

// #if (_WIN32_IE >= 0x0300)
alias LVCOLUMNA LV_COLUMNA;
alias LVCOLUMNW LV_COLUMNW;
// #else
// #...
// #...
// #...
// #...
// #endif

alias LVCOLUMN LV_COLUMN;

// #define LVCOLUMNA_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNA, iSubItem)
// #define LVCOLUMNW_V1_SIZE CCSIZEOF_STRUCT(LVCOLUMNW, iSubItem)

struct tagLVCOLUMNA {
  UINT mask;
  int fmt;
  int cx;
  LPSTR pszText;
  int cchTextMax;
  int iSubItem;
// #if (_WIN32_IE >= 0x0300)
  int iImage;
  int iOrder;
// #endif
}
alias tagLVCOLUMNA LVCOLUMNA;
alias tagLVCOLUMNA* LPLVCOLUMNA;

struct tagLVCOLUMNW {
  UINT mask;
  int fmt;
  int cx;
  LPWSTR pszText;
  int cchTextMax;
  int iSubItem;
// #if (_WIN32_IE >= 0x0300)
  int iImage;
  int iOrder;
// #endif
}
alias tagLVCOLUMNW LVCOLUMNW;
alias tagLVCOLUMNW* LPLVCOLUMNW;

// #ifdef UNICODE
alias LVCOLUMNW LVCOLUMN;
alias LPLVCOLUMNW LPLVCOLUMN;
// #define LVCOLUMN_V1_SIZE LVCOLUMNW_V1_SIZE
// #else
// #...
// #...
// #...
// #endif

enum : uint { LVCF_FMT = 0x0001 }
enum : uint { LVCF_WIDTH = 0x0002 }
enum : uint { LVCF_TEXT = 0x0004 }
enum : uint { LVCF_SUBITEM = 0x0008 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { LVCF_IMAGE = 0x0010 }
enum : uint { LVCF_ORDER = 0x0020 }
// #endif

enum : uint { LVCFMT_LEFT = 0x0000 }
enum : uint { LVCFMT_RIGHT = 0x0001 }
enum : uint { LVCFMT_CENTER = 0x0002 }
enum : uint { LVCFMT_JUSTIFYMASK = 0x0003 }

// #if (_WIN32_IE >= 0x0300)
enum : uint { LVCFMT_IMAGE = 0x0800 }
enum : uint { LVCFMT_BITMAP_ON_RIGHT = 0x1000 }
enum : uint { LVCFMT_COL_HAS_IMAGES = 0x8000 }
// #endif

enum : uint { LVM_GETCOLUMNA = LVM_FIRST + 25 }
enum : uint { LVM_GETCOLUMNW = LVM_FIRST + 95 }
// #ifdef UNICODE
alias LVM_GETCOLUMNW LVM_GETCOLUMN;
// #else
// #...
// #endif

// #define ListView_GetColumn(hwnd, iCol, pcol) (BOOL)SNDMSG((hwnd), LVM_GETCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(LV_COLUMN *)(pcol))

enum : uint { LVM_SETCOLUMNA = LVM_FIRST + 26 }
enum : uint { LVM_SETCOLUMNW = LVM_FIRST + 96 }
// #ifdef UNICODE
alias LVM_SETCOLUMNW LVM_SETCOLUMN;
// #else
// #...
// #endif

// #define ListView_SetColumn(hwnd, iCol, pcol) (BOOL)SNDMSG((hwnd), LVM_SETCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(const LV_COLUMN *)(pcol))

enum : uint { LVM_INSERTCOLUMNA = LVM_FIRST + 27 }
enum : uint { LVM_INSERTCOLUMNW = LVM_FIRST + 97 }
// #ifdef UNICODE
alias LVM_INSERTCOLUMNW LVM_INSERTCOLUMN;
// #else
// #...
// #endif

// #define ListView_InsertColumn(hwnd, iCol, pcol) (int)SNDMSG((hwnd), LVM_INSERTCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(const LV_COLUMN *)(pcol))

enum : uint { LVM_DELETECOLUMN = LVM_FIRST + 28 }
// #define ListView_DeleteColumn(hwnd, iCol) (BOOL)SNDMSG((hwnd), LVM_DELETECOLUMN, (WPARAM)(int)(iCol), 0)

enum : uint { LVM_GETCOLUMNWIDTH = LVM_FIRST + 29 }
// #define ListView_GetColumnWidth(hwnd, iCol) (int)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(int)(iCol), 0)

enum { LVSCW_AUTOSIZE = -1 }
enum { LVSCW_AUTOSIZE_USEHEADER = -2 }
enum : uint { LVM_SETCOLUMNWIDTH = LVM_FIRST + 30 }

// #define ListView_SetColumnWidth(hwnd, iCol, cx) (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNWIDTH, (WPARAM)(int)(iCol), MAKELPARAM((cx), 0))

// #if (_WIN32_IE >= 0x0300)
enum : uint { LVM_GETHEADER = LVM_FIRST + 31 }
// #define ListView_GetHeader(hwnd) (HWND)SNDMSG((hwnd), LVM_GETHEADER, 0, 0L)
// #endif

enum : uint { LVM_CREATEDRAGIMAGE = LVM_FIRST + 33 }
// #define ListView_CreateDragImage(hwnd, i, lpptUpLeft) (HIMAGELIST)SNDMSG((hwnd), LVM_CREATEDRAGIMAGE, (WPARAM)(int)(i), (LPARAM)(LPPOINT)(lpptUpLeft))

enum : uint { LVM_GETVIEWRECT = LVM_FIRST + 34 }
// #define ListView_GetViewRect(hwnd, prc) (BOOL)SNDMSG((hwnd), LVM_GETVIEWRECT, 0, (LPARAM)(RECT *)(prc))

enum : uint { LVM_GETTEXTCOLOR = LVM_FIRST + 35 }
// #define ListView_GetTextColor(hwnd) (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0L)

enum : uint { LVM_SETTEXTCOLOR = LVM_FIRST + 36 }
// #define ListView_SetTextColor(hwnd, clrText) (BOOL)SNDMSG((hwnd), LVM_SETTEXTCOLOR, 0, (LPARAM)(COLORREF)(clrText))

enum : uint { LVM_GETTEXTBKCOLOR = LVM_FIRST + 37 }
// #define ListView_GetTextBkColor(hwnd) (COLORREF)SNDMSG((hwnd), LVM_GETTEXTBKCOLOR, 0, 0L)

enum : uint { LVM_SETTEXTBKCOLOR = LVM_FIRST + 38 }
// #define ListView_SetTextBkColor(hwnd, clrTextBk) (BOOL)SNDMSG((hwnd), LVM_SETTEXTBKCOLOR, 0, (LPARAM)(COLORREF)(clrTextBk))

enum : uint { LVM_GETTOPINDEX = LVM_FIRST + 39 }
// #define ListView_GetTopIndex(hwndLV) (int)SNDMSG((hwndLV), LVM_GETTOPINDEX, 0, 0)

enum : uint { LVM_GETCOUNTPERPAGE = LVM_FIRST + 40 }
// #define ListView_GetCountPerPage(hwndLV) (int)SNDMSG((hwndLV), LVM_GETCOUNTPERPAGE, 0, 0)

enum : uint { LVM_GETORIGIN = LVM_FIRST + 41 }
// #define ListView_GetOrigin(hwndLV, ppt) (BOOL)SNDMSG((hwndLV), LVM_GETORIGIN, (WPARAM)0, (LPARAM)(POINT *)(ppt))

enum : uint { LVM_UPDATE = LVM_FIRST + 42 }
// #define ListView_Update(hwndLV, i) (BOOL)SNDMSG((hwndLV), LVM_UPDATE, (WPARAM)(i), 0L)

enum : uint { LVM_SETITEMSTATE = LVM_FIRST + 43 }
// #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); }

// #if (_WIN32_IE >= 0x0300)
// #define ListView_SetCheckState(hwndLV, i, fCheck) ListView_SetItemState(hwndLV, i, INDEXTOSTATEIMAGEMASK((fCheck)?2:1), LVIS_STATEIMAGEMASK)
// #endif

enum : uint { LVM_GETITEMSTATE = LVM_FIRST + 44 }
// #define ListView_GetItemState(hwndLV, i, mask) (UINT)SNDMSG((hwndLV), LVM_GETITEMSTATE, (WPARAM)(i), (LPARAM)(mask))

// #if (_WIN32_IE >= 0x0300)
// #define ListView_GetCheckState(hwndLV, i) ((((UINT)(SNDMSG((hwndLV), LVM_GETITEMSTATE, (WPARAM)(i), LVIS_STATEIMAGEMASK))) >> 12) -1)
// #endif

enum : uint { LVM_GETITEMTEXTA = LVM_FIRST + 45 }
enum : uint { LVM_GETITEMTEXTW = LVM_FIRST + 115 }

// #ifdef UNICODE
alias LVM_GETITEMTEXTW LVM_GETITEMTEXT;
// #else
// #...
// #endif

// #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); }

enum : uint { LVM_SETITEMTEXTA = LVM_FIRST + 46 }
enum : uint { LVM_SETITEMTEXTW = LVM_FIRST + 116 }

// #ifdef UNICODE
alias LVM_SETITEMTEXTW LVM_SETITEMTEXT;
// #else
// #...
// #endif

// #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); }

// #if (_WIN32_IE >= 0x0300)

enum : uint { LVSICF_NOINVALIDATEALL = 0x00000001 }
enum : uint { LVSICF_NOSCROLL = 0x00000002 }
// #endif

enum : uint { LVM_SETITEMCOUNT = LVM_FIRST + 47 }
// #define ListView_SetItemCount(hwndLV, cItems) SNDMSG((hwndLV), LVM_SETITEMCOUNT, (WPARAM)(cItems), 0)

// #if (_WIN32_IE >= 0x0300)
// #define ListView_SetItemCountEx(hwndLV, cItems, dwFlags) SNDMSG((hwndLV), LVM_SETITEMCOUNT, (WPARAM)(cItems), (LPARAM)(dwFlags))
// #endif

extern(Windows) alias int function(LPARAM, LPARAM, LPARAM) PFNLVCOMPARE;

enum : uint { LVM_SORTITEMS = LVM_FIRST + 48 }
// #define ListView_SortItems(hwndLV, _pfnCompare, _lPrm) (BOOL)SNDMSG((hwndLV), LVM_SORTITEMS, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))

enum : uint { LVM_SETITEMPOSITION32 = LVM_FIRST + 49 }
// #define ListView_SetItemPosition32(hwndLV, i, x0, y0) { POINT ptNewPos; ptNewPos.x = x0; ptNewPos.y = y0; SNDMSG((hwndLV), LVM_SETITEMPOSITION32, (WPARAM)(int)(i), (LPARAM)&ptNewPos); }

enum : uint { LVM_GETSELECTEDCOUNT = LVM_FIRST + 50 }
// #define ListView_GetSelectedCount(hwndLV) (UINT)SNDMSG((hwndLV), LVM_GETSELECTEDCOUNT, 0, 0L)

enum : uint { LVM_GETITEMSPACING = LVM_FIRST + 51 }
// #define ListView_GetItemSpacing(hwndLV, fSmall) (DWORD)SNDMSG((hwndLV), LVM_GETITEMSPACING, fSmall, 0L)

enum : uint { LVM_GETISEARCHSTRINGA = LVM_FIRST + 52 }
enum : uint { LVM_GETISEARCHSTRINGW = LVM_FIRST + 117 }

// #ifdef UNICODE
alias LVM_GETISEARCHSTRINGW LVM_GETISEARCHSTRING;
// #else
// #...
// #endif

// #define ListView_GetISearchString(hwndLV, lpsz) (BOOL)SNDMSG((hwndLV), LVM_GETISEARCHSTRING, 0, (LPARAM)(LPTSTR)(lpsz))

// #if (_WIN32_IE >= 0x0300)
enum : uint { LVM_SETICONSPACING = LVM_FIRST + 53 }

// #define ListView_SetIconSpacing(hwndLV, cx, cy) (DWORD)SNDMSG((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))

enum : uint { LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54 }
// #define ListView_SetExtendedListViewStyle(hwndLV, dw) (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dw)
// #if (_WIN32_IE >= 0x0400)
// #define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw) (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, dwMask, dw)
// #endif

enum : uint { LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55 }
// #define ListView_GetExtendedListViewStyle(hwndLV) (DWORD)SNDMSG((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)

enum : uint { LVS_EX_GRIDLINES = 0x00000001 }
enum : uint { LVS_EX_SUBITEMIMAGES = 0x00000002 }
enum : uint { LVS_EX_CHECKBOXES = 0x00000004 }
enum : uint { LVS_EX_TRACKSELECT = 0x00000008 }
enum : uint { LVS_EX_HEADERDRAGDROP = 0x00000010 }
enum : uint { LVS_EX_FULLROWSELECT = 0x00000020 }
enum : uint { LVS_EX_ONECLICKACTIVATE = 0x00000040 }
enum : uint { LVS_EX_TWOCLICKACTIVATE = 0x00000080 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { LVS_EX_FLATSB = 0x00000100 }
enum : uint { LVS_EX_REGIONAL = 0x00000200 }
enum : uint { LVS_EX_INFOTIP = 0x00000400 }
enum : uint { LVS_EX_UNDERLINEHOT = 0x00000800 }
enum : uint { LVS_EX_UNDERLINECOLD = 0x00001000 }
enum : uint { LVS_EX_MULTIWORKAREAS = 0x00002000 }
// #endif
// #if (_WIN32_IE >= 0x0500)
enum : uint { LVS_EX_LABELTIP = 0x00004000 }
enum : uint { LVS_EX_BORDERSELECT = 0x00008000 }
// #endif  // End (_WIN32_IE >= 0x0500)
// #if (_WIN32_WINNT >= 0x501)
enum : uint { LVS_EX_DOUBLEBUFFER = 0x00010000 }
enum : uint { LVS_EX_HIDELABELS = 0x00020000 }
enum : uint { LVS_EX_SINGLEROW = 0x00040000 }
enum : uint { LVS_EX_SNAPTOGRID = 0x00080000 }
enum : uint { LVS_EX_SIMPLESELECT = 0x00100000 }
// #endif

enum : uint { LVM_GETSUBITEMRECT = LVM_FIRST + 56 }
// #define ListView_GetSubItemRect(hwnd, iItem, iSubItem, code, prc) (BOOL)SNDMSG((hwnd), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), ((prc) ? ((((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code), (LPARAM)(prc)) : (LPARAM)(LPRECT)NULL))

enum : uint { LVM_SUBITEMHITTEST = LVM_FIRST + 57 }
// #define ListView_SubItemHitTest(hwnd, plvhti) (int)SNDMSG((hwnd), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))

enum : uint { LVM_SETCOLUMNORDERARRAY = LVM_FIRST + 58 }
// #define ListView_SetColumnOrderArray(hwnd, iCount, pi) (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNORDERARRAY, (WPARAM)(iCount), (LPARAM)(LPINT)(pi))

enum : uint { LVM_GETCOLUMNORDERARRAY = LVM_FIRST + 59 }
// #define ListView_GetColumnOrderArray(hwnd, iCount, pi) (BOOL)SNDMSG((hwnd), LVM_GETCOLUMNORDERARRAY, (WPARAM)(iCount), (LPARAM)(LPINT)(pi))

enum : uint { LVM_SETHOTITEM = LVM_FIRST + 60 }
// #define ListView_SetHotItem(hwnd, i) (int)SNDMSG((hwnd), LVM_SETHOTITEM, (WPARAM)(i), 0)

enum : uint { LVM_GETHOTITEM = LVM_FIRST + 61 }
// #define ListView_GetHotItem(hwnd) (int)SNDMSG((hwnd), LVM_GETHOTITEM, 0, 0)

enum : uint { LVM_SETHOTCURSOR = LVM_FIRST + 62 }
// #define ListView_SetHotCursor(hwnd, hcur) (HCURSOR)SNDMSG((hwnd), LVM_SETHOTCURSOR, 0, (LPARAM)(hcur))

enum : uint { LVM_GETHOTCURSOR = LVM_FIRST + 63 }
// #define ListView_GetHotCursor(hwnd) (HCURSOR)SNDMSG((hwnd), LVM_GETHOTCURSOR, 0, 0)

enum : uint { LVM_APPROXIMATEVIEWRECT = LVM_FIRST + 64 }
// #define ListView_ApproximateViewRect(hwnd, iWidth, iHeight, iCount) (DWORD)SNDMSG((hwnd), LVM_APPROXIMATEVIEWRECT, iCount, MAKELPARAM(iWidth, iHeight))
// #endif      // _WIN32_IE >= 0x0300

// #if (_WIN32_IE >= 0x0400)

enum : uint { LV_MAX_WORKAREAS = 16 }
enum : uint { LVM_SETWORKAREAS = LVM_FIRST + 65 }
// #define ListView_SetWorkAreas(hwnd, nWorkAreas, prc) (BOOL)SNDMSG((hwnd), LVM_SETWORKAREAS, (WPARAM)(int)(nWorkAreas), (LPARAM)(RECT *)(prc))

enum : uint { LVM_GETWORKAREAS = LVM_FIRST + 70 }
// #define ListView_GetWorkAreas(hwnd, nWorkAreas, prc) (BOOL)SNDMSG((hwnd), LVM_GETWORKAREAS, (WPARAM)(int)(nWorkAreas), (LPARAM)(RECT *)(prc))

enum : uint { LVM_GETNUMBEROFWORKAREAS = LVM_FIRST + 73 }
// #define ListView_GetNumberOfWorkAreas(hwnd, pnWorkAreas) (BOOL)SNDMSG((hwnd), LVM_GETNUMBEROFWORKAREAS, 0, (LPARAM)(UINT *)(pnWorkAreas))

enum : uint { LVM_GETSELECTIONMARK = LVM_FIRST + 66 }
// #define ListView_GetSelectionMark(hwnd) (int)SNDMSG((hwnd), LVM_GETSELECTIONMARK, 0, 0)

enum : uint { LVM_SETSELECTIONMARK = LVM_FIRST + 67 }
// #define ListView_SetSelectionMark(hwnd, i) (int)SNDMSG((hwnd), LVM_SETSELECTIONMARK, 0, (LPARAM)(i))

enum : uint { LVM_SETHOVERTIME = LVM_FIRST + 71 }
// #define ListView_SetHoverTime(hwndLV, dwHoverTimeMs) (DWORD)SNDMSG((hwndLV), LVM_SETHOVERTIME, 0, (LPARAM)(dwHoverTimeMs))

enum : uint { LVM_GETHOVERTIME = LVM_FIRST + 72 }
// #define ListView_GetHoverTime(hwndLV) (DWORD)SNDMSG((hwndLV), LVM_GETHOVERTIME, 0, 0)

enum : uint { LVM_SETTOOLTIPS = LVM_FIRST + 74 }
// #define ListView_SetToolTips(hwndLV, hwndNewHwnd) (HWND)SNDMSG((hwndLV), LVM_SETTOOLTIPS, (WPARAM)(hwndNewHwnd), 0)

enum : uint { LVM_GETTOOLTIPS = LVM_FIRST + 78 }
// #define ListView_GetToolTips(hwndLV) (HWND)SNDMSG((hwndLV), LVM_GETTOOLTIPS, 0, 0)

enum : uint { LVM_SORTITEMSEX = LVM_FIRST + 81 }
// #define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm) (BOOL)SNDMSG((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))

struct tagLVBKIMAGEA {
  ULONG ulFlags;
  HBITMAP hbm;
  LPSTR pszImage;
  UINT cchImageMax;
  int xOffsetPercent;
  int yOffsetPercent;
}
alias tagLVBKIMAGEA LVBKIMAGEA;
alias tagLVBKIMAGEA* LPLVBKIMAGEA;

struct tagLVBKIMAGEW {
  ULONG ulFlags;
  HBITMAP hbm;
  LPWSTR pszImage;
  UINT cchImageMax;
  int xOffsetPercent;
  int yOffsetPercent;
}
alias tagLVBKIMAGEW LVBKIMAGEW;
alias tagLVBKIMAGEW* LPLVBKIMAGEW;

enum : uint { LVBKIF_SOURCE_NONE = 0x00000000 }
enum : uint { LVBKIF_SOURCE_HBITMAP = 0x00000001 }
enum : uint { LVBKIF_SOURCE_URL = 0x00000002 }
enum : uint { LVBKIF_SOURCE_MASK = 0x00000003 }
enum : uint { LVBKIF_STYLE_NORMAL = 0x00000000 }
enum : uint { LVBKIF_STYLE_TILE = 0x00000010 }
enum : uint { LVBKIF_STYLE_MASK = 0x00000010 }
// #if (_WIN32_WINNT >= 0x501)
enum : uint { LVBKIF_FLAG_TILEOFFSET = 0x00000100 }
enum : uint { LVBKIF_TYPE_WATERMARK = 0x10000000 }
// #endif

enum : uint { LVM_SETBKIMAGEA = LVM_FIRST + 68 }
enum : uint { LVM_SETBKIMAGEW = LVM_FIRST + 138 }
enum : uint { LVM_GETBKIMAGEA = LVM_FIRST + 69 }
enum : uint { LVM_GETBKIMAGEW = LVM_FIRST + 139 }

// #if (_WIN32_WINNT >= 0x501)
enum : uint { LVM_SETSELECTEDCOLUMN = LVM_FIRST + 140 }
// #define ListView_SetSelectedColumn(hwnd, iCol) SNDMSG((hwnd), LVM_SETSELECTEDCOLUMN, (WPARAM)iCol, 0)

enum : uint { LVM_SETTILEWIDTH = LVM_FIRST + 141 }
// #define ListView_SetTileWidth(hwnd, cpWidth) SNDMSG((hwnd), LVM_SETTILEWIDTH, (WPARAM)cpWidth, 0)

enum : uint { LV_VIEW_ICON = 0x0000 }
enum : uint { LV_VIEW_DETAILS = 0x0001 }
enum : uint { LV_VIEW_SMALLICON = 0x0002 }
enum : uint { LV_VIEW_LIST = 0x0003 }
enum : uint { LV_VIEW_TILE = 0x0004 }
enum : uint { LV_VIEW_MAX = 0x0004 }

enum : uint { LVM_SETVIEW = LVM_FIRST + 142 }
// #define ListView_SetView(hwnd, iView) (DWORD)SNDMSG((hwnd), LVM_SETVIEW, (WPARAM)(DWORD)iView, 0)

enum : uint { LVM_GETVIEW = LVM_FIRST + 143 }
// #define ListView_GetView(hwnd) (DWORD)SNDMSG((hwnd), LVM_GETVIEW, 0, 0)

enum : uint { LVGF_NONE = 0x00000000 }
enum : uint { LVGF_HEADER = 0x00000001 }
enum : uint { LVGF_FOOTER = 0x00000002 }
enum : uint { LVGF_STATE = 0x00000004 }
enum : uint { LVGF_ALIGN = 0x00000008 }
enum : uint { LVGF_GROUPID = 0x00000010 }

enum : uint { LVGS_NORMAL = 0x00000000 }
enum : uint { LVGS_COLLAPSED = 0x00000001 }
enum : uint { LVGS_HIDDEN = 0x00000002 }

enum : uint { LVGA_HEADER_LEFT = 0x00000001 }
enum : uint { LVGA_HEADER_CENTER = 0x00000002 }
enum : uint { LVGA_HEADER_RIGHT = 0x00000004 }
enum : uint { LVGA_FOOTER_LEFT = 0x00000008 }
enum : uint { LVGA_FOOTER_CENTER = 0x00000010 }
enum : uint { LVGA_FOOTER_RIGHT = 0x00000020 }

struct tagLVGROUP {
  UINT cbSize;
  UINT mask;
  LPWSTR pszHeader;
  int cchHeader;
  LPWSTR pszFooter;
  int cchFooter;
  int iGroupId;
  UINT stateMask;
  UINT state;
  UINT uAlign;
}
alias tagLVGROUP LVGROUP;
alias tagLVGROUP* PLVGROUP;

enum : uint { LVM_INSERTGROUP = LVM_FIRST + 145 }
// #define ListView_InsertGroup(hwnd, index, pgrp) SNDMSG((hwnd), LVM_INSERTGROUP, (WPARAM)index, (LPARAM)pgrp)

enum : uint { LVM_SETGROUPINFO = LVM_FIRST + 147 }
// #define ListView_SetGroupInfo(hwnd, iGroupId, pgrp) SNDMSG((hwnd), LVM_SETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)

enum : uint { LVM_GETGROUPINFO = LVM_FIRST + 149 }
// #define ListView_GetGroupInfo(hwnd, iGroupId, pgrp) SNDMSG((hwnd), LVM_GETGROUPINFO, (WPARAM)iGroupId, (LPARAM)pgrp)

enum : uint { LVM_REMOVEGROUP = LVM_FIRST + 150 }
// #define ListView_RemoveGroup(hwnd, iGroupId) SNDMSG((hwnd), LVM_REMOVEGROUP, (WPARAM)iGroupId, 0)

enum : uint { LVM_MOVEGROUP = LVM_FIRST + 151 }
// #define ListView_MoveGroup(hwnd, iGroupId, toIndex) SNDMSG((hwnd), LVM_MOVEGROUP, (WPARAM)iGroupId, (LPARAM)toIndex)

enum : uint { LVM_MOVEITEMTOGROUP = LVM_FIRST + 154 }
// #define ListView_MoveItemToGroup(hwnd, idItemFrom, idGroupTo) SNDMSG((hwnd), LVM_MOVEITEMTOGROUP, (WPARAM)idItemFrom, (LPARAM)idGroupTo)

enum : uint { LVGMF_NONE = 0x00000000 }
enum : uint { LVGMF_BORDERSIZE = 0x00000001 }
enum : uint { LVGMF_BORDERCOLOR = 0x00000002 }
enum : uint { LVGMF_TEXTCOLOR = 0x00000004 }

struct tagLVGROUPMETRICS {
  UINT cbSize;
  UINT mask;
  UINT Left;
  UINT Top;
  UINT Right;
  UINT Bottom;
  COLORREF crLeft;
  COLORREF crTop;
  COLORREF crRight;
  COLORREF crBottom;
  COLORREF crHeader;
  COLORREF crFooter;
}
alias tagLVGROUPMETRICS LVGROUPMETRICS;
alias tagLVGROUPMETRICS* PLVGROUPMETRICS;

enum : uint { LVM_SETGROUPMETRICS = LVM_FIRST + 155 }
// #define ListView_SetGroupMetrics(hwnd, pGroupMetrics) SNDMSG((hwnd), LVM_SETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)

enum : uint { LVM_GETGROUPMETRICS = LVM_FIRST + 156 }
// #define ListView_GetGroupMetrics(hwnd, pGroupMetrics) SNDMSG((hwnd), LVM_GETGROUPMETRICS, 0, (LPARAM)pGroupMetrics)

enum : uint { LVM_ENABLEGROUPVIEW = LVM_FIRST + 157 }
// #define ListView_EnableGroupView(hwnd, fEnable) SNDMSG((hwnd), LVM_ENABLEGROUPVIEW, (WPARAM)fEnable, 0)

extern(Windows) alias int function(int, int, void *) PFNLVGROUPCOMPARE;

enum : uint { LVM_SORTGROUPS = LVM_FIRST + 158 }
// #define ListView_SortGroups(hwnd, _pfnGroupCompate, _plv) SNDMSG((hwnd), LVM_SORTGROUPS, (WPARAM)_pfnGroupCompate, (LPARAM)_plv)

struct tagLVINSERTGROUPSORTED {
  PFNLVGROUPCOMPARE pfnGroupCompare;
  void *pvData;
  LVGROUP lvGroup;
}
alias tagLVINSERTGROUPSORTED LVINSERTGROUPSORTED;
alias tagLVINSERTGROUPSORTED* PLVINSERTGROUPSORTED;

enum : uint { LVM_INSERTGROUPSORTED = LVM_FIRST + 159 }
// #define ListView_InsertGroupSorted(hwnd, structInsert) SNDMSG((hwnd), LVM_INSERTGROUPSORTED, (WPARAM)structInsert, 0)

enum : uint { LVM_REMOVEALLGROUPS = LVM_FIRST + 160 }
// #define ListView_RemoveAllGroups(hwnd) SNDMSG((hwnd), LVM_REMOVEALLGROUPS, 0, 0)

enum : uint { LVM_HASGROUP = LVM_FIRST + 161 }
// #define ListView_HasGroup(hwnd, dwGroupId) SNDMSG((hwnd), LVM_HASGROUP, dwGroupId, 0)

enum : uint { LVTVIF_AUTOSIZE = 0x00000000 }
enum : uint { LVTVIF_FIXEDWIDTH = 0x00000001 }
enum : uint { LVTVIF_FIXEDHEIGHT = 0x00000002 }
enum : uint { LVTVIF_FIXEDSIZE = 0x00000003 }

enum : uint { LVTVIM_TILESIZE = 0x00000001 }
enum : uint { LVTVIM_COLUMNS = 0x00000002 }
enum : uint { LVTVIM_LABELMARGIN = 0x00000004 }

struct tagLVTILEVIEWINFO {
  UINT cbSize;
  DWORD dwMask;
  DWORD dwFlags;
  SIZE sizeTile;
  int cLines;
  RECT rcLabelMargin;
}
alias tagLVTILEVIEWINFO LVTILEVIEWINFO;
alias tagLVTILEVIEWINFO* PLVTILEVIEWINFO;

struct tagLVTILEINFO {
  UINT cbSize;
  int iItem;
  UINT cColumns;
  PUINT puColumns;
}
alias tagLVTILEINFO LVTILEINFO;
alias tagLVTILEINFO* PLVTILEINFO;

enum : uint { LVM_SETTILEVIEWINFO = LVM_FIRST + 162 }
// #define ListView_SetTileViewInfo(hwnd, ptvi) SNDMSG((hwnd), LVM_SETTILEVIEWINFO, 0, (LPARAM)ptvi)

enum : uint { LVM_GETTILEVIEWINFO = LVM_FIRST + 163 }
// #define ListView_GetTileViewInfo(hwnd, ptvi) SNDMSG((hwnd), LVM_GETTILEVIEWINFO, 0, (LPARAM)ptvi)

enum : uint { LVM_SETTILEINFO = LVM_FIRST + 164 }
// #define ListView_SetTileInfo(hwnd, pti) SNDMSG((hwnd), LVM_SETTILEINFO, 0, (LPARAM)pti)

enum : uint { LVM_GETTILEINFO = LVM_FIRST + 165 }
// #define ListView_GetTileInfo(hwnd, pti) SNDMSG((hwnd), LVM_GETTILEINFO, 0, (LPARAM)pti)

struct _8 {
  UINT cbSize;
  DWORD dwFlags;
  int iItem;
  DWORD dwReserved;
}
alias _8 LVINSERTMARK;
alias _8* LPLVINSERTMARK;

enum : uint { LVIM_AFTER = 0x00000001 }

enum : uint { LVM_SETINSERTMARK = LVM_FIRST + 166 }
// #define ListView_SetInsertMark(hwnd, lvim) (BOOL)SNDMSG((hwnd), LVM_SETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))

enum : uint { LVM_GETINSERTMARK = LVM_FIRST + 167 }
// #define ListView_GetInsertMark(hwnd, lvim) (BOOL)SNDMSG((hwnd), LVM_GETINSERTMARK, (WPARAM) 0, (LPARAM) (lvim))

enum : uint { LVM_INSERTMARKHITTEST = LVM_FIRST + 168 }
// #define ListView_InsertMarkHitTest(hwnd, point, lvim) (int)SNDMSG((hwnd), LVM_INSERTMARKHITTEST, (WPARAM)(LPPOINT)(point), (LPARAM)(LPLVINSERTMARK)(lvim))

enum : uint { LVM_GETINSERTMARKRECT = LVM_FIRST + 169 }
// #define ListView_GetInsertMarkRect(hwnd, rc) (int)SNDMSG((hwnd), LVM_GETINSERTMARKRECT, (WPARAM)0, (LPARAM)(LPRECT)(rc))

enum : uint { LVM_SETINSERTMARKCOLOR = LVM_FIRST + 170 }
// #define ListView_SetInsertMarkColor(hwnd, color) (COLORREF)SNDMSG((hwnd), LVM_SETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))

enum : uint { LVM_GETINSERTMARKCOLOR = LVM_FIRST + 171 }
// #define ListView_GetInsertMarkColor(hwnd) (COLORREF)SNDMSG((hwnd), LVM_GETINSERTMARKCOLOR, (WPARAM)0, (LPARAM)0)

struct tagLVSETINFOTIP {
  UINT cbSize;
  DWORD dwFlags;
  LPWSTR pszText;
  int iItem;
  int iSubItem;
}
alias tagLVSETINFOTIP LVSETINFOTIP;
alias tagLVSETINFOTIP* PLVSETINFOTIP;

enum : uint { LVM_SETINFOTIP = LVM_FIRST + 173 }

// #define ListView_SetInfoTip(hwndLV, plvInfoTip) (BOOL)SNDMSG((hwndLV), LVM_SETINFOTIP, (WPARAM)0, (LPARAM)plvInfoTip)

enum : uint { LVM_GETSELECTEDCOLUMN = LVM_FIRST + 174 }
// #define ListView_GetSelectedColumn(hwnd) (UINT)SNDMSG((hwnd), LVM_GETSELECTEDCOLUMN, 0, 0)

enum : uint { LVM_ISGROUPVIEWENABLED = LVM_FIRST + 175 }
// #define ListView_IsGroupViewEnabled(hwnd) (BOOL)SNDMSG((hwnd), LVM_ISGROUPVIEWENABLED, 0, 0)

enum : uint { LVM_GETOUTLINECOLOR = LVM_FIRST + 176 }
// #define ListView_GetOutlineColor(hwnd) (COLORREF)SNDMSG((hwnd), LVM_GETOUTLINECOLOR, 0, 0)

enum : uint { LVM_SETOUTLINECOLOR = LVM_FIRST + 177 }
// #define ListView_SetOutlineColor(hwnd, color) (COLORREF)SNDMSG((hwnd), LVM_SETOUTLINECOLOR, (WPARAM)0, (LPARAM)(COLORREF)(color))

enum : uint { LVM_CANCELEDITLABEL = LVM_FIRST + 179 }
// #define ListView_CancelEditLabel(hwnd) (VOID)SNDMSG((hwnd), LVM_CANCELEDITLABEL, (WPARAM)0, (LPARAM)0)

enum : uint { LVM_MAPINDEXTOID = LVM_FIRST + 180 }
// #define ListView_MapIndexToID(hwnd, index) (UINT)SNDMSG((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, (LPARAM)0)

enum : uint { LVM_MAPIDTOINDEX = LVM_FIRST + 181 }
// #define ListView_MapIDToIndex(hwnd, id) (UINT)SNDMSG((hwnd), LVM_MAPIDTOINDEX, (WPARAM)id, (LPARAM)0)

// #endif

// #ifdef UNICODE
alias LVBKIMAGEW LVBKIMAGE;
alias LPLVBKIMAGEW LPLVBKIMAGE;
alias LVM_SETBKIMAGEW LVM_SETBKIMAGE;
alias LVM_GETBKIMAGEW LVM_GETBKIMAGE;
// #else
// #...
// #...
// #...
// #...
// #endif

// #define ListView_SetBkImage(hwnd, plvbki) (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)(plvbki))

// #define ListView_GetBkImage(hwnd, plvbki) (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)(plvbki))

// #endif      // _WIN32_IE >= 0x0400

// #if (_WIN32_IE >= 0x0300)
alias LPNMLISTVIEW LPNM_LISTVIEW;
alias NMLISTVIEW NM_LISTVIEW;
// #else
// #...
// #...
// #...
// #endif

struct tagNMLISTVIEW {
  NMHDR hdr;
  int iItem;
  int iSubItem;
  UINT uNewState;
  UINT uOldState;
  UINT uChanged;
  POINT ptAction;
  LPARAM lParam;
}
alias tagNMLISTVIEW NMLISTVIEW;
alias tagNMLISTVIEW* LPNMLISTVIEW;

// #if (_WIN32_IE >= 0x400)

struct tagNMITEMACTIVATE {
  NMHDR hdr;
  int iItem;
  int iSubItem;
  UINT uNewState;
  UINT uOldState;
  UINT uChanged;
  POINT ptAction;
  LPARAM lParam;
  UINT uKeyFlags;
}
alias tagNMITEMACTIVATE NMITEMACTIVATE;
alias tagNMITEMACTIVATE* LPNMITEMACTIVATE;

enum : uint { LVKF_ALT = 0x0001 }
enum : uint { LVKF_CONTROL = 0x0002 }
enum : uint { LVKF_SHIFT = 0x0004 }
// #endif //(_WIN32_IE >= 0x0400)

// #if (_WIN32_IE >= 0x0300)
// #define NMLVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMLVCUSTOMDRW, clrTextBk)

struct tagNMLVCUSTOMDRAW {
  NMCUSTOMDRAW nmcd;
  COLORREF clrText;
  COLORREF clrTextBk;
// #if (_WIN32_IE >= 0x0400)
  int iSubItem;
// #endif
// #if (_WIN32_WINNT >= 0x501)
  DWORD dwItemType;
  COLORREF clrFace;
  int iIconEffect;
  int iIconPhase;
  int iPartId;
  int iStateId;
  RECT rcText;
  UINT uAlign;
// #endif
}
alias tagNMLVCUSTOMDRAW NMLVCUSTOMDRAW;
alias tagNMLVCUSTOMDRAW* LPNMLVCUSTOMDRAW;

enum : uint { LVCDI_ITEM = 0x00000000 }
enum : uint { LVCDI_GROUP = 0x00000001 }

enum : uint { LVCDRF_NOSELECT = 0x00010000 }
enum : uint { LVCDRF_NOGROUPFRAME = 0x00020000 }

struct tagNMLVCACHEHINT {
  NMHDR hdr;
  int iFrom;
  int iTo;
}
alias tagNMLVCACHEHINT NMLVCACHEHINT;
alias tagNMLVCACHEHINT* LPNMLVCACHEHINT;

alias LPNMLVCACHEHINT LPNM_CACHEHINT;
alias LPNMLVCACHEHINT PNM_CACHEHINT;
alias NMLVCACHEHINT NM_CACHEHINT;

struct tagNMLVFINDITEMA {
  NMHDR hdr;
  int iStart;
  LVFINDINFOA lvfi;
}
alias tagNMLVFINDITEMA NMLVFINDITEMA;
alias tagNMLVFINDITEMA* LPNMLVFINDITEMA;

struct tagNMLVFINDITEMW {
  NMHDR hdr;
  int iStart;
  LVFINDINFOW lvfi;
}
alias tagNMLVFINDITEMW NMLVFINDITEMW;
alias tagNMLVFINDITEMW* LPNMLVFINDITEMW;

alias LPNMLVFINDITEMA PNM_FINDITEMA;
alias LPNMLVFINDITEMA LPNM_FINDITEMA;
alias NMLVFINDITEMA NM_FINDITEMA;

alias LPNMLVFINDITEMW PNM_FINDITEMW;
alias LPNMLVFINDITEMW LPNM_FINDITEMW;
alias NMLVFINDITEMW NM_FINDITEMW;

// #ifdef UNICODE
alias PNM_FINDITEMW PNM_FINDITEM;
alias LPNM_FINDITEMW LPNM_FINDITEM;
alias NM_FINDITEMW NM_FINDITEM;
alias NMLVFINDITEMW NMLVFINDITEM;
alias LPNMLVFINDITEMW LPNMLVFINDITEM;
// #else
// #...
// #...
// #...
// #...
// #...
// #endif

struct tagNMLVODSTATECHANGE {
  NMHDR hdr;
  int iFrom;
  int iTo;
  UINT uNewState;
  UINT uOldState;
}
alias tagNMLVODSTATECHANGE NMLVODSTATECHANGE;
alias tagNMLVODSTATECHANGE* LPNMLVODSTATECHANGE;

alias LPNMLVODSTATECHANGE PNM_ODSTATECHANGE;
alias LPNMLVODSTATECHANGE LPNM_ODSTATECHANGE;
alias NMLVODSTATECHANGE NM_ODSTATECHANGE;
// #endif      // _WIN32_IE >= 0x0300

enum : uint { LVN_ITEMCHANGING = LVN_FIRST-0 }
enum : uint { LVN_ITEMCHANGED = LVN_FIRST-1 }
enum : uint { LVN_INSERTITEM = LVN_FIRST-2 }
enum : uint { LVN_DELETEITEM = LVN_FIRST-3 }
enum : uint { LVN_DELETEALLITEMS = LVN_FIRST-4 }
enum : uint { LVN_BEGINLABELEDITA = LVN_FIRST-5 }
enum : uint { LVN_BEGINLABELEDITW = LVN_FIRST-75 }
enum : uint { LVN_ENDLABELEDITA = LVN_FIRST-6 }
enum : uint { LVN_ENDLABELEDITW = LVN_FIRST-76 }
enum : uint { LVN_COLUMNCLICK = LVN_FIRST-8 }
enum : uint { LVN_BEGINDRAG = LVN_FIRST-9 }
enum : uint { LVN_BEGINRDRAG = LVN_FIRST-11 }

// #if (_WIN32_IE >= 0x0300)
enum : uint { LVN_ODCACHEHINT = LVN_FIRST-13 }
enum : uint { LVN_ODFINDITEMA = LVN_FIRST-52 }
enum : uint { LVN_ODFINDITEMW = LVN_FIRST-79 }

enum : uint { LVN_ITEMACTIVATE = LVN_FIRST-14 }
enum : uint { LVN_ODSTATECHANGED = LVN_FIRST-15 }

// #ifdef UNICODE
alias LVN_ODFINDITEMW LVN_ODFINDITEM;
// #else
// #...
// #endif
// #endif      // _WIN32_IE >= 0x0300

// #if (_WIN32_IE >= 0x0400)
enum : uint { LVN_HOTTRACK = LVN_FIRST-21 }
// #endif

enum : uint { LVN_GETDISPINFOA = LVN_FIRST-50 }
enum : uint { LVN_GETDISPINFOW = LVN_FIRST-77 }
enum : uint { LVN_SETDISPINFOA = LVN_FIRST-51 }
enum : uint { LVN_SETDISPINFOW = LVN_FIRST-78 }

// #ifdef UNICODE
alias LVN_BEGINLABELEDITW LVN_BEGINLABELEDIT;
alias LVN_ENDLABELEDITW LVN_ENDLABELEDIT;
alias LVN_GETDISPINFOW LVN_GETDISPINFO;
alias LVN_SETDISPINFOW LVN_SETDISPINFO;
// #else
// #...
// #...
// #...
// #...
// #endif

enum : uint { LVIF_DI_SETITEM = 0x1000 }

// #if (_WIN32_IE >= 0x0300)
alias NMLVDISPINFOA LV_DISPINFOA;
alias NMLVDISPINFOW LV_DISPINFOW;
// #else
// #...
// #...
// #...
// #...
// #endif

alias NMLVDISPINFO LV_DISPINFO;

struct tagLVDISPINFO {
  NMHDR hdr;
  LVITEMA item;
}
alias tagLVDISPINFO NMLVDISPINFOA;
alias tagLVDISPINFO* LPNMLVDISPINFOA;

struct tagLVDISPINFOW {
  NMHDR hdr;
  LVITEMW item;
}
alias tagLVDISPINFOW NMLVDISPINFOW;
alias tagLVDISPINFOW* LPNMLVDISPINFOW;

// #ifdef UNICODE
alias NMLVDISPINFOW NMLVDISPINFO;
// #else
// #...
// #endif

enum : uint { LVN_KEYDOWN = LVN_FIRST-55 }

// #if (_WIN32_IE >= 0x0300)
alias NMLVKEYDOWN LV_KEYDOWN;
// #else
// #...
// #...
// #endif

// #ifdef _WIN32
align(1):
// #endif

struct tagLVKEYDOWN {
  NMHDR hdr;
  WORD wVKey;
  UINT flags;
}
alias tagLVKEYDOWN NMLVKEYDOWN;
alias tagLVKEYDOWN* LPNMLVKEYDOWN;

// #ifdef _WIN32
align:
// #endif

// #if (_WIN32_IE >= 0x0300)
enum : uint { LVN_MARQUEEBEGIN = LVN_FIRST-56 }
// #endif

// #if (_WIN32_IE >= 0x0400)
struct tagNMLVGETINFOTIPA {
  NMHDR hdr;
  DWORD dwFlags;
  LPSTR pszText;
  int cchTextMax;
  int iItem;
  int iSubItem;
  LPARAM lParam;
}
alias tagNMLVGETINFOTIPA NMLVGETINFOTIPA;
alias tagNMLVGETINFOTIPA* LPNMLVGETINFOTIPA;

struct tagNMLVGETINFOTIPW {
  NMHDR hdr;
  DWORD dwFlags;
  LPWSTR pszText;
  int cchTextMax;
  int iItem;
  int iSubItem;
  LPARAM lParam;
}
alias tagNMLVGETINFOTIPW NMLVGETINFOTIPW;
alias tagNMLVGETINFOTIPW* LPNMLVGETINFOTIPW;

enum : uint { LVGIT_UNFOLDED = 0x0001 }

enum : uint { LVN_GETINFOTIPA = LVN_FIRST-57 }
enum : uint { LVN_GETINFOTIPW = LVN_FIRST-58 }

// #ifdef UNICODE
alias LVN_GETINFOTIPW LVN_GETINFOTIP;
alias NMLVGETINFOTIPW NMLVGETINFOTIP;
alias LPNMLVGETINFOTIPW LPNMLVGETINFOTIP;
// #else
// #...
// #...
// #...
// #endif

// #endif      // _WIN32_IE >= 0x0400

// #if (_WIN32_WINNT >= 0x501)
struct tagNMLVSCROLL {
  NMHDR hdr;
  int dx;
  int dy;
}
alias tagNMLVSCROLL NMLVSCROLL;
alias tagNMLVSCROLL* LPNMLVSCROLL;

enum : uint { LVN_BEGINSCROLL = LVN_FIRST-80 }
enum : uint { LVN_ENDSCROLL = LVN_FIRST-81 }
// #endif

// #endif // NOLISTVIEW

// #ifndef NOTREEVIEW

// #ifdef _WIN32
const char[] WC_TREEVIEWA = "SysTreeView32";
const wchar[] WC_TREEVIEWW = "SysTreeView32";

// #ifdef UNICODE
alias WC_TREEVIEWW WC_TREEVIEW;
// #else
// #...
// #endif

// #else
// #...
// #endif

enum : uint { TVS_HASBUTTONS = 0x0001 }
enum : uint { TVS_HASLINES = 0x0002 }
enum : uint { TVS_LINESATROOT = 0x0004 }
enum : uint { TVS_EDITLABELS = 0x0008 }
enum : uint { TVS_DISABLEDRAGDROP = 0x0010 }
enum : uint { TVS_SHOWSELALWAYS = 0x0020 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TVS_RTLREADING = 0x0040 }

enum : uint { TVS_NOTOOLTIPS = 0x0080 }
enum : uint { TVS_CHECKBOXES = 0x0100 }
enum : uint { TVS_TRACKSELECT = 0x0200 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { TVS_SINGLEEXPAND = 0x0400 }
enum : uint { TVS_INFOTIP = 0x0800 }
enum : uint { TVS_FULLROWSELECT = 0x1000 }
enum : uint { TVS_NOSCROLL = 0x2000 }
enum : uint { TVS_NONEVENHEIGHT = 0x4000 }
// #endif
// #if (_WIN32_IE >= 0x500)
enum : uint { TVS_NOHSCROLL = 0x8000 }
// #endif
// #endif

alias _TREEITEM* HTREEITEM;

enum : uint { TVIF_TEXT = 0x0001 }
enum : uint { TVIF_IMAGE = 0x0002 }
enum : uint { TVIF_PARAM = 0x0004 }
enum : uint { TVIF_STATE = 0x0008 }
enum : uint { TVIF_HANDLE = 0x0010 }
enum : uint { TVIF_SELECTEDIMAGE = 0x0020 }
enum : uint { TVIF_CHILDREN = 0x0040 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { TVIF_INTEGRAL = 0x0080 }
// #endif
enum : uint { TVIS_SELECTED = 0x0002 }
enum : uint { TVIS_CUT = 0x0004 }
enum : uint { TVIS_DROPHILITED = 0x0008 }
enum : uint { TVIS_BOLD = 0x0010 }
enum : uint { TVIS_EXPANDED = 0x0020 }
enum : uint { TVIS_EXPANDEDONCE = 0x0040 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TVIS_EXPANDPARTIAL = 0x0080 }
// #endif

enum : uint { TVIS_OVERLAYMASK = 0x0F00 }
enum : uint { TVIS_STATEIMAGEMASK = 0xF000 }
enum : uint { TVIS_USERMASK = 0xF000 }

enum { I_CHILDRENCALLBACK = -1 }

// #if (_WIN32_IE >= 0x0300)
alias LPTVITEMW LPTV_ITEMW;
alias LPTVITEMA LPTV_ITEMA;
alias TVITEMW TV_ITEMW;
alias TVITEMA TV_ITEMA;
// #else
// #...
// #...
// #...
// #...
// #...
// #...
// #endif

alias LPTVITEM LPTV_ITEM;
alias TVITEM TV_ITEM;

struct tagTVITEMA {
  UINT mask;
  HTREEITEM hItem;
  UINT state;
  UINT stateMask;
  LPSTR pszText;
  int cchTextMax;
  int iImage;
  int iSelectedImage;
  int cChildren;
  LPARAM lParam;
}
alias tagTVITEMA TVITEMA;
alias tagTVITEMA* LPTVITEMA;

struct tagTVITEMW {
  UINT mask;
  HTREEITEM hItem;
  UINT state;
  UINT stateMask;
  LPWSTR pszText;
  int cchTextMax;
  int iImage;
  int iSelectedImage;
  int cChildren;
  LPARAM lParam;
}
alias tagTVITEMW TVITEMW;
alias tagTVITEMW* LPTVITEMW;

// #if (_WIN32_IE >= 0x0400)

struct tagTVITEMEXA {
  UINT mask;
  HTREEITEM hItem;
  UINT state;
  UINT stateMask;
  LPSTR pszText;
  int cchTextMax;
  int iImage;
  int iSelectedImage;
  int cChildren;
  LPARAM lParam;
  int iIntegral;
}
alias tagTVITEMEXA TVITEMEXA;
alias tagTVITEMEXA* LPTVITEMEXA;

struct tagTVITEMEXW {
  UINT mask;
  HTREEITEM hItem;
  UINT state;
  UINT stateMask;
  LPWSTR pszText;
  int cchTextMax;
  int iImage;
  int iSelectedImage;
  int cChildren;
  LPARAM lParam;
  int iIntegral;
}
alias tagTVITEMEXW TVITEMEXW;
alias tagTVITEMEXW* LPTVITEMEXW;

// #ifdef UNICODE
alias TVITEMEXW TVITEMEX;
alias LPTVITEMEXW LPTVITEMEX;
// #else
// ...
// #endif // UNICODE

// #endif

// #ifdef UNICODE
alias TVITEMW TVITEM;
alias LPTVITEMW LPTVITEM;
// #else
// #...
// #...
// #endif

const HTREEITEM TVI_ROOT = cast(HTREEITEM)(-0x10000);
const HTREEITEM TVI_FIRST = cast(HTREEITEM)(-0x0FFFF);
const HTREEITEM TVI_LAST = cast(HTREEITEM)(-0x0FFFE);
const HTREEITEM TVI_SORT = cast(HTREEITEM)(-0x0FFFD);

// #if (_WIN32_IE >= 0x0300)
alias LPTVINSERTSTRUCTA LPTV_INSERTSTRUCTA;
alias LPTVINSERTSTRUCTW LPTV_INSERTSTRUCTW;
alias TVINSERTSTRUCTA TV_INSERTSTRUCTA;
alias TVINSERTSTRUCTW TV_INSERTSTRUCTW;
// #else
// #...
// #...
// #...
// #...
// #...
// #...
// #endif

alias TVINSERTSTRUCT TV_INSERTSTRUCT;
alias LPTVINSERTSTRUCT LPTV_INSERTSTRUCT;

// #define TVINSERTSTRUCTA_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTA, item)
// #define TVINSERTSTRUCTW_V1_SIZE CCSIZEOF_STRUCT(TVINSERTSTRUCTW, item)

struct tagTVINSERTSTRUCTA {
  HTREEITEM hParent;
  HTREEITEM hInsertAfter;
// #if (_WIN32_IE >= 0x0400)
union {
  TVITEMEXA itemex;
  TV_ITEMA item;
}

// #else
// ...
// #endif
}
alias tagTVINSERTSTRUCTA TVINSERTSTRUCTA;
alias tagTVINSERTSTRUCTA* LPTVINSERTSTRUCTA;

struct tagTVINSERTSTRUCTW {
  HTREEITEM hParent;
  HTREEITEM hInsertAfter;
// #if (_WIN32_IE >= 0x0400)
union {
  TVITEMEXW itemex;
  TV_ITEMW item;
}

// #else
// ...
// #endif
}
alias tagTVINSERTSTRUCTW TVINSERTSTRUCTW;
alias tagTVINSERTSTRUCTW* LPTVINSERTSTRUCTW;

// #ifdef UNICODE
alias TVINSERTSTRUCTW TVINSERTSTRUCT;
alias LPTVINSERTSTRUCTW LPTVINSERTSTRUCT;
// #define TVINSERTSTRUCT_V1_SIZE TVINSERTSTRUCTW_V1_SIZE
// #else
// #...
// #...
// #...
// #endif

enum : uint { TVM_INSERTITEMA = TV_FIRST + 0 }
enum : uint { TVM_INSERTITEMW = TV_FIRST + 50 }
// #ifdef UNICODE
alias TVM_INSERTITEMW TVM_INSERTITEM;
// #else
// #...
// #endif

// #define TreeView_InsertItem(hwnd, lpis) (HTREEITEM)SNDMSG((hwnd), TVM_INSERTITEM, 0, (LPARAM)(LPTV_INSERTSTRUCT)(lpis))

enum : uint { TVM_DELETEITEM = TV_FIRST + 1 }
// #define TreeView_DeleteItem(hwnd, hitem) (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hitem))

// #define TreeView_DeleteAllItems(hwnd) (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)

enum : uint { TVM_EXPAND = TV_FIRST + 2 }
// #define TreeView_Expand(hwnd, hitem, code) (BOOL)SNDMSG((hwnd), TVM_EXPAND, (WPARAM)(code), (LPARAM)(HTREEITEM)(hitem))

enum : uint { TVE_COLLAPSE = 0x0001 }
enum : uint { TVE_EXPAND = 0x0002 }
enum : uint { TVE_TOGGLE = 0x0003 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TVE_EXPANDPARTIAL = 0x4000 }
// #endif
enum : uint { TVE_COLLAPSERESET = 0x8000 }

enum : uint { TVM_GETITEMRECT = TV_FIRST + 4 }
// #define TreeView_GetItemRect(hwnd, hitem, prc, code) (*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSG((hwnd), TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))

enum : uint { TVM_GETCOUNT = TV_FIRST + 5 }
// #define TreeView_GetCount(hwnd) (UINT)SNDMSG((hwnd), TVM_GETCOUNT, 0, 0)

enum : uint { TVM_GETINDENT = TV_FIRST + 6 }
// #define TreeView_GetIndent(hwnd) (UINT)SNDMSG((hwnd), TVM_GETINDENT, 0, 0)

enum : uint { TVM_SETINDENT = TV_FIRST + 7 }
// #define TreeView_SetIndent(hwnd, indent) (BOOL)SNDMSG((hwnd), TVM_SETINDENT, (WPARAM)(indent), 0)

enum : uint { TVM_GETIMAGELIST = TV_FIRST + 8 }
// #define TreeView_GetImageList(hwnd, iImage) (HIMAGELIST)SNDMSG((hwnd), TVM_GETIMAGELIST, iImage, 0)

enum : uint { TVSIL_NORMAL = 0 }
enum : uint { TVSIL_STATE = 2 }

enum : uint { TVM_SETIMAGELIST = TV_FIRST + 9 }
// #define TreeView_SetImageList(hwnd, himl, iImage) (HIMAGELIST)SNDMSG((hwnd), TVM_SETIMAGELIST, iImage, (LPARAM)(HIMAGELIST)(himl))

enum : uint { TVM_GETNEXTITEM = TV_FIRST + 10 }
// #define TreeView_GetNextItem(hwnd, hitem, code) (HTREEITEM)SNDMSG((hwnd), TVM_GETNEXTITEM, (WPARAM)(code), (LPARAM)(HTREEITEM)(hitem))

enum : uint { TVGN_ROOT = 0x0000 }
enum : uint { TVGN_NEXT = 0x0001 }
enum : uint { TVGN_PREVIOUS = 0x0002 }
enum : uint { TVGN_PARENT = 0x0003 }
enum : uint { TVGN_CHILD = 0x0004 }
enum : uint { TVGN_FIRSTVISIBLE = 0x0005 }
enum : uint { TVGN_NEXTVISIBLE = 0x0006 }
enum : uint { TVGN_PREVIOUSVISIBLE = 0x0007 }
enum : uint { TVGN_DROPHILITE = 0x0008 }
enum : uint { TVGN_CARET = 0x0009 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { TVGN_LASTVISIBLE = 0x000A }
// #endif      // _WIN32_IE >= 0x0400

// #if (_WIN32_WINNT >= 0x501)
enum : uint { TVSI_NOSINGLEEXPAND = 0x8000 }
// #endif

// #define TreeView_GetChild(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_CHILD)
// #define TreeView_GetNextSibling(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_NEXT)
// #define TreeView_GetPrevSibling(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_PREVIOUS)
// #define TreeView_GetParent(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_PARENT)
// #define TreeView_GetFirstVisible(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
// #define TreeView_GetNextVisible(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_NEXTVISIBLE)
// #define TreeView_GetPrevVisible(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_PREVIOUSVISIBLE)
// #define TreeView_GetSelection(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
// #define TreeView_GetDropHilight(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
// #define TreeView_GetRoot(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
// #if (_WIN32_IE >= 0x0400)
// #define TreeView_GetLastVisible(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
// #endif      // _WIN32_IE >= 0x0400

enum : uint { TVM_SELECTITEM = TV_FIRST + 11 }
// #define TreeView_Select(hwnd, hitem, code) (BOOL)SNDMSG((hwnd), TVM_SELECTITEM, (WPARAM)(code), (LPARAM)(HTREEITEM)(hitem))

// #define TreeView_SelectItem(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_CARET)
// #define TreeView_SelectDropTarget(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
// #define TreeView_SelectSetFirstVisible(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)

enum : uint { TVM_GETITEMA = TV_FIRST + 12 }
enum : uint { TVM_GETITEMW = TV_FIRST + 62 }

// #ifdef UNICODE
alias TVM_GETITEMW TVM_GETITEM;
// #else
// #...
// #endif

// #define TreeView_GetItem(hwnd, pitem) (BOOL)SNDMSG((hwnd), TVM_GETITEM, 0, (LPARAM)(TV_ITEM *)(pitem))

enum : uint { TVM_SETITEMA = TV_FIRST + 13 }
enum : uint { TVM_SETITEMW = TV_FIRST + 63 }

// #ifdef UNICODE
alias TVM_SETITEMW TVM_SETITEM;
// #else
// #...
// #endif

// #define TreeView_SetItem(hwnd, pitem) (BOOL)SNDMSG((hwnd), TVM_SETITEM, 0, (LPARAM)(const TV_ITEM *)(pitem))

enum : uint { TVM_EDITLABELA = TV_FIRST + 14 }
enum : uint { TVM_EDITLABELW = TV_FIRST + 65 }
// #ifdef UNICODE
alias TVM_EDITLABELW TVM_EDITLABEL;
// #else
// #...
// #endif

// #define TreeView_EditLabel(hwnd, hitem) (HWND)SNDMSG((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))

enum : uint { TVM_GETEDITCONTROL = TV_FIRST + 15 }
// #define TreeView_GetEditControl(hwnd) (HWND)SNDMSG((hwnd), TVM_GETEDITCONTROL, 0, 0)

enum : uint { TVM_GETVISIBLECOUNT = TV_FIRST + 16 }
// #define TreeView_GetVisibleCount(hwnd) (UINT)SNDMSG((hwnd), TVM_GETVISIBLECOUNT, 0, 0)

enum : uint { TVM_HITTEST = TV_FIRST + 17 }
// #define TreeView_HitTest(hwnd, lpht) (HTREEITEM)SNDMSG((hwnd), TVM_HITTEST, 0, (LPARAM)(LPTV_HITTESTINFO)(lpht))

// #if (_WIN32_IE >= 0x0300)
alias LPTVHITTESTINFO LPTV_HITTESTINFO;
alias TVHITTESTINFO TV_HITTESTINFO;
// #else
// #...
// #...
// #...
// #endif

struct tagTVHITTESTINFO {
  POINT pt;
  UINT flags;
  HTREEITEM hItem;
}
alias tagTVHITTESTINFO TVHITTESTINFO;
alias tagTVHITTESTINFO* LPTVHITTESTINFO;

enum : uint { TVHT_NOWHERE = 0x0001 }
enum : uint { TVHT_ONITEMICON = 0x0002 }
enum : uint { TVHT_ONITEMLABEL = 0x0004 }
enum : uint { TVHT_ONITEM = TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON }
enum : uint { TVHT_ONITEMINDENT = 0x0008 }
enum : uint { TVHT_ONITEMBUTTON = 0x0010 }
enum : uint { TVHT_ONITEMRIGHT = 0x0020 }
// #define TVHT_ONITEMSTATEICON 0x0040

enum : uint { TVHT_ABOVE = 0x0100 }
enum : uint { TVHT_BELOW = 0x0200 }
enum : uint { TVHT_TORIGHT = 0x0400 }
enum : uint { TVHT_TOLEFT = 0x0800 }

enum : uint { TVM_CREATEDRAGIMAGE = TV_FIRST + 18 }
// #define TreeView_CreateDragImage(hwnd, hitem) (HIMAGELIST)SNDMSG((hwnd), TVM_CREATEDRAGIMAGE, 0, (LPARAM)(HTREEITEM)(hitem))

enum : uint { TVM_SORTCHILDREN = TV_FIRST + 19 }
// #define TreeView_SortChildren(hwnd, hitem, recurse) (BOOL)SNDMSG((hwnd), TVM_SORTCHILDREN, (WPARAM)(recurse), (LPARAM)(HTREEITEM)(hitem))

enum : uint { TVM_ENSUREVISIBLE = TV_FIRST + 20 }
// #define TreeView_EnsureVisible(hwnd, hitem) (BOOL)SNDMSG((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(HTREEITEM)(hitem))

enum : uint { TVM_SORTCHILDRENCB = TV_FIRST + 21 }
// #define TreeView_SortChildrenCB(hwnd, psort, recurse) (BOOL)SNDMSG((hwnd), TVM_SORTCHILDRENCB, (WPARAM)(recurse), (LPARAM)(LPTV_SORTCB)(psort))

enum : uint { TVM_ENDEDITLABELNOW = TV_FIRST + 22 }
// #define TreeView_EndEditLabelNow(hwnd, fCancel) (BOOL)SNDMSG((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)(fCancel), 0)

enum : uint { TVM_GETISEARCHSTRINGA = TV_FIRST + 23 }
enum : uint { TVM_GETISEARCHSTRINGW = TV_FIRST + 64 }

// #ifdef UNICODE
alias TVM_GETISEARCHSTRINGW TVM_GETISEARCHSTRING;
// #else
// #...
// #endif

// #if (_WIN32_IE >= 0x0300)
enum : uint { TVM_SETTOOLTIPS = TV_FIRST + 24 }
// #define TreeView_SetToolTips(hwnd, hwndTT) (HWND)SNDMSG((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
enum : uint { TVM_GETTOOLTIPS = TV_FIRST + 25 }
// #define TreeView_GetToolTips(hwnd) (HWND)SNDMSG((hwnd), TVM_GETTOOLTIPS, 0, 0)
// #endif

// #define TreeView_GetISearchString(hwndTV, lpsz) (BOOL)SNDMSG((hwndTV), TVM_GETISEARCHSTRING, 0, (LPARAM)(LPTSTR)(lpsz))

// #if (_WIN32_IE >= 0x0400)
enum : uint { TVM_SETINSERTMARK = TV_FIRST + 26 }
// #define TreeView_SetInsertMark(hwnd, hItem, fAfter) (BOOL)SNDMSG((hwnd), TVM_SETINSERTMARK, (WPARAM) (fAfter), (LPARAM) (hItem))

alias CCM_SETUNICODEFORMAT TVM_SETUNICODEFORMAT;
// #define TreeView_SetUnicodeFormat(hwnd, fUnicode) (BOOL)SNDMSG((hwnd), TVM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)

alias CCM_GETUNICODEFORMAT TVM_GETUNICODEFORMAT;
// #define TreeView_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd), TVM_GETUNICODEFORMAT, 0, 0)

// #endif

// #if (_WIN32_IE >= 0x0400)
enum : uint { TVM_SETITEMHEIGHT = TV_FIRST + 27 }
// #define TreeView_SetItemHeight(hwnd, iHeight) (int)SNDMSG((hwnd), TVM_SETITEMHEIGHT, (WPARAM)(iHeight), 0)
enum : uint { TVM_GETITEMHEIGHT = TV_FIRST + 28 }
// #define TreeView_GetItemHeight(hwnd) (int)SNDMSG((hwnd), TVM_GETITEMHEIGHT, 0, 0)

enum : uint { TVM_SETBKCOLOR = TV_FIRST + 29 }
// #define TreeView_SetBkColor(hwnd, clr) (COLORREF)SNDMSG((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)(clr))

enum : uint { TVM_SETTEXTCOLOR = TV_FIRST + 30 }
// #define TreeView_SetTextColor(hwnd, clr) (COLORREF)SNDMSG((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)(clr))

enum : uint { TVM_GETBKCOLOR = TV_FIRST + 31 }
// #define TreeView_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd), TVM_GETBKCOLOR, 0, 0)

enum : uint { TVM_GETTEXTCOLOR = TV_FIRST + 32 }
// #define TreeView_GetTextColor(hwnd) (COLORREF)SNDMSG((hwnd), TVM_GETTEXTCOLOR, 0, 0)

enum : uint { TVM_SETSCROLLTIME = TV_FIRST + 33 }
// #define TreeView_SetScrollTime(hwnd, uTime) (UINT)SNDMSG((hwnd), TVM_SETSCROLLTIME, uTime, 0)

enum : uint { TVM_GETSCROLLTIME = TV_FIRST + 34 }
// #define TreeView_GetScrollTime(hwnd) (UINT)SNDMSG((hwnd), TVM_GETSCROLLTIME, 0, 0)

enum : uint { TVM_SETINSERTMARKCOLOR = TV_FIRST + 37 }
// #define TreeView_SetInsertMarkColor(hwnd, clr) (COLORREF)SNDMSG((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)(clr))
enum : uint { TVM_GETINSERTMARKCOLOR = TV_FIRST + 38 }
// #define TreeView_GetInsertMarkColor(hwnd) (COLORREF)SNDMSG((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)

// #endif  /* (_WIN32_IE >= 0x0400) */

// #if (_WIN32_IE >= 0x0500)

// #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); }

// #define TreeView_SetCheckState(hwndTV, hti, fCheck) TreeView_SetItemState(hwndTV, hti, INDEXTOSTATEIMAGEMASK((fCheck)?2:1), TVIS_STATEIMAGEMASK)

enum : uint { TVM_GETITEMSTATE = TV_FIRST + 39 }
// #define TreeView_GetItemState(hwndTV, hti, mask) (UINT)SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))

// #define TreeView_GetCheckState(hwndTV, hti) ((((UINT)(SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), TVIS_STATEIMAGEMASK))) >> 12) -1)

enum : uint { TVM_SETLINECOLOR = TV_FIRST + 40 }
// #define TreeView_SetLineColor(hwnd, clr) (COLORREF)SNDMSG((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))

enum : uint { TVM_GETLINECOLOR = TV_FIRST + 41 }
// #define TreeView_GetLineColor(hwnd) (COLORREF)SNDMSG((hwnd), TVM_GETLINECOLOR, 0, 0)

// #endif

// #if (_WIN32_WINNT >= 0x0501)
enum : uint { TVM_MAPACCIDTOHTREEITEM = TV_FIRST + 42 }
// #define TreeView_MapAccIDToHTREEITEM(hwnd, id) (HTREEITEM)SNDMSG((hwnd), TVM_MAPACCIDTOHTREEITEM, id, 0)

enum : uint { TVM_MAPHTREEITEMTOACCID = TV_FIRST + 43 }
// #define TreeView_MapHTREEITEMToAccID(hwnd, htreeitem) (UINT)SNDMSG((hwnd), TVM_MAPHTREEITEMTOACCID, (WPARAM)htreeitem, 0)

// #endif

extern(Windows) alias int function(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) PFNTVCOMPARE;

// #if (_WIN32_IE >= 0x0300)
alias LPTVSORTCB LPTV_SORTCB;
alias TVSORTCB TV_SORTCB;
// #else
// #...
// #...
// #...
// #endif

struct tagTVSORTCB {
  HTREEITEM hParent;
  PFNTVCOMPARE lpfnCompare;
  LPARAM lParam;
}
alias tagTVSORTCB TVSORTCB;
alias tagTVSORTCB* LPTVSORTCB;

// #if (_WIN32_IE >= 0x0300)
alias LPNMTREEVIEWA LPNM_TREEVIEWA;
alias LPNMTREEVIEWW LPNM_TREEVIEWW;
alias NMTREEVIEWW NM_TREEVIEWW;
alias NMTREEVIEWA NM_TREEVIEWA;
// #else
// #...
// #...
// #...
// #...
// #...
// #...
// #endif

alias LPNMTREEVIEW LPNM_TREEVIEW;
alias NMTREEVIEW NM_TREEVIEW;

struct tagNMTREEVIEWA {
  NMHDR hdr;
  UINT action;
  TVITEMA itemOld;
  TVITEMA itemNew;
  POINT ptDrag;
}
alias tagNMTREEVIEWA NMTREEVIEWA;
alias tagNMTREEVIEWA* LPNMTREEVIEWA;

struct tagNMTREEVIEWW {
  NMHDR hdr;
  UINT action;
  TVITEMW itemOld;
  TVITEMW itemNew;
  POINT ptDrag;
}
alias tagNMTREEVIEWW NMTREEVIEWW;
alias tagNMTREEVIEWW* LPNMTREEVIEWW;

// #ifdef UNICODE
alias NMTREEVIEWW NMTREEVIEW;
alias LPNMTREEVIEWW LPNMTREEVIEW;
// #else
// #...
// #...
// #endif

enum : uint { TVN_SELCHANGINGA = TVN_FIRST-1 }
enum : uint { TVN_SELCHANGINGW = TVN_FIRST-50 }
enum : uint { TVN_SELCHANGEDA = TVN_FIRST-2 }
enum : uint { TVN_SELCHANGEDW = TVN_FIRST-51 }

enum : uint { TVC_UNKNOWN = 0x0000 }
enum : uint { TVC_BYMOUSE = 0x0001 }
enum : uint { TVC_BYKEYBOARD = 0x0002 }

enum : uint { TVN_GETDISPINFOA = TVN_FIRST-3 }
enum : uint { TVN_GETDISPINFOW = TVN_FIRST-52 }
enum : uint { TVN_SETDISPINFOA = TVN_FIRST-4 }
enum : uint { TVN_SETDISPINFOW = TVN_FIRST-53 }

enum : uint { TVIF_DI_SETITEM = 0x1000 }

// #if (_WIN32_IE >= 0x0300)
alias NMTVDISPINFOA TV_DISPINFOA;
alias NMTVDISPINFOW TV_DISPINFOW;
// #else
// #...
// #...
// #...
// #...
// #endif

alias NMTVDISPINFO TV_DISPINFO;

struct tagTVDISPINFOA {
  NMHDR hdr;
  TVITEMA item;
}
alias tagTVDISPINFOA NMTVDISPINFOA;
alias tagTVDISPINFOA* LPNMTVDISPINFOA;

struct tagTVDISPINFOW {
  NMHDR hdr;
  TVITEMW item;
}
alias tagTVDISPINFOW NMTVDISPINFOW;
alias tagTVDISPINFOW* LPNMTVDISPINFOW;

// #ifdef UNICODE
alias NMTVDISPINFOW NMTVDISPINFO;
alias LPNMTVDISPINFOW LPNMTVDISPINFO;
// #else
// #...
// #...
// #endif

enum : uint { TVN_ITEMEXPANDINGA = TVN_FIRST-5 }
enum : uint { TVN_ITEMEXPANDINGW = TVN_FIRST-54 }
enum : uint { TVN_ITEMEXPANDEDA = TVN_FIRST-6 }
enum : uint { TVN_ITEMEXPANDEDW = TVN_FIRST-55 }
enum : uint { TVN_BEGINDRAGA = TVN_FIRST-7 }
enum : uint { TVN_BEGINDRAGW = TVN_FIRST-56 }
enum : uint { TVN_BEGINRDRAGA = TVN_FIRST-8 }
enum : uint { TVN_BEGINRDRAGW = TVN_FIRST-57 }
enum : uint { TVN_DELETEITEMA = TVN_FIRST-9 }
enum : uint { TVN_DELETEITEMW = TVN_FIRST-58 }
enum : uint { TVN_BEGINLABELEDITA = TVN_FIRST-10 }
enum : uint { TVN_BEGINLABELEDITW = TVN_FIRST-59 }
enum : uint { TVN_ENDLABELEDITA = TVN_FIRST-11 }
enum : uint { TVN_ENDLABELEDITW = TVN_FIRST-60 }
enum : uint { TVN_KEYDOWN = TVN_FIRST-12 }

// #if (_WIN32_IE >= 0x0400)
enum : uint { TVN_GETINFOTIPA = TVN_FIRST-13 }
enum : uint { TVN_GETINFOTIPW = TVN_FIRST-14 }
enum : uint { TVN_SINGLEEXPAND = TVN_FIRST-15 }

enum : uint { TVNRET_DEFAULT = 0 }
enum : uint { TVNRET_SKIPOLD = 1 }
enum : uint { TVNRET_SKIPNEW = 2 }

// #endif // 0x400

// #if (_WIN32_IE >= 0x0300)
alias NMTVKEYDOWN TV_KEYDOWN;
// #else
// #...
// #...
// #endif

// #ifdef _WIN32
align(1):
// #endif

struct tagTVKEYDOWN {
  NMHDR hdr;
  WORD wVKey;
  UINT flags;
}
alias tagTVKEYDOWN NMTVKEYDOWN;
alias tagTVKEYDOWN* LPNMTVKEYDOWN;

// #ifdef _WIN32
align:
// #endif

// #ifdef UNICODE
alias TVN_SELCHANGINGW TVN_SELCHANGING;
alias TVN_SELCHANGEDW TVN_SELCHANGED;
alias TVN_GETDISPINFOW TVN_GETDISPINFO;
alias TVN_SETDISPINFOW TVN_SETDISPINFO;
alias TVN_ITEMEXPANDINGW TVN_ITEMEXPANDING;
alias TVN_ITEMEXPANDEDW TVN_ITEMEXPANDED;
alias TVN_BEGINDRAGW TVN_BEGINDRAG;
alias TVN_BEGINRDRAGW TVN_BEGINRDRAG;
alias TVN_DELETEITEMW TVN_DELETEITEM;
alias TVN_BEGINLABELEDITW TVN_BEGINLABELEDIT;
alias TVN_ENDLABELEDITW TVN_ENDLABELEDIT;
// #else
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #endif

// #if (_WIN32_IE >= 0x0300)
// #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW, clrTextBk)

struct tagNMTVCUSTOMDRAW {
  NMCUSTOMDRAW nmcd;
  COLORREF clrText;
  COLORREF clrTextBk;
// #if (_WIN32_IE >= 0x0400)
  int iLevel;
// #endif
}
alias tagNMTVCUSTOMDRAW NMTVCUSTOMDRAW;
alias tagNMTVCUSTOMDRAW* LPNMTVCUSTOMDRAW;

// #endif

// #if (_WIN32_IE >= 0x0400)

struct tagNMTVGETINFOTIPA {
  NMHDR hdr;
  LPSTR pszText;
  int cchTextMax;
  HTREEITEM hItem;
  LPARAM lParam;
}
alias tagNMTVGETINFOTIPA NMTVGETINFOTIPA;
alias tagNMTVGETINFOTIPA* LPNMTVGETINFOTIPA;

struct tagNMTVGETINFOTIPW {
  NMHDR hdr;
  LPWSTR pszText;
  int cchTextMax;
  HTREEITEM hItem;
  LPARAM lParam;
}
alias tagNMTVGETINFOTIPW NMTVGETINFOTIPW;
alias tagNMTVGETINFOTIPW* LPNMTVGETINFOTIPW;

// #ifdef UNICODE
alias TVN_GETINFOTIPW TVN_GETINFOTIP;
alias NMTVGETINFOTIPW NMTVGETINFOTIP;
alias LPNMTVGETINFOTIPW LPNMTVGETINFOTIP;
// #else
// #...
// #...
// #...
// #endif

enum : uint { TVCDRF_NOIMAGES = 0x00010000 }

// #endif      // _WIN32_IE >= 0x0400

// #endif      // NOTREEVIEW

// #if (_WIN32_IE >= 0x0300)

// #ifndef NOUSEREXCONTROLS

const wchar[] WC_COMBOBOXEXW = "ComboBoxEx32";
const char[] WC_COMBOBOXEXA = "ComboBoxEx32";

// #ifdef UNICODE
alias WC_COMBOBOXEXW WC_COMBOBOXEX;
// #else
// #...
// #endif

enum : uint { CBEIF_TEXT = 0x00000001 }
enum : uint { CBEIF_IMAGE = 0x00000002 }
enum : uint { CBEIF_SELECTEDIMAGE = 0x00000004 }
enum : uint { CBEIF_OVERLAY = 0x00000008 }
enum : uint { CBEIF_INDENT = 0x00000010 }
enum : uint { CBEIF_LPARAM = 0x00000020 }

enum : uint { CBEIF_DI_SETITEM = 0x10000000 }

struct tagCOMBOBOXEXITEMA {
  UINT mask;
  INT_PTR iItem;
  LPSTR pszText;
  int cchTextMax;
  int iImage;
  int iSelectedImage;
  int iOverlay;
  int iIndent;
  LPARAM lParam;
}
alias tagCOMBOBOXEXITEMA COMBOBOXEXITEMA;
alias tagCOMBOBOXEXITEMA* PCOMBOBOXEXITEMA;

alias COMBOBOXEXITEMA* PCCOMBOEXITEMA;

struct tagCOMBOBOXEXITEMW {
  UINT mask;
  INT_PTR iItem;
  LPWSTR pszText;
  int cchTextMax;
  int iImage;
  int iSelectedImage;
  int iOverlay;
  int iIndent;
  LPARAM lParam;
}
alias tagCOMBOBOXEXITEMW COMBOBOXEXITEMW;
alias tagCOMBOBOXEXITEMW* PCOMBOBOXEXITEMW;

alias COMBOBOXEXITEMW* PCCOMBOEXITEMW;

// #ifdef UNICODE
alias COMBOBOXEXITEMW COMBOBOXEXITEM;
alias PCOMBOBOXEXITEMW PCOMBOBOXEXITEM;
alias PCCOMBOBOXEXITEMW PCCOMBOBOXEXITEM;
// #else
// #...
// #...
// #...
// #endif

enum : uint { CBEM_INSERTITEMA = WM_USER + 1 }
enum : uint { CBEM_SETIMAGELIST = WM_USER + 2 }
enum : uint { CBEM_GETIMAGELIST = WM_USER + 3 }
enum : uint { CBEM_GETITEMA = WM_USER + 4 }
enum : uint { CBEM_SETITEMA = WM_USER + 5 }
alias CB_DELETESTRING CBEM_DELETEITEM;
enum : uint { CBEM_GETCOMBOCONTROL = WM_USER + 6 }
enum : uint { CBEM_GETEDITCONTROL = WM_USER + 7 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { CBEM_SETEXSTYLE = WM_USER + 8 }
enum : uint { CBEM_SETEXTENDEDSTYLE = WM_USER + 14 }
enum : uint { CBEM_GETEXSTYLE = WM_USER + 9 }
enum : uint { CBEM_GETEXTENDEDSTYLE = WM_USER + 9 }
alias CCM_SETUNICODEFORMAT CBEM_SETUNICODEFORMAT;
alias CCM_GETUNICODEFORMAT CBEM_GETUNICODEFORMAT;
// #else
// #...
// #...
// #endif
enum : uint { CBEM_HASEDITCHANGED = WM_USER + 10 }
enum : uint { CBEM_INSERTITEMW = WM_USER + 11 }
enum : uint { CBEM_SETITEMW = WM_USER + 12 }
enum : uint { CBEM_GETITEMW = WM_USER + 13 }

// #ifdef UNICODE
alias CBEM_INSERTITEMW CBEM_INSERTITEM;
alias CBEM_SETITEMW CBEM_SETITEM;
alias CBEM_GETITEMW CBEM_GETITEM;
// #else
// #...
// #...
// #...
// #endif

// #if (_WIN32_WINNT >= 0x501)
alias CCM_SETWINDOWTHEME CBEM_SETWINDOWTHEME;
// #endif

enum : uint { CBES_EX_NOEDITIMAGE = 0x00000001 }
enum : uint { CBES_EX_NOEDITIMAGEINDENT = 0x00000002 }
enum : uint { CBES_EX_PATHWORDBREAKPROC = 0x00000004 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { CBES_EX_NOSIZELIMIT = 0x00000008 }
enum : uint { CBES_EX_CASESENSITIVE = 0x00000010 }

struct _9 {
  NMHDR hdr;
  COMBOBOXEXITEMA ceItem;
}
alias _9 NMCOMBOBOXEXA;
alias _9* PNMCOMBOBOXEXA;

struct _10 {
  NMHDR hdr;
  COMBOBOXEXITEMW ceItem;
}
alias _10 NMCOMBOBOXEXW;
alias _10* PNMCOMBOBOXEXW;

// #ifdef UNICODE
alias NMCOMBOBOXEXW NMCOMBOBOXEX;
alias PNMCOMBOBOXEXW PNMCOMBOBOXEX;
alias CBEN_GETDISPINFOW CBEN_GETDISPINFO;
// #else
// #...
// #...
// #...
// #endif

// #else
// ...

// #...

// #endif      // _WIN32_IE >= 0x0400

// #if (_WIN32_IE >= 0x0400)
// #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
// #endif
enum : uint { CBEN_INSERTITEM = CBEN_FIRST - 1 }
enum : uint { CBEN_DELETEITEM = CBEN_FIRST - 2 }
enum : uint { CBEN_BEGINEDIT = CBEN_FIRST - 4 }
enum : uint { CBEN_ENDEDITA = CBEN_FIRST - 5 }
enum : uint { CBEN_ENDEDITW = CBEN_FIRST - 6 }

// #if (_WIN32_IE >= 0x0400)
// #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
// #endif

// #if (_WIN32_IE >= 0x0400)
enum : uint { CBEN_DRAGBEGINA = CBEN_FIRST - 8 }
enum : uint { CBEN_DRAGBEGINW = CBEN_FIRST - 9 }

// #ifdef UNICODE
alias CBEN_DRAGBEGINW CBEN_DRAGBEGIN;
// #else
// #...
// #endif

// #endif  //(_WIN32_IE >= 0x0400)

// #ifdef UNICODE
alias CBEN_ENDEDITW CBEN_ENDEDIT;
// #else
// #...
// #endif

enum : uint { CBENF_KILLFOCUS = 1 }
enum : uint { CBENF_RETURN = 2 }
enum : uint { CBENF_ESCAPE = 3 }
enum : uint { CBENF_DROPDOWN = 4 }

enum : uint { CBEMAXSTRLEN = 260 }

// #if (_WIN32_IE >= 0x0400)

struct _11 {
  NMHDR hdr;
  int iItemid;
  WCHAR szText[CBEMAXSTRLEN];
}
alias _11 NMCBEDRAGBEGINW;
alias _11* LPNMCBEDRAGBEGINW;
alias _11* PNMCBEDRAGBEGINW;

struct _12 {
  NMHDR hdr;
  int iItemid;
  char szText[CBEMAXSTRLEN];
}
alias _12 NMCBEDRAGBEGINA;
alias _12* LPNMCBEDRAGBEGINA;
alias _12* PNMCBEDRAGBEGINA;

// #ifdef UNICODE
alias NMCBEDRAGBEGINW NMCBEDRAGBEGIN;
alias LPNMCBEDRAGBEGINW LPNMCBEDRAGBEGIN;
alias PNMCBEDRAGBEGINW PNMCBEDRAGBEGIN;
// #else
// #...
// #...
// #...
// #endif
// #endif      // _WIN32_IE >= 0x0400

struct _13 {
  NMHDR hdr;
  BOOL fChanged;
  int iNewSelection;
  WCHAR szText[CBEMAXSTRLEN];
  int iWhy;
}
alias _13 NMCBEENDEDITW;
alias _13* LPNMCBEENDEDITW;
alias _13* PNMCBEENDEDITW;

struct _14 {
  NMHDR hdr;
  BOOL fChanged;
  int iNewSelection;
  char szText[CBEMAXSTRLEN];
  int iWhy;
}
alias _14 NMCBEENDEDITA;
alias _14* LPNMCBEENDEDITA;
alias _14* PNMCBEENDEDITA;

// #ifdef UNICODE
alias NMCBEENDEDITW NMCBEENDEDIT;
alias LPNMCBEENDEDITW LPNMCBEENDEDIT;
alias PNMCBEENDEDITW PNMCBEENDEDIT;
// #else
// #...
// #...
// #...
// #endif

// #endif

// #endif      // _WIN32_IE >= 0x0300

// #ifndef NOTABCONTROL

// #ifdef _WIN32

const char[] WC_TABCONTROLA = "SysTabControl32";
const wchar[] WC_TABCONTROLW = "SysTabControl32";

// #ifdef UNICODE
alias WC_TABCONTROLW WC_TABCONTROL;
// #else
// #...
// #endif

// #else
// #...
// #endif

// #if (_WIN32_IE >= 0x0300)
enum : uint { TCS_SCROLLOPPOSITE = 0x0001 }
enum : uint { TCS_BOTTOM = 0x0002 }
enum : uint { TCS_RIGHT = 0x0002 }
enum : uint { TCS_MULTISELECT = 0x0004 }
// #endif
// #if (_WIN32_IE >= 0x0400)
enum : uint { TCS_FLATBUTTONS = 0x0008 }
// #endif
enum : uint { TCS_FORCEICONLEFT = 0x0010 }
enum : uint { TCS_FORCELABELLEFT = 0x0020 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TCS_HOTTRACK = 0x0040 }
enum : uint { TCS_VERTICAL = 0x0080 }
// #endif
enum : uint { TCS_TABS = 0x0000 }
enum : uint { TCS_BUTTONS = 0x0100 }
enum : uint { TCS_SINGLELINE = 0x0000 }
enum : uint { TCS_MULTILINE = 0x0200 }
enum : uint { TCS_RIGHTJUSTIFY = 0x0000 }
enum : uint { TCS_FIXEDWIDTH = 0x0400 }
enum : uint { TCS_RAGGEDRIGHT = 0x0800 }
enum : uint { TCS_FOCUSONBUTTONDOWN = 0x1000 }
enum : uint { TCS_OWNERDRAWFIXED = 0x2000 }
enum : uint { TCS_TOOLTIPS = 0x4000 }
enum : uint { TCS_FOCUSNEVER = 0x8000 }

// #if (_WIN32_IE >= 0x0400)

enum : uint { TCS_EX_FLATSEPARATORS = 0x00000001 }
enum : uint { TCS_EX_REGISTERDROP = 0x00000002 }
// #endif

enum : uint { TCM_GETIMAGELIST = TCM_FIRST + 2 }
// #define TabCtrl_GetImageList(hwnd) (HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, 0L)

enum : uint { TCM_SETIMAGELIST = TCM_FIRST + 3 }
// #define TabCtrl_SetImageList(hwnd, himl) (HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(HIMAGELIST)(himl))

enum : uint { TCM_GETITEMCOUNT = TCM_FIRST + 4 }
// #define TabCtrl_GetItemCount(hwnd) (int)SNDMSG((hwnd), TCM_GETITEMCOUNT, 0, 0L)

enum : uint { TCIF_TEXT = 0x0001 }
enum : uint { TCIF_IMAGE = 0x0002 }
enum : uint { TCIF_RTLREADING = 0x0004 }
enum : uint { TCIF_PARAM = 0x0008 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { TCIF_STATE = 0x0010 }

enum : uint { TCIS_BUTTONPRESSED = 0x0001 }
// #endif
// #if (_WIN32_IE >= 0x0400)
enum : uint { TCIS_HIGHLIGHTED = 0x0002 }
// #endif

// #if (_WIN32_IE >= 0x0300)
alias TCITEMHEADERA TC_ITEMHEADERA;
alias TCITEMHEADERW TC_ITEMHEADERW;
// #else
// #...
// #...
// #...
// #...
// #endif
alias TCITEMHEADER TC_ITEMHEADER;

struct tagTCITEMHEADERA {
  UINT mask;
  UINT lpReserved1;
  UINT lpReserved2;
  LPSTR pszText;
  int cchTextMax;
  int iImage;
}
alias tagTCITEMHEADERA TCITEMHEADERA;
alias tagTCITEMHEADERA* LPTCITEMHEADERA;

struct tagTCITEMHEADERW {
  UINT mask;
  UINT lpReserved1;
  UINT lpReserved2;
  LPWSTR pszText;
  int cchTextMax;
  int iImage;
}
alias tagTCITEMHEADERW TCITEMHEADERW;
alias tagTCITEMHEADERW* LPTCITEMHEADERW;

// #ifdef UNICODE
alias TCITEMHEADERW TCITEMHEADER;
alias LPTCITEMHEADERW LPTCITEMHEADER;
// #else
// #...
// #...
// #endif

// #if (_WIN32_IE >= 0x0300)
alias TCITEMA TC_ITEMA;
alias TCITEMW TC_ITEMW;
// #else
// #...
// #...
// #...
// #...
// #endif
alias TCITEM TC_ITEM;

struct tagTCITEMA {
  UINT mask;
// #if (_WIN32_IE >= 0x0300)
  DWORD dwState;
  DWORD dwStateMask;
// #else
// ...
// #endif
  LPSTR pszText;
  int cchTextMax;
  int iImage;
  LPARAM lParam;
}
alias tagTCITEMA TCITEMA;
alias tagTCITEMA* LPTCITEMA;

struct tagTCITEMW {
  UINT mask;
// #if (_WIN32_IE >= 0x0300)
  DWORD dwState;
  DWORD dwStateMask;
// #else
// ...
// #endif
  LPWSTR pszText;
  int cchTextMax;
  int iImage;
  LPARAM lParam;
}
alias tagTCITEMW TCITEMW;
alias tagTCITEMW* LPTCITEMW;

// #ifdef UNICODE
alias TCITEMW TCITEM;
alias LPTCITEMW LPTCITEM;
// #else
// #...
// #...
// #endif

enum : uint { TCM_GETITEMA = TCM_FIRST + 5 }
enum : uint { TCM_GETITEMW = TCM_FIRST + 60 }

// #ifdef UNICODE
alias TCM_GETITEMW TCM_GETITEM;
// #else
// #...
// #endif

// #define TabCtrl_GetItem(hwnd, iItem, pitem) (BOOL)SNDMSG((hwnd), TCM_GETITEM, (WPARAM)(int)(iItem), (LPARAM)(TC_ITEM *)(pitem))

enum : uint { TCM_SETITEMA = TCM_FIRST + 6 }
enum : uint { TCM_SETITEMW = TCM_FIRST + 61 }

// #ifdef UNICODE
alias TCM_SETITEMW TCM_SETITEM;
// #else
// #...
// #endif

// #define TabCtrl_SetItem(hwnd, iItem, pitem) (BOOL)SNDMSG((hwnd), TCM_SETITEM, (WPARAM)(int)(iItem), (LPARAM)(TC_ITEM *)(pitem))

enum : uint { TCM_INSERTITEMA = TCM_FIRST + 7 }
enum : uint { TCM_INSERTITEMW = TCM_FIRST + 62 }

// #ifdef UNICODE
alias TCM_INSERTITEMW TCM_INSERTITEM;
// #else
// #...
// #endif

// #define TabCtrl_InsertItem(hwnd, iItem, pitem) (int)SNDMSG((hwnd), TCM_INSERTITEM, (WPARAM)(int)(iItem), (LPARAM)(const TC_ITEM *)(pitem))

enum : uint { TCM_DELETEITEM = TCM_FIRST + 8 }
// #define TabCtrl_DeleteItem(hwnd, i) (BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)

enum : uint { TCM_DELETEALLITEMS = TCM_FIRST + 9 }
// #define TabCtrl_DeleteAllItems(hwnd) (BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, 0L)

enum : uint { TCM_GETITEMRECT = TCM_FIRST + 10 }
// #define TabCtrl_GetItemRect(hwnd, i, prc) (BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))

enum : uint { TCM_GETCURSEL = TCM_FIRST + 11 }
// #define TabCtrl_GetCurSel(hwnd) (int)SNDMSG((hwnd), TCM_GETCURSEL, 0, 0)

enum : uint { TCM_SETCURSEL = TCM_FIRST + 12 }
// #define TabCtrl_SetCurSel(hwnd, i) (int)SNDMSG((hwnd), TCM_SETCURSEL, (WPARAM)(i), 0)

enum : uint { TCHT_NOWHERE = 0x0001 }
enum : uint { TCHT_ONITEMICON = 0x0002 }
enum : uint { TCHT_ONITEMLABEL = 0x0004 }
enum : uint { TCHT_ONITEM = TCHT_ONITEMICON | TCHT_ONITEMLABEL }

// #if (_WIN32_IE >= 0x0300)
alias LPTCHITTESTINFO LPTC_HITTESTINFO;
alias TCHITTESTINFO TC_HITTESTINFO;
// #else
// #...
// #...
// #...
// #endif

struct tagTCHITTESTINFO {
  POINT pt;
  UINT flags;
}
alias tagTCHITTESTINFO TCHITTESTINFO;
alias tagTCHITTESTINFO* LPTCHITTESTINFO;

enum : uint { TCM_HITTEST = TCM_FIRST + 13 }
// #define TabCtrl_HitTest(hwndTC, pinfo) (int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))

enum : uint { TCM_SETITEMEXTRA = TCM_FIRST + 14 }
// #define TabCtrl_SetItemExtra(hwndTC, cb) (BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)

enum : uint { TCM_ADJUSTRECT = TCM_FIRST + 40 }
// #define TabCtrl_AdjustRect(hwnd, bLarger, prc) (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)(bLarger), (LPARAM)(RECT *)prc)

enum : uint { TCM_SETITEMSIZE = TCM_FIRST + 41 }
// #define TabCtrl_SetItemSize(hwnd, x, y) (DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))

enum : uint { TCM_REMOVEIMAGE = TCM_FIRST + 42 }
// #define TabCtrl_RemoveImage(hwnd, i) (void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, 0L)

enum : uint { TCM_SETPADDING = TCM_FIRST + 43 }
// #define TabCtrl_SetPadding(hwnd, cx, cy) (void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))

enum : uint { TCM_GETROWCOUNT = TCM_FIRST + 44 }
// #define TabCtrl_GetRowCount(hwnd) (int)SNDMSG((hwnd), TCM_GETROWCOUNT, 0, 0L)

enum : uint { TCM_GETTOOLTIPS = TCM_FIRST + 45 }
// #define TabCtrl_GetToolTips(hwnd) (HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, 0L)

enum : uint { TCM_SETTOOLTIPS = TCM_FIRST + 46 }
// #define TabCtrl_SetToolTips(hwnd, hwndTT) (void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)(hwndTT), 0L)

enum : uint { TCM_GETCURFOCUS = TCM_FIRST + 47 }
// #define TabCtrl_GetCurFocus(hwnd) (int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0)

enum : uint { TCM_SETCURFOCUS = TCM_FIRST + 48 }
// #define TabCtrl_SetCurFocus(hwnd, i) SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0)

// #if (_WIN32_IE >= 0x0300)
enum : uint { TCM_SETMINTABWIDTH = TCM_FIRST + 49 }
// #define TabCtrl_SetMinTabWidth(hwnd, x) (int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x)

enum : uint { TCM_DESELECTALL = TCM_FIRST + 50 }
// #define TabCtrl_DeselectAll(hwnd, fExcludeFocus) (void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
// #endif

// #if (_WIN32_IE >= 0x0400)

enum : uint { TCM_HIGHLIGHTITEM = TCM_FIRST + 51 }
// #define TabCtrl_HighlightItem(hwnd, i, fHighlight) (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)(i), (LPARAM)MAKELONG (fHighlight, 0))

enum : uint { TCM_SETEXTENDEDSTYLE = TCM_FIRST + 52 }
// #define TabCtrl_SetExtendedStyle(hwnd, dw) (DWORD)SNDMSG((hwnd), TCM_SETEXTENDEDSTYLE, 0, dw)

enum : uint { TCM_GETEXTENDEDSTYLE = TCM_FIRST + 53 }
// #define TabCtrl_GetExtendedStyle(hwnd) (DWORD)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)

alias CCM_SETUNICODEFORMAT TCM_SETUNICODEFORMAT;
// #define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) (BOOL)SNDMSG((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)

alias CCM_GETUNICODEFORMAT TCM_GETUNICODEFORMAT;
// #define TabCtrl_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd), TCM_GETUNICODEFORMAT, 0, 0)

// #endif      // _WIN32_IE >= 0x0400

enum : uint { TCN_KEYDOWN = TCN_FIRST - 0 }

// #if (_WIN32_IE >= 0x0300)
alias NMTCKEYDOWN TC_KEYDOWN;
// #else
// #...
// #...
// #endif

// #ifdef _WIN32
align(1):
// #endif

struct tagTCKEYDOWN {
  NMHDR hdr;
  WORD wVKey;
  UINT flags;
}
alias tagTCKEYDOWN NMTCKEYDOWN;

// #ifdef _WIN32
align:
// #endif

enum : uint { TCN_SELCHANGE = TCN_FIRST - 1 }
enum : uint { TCN_SELCHANGING = TCN_FIRST - 2 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { TCN_GETOBJECT = TCN_FIRST - 3 }
// #endif      // _WIN32_IE >= 0x0400
// #if (_WIN32_IE >= 0x0500)
enum : uint { TCN_FOCUSCHANGE = TCN_FIRST - 4 }
// #endif      // _WIN32_IE >= 0x0500
// #endif      // NOTABCONTROL

// #ifndef NOANIMATE

// #ifdef _WIN32

const wchar[] ANIMATE_CLASSW = "SysAnimate32";
const char[] ANIMATE_CLASSA = "SysAnimate32";

// #ifdef UNICODE
alias ANIMATE_CLASSW ANIMATE_CLASS;
// #else
// #...
// #endif

enum : uint { ACS_CENTER = 0x0001 }
enum : uint { ACS_TRANSPARENT = 0x0002 }
enum : uint { ACS_AUTOPLAY = 0x0004 }
// #if (_WIN32_IE >= 0x0300)
enum : uint { ACS_TIMER = 0x0008 }
// #endif

enum : uint { ACM_OPENA = WM_USER+100 }
enum : uint { ACM_OPENW = WM_USER+103 }

// #ifdef UNICODE
alias ACM_OPENW ACM_OPEN;
// #else
// #...
// #endif

enum : uint { ACM_PLAY = WM_USER+101 }
enum : uint { ACM_STOP = WM_USER+102 }

enum : uint { ACN_START = 1 }
enum : uint { ACN_STOP = 2 }

// #define Animate_Create(hwndP, id, dwStyle, hInstance) CreateWindow(ANIMATE_CLASS, NULL, dwStyle, 0, 0, 0, 0, hwndP, (HMENU)(id), hInstance, NULL)

// #define Animate_Open(hwnd, szName) (BOOL)SNDMSG(hwnd, ACM_OPEN, 0, (LPARAM)(LPTSTR)(szName))
// #define Animate_OpenEx(hwnd, hInst, szName) (BOOL)SNDMSG(hwnd, ACM_OPEN, (WPARAM)(hInst), (LPARAM)(LPTSTR)(szName))
// #define Animate_Play(hwnd, from, to, rep) (BOOL)SNDMSG(hwnd, ACM_PLAY, (WPARAM)(rep), (LPARAM)MAKELONG(from, to))
// #define Animate_Stop(hwnd) (BOOL)SNDMSG(hwnd, ACM_STOP, 0, 0)
// #define Animate_Close(hwnd) Animate_Open(hwnd, NULL)
// #define Animate_Seek(hwnd, frame) Animate_Play(hwnd, frame, frame, 1)
// #endif

// #endif      // NOANIMATE

// #if (_WIN32_IE >= 0x0300)

// #ifndef NOMONTHCAL
// #ifdef _WIN32

const wchar[] MONTHCAL_CLASSW = "SysMonthCal32";
const char[] MONTHCAL_CLASSA = "SysMonthCal32";

// #ifdef UNICODE
alias MONTHCAL_CLASSW MONTHCAL_CLASS;
// #else
// #...
// #endif

alias DWORD MONTHDAYSTATE;
alias DWORD* LPMONTHDAYSTATE;

enum : uint { MCM_FIRST = 0x1000 }

enum : uint { MCM_GETCURSEL = MCM_FIRST + 1 }
// #define MonthCal_GetCurSel(hmc, pst) (BOOL)SNDMSG(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))

enum : uint { MCM_SETCURSEL = MCM_FIRST + 2 }
// #define MonthCal_SetCurSel(hmc, pst) (BOOL)SNDMSG(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))

enum : uint { MCM_GETMAXSELCOUNT = MCM_FIRST + 3 }
// #define MonthCal_GetMaxSelCount(hmc) (DWORD)SNDMSG(hmc, MCM_GETMAXSELCOUNT, 0, 0L)

enum : uint { MCM_SETMAXSELCOUNT = MCM_FIRST + 4 }
// #define MonthCal_SetMaxSelCount(hmc, n) (BOOL)SNDMSG(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)

enum : uint { MCM_GETSELRANGE = MCM_FIRST + 5 }
// #define MonthCal_GetSelRange(hmc, rgst) SNDMSG(hmc, MCM_GETSELRANGE, 0, (LPARAM)(rgst))

enum : uint { MCM_SETSELRANGE = MCM_FIRST + 6 }
// #define MonthCal_SetSelRange(hmc, rgst) SNDMSG(hmc, MCM_SETSELRANGE, 0, (LPARAM)(rgst))

enum : uint { MCM_GETMONTHRANGE = MCM_FIRST + 7 }
// #define MonthCal_GetMonthRange(hmc, gmr, rgst) (DWORD)SNDMSG(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))

enum : uint { MCM_SETDAYSTATE = MCM_FIRST + 8 }
// #define MonthCal_SetDayState(hmc, cbds, rgds) SNDMSG(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))

enum : uint { MCM_GETMINREQRECT = MCM_FIRST + 9 }
// #define MonthCal_GetMinReqRect(hmc, prc) SNDMSG(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))

enum : uint { MCM_SETCOLOR = MCM_FIRST + 10 }
// #define MonthCal_SetColor(hmc, iColor, clr) SNDMSG(hmc, MCM_SETCOLOR, iColor, clr)

enum : uint { MCM_GETCOLOR = MCM_FIRST + 11 }
// #define MonthCal_GetColor(hmc, iColor) SNDMSG(hmc, MCM_GETCOLOR, iColor, 0)

enum : uint { MCSC_BACKGROUND = 0 }
enum : uint { MCSC_TEXT = 1 }
enum : uint { MCSC_TITLEBK = 2 }
enum : uint { MCSC_TITLETEXT = 3 }
enum : uint { MCSC_MONTHBK = 4 }
enum : uint { MCSC_TRAILINGTEXT = 5 }

enum : uint { MCM_SETTODAY = MCM_FIRST + 12 }
// #define MonthCal_SetToday(hmc, pst) SNDMSG(hmc, MCM_SETTODAY, 0, (LPARAM)(pst))

enum : uint { MCM_GETTODAY = MCM_FIRST + 13 }
// #define MonthCal_GetToday(hmc, pst) (BOOL)SNDMSG(hmc, MCM_GETTODAY, 0, (LPARAM)(pst))

enum : uint { MCM_HITTEST = MCM_FIRST + 14 }
// #define MonthCal_HitTest(hmc, pinfo) SNDMSG(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)(pinfo))

struct _15 {
  UINT cbSize;
  POINT pt;
  UINT uHit;
  SYSTEMTIME st;
}
alias _15 MCHITTESTINFO;
alias _15* PMCHITTESTINFO;

enum : uint { MCHT_TITLE = 0x00010000 }
enum : uint { MCHT_CALENDAR = 0x00020000 }
enum : uint { MCHT_TODAYLINK = 0x00030000 }

enum : uint { MCHT_NEXT = 0x01000000 }
enum : uint { MCHT_PREV = 0x02000000 }

enum : uint { MCHT_NOWHERE = 0x00000000 }

enum : uint { MCHT_TITLEBK = MCHT_TITLE }
enum : uint { MCHT_TITLEMONTH = MCHT_TITLE | 0x0001 }
enum : uint { MCHT_TITLEYEAR = MCHT_TITLE | 0x0002 }
enum : uint { MCHT_TITLEBTNNEXT = MCHT_TITLE | MCHT_NEXT | 0x0003 }
enum : uint { MCHT_TITLEBTNPREV = MCHT_TITLE | MCHT_PREV | 0x0003 }

enum : uint { MCHT_CALENDARBK = MCHT_CALENDAR }
enum : uint { MCHT_CALENDARDATE = MCHT_CALENDAR | 0x0001 }
enum : uint { MCHT_CALENDARDATENEXT = MCHT_CALENDARDATE | MCHT_NEXT }
enum : uint { MCHT_CALENDARDATEPREV = MCHT_CALENDARDATE | MCHT_PREV }
enum : uint { MCHT_CALENDARDAY = MCHT_CALENDAR | 0x0002 }
enum : uint { MCHT_CALENDARWEEKNUM = MCHT_CALENDAR | 0x0003 }

enum : uint { MCM_SETFIRSTDAYOFWEEK = MCM_FIRST + 15 }
// #define MonthCal_SetFirstDayOfWeek(hmc, iDay) SNDMSG(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)

enum : uint { MCM_GETFIRSTDAYOFWEEK = MCM_FIRST + 16 }
// #define MonthCal_GetFirstDayOfWeek(hmc) (DWORD)SNDMSG(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)

enum : uint { MCM_GETRANGE = MCM_FIRST + 17 }
// #define MonthCal_GetRange(hmc, rgst) (DWORD)SNDMSG(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))

enum : uint { MCM_SETRANGE = MCM_FIRST + 18 }
// #define MonthCal_SetRange(hmc, gd, rgst) (BOOL)SNDMSG(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))

enum : uint { MCM_GETMONTHDELTA = MCM_FIRST + 19 }
// #define MonthCal_GetMonthDelta(hmc) (int)SNDMSG(hmc, MCM_GETMONTHDELTA, 0, 0)

enum : uint { MCM_SETMONTHDELTA = MCM_FIRST + 20 }
// #define MonthCal_SetMonthDelta(hmc, n) (int)SNDMSG(hmc, MCM_SETMONTHDELTA, n, 0)

enum : uint { MCM_GETMAXTODAYWIDTH = MCM_FIRST + 21 }
// #define MonthCal_GetMaxTodayWidth(hmc) (DWORD)SNDMSG(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)

// #if (_WIN32_IE >= 0x0400)
alias CCM_SETUNICODEFORMAT MCM_SETUNICODEFORMAT;
// #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) (BOOL)SNDMSG((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)

alias CCM_GETUNICODEFORMAT MCM_GETUNICODEFORMAT;
// #define MonthCal_GetUnicodeFormat(hwnd) (BOOL)SNDMSG((hwnd), MCM_GETUNICODEFORMAT, 0, 0)
// #endif

struct tagNMSELCHANGE {
  NMHDR nmhdr;

  SYSTEMTIME stSelStart;
  SYSTEMTIME stSelEnd;
}
alias tagNMSELCHANGE NMSELCHANGE;
alias tagNMSELCHANGE* LPNMSELCHANGE;

enum : uint { MCN_SELCHANGE = MCN_FIRST + 1 }

struct tagNMDAYSTATE {
  NMHDR nmhdr;

  SYSTEMTIME stStart;
  int cDayState;
  LPMONTHDAYSTATE prgDayState;
}
alias tagNMDAYSTATE NMDAYSTATE;
alias tagNMDAYSTATE* LPNMDAYSTATE;

enum : uint { MCN_GETDAYSTATE = MCN_FIRST + 3 }

alias NMSELCHANGE NMSELECT;
alias NMSELCHANGE* LPNMSELECT;

enum : uint { MCN_SELECT = MCN_FIRST + 4 }

enum : uint { MCS_DAYSTATE = 0x0001 }
enum : uint { MCS_MULTISELECT = 0x0002 }
enum : uint { MCS_WEEKNUMBERS = 0x0004 }
// #if (_WIN32_IE >= 0x0400)
enum : uint { MCS_NOTODAYCIRCLE = 0x0008 }
enum : uint { MCS_NOTODAY = 0x0010 }
// #else
// #...
// #endif

enum : uint { GMR_VISIBLE = 0 }
enum : uint { GMR_DAYSTATE = 1 }

// #endif // _WIN32
// #endif // NOMONTHCAL

// #ifndef NODATETIMEPICK
// #ifdef _WIN32

const wchar[] DATETIMEPICK_CLASSW = "SysDateTimePick32";
const char[] DATETIMEPICK_CLASSA = "SysDateTimePick32";

// #ifdef UNICODE
alias DATETIMEPICK_CLASSW DATETIMEPICK_CLASS;
// #else
// #...
// #endif

enum : uint { DTM_FIRST = 0x1000 }

enum : uint { DTM_GETSYSTEMTIME = DTM_FIRST + 1 }
// #define DateTime_GetSystemtime(hdp, pst) (DWORD)SNDMSG(hdp, DTM_GETSYSTEMTIME, 0, (LPARAM)(pst))

enum : uint { DTM_SETSYSTEMTIME = DTM_FIRST + 2 }
// #define DateTime_SetSystemtime(hdp, gd, pst) (BOOL)SNDMSG(hdp, DTM_SETSYSTEMTIME, (WPARAM)(gd), (LPARAM)(pst))

enum : uint { DTM_GETRANGE = DTM_FIRST + 3 }
// #define DateTime_GetRange(hdp, rgst) (DWORD)SNDMSG(hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))

enum : uint { DTM_SETRANGE = DTM_FIRST + 4 }
// #define DateTime_SetRange(hdp, gd, rgst) (BOOL)SNDMSG(hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))

enum : uint { DTM_SETFORMATA = DTM_FIRST + 5 }
enum : uint { DTM_SETFORMATW = DTM_FIRST + 50 }

// #ifdef UNICODE
alias DTM_SETFORMATW DTM_SETFORMAT;
// #else
// #...
// #endif

// #define DateTime_SetFormat(hdp, sz) (BOOL)SNDMSG(hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))

enum : uint { DTM_SETMCCOLOR = DTM_FIRST + 6 }
// #define DateTime_SetMonthCalColor(hdp, iColor, clr) SNDMSG(hdp, DTM_SETMCCOLOR, iColor, clr)

enum : uint { DTM_GETMCCOLOR = DTM_FIRST + 7 }
// #define DateTime_GetMonthCalColor(hdp, iColor) SNDMSG(hdp, DTM_GETMCCOLOR, iColor, 0)

enum : uint { DTM_GETMONTHCAL = DTM_FIRST + 8 }
// #define DateTime_GetMonthCal(hdp) (HWND)SNDMSG(hdp, DTM_GETMONTHCAL, 0, 0)

// #if (_WIN32_IE >= 0x0400)

enum : uint { DTM_SETMCFONT = DTM_FIRST + 9 }
// #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) SNDMSG(hdp, DTM_SETMCFONT, (WPARAM)(hfont), (LPARAM)(fRedraw))

enum : uint { DTM_GETMCFONT = DTM_FIRST + 10 }
// #define DateTime_GetMonthCalFont(hdp) SNDMSG(hdp, DTM_GETMCFONT, 0, 0)

// #endif      // _WIN32_IE >= 0x0400

enum : uint { DTS_UPDOWN = 0x0001 }
enum : uint { DTS_SHOWNONE = 0x0002 }
enum : uint { DTS_SHORTDATEFORMAT = 0x0000 }
enum : uint { DTS_LONGDATEFORMAT = 0x0004 }
// #if (_WIN32_IE >= 0x500)
enum : uint { DTS_SHORTDATECENTURYFORMAT = 0x000C }
// #endif // (_WIN32_IE >= 0x500)
enum : uint { DTS_TIMEFORMAT = 0x0009 }
enum : uint { DTS_APPCANPARSE = 0x0010 }
enum : uint { DTS_RIGHTALIGN = 0x0020 }

enum : uint { DTN_DATETIMECHANGE = DTN_FIRST + 1 }
struct tagNMDATETIMECHANGE {
  NMHDR nmhdr;
  DWORD dwFlags;
  SYSTEMTIME st;
}
alias tagNMDATETIMECHANGE NMDATETIMECHANGE;
alias tagNMDATETIMECHANGE* LPNMDATETIMECHANGE;

enum : uint { DTN_USERSTRINGA = DTN_FIRST + 2 }
enum : uint { DTN_USERSTRINGW = DTN_FIRST + 15 }
struct tagNMDATETIMESTRINGA {
  NMHDR nmhdr;
  LPCSTR pszUserString;
  SYSTEMTIME st;
  DWORD dwFlags;
}
alias tagNMDATETIMESTRINGA NMDATETIMESTRINGA;
alias tagNMDATETIMESTRINGA* LPNMDATETIMESTRINGA;

struct tagNMDATETIMESTRINGW {
  NMHDR nmhdr;
  LPCWSTR pszUserString;
  SYSTEMTIME st;
  DWORD dwFlags;
}
alias tagNMDATETIMESTRINGW NMDATETIMESTRINGW;
alias tagNMDATETIMESTRINGW* LPNMDATETIMESTRINGW;

// #ifdef UNICODE
alias DTN_USERSTRINGW DTN_USERSTRING;
alias NMDATETIMESTRINGW NMDATETIMESTRING;
alias LPNMDATETIMESTRINGW LPNMDATETIMESTRING;
// #else
// #...
// #...
// #...
// #endif

enum : uint { DTN_WMKEYDOWNA = DTN_FIRST + 3 }
enum : uint { DTN_WMKEYDOWNW = DTN_FIRST + 16 }
struct tagNMDATETIMEWMKEYDOWNA {
  NMHDR nmhdr;
  int nVirtKey;
  LPCSTR pszFormat;
  SYSTEMTIME st;
}
alias tagNMDATETIMEWMKEYDOWNA NMDATETIMEWMKEYDOWNA;
alias tagNMDATETIMEWMKEYDOWNA* LPNMDATETIMEWMKEYDOWNA;

struct tagNMDATETIMEWMKEYDOWNW {
  NMHDR nmhdr;
  int nVirtKey;
  LPCWSTR pszFormat;
  SYSTEMTIME st;
}
alias tagNMDATETIMEWMKEYDOWNW NMDATETIMEWMKEYDOWNW;
alias tagNMDATETIMEWMKEYDOWNW* LPNMDATETIMEWMKEYDOWNW;

// #ifdef UNICODE
alias DTN_WMKEYDOWNW DTN_WMKEYDOWN;
alias NMDATETIMEWMKEYDOWNW NMDATETIMEWMKEYDOWN;
alias LPNMDATETIMEWMKEYDOWNW LPNMDATETIMEWMKEYDOWN;
// #else
// #...
// #...
// #...
// #endif

enum : uint { DTN_FORMATA = DTN_FIRST + 4 }
enum : uint { DTN_FORMATW = DTN_FIRST + 17 }
struct tagNMDATETIMEFORMATA {
  NMHDR nmhdr;
  LPCSTR pszFormat;
  SYSTEMTIME st;
  LPCSTR pszDisplay;
  CHAR szDisplay[64];
}
alias tagNMDATETIMEFORMATA NMDATETIMEFORMATA;
alias tagNMDATETIMEFORMATA* LPNMDATETIMEFORMATA;

struct tagNMDATETIMEFORMATW {
  NMHDR nmhdr;
  LPCWSTR pszFormat;
  SYSTEMTIME st;
  LPCWSTR pszDisplay;
  WCHAR szDisplay[64];
}
alias tagNMDATETIMEFORMATW NMDATETIMEFORMATW;
alias tagNMDATETIMEFORMATW* LPNMDATETIMEFORMATW;

// #ifdef UNICODE
alias DTN_FORMATW DTN_FORMAT;
alias NMDATETIMEFORMATW NMDATETIMEFORMAT;
alias LPNMDATETIMEFORMATW LPNMDATETIMEFORMAT;
// #else
// #...
// #...
// #...
// #endif

enum : uint { DTN_FORMATQUERYA = DTN_FIRST + 5 }
enum : uint { DTN_FORMATQUERYW = DTN_FIRST + 18 }
struct tagNMDATETIMEFORMATQUERYA {
  NMHDR nmhdr;
  LPCSTR pszFormat;
  SIZE szMax;
}
alias tagNMDATETIMEFORMATQUERYA NMDATETIMEFORMATQUERYA;
alias tagNMDATETIMEFORMATQUERYA* LPNMDATETIMEFORMATQUERYA;

struct tagNMDATETIMEFORMATQUERYW {
  NMHDR nmhdr;
  LPCWSTR pszFormat;
  SIZE szMax;
}
alias tagNMDATETIMEFORMATQUERYW NMDATETIMEFORMATQUERYW;
alias tagNMDATETIMEFORMATQUERYW* LPNMDATETIMEFORMATQUERYW;

// #ifdef UNICODE
alias DTN_FORMATQUERYW DTN_FORMATQUERY;
alias NMDATETIMEFORMATQUERYW NMDATETIMEFORMATQUERY;
alias LPNMDATETIMEFORMATQUERYW LPNMDATETIMEFORMATQUERY;
// #else
// #...
// #...
// #...
// #endif

enum : uint { DTN_DROPDOWN = DTN_FIRST + 6 }
enum : uint { DTN_CLOSEUP = DTN_FIRST + 7 }

enum : uint { GDTR_MIN = 0x0001 }
enum : uint { GDTR_MAX = 0x0002 }

enum { GDT_ERROR = -1 }
enum : uint { GDT_VALID = 0 }
enum : uint { GDT_NONE = 1 }

// #endif // _WIN32
// #endif // NODATETIMEPICK

// #if (_WIN32_IE >= 0x0400)

// #ifndef NOIPADDRESS

enum : uint { IPM_CLEARADDRESS = WM_USER+100 }
enum : uint { IPM_SETADDRESS = WM_USER+101 }
enum : uint { IPM_GETADDRESS = WM_USER+102 }
enum : uint { IPM_SETRANGE = WM_USER+103 }
enum : uint { IPM_SETFOCUS = WM_USER+104 }
enum : uint { IPM_ISBLANK = WM_USER+105 }

const wchar[] WC_IPADDRESSW = "SysIPAddress32";
const char[] WC_IPADDRESSA = "SysIPAddress32";

// #ifdef UNICODE
alias WC_IPADDRESSW WC_IPADDRESS;
// #else
// #...
// #endif

enum : uint { IPN_FIELDCHANGED = IPN_FIRST - 0 }
struct tagNMIPADDRESS {
  NMHDR hdr;
  int iField;
  int iValue;
}
alias tagNMIPADDRESS NMIPADDRESS;
alias tagNMIPADDRESS* LPNMIPADDRESS;

// #define MAKEIPRANGE(low, high) ((LPARAM)(WORD)(((BYTE)(high) << 8) + (BYTE)(low)))

// #define MAKEIPADDRESS(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))

// #define FIRST_IPADDRESS(x) ((x>>24) & 0xff)
// #define SECOND_IPADDRESS(x) ((x>>16) & 0xff)
// #define THIRD_IPADDRESS(x) ((x>>8) & 0xff)
// #define FOURTH_IPADDRESS(x) (x & 0xff)

// #endif // NOIPADDRESS

// #ifndef NOPAGESCROLLER

const wchar[] WC_PAGESCROLLERW = "SysPager";
const char[] WC_PAGESCROLLERA = "SysPager";

// #ifdef UNICODE
alias WC_PAGESCROLLERW WC_PAGESCROLLER;
// #else
// #...
// #endif

enum : uint { PGS_VERT = 0x00000000 }
enum : uint { PGS_HORZ = 0x00000001 }
enum : uint { PGS_AUTOSCROLL = 0x00000002 }
enum : uint { PGS_DRAGNDROP = 0x00000004 }

enum : uint { PGF_INVISIBLE = 0 }
enum : uint { PGF_NORMAL = 1 }
enum : uint { PGF_GRAYED = 2 }
enum : uint { PGF_DEPRESSED = 4 }
enum : uint { PGF_HOT = 8 }

enum : uint { PGB_TOPORLEFT = 0 }
enum : uint { PGB_BOTTOMORRIGHT = 1 }

enum : uint { PGM_SETCHILD = PGM_FIRST + 1 }
// #define Pager_SetChild(hwnd, hwndChild) (void)SNDMSG((hwnd), PGM_SETCHILD, 0, (LPARAM)(hwndChild))

enum : uint { PGM_RECALCSIZE = PGM_FIRST + 2 }
// #define Pager_RecalcSize(hwnd) (void)SNDMSG((hwnd), PGM_RECALCSIZE, 0, 0)

enum : uint { PGM_FORWARDMOUSE = PGM_FIRST + 3 }
// #define Pager_ForwardMouse(hwnd, bForward) (void)SNDMSG((hwnd), PGM_FORWARDMOUSE, (WPARAM)(bForward), 0)

enum : uint { PGM_SETBKCOLOR = PGM_FIRST + 4 }
// #define Pager_SetBkColor(hwnd, clr) (COLORREF)SNDMSG((hwnd), PGM_SETBKCOLOR, 0, (LPARAM)(clr))

enum : uint { PGM_GETBKCOLOR = PGM_FIRST + 5 }
// #define Pager_GetBkColor(hwnd) (COLORREF)SNDMSG((hwnd), PGM_GETBKCOLOR, 0, 0)

enum : uint { PGM_SETBORDER = PGM_FIRST + 6 }
// #define Pager_SetBorder(hwnd, iBorder) (int)SNDMSG((hwnd), PGM_SETBORDER, 0, (LPARAM)(iBorder))

enum : uint { PGM_GETBORDER = PGM_FIRST + 7 }
// #define Pager_GetBorder(hwnd) (int)SNDMSG((hwnd), PGM_GETBORDER, 0, 0)

enum : uint { PGM_SETPOS = PGM_FIRST + 8 }
// #define Pager_SetPos(hwnd, iPos) (int)SNDMSG((hwnd), PGM_SETPOS, 0, (LPARAM)(iPos))

enum : uint { PGM_GETPOS = PGM_FIRST + 9 }
// #define Pager_GetPos(hwnd) (int)SNDMSG((hwnd), PGM_GETPOS, 0, 0)

enum : uint { PGM_SETBUTTONSIZE = PGM_FIRST + 10 }
// #define Pager_SetButtonSize(hwnd, iSize) (int)SNDMSG((hwnd), PGM_SETBUTTONSIZE, 0, (LPARAM)(iSize))

enum : uint { PGM_GETBUTTONSIZE = PGM_FIRST + 11 }
// #define Pager_GetButtonSize(hwnd) (int)SNDMSG((hwnd), PGM_GETBUTTONSIZE, 0,0)

enum : uint { PGM_GETBUTTONSTATE = PGM_FIRST + 12 }
// #define Pager_GetButtonState(hwnd, iButton) (DWORD)SNDMSG((hwnd), PGM_GETBUTTONSTATE, 0, (LPARAM)(iButton))

alias CCM_GETDROPTARGET PGM_GETDROPTARGET;
// #define Pager_GetDropTarget(hwnd, ppdt) (void)SNDMSG((hwnd), PGM_GETDROPTARGET, 0, (LPARAM)(ppdt))

enum : uint { PGN_SCROLL = PGN_FIRST-1 }

enum : uint { PGF_SCROLLUP = 1 }
enum : uint { PGF_SCROLLDOWN = 2 }
enum : uint { PGF_SCROLLLEFT = 4 }
enum : uint { PGF_SCROLLRIGHT = 8 }

enum : uint { PGK_SHIFT = 1 }
enum : uint { PGK_CONTROL = 2 }
enum : uint { PGK_MENU = 4 }

// #ifdef _WIN32
align(1):
// #endif

struct _16 {
  NMHDR hdr;
  WORD fwKeys;
  RECT rcParent;
  int iDir;
  int iXpos;
  int iYpos;
  int iScroll;
}
alias _16 NMPGSCROLL;
alias _16* LPNMPGSCROLL;

// #ifdef _WIN32
align:
// #endif

enum : uint { PGN_CALCSIZE = PGN_FIRST-2 }

enum : uint { PGF_CALCWIDTH = 1 }
enum : uint { PGF_CALCHEIGHT = 2 }

struct _17 {
  NMHDR hdr;
  DWORD dwFlag;
  int iWidth;
  int iHeight;
}
alias _17 NMPGCALCSIZE;
alias _17* LPNMPGCALCSIZE;

enum : uint { PGN_HOTITEMCHANGE = PGN_FIRST-3 }

struct tagNMPGHOTITEM {
  NMHDR hdr;
  int idOld;
  int idNew;
  DWORD dwFlags;
}
alias tagNMPGHOTITEM NMPGHOTITEM;
alias tagNMPGHOTITEM* LPNMPGHOTITEM;

// #endif // NOPAGESCROLLER

// #ifndef NONATIVEFONTCTL

const wchar[] WC_NATIVEFONTCTLW = "NativeFontCtl";
const char[] WC_NATIVEFONTCTLA = "NativeFontCtl";

// #ifdef UNICODE
alias WC_NATIVEFONTCTLW WC_NATIVEFONTCTL;
// #else
// #...
// #endif

enum : uint { NFS_EDIT = 0x0001 }
enum : uint { NFS_STATIC = 0x0002 }
enum : uint { NFS_LISTCOMBO = 0x0004 }
enum : uint { NFS_BUTTON = 0x0008 }
enum : uint { NFS_ALL = 0x0010 }
enum : uint { NFS_USEFONTASSOC = 0x0020 }

// #endif // NONATIVEFONTCTL

// #ifndef NOBUTTON

// #ifdef _WIN32

const char[] WC_BUTTONA = "Button";
const wchar[] WC_BUTTONW = "Button";

// #ifdef UNICODE
alias WC_BUTTONW WC_BUTTON;
// #else
// #...
// #endif

// #else
// #...
// #endif

// #if (_WIN32_WINNT >= 0x501)
enum : uint { BUTTON_IMAGELIST_ALIGN_LEFT = 0 }
enum : uint { BUTTON_IMAGELIST_ALIGN_RIGHT = 1 }
enum : uint { BUTTON_IMAGELIST_ALIGN_TOP = 2 }
enum : uint { BUTTON_IMAGELIST_ALIGN_BOTTOM = 3 }
enum : uint { BUTTON_IMAGELIST_ALIGN_CENTER = 4 }

struct _18 {
  HIMAGELIST himl;
  RECT margin;
  UINT uAlign;
}
alias _18 BUTTON_IMAGELIST;
alias _18* PBUTTON_IMAGELIST;

enum : uint { BCM_GETIDEALSIZE = BCM_FIRST + 0x0001 }
// #define Button_GetIdealSize(hwnd, psize) (BOOL)SNDMSG((hwnd), BCM_GETIDEALSIZE, 0, (LPARAM)(psize))

enum : uint { BCM_SETIMAGELIST = BCM_FIRST + 0x0002 }
// #define Button_SetImageList(hwnd, pbuttonImagelist) (BOOL)SNDMSG((hwnd), BCM_SETIMAGELIST, 0, (LPARAM)(pbuttonImagelist))

enum : uint { BCM_GETIMAGELIST = BCM_FIRST + 0x0003 }
// #define Button_GetImageList(hwnd, pbuttonImagelist) (BOOL)SNDMSG((hwnd), BCM_GETIMAGELIST, 0, (LPARAM)(pbuttonImagelist))

enum : uint { BCM_SETTEXTMARGIN = BCM_FIRST + 0x0004 }
// #define Button_SetTextMargin(hwnd, pmargin) (BOOL)SNDMSG((hwnd), BCM_SETTEXTMARGIN, 0, (LPARAM)(pmargin))
enum : uint { BCM_GETTEXTMARGIN = BCM_FIRST + 0x0005 }
// #define Button_GetTextMargin(hwnd, pmargin) (BOOL)SNDMSG((hwnd), BCM_GETTEXTMARGIN, 0, (LPARAM)(pmargin))

struct tagNMBCHOTITEM {
  NMHDR hdr;
  DWORD dwFlags;
}
alias tagNMBCHOTITEM NMBCHOTITEM;
alias tagNMBCHOTITEM* LPNMBCHOTITEM;

enum : uint { BCN_HOTITEMCHANGE = BCN_FIRST + 0x0001 }

enum : uint { BST_HOT = 0x0200 }

// #endif

// #endif // NOBUTTON

// #ifndef NOSTATIC

// #ifdef _WIN32

const char[] WC_STATICA = "Static";
const wchar[] WC_STATICW = "Static";

// #ifdef UNICODE
alias WC_STATICW WC_STATIC;
// #else
// #...
// #endif

// #else
// #...
// #endif

// #endif // NOSTATIC

// #ifndef NOEDIT

// #ifdef _WIN32

const char[] WC_EDITA = "Edit";
const wchar[] WC_EDITW = "Edit";

// #ifdef UNICODE
alias WC_EDITW WC_EDIT;
// #else
// #...
// #endif

// #else
// #...
// #endif

// #if (_WIN32_WINNT >= 0x501)
enum : uint { EM_SETCUEBANNER = ECM_FIRST + 1 }
// #define Edit_SetCueBannerText(hwnd, lpcwText) (BOOL)SNDMSG((hwnd), EM_SETCUEBANNER, 0, (LPARAM)(lpcwText))
enum : uint { EM_GETCUEBANNER = ECM_FIRST + 2 }
// #define Edit_GetCueBannerText(hwnd, lpwText, cchText) (BOOL)SNDMSG((hwnd), EM_GETCUEBANNER, (WPARAM)(lpwText), (LPARAM)(cchText))

struct _tagEDITBALLOONTIP {
  DWORD cbStruct;
  LPCWSTR pszTitle;
  LPCWSTR pszText;
  INT ttiIcon;
}
alias _tagEDITBALLOONTIP EDITBALLOONTIP;
alias _tagEDITBALLOONTIP* PEDITBALLOONTIP;

enum : uint { EM_SHOWBALLOONTIP = ECM_FIRST + 3 }
// #define Edit_ShowBalloonTip(hwnd, peditballoontip) (BOOL)SNDMSG((hwnd), EM_SHOWBALLOONTIP, 0, (LPARAM)(peditballoontip))
enum : uint { EM_HIDEBALLOONTIP = ECM_FIRST + 4 }
// #define Edit_HideBalloonTip(hwnd) (BOOL)SNDMSG((hwnd), EM_HIDEBALLOONTIP, 0, 0)
// #endif

// #endif // NOEDIT

// #ifndef NOLISTBOX

// #ifdef _WIN32

const char[] WC_LISTBOXA = "ListBox";
const wchar[] WC_LISTBOXW = "ListBox";

// #ifdef UNICODE
alias WC_LISTBOXW WC_LISTBOX;
// #else
// #...
// #endif

// #else
// #...
// #endif

// #endif // NOLISTBOX

// #ifndef NOCOMBOBOX

// #ifdef _WIN32

const char[] WC_COMBOBOXA = "ComboBox";
const wchar[] WC_COMBOBOXW = "ComboBox";

// #ifdef UNICODE
alias WC_COMBOBOXW WC_COMBOBOX;
// #else
// #...
// #endif

// #else
// #...
// #endif

// #endif // NOCOMBOBOX

// #if (_WIN32_WINNT >= 0x501)

enum : uint { CB_SETMINVISIBLE = CBM_FIRST + 1 }
enum : uint { CB_GETMINVISIBLE = CBM_FIRST + 2 }

// #define ComboBox_SetMinVisible(hwnd, iMinVisible) (BOOL)SNDMSG((hwnd), CB_SETMINVISIBLE, (WPARAM)iMinVisible, 0)

// #define ComboBox_GetMinVisible(hwnd) (int)SNDMSG((hwnd), CB_GETMINVISIBLE, 0, 0)

// #endif

// #ifndef NOSCROLLBAR

// #ifdef _WIN32

const char[] WC_SCROLLBARA = "ScrollBar";
const wchar[] WC_SCROLLBARW = "ScrollBar";

// #ifdef UNICODE
alias WC_SCROLLBARW WC_SCROLLBAR;
// #else
// #...
// #endif

// #else
// #...
// #endif

// #endif // NOSCROLLBAR

// #ifdef _WIN32
// #if (_WIN32_WINNT >= 0x501)

enum { INVALID_LINK_INDEX = -1 }
enum : uint { MAX_LINKID_TEXT = 48 }
enum { L_MAX_URL_LENGTH = 2048 + 32 + 4 }

const wchar[] WC_LINK = "SysLink";

enum : uint { LWS_TRANSPARENT = 0x0001 }
enum : uint { LWS_IGNORERETURN = 0x0002 }

enum : uint { LIF_ITEMINDEX = 0x00000001 }
enum : uint { LIF_STATE = 0x00000002 }
enum : uint { LIF_ITEMID = 0x00000004 }
enum : uint { LIF_URL = 0x00000008 }

enum : uint { LIS_FOCUSED = 0x00000001 }
enum : uint { LIS_ENABLED = 0x00000002 }
enum : uint { LIS_VISITED = 0x00000004 }

struct tagLITEM {
  UINT mask ;
  int iLink ;
  UINT state ;
  UINT stateMask ;
  WCHAR szID[MAX_LINKID_TEXT] ;
  WCHAR szUrl[L_MAX_URL_LENGTH] ;
}
alias tagLITEM LITEM;
alias tagLITEM* PLITEM;

struct tagLHITTESTINFO {
  POINT pt ;
  LITEM item ;
}
alias tagLHITTESTINFO LHITTESTINFO;
alias tagLHITTESTINFO* PLHITTESTINFO;

struct tagNMLINK {
  NMHDR hdr;
  LITEM item ;
}
alias tagNMLINK NMLINK;
alias tagNMLINK* PNMLINK;

enum : uint { LM_HITTEST = WM_USER+0x300 }
enum : uint { LM_GETIDEALHEIGHT = WM_USER+0x301 }
enum : uint { LM_SETITEM = WM_USER+0x302 }
enum : uint { LM_GETITEM = WM_USER+0x303 }

// #endif
// #endif // _WIN32

// #ifndef NOMUI
extern(Windows) export void InitMUILanguage(LANGID uiLang);

extern(Windows) export LANGID GetMUILanguage();
// #endif  // NOMUI

// #endif      // _WIN32_IE >= 0x0400

// #ifdef _WIN32

// #ifndef NOTRACKMOUSEEVENT

// #ifndef WM_MOUSEHOVER
// #...
// #...
// #endif

// #ifndef TME_HOVER

enum : uint { TME_HOVER = 0x00000001 }
enum : uint { TME_LEAVE = 0x00000002 }
// #if (WINVER >= 0x0500)
enum : uint { TME_NONCLIENT = 0x00000010 }
// #endif /* WINVER >= 0x0500 */
enum : uint { TME_QUERY = 0x40000000 }
enum : uint { TME_CANCEL = 0x80000000 }

enum : uint { HOVER_DEFAULT = 0xFFFFFFFF }

struct tagTRACKMOUSEEVENT {
  DWORD cbSize;
  DWORD dwFlags;
  HWND hwndTrack;
  DWORD dwHoverTime;
}
alias tagTRACKMOUSEEVENT TRACKMOUSEEVENT;
alias tagTRACKMOUSEEVENT* LPTRACKMOUSEEVENT;

// #endif // !TME_HOVER

extern(Windows) export BOOL _TrackMouseEvent(
  LPTRACKMOUSEEVENT lpEventTrack);

// #endif // !NOTRACKMOUSEEVENT

// #if (_WIN32_IE >= 0x0400)

// #ifndef NOFLATSBAPIS

enum : uint { WSB_PROP_CYVSCROLL = 0x00000001 }
enum : uint { WSB_PROP_CXHSCROLL = 0x00000002 }
enum : uint { WSB_PROP_CYHSCROLL = 0x00000004 }
enum : uint { WSB_PROP_CXVSCROLL = 0x00000008 }
enum : uint { WSB_PROP_CXHTHUMB = 0x00000010 }
enum : uint { WSB_PROP_CYVTHUMB = 0x00000020 }
enum : uint { WSB_PROP_VBKGCOLOR = 0x00000040 }
enum : uint { WSB_PROP_HBKGCOLOR = 0x00000080 }
enum : uint { WSB_PROP_VSTYLE = 0x00000100 }
enum : uint { WSB_PROP_HSTYLE = 0x00000200 }
enum : uint { WSB_PROP_WINSTYLE = 0x00000400 }
enum : uint { WSB_PROP_PALETTE = 0x00000800 }
enum : uint { WSB_PROP_MASK = 0x00000FFF }

enum : uint { FSB_FLAT_MODE = 2 }
enum : uint { FSB_ENCARTA_MODE = 1 }
enum : uint { FSB_REGULAR_MODE = 0 }

extern(Windows) export BOOL FlatSB_EnableScrollBar(HWND, int, UINT);
extern(Windows) export BOOL FlatSB_ShowScrollBar(HWND, int code, BOOL);

extern(Windows) export BOOL FlatSB_GetScrollRange(HWND, int code, LPINT, LPINT);
extern(Windows) export BOOL FlatSB_GetScrollInfo(HWND, int code, LPSCROLLINFO);

extern(Windows) export int FlatSB_GetScrollPos(HWND, int code);

extern(Windows) export BOOL FlatSB_GetScrollProp(HWND, int propIndex, LPINT);
// #ifdef _WIN64
// ...
// #else
alias FlatSB_GetScrollProp FlatSB_GetScrollPropPtr;
// #endif

extern(Windows) export int FlatSB_SetScrollPos(HWND, int code, int pos, BOOL fRedraw);

extern(Windows) export int FlatSB_SetScrollInfo(HWND, int code, LPSCROLLINFO, BOOL fRedraw);

extern(Windows) export int FlatSB_SetScrollRange(HWND, int code, int min, int max, BOOL fRedraw);
extern(Windows) export BOOL FlatSB_SetScrollProp(HWND, UINT index, INT_PTR newValue, BOOL);
alias FlatSB_SetScrollProp FlatSB_SetScrollPropPtr;

extern(Windows) export BOOL InitializeFlatSB(HWND);
extern(Windows) export HRESULT UninitializeFlatSB(HWND);

// #endif  //  NOFLATSBAPIS

// #endif      // _WIN32_IE >= 0x0400

// #endif /* _WIN32 */

// #endif      // _WIN32_IE >= 0x0300

// #if (_WIN32_WINNT >= 0x501)

extern(Windows) alias LRESULT function(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData) SUBCLASSPROC;

extern(Windows) export BOOL SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIdSubclass,
  DWORD_PTR dwRefData);
extern(Windows) export BOOL GetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIdSubclass,
  DWORD_PTR *pdwRefData);
extern(Windows) export BOOL RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass,
  UINT_PTR uIdSubclass);

extern(Windows) export LRESULT DefSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
// #endif

// #if (_WIN32_WINNT >= 0x501)

extern(Windows) export int DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT* prc, DWORD dwFlags, COLORREF crText, COLORREF crShadow,
  int ixOffset, int iyOffset);
// #endif

// #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
// #if ISOLATION_AWARE_ENABLED

// #if !defined(ISOLATION_AWARE_INLINE)
// #if defined(__cplusplus)
// #...
// #else
// #...
// #endif
// #endif

// ...

// ...
// #if defined(__IStream_INTERFACE_DEFINED__)
// ...
// #if defined(__IStream_INTERFACE_DEFINED__) &&  (_WIN32_WINNT >= 0x0501)
// ...
// #endif /* defined(__IStream_INTERFACE_DEFINED__) &&  (_WIN32_WINNT >= 0x0501) */
// #endif /* defined(__IStream_INTERFACE_DEFINED__) */
// ...
// #if !defined(NOTRACKMOUSEEVENT)
// ...
// #endif /* !defined(NOTRACKMOUSEEVENT) */
// ...
// #if (_WIN32_IE >= 0x560)
// ...
// #endif /* (_WIN32_IE >= 0x560) */
// ...

// #if defined(UNICODE)

// #...
// #...
// #...

// #else /* UNICODE */

// #...
// #...
// #...

// #endif /* UNICODE */

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// #if defined(__IStream_INTERFACE_DEFINED__)

// ...

// ...

// #if defined(__IStream_INTERFACE_DEFINED__) &&  (_WIN32_WINNT >= 0x0501)

// ...

// ...

// ...

// ...

// #endif /* defined(__IStream_INTERFACE_DEFINED__) &&  (_WIN32_WINNT >= 0x0501) */
// #endif /* defined(__IStream_INTERFACE_DEFINED__) */

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// #if !defined(NOTRACKMOUSEEVENT)

// ...

// #endif /* !defined(NOTRACKMOUSEEVENT) */

// ...

// ...

// ...

// ...

// ...

// ...

// ...
// #if defined(_WIN64)
// ...
// #else
// ...
// #endif
// ...

// ...

// ...

// ...

// ...

// ...

// ...

// ...

// #if (_WIN32_IE >= 0x560)

// ...

// ...

// ...

// #endif /* (_WIN32_IE >= 0x560) */

// ...

// ...

// ...

// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #if defined(FlatSB_GetScrollPropPtr)
// #...
// #endif
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...
// #...

// #endif /* ISOLATION_AWARE_ENABLED */
// #endif /* RC */

// #ifdef __cplusplus
// }
// #endif

// #endif

// #endif  // _INC_COMMCTRL