commctrl.inc
dp4_micrommander/project/include/x64/commctrl.inc

	IFDEF	UNICODE
	
CreateStatusWindow	equ	CreateStatusWindowW
ImageList_LoadImage	equ	ImageList_LoadImageW

HDITEM		equ	HDITEMW
LVCOLUMN		equ	LVCOLUMNW
DTN_USERSTRING		equ	DTN_USERSTRINGW
DTN_WMKEYDOWN		equ	DTN_WMKEYDOWNW
DTN_FORMAT		equ	DTN_FORMATW
DTN_FORMATQUERY	equ	DTN_FORMATQUERYW
DTM_SETFORMAT		equ	DTM_SETFORMATW
ACM_OPEN		equ	ACM_OPENW
TCM_INSERTITEM		equ	TCM_INSERTITEMW
TCITEMHEADER		equ	TCITEMHEADERW
TCITEM		equ	TCITEMW
TCM_GETITEM		equ	TCM_GETITEMW
TCM_SETITEM		equ	TCM_SETITEMW
NMCBEDRAGBEGIN		equ	NMCBEDRAGBEGINW
NMCBEENDEDIT		equ	NMCBEENDEDITW
CBEN_DRAGBEGIN		equ	CBEN_DRAGBEGINW
CBEN_ENDEDIT		equ	CBEN_ENDEDITW
NMCOMBOBOXEX		equ	NMCOMBOBOXEXW
CBEM_INSERTITEM		equ	CBEM_INSERTITEMW
CBEM_SETITEM		equ	CBEM_SETITEMW
CBEM_GETITEM		equ	CBEM_GETITEMW
COMBOBOXEXITEM		equ	COMBOBOXEXITEMW
TVN_GETINFOTIP		equ	TVN_GETINFOTIPW
TVN_SELCHANGING		equ	TVN_SELCHANGINGW
TVN_SELCHANGED		equ	TVN_SELCHANGEDW
TVN_GETDISPINFO		equ	TVN_GETDISPINFOW
TVN_SETDISPINFO		equ	TVN_SETDISPINFOW
TVN_ITEMEXPANDING	equ	TVN_ITEMEXPANDINGW
TVN_ITEMEXPANDED	equ	TVN_ITEMEXPANDEDW
TVN_BEGINDRAG		equ	TVN_BEGINDRAGW
TVN_BEGINRDRAG		equ	TVN_BEGINRDRAGW
TVN_DELETEITEM		equ	TVN_DELETEITEMW
TVN_BEGINLABELEDIT	equ	TVN_BEGINLABELEDITW
TVN_ENDLABELEDIT	equ	TVN_ENDLABELEDITW
NMTVDISPINFO		equ	NMTVDISPINFOW
NMTREEVIEW		equ	NMTREEVIEWW
TVM_GETISEARCHSTRING	equ	TVM_GETISEARCHSTRINGW
TVM_SETITEM		equ	TVM_SETITEMW
TVM_EDITLABEL		equ	TVM_EDITLABELW
TVM_GETITEM		equ	TVM_GETITEMW
TVINSERTSTRUCT		equ	TVINSERTSTRUCTW
TVM_INSERTITEM		equ	TVM_INSERTITEMW
TVITEM		equ	TVITEMW
TVITEMEX		equ	TVITEMEXW
LVN_GETINFOTIP		equ	LVN_GETINFOTIPW
NMLVGETINFOTIP		equ	NMLVGETINFOTIPW
NMLVDISPINFO		equ	NMLVDISPINFOW
LVN_ODFINDITEM		equ	LVN_ODFINDITEMW
LVN_BEGINLABELEDIT	equ	LVN_BEGINLABELEDITW
LVN_ENDLABELEDIT	equ	LVN_ENDLABELEDITW
LVN_GETDISPINFO		equ	LVN_GETDISPINFOW
LVN_SETDISPINFO		equ	LVN_SETDISPINFOW
NM_FINDITEM		equ	NM_FINDITEMW
LVBKIMAGE		equ	LVBKIMAGEW
LPLVBKIMAGE		equ	LPLVBKIMAGEW
LVM_SETBKIMAGE		equ	LVM_SETBKIMAGEW
LVM_GETBKIMAGE		equ	LVM_GETBKIMAGEW
LVM_GETISEARCHSTRING	equ	LVM_GETISEARCHSTRINGW
LVM_GETCOLUMN		equ	LVM_GETCOLUMNW
LVM_SETCOLUMN		equ	LVM_SETCOLUMNW
LVM_INSERTCOLUMN	equ	LVM_INSERTCOLUMNW
LVM_GETITEMTEXT	equ	LVM_GETITEMTEXTW
LVM_SETITEMTEXT	equ	LVM_SETITEMTEXTW
LVM_EDITLABEL		equ	LVM_EDITLABELW
LVM_GETSTRINGWIDTH	equ	LVM_GETSTRINGWIDTHW
LVM_FINDITEM		equ	LVM_FINDITEMW
LVFINDINFO		equ	LVFINDINFOW
LVITEM		equ	LVITEMW
LVM_INSERTITEM		equ	LVM_INSERTITEMW
LVM_SETITEM		equ	LVM_SETITEMW
LVM_GETITEM		equ	LVM_GETITEMW
TRACKBAR_CLASS		equ	TRACKBAR_CLASSW
SB_GETTEXT		equ	SB_GETTEXTW
SB_SETTEXT		equ	SB_SETTEXTW
SB_GETTEXTLENGTH	equ	SB_GETTEXTLENGTHW
SB_SETTIPTEXT		equ	SB_SETTIPTEXTW
SB_GETTIPTEXT		equ	SB_GETTIPTEXTW
DrawStatusText		equ	DrawStatusTextW
NMTTDISPINFO		equ	NMTTDISPINFOW
TTN_GETDISPINFO		equ	TTN_GETDISPINFOW
TTN_NEEDTEXTW		equ	TTN_NEEDTEXT
TTHITTESTINFO		equ	TTHITTESTINFOW
TTM_ADDTOOL		equ	TTM_ADDTOOLW
TTM_DELTOOL		equ	TTM_DELTOOLW
TTM_NEWTOOLRECT	equ	TTM_NEWTOOLRECTW
TTM_GETTOOLINFO	equ	TTM_GETTOOLINFOW
TTM_SETTOOLINFO	equ	TTM_SETTOOLINFOW
TTM_HITTEST		equ	TTM_HITTESTW
TTM_GETTEXT		equ	TTM_GETTEXTW
TTM_UPDATETIPTEXT	equ	TTM_UPDATETIPTEXTW
TTM_ENUMTOOLS		equ	TTM_ENUMTOOLSW
TTM_GETCURRENTTOOL	equ	TTM_GETCURRENTTOOLW
TTM_SETTITLE		equ	TTM_SETTITLEW
TTTOOLINFO		equ	TTTOOLINFOW
REBARBANDINFO		equ	REBARBANDINFOW
RB_INSERTBAND		equ	RB_INSERTBANDW
RB_SETBANDINFO		equ	RB_SETBANDINFOW
RB_GETBANDINFO		equ	RB_GETBANDINFOW
HD_ITEM		equ	HD_ITEMW
HD_TEXTFILTER		equ	HD_TEXTFILTERW
HDM_INSERTITEM		equ	HDM_INSERTITEMW
HDM_SETITEM		equ	HDM_SETITEMW
HDM_GETITEM		equ	HDM_GETITEMW
HDN_ITEMCHANGING	equ	HDN_ITEMCHANGINGW
HDN_ITEMCHANGED	equ	HDN_ITEMCHANGEDW
HDN_ITEMCLICK		equ	HDN_ITEMCLICKW
HDN_ITEMDBLCLICK	equ	HDN_ITEMDBLCLICKW
HDN_DIVIDERDBLCLICK	equ	HDN_DIVIDERDBLCLICKW
HDN_BEGINTRACK		equ	HDN_BEGINTRACKW
HDN_ENDTRACK		equ	HDN_ENDTRACKW
HDN_TRACK		equ	HDN_TRACKW
HDN_GETDISPINFO		equ	HDN_GETDISPINFOW
NMHEADER		equ	NMHEADERW
NMHDDISPINFO		equ	NMHDDISPINFOW
TBSAVEPARAMS		equ	TBSAVEPARAMSW
TB_GETBUTTONTEXT	equ	TB_GETBUTTONTEXTW
TB_SAVERESTORE		equ	TB_SAVERESTOREW
TB_ADDSTRING		equ	TB_ADDSTRINGW
TB_MAPACCELERATOR	equ	TB_MAPACCELERATORW
TBBUTTONINFO		equ	TBBUTTONINFOW
TB_INSERTBUTTON		equ	TB_INSERTBUTTONW
TB_ADDBUTTONS		equ	TB_ADDBUTTONSW
TB_GETBUTTONINFO	equ	TB_GETBUTTONINFOW
TB_SETBUTTONINFO	equ	TB_SETBUTTONINFOW
TB_GETSTRING		equ	TB_GETSTRINGW
TBN_GETINFOTIP		equ	TBN_GETINFOTIPW
TBN_GETDISPINFO		equ	TBN_GETDISPINFOW
TBN_GETBUTTONINFO	equ	TBN_GETBUTTONINFOW
NMTOOLBAR		equ	NMTOOLBARW

	ELSE

CreateStatusWindow	equ	CreateStatusWindowA
ImageList_LoadImage	equ	ImageList_LoadImageA

HDITEM		equ	HDITEMA
DTN_USERSTRING		equ	DTN_USERSTRINGA
DTN_WMKEYDOWN		equ	DTN_WMKEYDOWNA
DTN_FORMAT		equ	DTN_FORMATA
DTN_FORMATQUERY	equ	DTN_FORMATQUERYA
DTM_SETFORMAT		equ	DTM_SETFORMATA
ACM_OPEN		equ	ACM_OPENA
TCM_INSERTITEM		equ	TCM_INSERTITEMA
TCITEMHEADER		equ	TCITEMHEADERA
TCITEM		equ	TCITEMA
TCM_GETITEM		equ	TCM_GETITEMA
TCM_SETITEM		equ	TCM_SETITEMA
NMCBEDRAGBEGIN		equ	NMCBEDRAGBEGINA
NMCBEENDEDIT		equ	NMCBEENDEDITA
CBEN_DRAGBEGIN		equ	CBEN_DRAGBEGINA
CBEN_ENDEDIT		equ	CBEN_ENDEDITA
NMCOMBOBOXEX		equ	NMCOMBOBOXEXA
CBEM_INSERTITEM		equ	CBEM_INSERTITEMA
CBEM_SETITEM		equ	CBEM_SETITEMA
CBEM_GETITEM		equ	CBEM_GETITEMA
COMBOBOXEXITEM		equ	COMBOBOXEXITEMA
TVN_GETINFOTIP		equ	TVN_GETINFOTIPA
TVN_SELCHANGING		equ	TVN_SELCHANGINGA
TVN_SELCHANGED		equ	TVN_SELCHANGEDA
TVN_GETDISPINFO		equ	TVN_GETDISPINFOA
TVN_SETDISPINFO		equ	TVN_SETDISPINFOA
TVN_ITEMEXPANDING	equ	TVN_ITEMEXPANDINGA
TVN_ITEMEXPANDED	equ	TVN_ITEMEXPANDEDA
TVN_BEGINDRAG		equ	TVN_BEGINDRAGA
TVN_BEGINRDRAG		equ	TVN_BEGINRDRAGA
TVN_DELETEITEM		equ	TVN_DELETEITEMA
TVN_BEGINLABELEDIT	equ	TVN_BEGINLABELEDITA
TVN_ENDLABELEDIT	equ	TVN_ENDLABELEDITA
NMTVDISPINFO		equ	NMTVDISPINFOA
NMTREEVIEW		equ	NMTREEVIEWA
TVM_GETISEARCHSTRING	equ	TVM_GETISEARCHSTRINGA
TVM_SETITEM		equ	TVM_SETITEMA
TVM_EDITLABEL		equ	TVM_EDITLABELA
TVM_GETITEM		equ	TVM_GETITEMA
TVINSERTSTRUCT		equ	TVINSERTSTRUCTA
TVM_INSERTITEM		equ	TVM_INSERTITEMA
TVITEM		equ	TVITEMA
TVITEMEX		equ	TVITEMEXA
LVN_GETINFOTIP		equ	LVN_GETINFOTIPA
NMLVGETINFOTIP		equ	NMLVGETINFOTIPA
NMLVDISPINFO		equ	NMLVDISPINFOA
LVN_ODFINDITEM		equ	LVN_ODFINDITEMA
LVN_BEGINLABELEDIT	equ	LVN_BEGINLABELEDITA
LVN_ENDLABELEDIT	equ	LVN_ENDLABELEDITA
LVN_GETDISPINFO		equ	LVN_GETDISPINFOA
LVN_SETDISPINFO		equ	LVN_SETDISPINFOA
NM_FINDITEM		equ	NM_FINDITEMA
LVBKIMAGE		equ	LVBKIMAGEA
LPLVBKIMAGE		equ	LPLVBKIMAGEA
LVM_SETBKIMAGE		equ	LVM_SETBKIMAGEA
LVM_GETBKIMAGE		equ	LVM_GETBKIMAGEA
LVM_GETISEARCHSTRING	equ	LVM_GETISEARCHSTRINGA
LVM_GETCOLUMN		equ	LVM_GETCOLUMNA
LVM_SETCOLUMN		equ	LVM_SETCOLUMNA
LVM_INSERTCOLUMN	equ	LVM_INSERTCOLUMNA
LVM_GETITEMTEXT	equ	LVM_GETITEMTEXTA
LVM_SETITEMTEXT	equ	LVM_SETITEMTEXTA
LVCOLUMN		equ	LVCOLUMNA
LVM_EDITLABEL		equ	LVM_EDITLABELA
LVM_GETSTRINGWIDTH	equ	LVM_GETSTRINGWIDTHA
LVM_FINDITEM		equ	LVM_FINDITEMA
LVFINDINFO		equ	LVFINDINFOA
LVITEM		equ	LVITEMA
LVM_INSERTITEM		equ	LVM_INSERTITEMA
LVM_SETITEM		equ	LVM_SETITEMA
LVM_GETITEM		equ	LVM_GETITEMA
TRACKBAR_CLASS		equ	TRACKBAR_CLASSA
SB_GETTEXT		equ	SB_GETTEXTA
SB_SETTEXT		equ	SB_SETTEXTA
SB_GETTEXTLENGTH	equ	SB_GETTEXTLENGTHA
SB_SETTIPTEXT		equ	SB_SETTIPTEXTA
SB_GETTIPTEXT		equ	SB_GETTIPTEXTA
DrawStatusText		equ	DrawStatusTextA
NMTTDISPINFO		equ	NMTTDISPINFOA
TTN_GETDISPINFO		equ	TTN_GETDISPINFOA
TTN_NEEDTEXT		equ	TTN_NEEDTEXTA
TTHITTESTINFO		equ	TTHITTESTINFOA
TTM_ADDTOOL		equ	TTM_ADDTOOLA
TTM_DELTOOL		equ	TTM_DELTOOLA
TTM_NEWTOOLRECT	equ	TTM_NEWTOOLRECTA
TTM_GETTOOLINFO	equ	TTM_GETTOOLINFOA
TTM_SETTOOLINFO	equ	TTM_SETTOOLINFOA
TTM_HITTEST		equ	TTM_HITTESTA
TTM_GETTEXT		equ	TTM_GETTEXTA
TTM_UPDATETIPTEXT	equ	TTM_UPDATETIPTEXTA
TTM_ENUMTOOLS		equ	TTM_ENUMTOOLSA
TTM_GETCURRENTTOOL	equ	TTM_GETCURRENTTOOLA
TTM_SETTITLE		equ	TTM_SETTITLEA
TOOLINFO		equ	TOOLINFOA
REBARBANDINFO		equ	REBARBANDINFOA
RB_INSERTBAND		equ	RB_INSERTBANDA
RB_SETBANDINFO		equ	RB_SETBANDINFOA
RB_GETBANDINFO		equ	RB_GETBANDINFOA
HD_ITEM		equ	HD_ITEMA
HD_TEXTFILTER		equ	HD_TEXTFILTERA
HDM_INSERTITEM		equ	HDM_INSERTITEMA
HDM_SETITEM		equ	HDM_SETITEMA
HDM_GETITEM		equ	HDM_GETITEMA
HDN_ITEMCHANGING	equ	HDN_ITEMCHANGINGA
HDN_ITEMCHANGED	equ	HDN_ITEMCHANGEDA
HDN_ITEMCLICK		equ	HDN_ITEMCLICKA
HDN_ITEMDBLCLICK	equ	HDN_ITEMDBLCLICKA
HDN_DIVIDERDBLCLICK	equ	HDN_DIVIDERDBLCLICKA
HDN_BEGINTRACK		equ	HDN_BEGINTRACKA
HDN_ENDTRACK		equ	HDN_ENDTRACKA
HDN_TRACK		equ	HDN_TRACKA
HDN_GETDISPINFO		equ	HDN_GETDISPINFOA
NMHEADER		equ	NMHEADERA
NMHDDISPINFO		equ	NMHDDISPINFOA
TBSAVEPARAMS		equ	TBSAVEPARAMSA
TB_GETBUTTONTEXT	equ	TB_GETBUTTONTEXTA
TB_SAVERESTORE		equ	TB_SAVERESTOREA
TB_ADDSTRING		equ	TB_ADDSTRINGA
TB_MAPACCELERATOR	equ	TB_MAPACCELERATORA
TBBUTTONINFO		equ	TBBUTTONINFOA
TB_INSERTBUTTON		equ	TB_INSERTBUTTONA
TB_ADDBUTTONS		equ	TB_ADDBUTTONSA
TB_GETBUTTONINFO	equ	TB_GETBUTTONINFOA
TB_SETBUTTONINFO	equ	TB_SETBUTTONINFOA
TB_GETSTRING		equ	TB_GETSTRINGA
TBN_GETINFOTIP		equ	TBN_GETINFOTIPA
TBN_GETDISPINFO		equ	TBN_GETDISPINFOA
TBN_GETBUTTONINFO	equ	TBN_GETBUTTONINFOA
NMTOOLBAR		equ	NMTOOLBARA
	ENDIF

CreateStatusWindowA	proto	:DWORD, :QWORD, :QWORD, :DWORD
CreateStatusWindowW	proto	:DWORD, :QWORD, :QWORD, :DWORD
ImageList_Destroy		proto	:QWORD
ImageList_LoadImageA	proto	:QWORD, :QWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
ImageList_LoadImageW	proto	:QWORD, :QWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
InitCommonControlsEx	proto	:QWORD
TaskDialog		proto	:QWORD, :QWORD, :QWORD, :QWORD, :QWORD, :DWORD, :QWORD, :QWORD
TaskDialogIndirect	proto	:QWORD, :QWORD, :QWORD, :QWORD


ICC_LISTVIEW_CLASSES	=	00000001h	; listview, header
ICC_TREEVIEW_CLASSES	=	00000002h	; treeview, tooltips
ICC_BAR_CLASSES		=	00000004h	; toolbar, statusbar, trackbar, tooltips
ICC_TAB_CLASSES		=	00000008h	; tab, tooltips
ICC_UPDOWN_CLASS	=	00000010h	; updown
ICC_PROGRESS_CLASS	=	00000020h	; progress
ICC_HOTKEY_CLASS	=	00000040h	; hotkey
ICC_ANIMATE_CLASS	=	00000080h	; animate
ICC_WIN95_CLASSES	=	000000FFh
ICC_DATE_CLASSES	=	00000100h	; month picker, date picker, time picker, updown
ICC_USEREX_CLASSES	=	00000200h	; comboex
ICC_COOL_CLASSES	=	00000400h	; rebar (coolbar) control
ICC_INTERNET_CLASSES	=	00000800h
ICC_PAGESCROLLER_CLASS	=	00001000h	; page scroller
ICC_NATIVEFNTCTL_CLASS	=	00002000h	; native font control
ICC_STANDARD_CLASSES	=	00004000h
ICC_LINK_CLASS		=	00008000h

INITCOMMCTRLEX	struc
 dwSize	dd	?	; size of this structure
 dwICC	dd	?	; flags indicating which classes to be initialized
INITCOMMCTRLEX	ends

LVFINDINFOW		struc
 flags		dd	?
		dd	?
 psz		dq	?
 lParam		dq	?
 pt		POINT	<?>
 vkDirection		dd	?
	dd	?
LVFINDINFOW	ends


LV_FINDINFOA		equ	LVFINDINFOA
LV_FINDINFOW		equ	LVFINDINFOW

LVM_FINDITEMA		equ	LVM_FIRST + 13
LVM_FINDITEMW		equ	LVM_FIRST + 83

PBRANGE		struc
 iLow		dd	?
 iHigh		dd	?
		dd	?, ?
PBRANGE		ends

TD_WARNING_ICON         = (-1)
TD_ERROR_ICON           =(-2)
TD_INFORMATION_ICON     =(-3)
TD_SHIELD_ICON          =(-4)
TDCBF_OK_BUTTON            = 00001h; selected control return value IDOK
TDCBF_YES_BUTTON           = 00002h; selected control return value IDYES
TDCBF_NO_BUTTON            = 00004h; selected control return value IDNO
TDCBF_CANCEL_BUTTON        = 00008h; selected control return value IDCANCEL
TDCBF_RETRY_BUTTON         = 00010h; selected control return value IDRETRY
TDCBF_CLOSE_BUTTON         = 00020h; selected control return value IDCLOSE

TDF_ENABLE_HYPERLINKS               = 00001h
TDF_USE_HICON_MAIN                  = 00002h
TDF_USE_HICON_FOOTER                = 00004h
TDF_ALLOW_DIALOG_CANCELLATION       = 00008h
TDF_USE_COMMAND_LINKS               = 00010h
TDF_USE_COMMAND_LINKS_NO_ICON       = 00020h
TDF_EXPAND_FOOTER_AREA              = 00040h
TDF_EXPANDED_BY_DEFAULT             = 00080h
TDF_VERIFICATION_FLAG_CHECKED       = 00100h
TDF_SHOW_PROGRESS_BAR               = 00200h
TDF_SHOW_MARQUEE_PROGRESS_BAR       = 00400h
TDF_CALLBACK_TIMER                  = 00800h
TDF_POSITION_RELATIVE_TO_WINDOW     = 01000h
TDF_RTL_LAYOUT                      = 02000h
TDF_NO_DEFAULT_RADIO_BUTTON         = 04000h
TDF_CAN_BE_MINIMIZED                = 08000

TDM_NAVIGATE_PAGE                   = WM_USER+101
TDM_CLICK_BUTTON                    = WM_USER+102; wParam = Button ID
TDM_SET_MARQUEE_PROGRESS_BAR        = WM_USER+103; wParam = 0 (nonMarque) wParam != 0 (Marquee)
TDM_SET_PROGRESS_BAR_STATE          = WM_USER+104; wParam = new progress state
TDM_SET_PROGRESS_BAR_RANGE          = WM_USER+105; lParam = MAKELPARAM(nMinRangenMaxRange)
TDM_SET_PROGRESS_BAR_POS            = WM_USER+106; wParam = new position
TDM_SET_PROGRESS_BAR_MARQUEE        = WM_USER+107; wParam = 0 (stop marquee)wParam != 0 (start marquee)lparam = speed (milliseconds between repaints)
TDM_SET_ELEMENT_TEXT                = WM_USER+108; wParam = element (TASKDIALOG_ELEMENTS)lParam = new element text (LPCWSTR)
TDM_CLICK_RADIO_BUTTON              = WM_USER+110; wParam = Radio Button ID
TDM_ENABLE_BUTTON                   = WM_USER+111; lParam = 0 (disable)lParam != 0 (enable)wParam = Button ID
TDM_ENABLE_RADIO_BUTTON             = WM_USER+112; lParam = 0 (disable)lParam != 0 (enable)wParam = Radio Button ID
TDM_CLICK_VERIFICATION              = WM_USER+113; wParam = 0 (unchecked)1 (checked)lParam = 1 (set key focus)
TDM_UPDATE_ELEMENT_TEXT             = WM_USER+114; wParam = element (TASKDIALOG_ELEMENTS)lParam = new element text (LPCWSTR)
TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = WM_USER+115; wParam = Button IDlParam = 0 (elevation not required), lParam != 0 (elevation required)
TDM_UPDATE_ICON                     = WM_USER+116  ; wParam = icon element (TASKDIALOG_ICON_ELEMENTS), lParam = new icon (hIcon if TDF_USE_HICON_* was set, PCWSTR otherwise)

TDN_CREATED                         = 0
TDN_NAVIGATED                       = 1
TDN_BUTTON_CLICKED                  = 2          ; wParam = Button ID
TDN_HYPERLINK_CLICKED               = 3          ; lParam = (LPCWSTR)pszHREF
TDN_TIMER                           = 4          ; wParam = Milliseconds since dialog created or timer reset
TDN_DESTROYED                       = 5
TDN_RADIO_BUTTON_CLICKED            = 6          ; wParam = Radio Button ID
TDN_DIALOG_CONSTRUCTED              = 7
TDN_VERIFICATION_CLICKED            = 8           ; wParam = 1 if checkbox checked, 0 if not, lParam is unused and always 0
TDN_HELP                            = 9
TDN_EXPANDO_BUTTON_CLICKED          = 10            ; wParam = 0 (dialog is now collapsed), wParam != 0 (dialog is now expanded)

TASKDIALOG_BUTTON	STRUC
  nButtonID		dd	?
  pszButtonText	dq	?
TASKDIALOG_BUTTON	ENDS

TASKDIALOGCONFIG	STRUC
 cbSize			dd	?
 hwndParent		dq	?
 hInstance		dq	?	; used for MAKEINTRESOURCE() strings
 dwFlags		dd	?	; TASKDIALOG_FLAGS (TDF_XXX) flags
 dwCommonButtons	dd	?	; TASKDIALOG_COMMON_BUTTON (TDCBF_XXX) flags
 pszWindowTitle	dq	?	; string or MAKEINTRESOURCE()
; hMainIcon
 pszMainIcon		dq	?
 pszMainInstruction	dq	?
 pszContent		dq	?
 cButtons		dd	?
 pButtons		dq	?
 nDefaultButton	dd	?
 cRadioButtons		dd	?
 pRadioButtons		dq	?
 nDefaultRadioButton	dd	?
 pszVerificationText	dq	?
 pszExpandedInformation	dq	?
 pszExpandedControlText	dq	?
 pszCollapsedControlText	dq	?
; hFooterIcon
 pszFooterIcon		dq	?
 pszFooter		dq	?
 pfCallback		dq	?
 lpCallbackData		dq	?
 cxWidth		dd	?	; width of the Task Dialog's client area in DLU's. If 0, Task Dialog will calculate the ideal width.
TASKDIALOGCONFIG	ENDS


;====== WM_NOTIFY codes (NMHDR.code values) ==================================

NM_FIRST		equ	0	; generic to all controls
NM_LAST		equ	0 - 99

LVN_FIRST		equ	0 - 100	; listview
LVN_LAST		equ	0 - 199

; Property sheet reserved (0 - 200) - (0 - 299) - see prsht.h

HDN_FIRST		equ	0 - 300	; header
HDN_LAST		equ	0 - 399

TVN_FIRST		equ	0 - 400	; treeview
TVN_LAST		equ	0 - 499

TTN_FIRST		equ	0 - 520	; tooltips
TTN_LAST		equ	0 - 549

TCN_FIRST		equ	0 - 550	; tab control
TCN_LAST		equ	0 - 580

; Shell reserved (0 - 580) - (0 - 589)

CDN_FIRST		equ	0 - 601	; common dialog (new)
CDN_LAST		equ	0 - 699

TBN_FIRST		equ	0 - 700	; toolbar
TBN_LAST		equ	0 - 720

UDN_FIRST		equ	0 - 721	; updown
UDN_LAST		equ	0 - 740
MCN_FIRST		equ	0 - 750	; monthcal
MCN_LAST		equ	0 - 759

DTN_FIRST		equ	0 - 760	; datetimepick
DTN_LAST		equ	0 - 799

CBEN_FIRST		equ	0 - 800	; combo box ex
CBEN_LAST		equ	0 - 830

RBN_FIRST		equ	0 - 831	; rebar
RBN_LAST		equ	0 - 859

IPN_FIRST		equ	0 - 860	; internet address
IPN_LAST		equ	0 - 879	; internet address

SBN_FIRST		equ	0 - 880	; status bar
SBN_LAST		equ	0 - 899

PGN_FIRST		equ	0 - 900	; Pager Control
PGN_LAST		equ	0 - 950

WMN_FIRST		equ	0 - 1000
WMN_LAST		equ	0 - 1200

BCN_FIRST		equ	0 - 1250
BCN_LAST		equ	0 - 1350

MSGF_COMMCTRL_BEGINDRAG	equ	4200h
MSGF_COMMCTRL_SIZEHEADER	equ	4201h
MSGF_COMMCTRL_DRAGSELECT	equ	4202h
MSGF_COMMCTRL_TOOLBARCUST	equ	4203h

;==================== CUSTOM DRAW ==========================================

; custom draw return flags
; values under 0x00010000 are reserved for global custom draw values.
; above that are for specific controls

CDRF_DODEFAULT		equ	00000000h
CDRF_NEWFONT		equ	00000002h
CDRF_SKIPDEFAULT	equ	00000004h
CDRF_NOTIFYPOSTPAINT	equ	00000010h
CDRF_NOTIFYITEMDRAW	equ	00000020h
CDRF_NOTIFYSUBITEMDRAW	equ	00000020h	; flags are the same, we can distinguish by context
CDRF_NOTIFYPOSTERASE	equ	00000040h

; drawstage flags
; values under 00010000 are reserved for global custom draw values.
; above that are for specific controls

CDDS_PREPAINT		equ	00000001h
CDDS_POSTPAINT		equ	00000002h
CDDS_PREERASE		equ	00000003h
CDDS_POSTERASE		equ	00000004h
CDDS_ITEM 		equ	00010000h	; the 0x000010000 bit means it's individual item specific
CDDS_ITEMPREPAINT	equ	CDDS_ITEM OR CDDS_PREPAINT
CDDS_ITEMPOSTPAINT	equ	CDDS_ITEM OR CDDS_POSTPAINT
CDDS_ITEMPREERASE	equ	CDDS_ITEM OR CDDS_PREERASE
CDDS_ITEMPOSTERASE	equ	CDDS_ITEM OR CDDS_POSTERASE
CDDS_SUBITEM		equ	00020000h

; itemState flags

CDIS_SELECTED 		equ	0001h
CDIS_GRAYED 		equ	0002h
CDIS_DISABLED 		equ	0004h
CDIS_CHECKED		equ	0008h
CDIS_FOCUS		equ	0010h
CDIS_DEFAULT		equ	0020h
CDIS_HOT		equ	0040h
CDIS_MARKED 		equ	0080h
CDIS_INDETERMINATE	equ	0100h
CDIS_SHOWKEYBOARDCUES 	equ	0200h


;====== HOTKEY CONTROL =======================================================

HOTKEYF_SHIFT		equ	01h
HOTKEYF_CONTROL	equ	02h
HOTKEYF_ALT		equ	04h
HOTKEYF_EXT		equ	08h

HKCOMB_NONE		equ	0001h
HKCOMB_S		equ	0002h
HKCOMB_C		equ	0004h
HKCOMB_A		equ	0008h
HKCOMB_SC		equ	0010h
HKCOMB_SA		equ	0020h
HKCOMB_CA		equ	0040h
HKCOMB_SCA		equ	0080h

HKM_SETHOTKEY		equ	WM_USER+1
HKM_GETHOTKEY		equ	WM_USER+2
HKM_SETRULES		equ	WM_USER+3

; begin_r_commctrl

;====== COMMON CONTROL STYLES ================================================

CCS_TOP		equ	00000001h
CCS_NOMOVEY		equ	00000002h
CCS_BOTTOM		equ	00000003h
CCS_NORESIZE		equ	00000004h
CCS_NOPARENTALIGN	equ	00000008h
CCS_ADJUSTABLE		equ	00000020h
CCS_NODIVIDER		equ	00000040h
CCS_VERT		equ	00000080h
CCS_LEFT		equ	CCS_VERT OR CCS_TOP
CCS_RIGHT		equ	CCS_VERT OR CCS_BOTTOM
CCS_NOMOVEX		equ	CCS_VERT OR CCS_NOMOVEY

; end_r_commctrl

;====== LISTVIEW CONTROL =====================================================

LVM_FIRST		equ	1000h	; ListView messages
TV_FIRST		equ	1100h	; TreeView messages
HDM_FIRST		equ	1200h	; Header messages
TCM_FIRST		equ	1300h	; Tab control messages
PGM_FIRST		equ	1400h	; Pager control messages
ECM_FIRST		equ	1500h	; Edit control messages
BCM_FIRST		equ	1600h	; Button control messages
CBM_FIRST		equ	1700h	; Combobox control messages
CCM_FIRST		equ	2000h	; Common control shared messages
CCM_LAST		equ	CCM_FIRST + 0200h

; begin_r_commctrl

LVS_ICON		equ	0000h
LVS_REPORT		equ	0001h
LVS_SMALLICON		equ	0002h
LVS_LIST		equ	0003h
LVS_TYPEMASK		equ	0003h
LVS_SINGLESEL		equ	0004h
LVS_SHOWSELALWAYS	equ	0008h
LVS_SORTASCENDING	equ	0010h
LVS_SORTDESCENDING	equ	0020h
LVS_SHAREIMAGELISTS	equ	0040h
LVS_NOLABELWRAP	equ	0080h
LVS_AUTOARRANGE	equ	0100h
LVS_EDITLABELS		equ	0200h
LVS_OWNERDATA		equ	1000h
LVS_NOSCROLL		equ	2000h
LVS_TYPESTYLEMASK	equ	0fc00h
LVS_ALIGNTOP		equ	0000h
LVS_ALIGNLEFT		equ	0800h
LVS_ALIGNMASK		equ	0c00h
LVS_OWNERDRAWFIXED	equ	0400h
LVS_NOCOLUMNHEADER	equ	4000h
LVS_NOSORTHEADER	equ	8000h

; end_r_commctrl

LVM_SETUNICODEFORMAT	equ	CCM_SETUNICODEFORMAT
LVM_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT
LVM_GETBKCOLOR		equ	LVM_FIRST + 0
LVM_SETBKCOLOR		equ	LVM_FIRST + 1
LVM_GETIMAGELIST	equ	LVM_FIRST + 2

LVSIL_NORMAL		equ	0
LVSIL_SMALL		equ	1
LVSIL_STATE		equ	2

LVM_SETIMAGELIST	equ	LVM_FIRST + 3
LVM_GETITEMCOUNT	equ	LVM_FIRST + 4

LVIF_TEXT		equ	0001h
LVIF_IMAGE		equ	0002h
LVIF_PARAM		equ	0004h
LVIF_STATE		equ	0008h
LVIF_INDENT		equ	0010h
LVIF_NORECOMPUTE	equ	0800h
LVIF_GROUPID		equ	0100h
LVIF_COLUMNS		equ	0200h

LVIS_FOCUSED		equ	0001h
LVIS_SELECTED		equ	0002h
LVIS_CUT		equ	0004h
LVIS_DROPHILITED		equ	0008h
LVIS_GLOW		equ	0010h
LVIS_ACTIVATING		equ	0020h

LVIS_OVERLAYMASK	equ	0F00h
LVIS_STATEIMAGEMASK	equ	0F000h

I_INDENTCALLBACK	equ	-1

I_GROUPIDCALLBACK	equ	-1
I_GROUPIDNONE		equ	-2


LVCF_FMT		equ	0001h
LVCF_WIDTH		equ	0002h
LVCF_TEXT		equ	0004h
LVCF_SUBITEM		equ	0008h
LVCF_IMAGE		equ	0010h
LVCF_ORDER		equ	0020h

LVCFMT_LEFT		equ	0000h
LVCFMT_RIGHT		equ	0001h
LVCFMT_CENTER		equ	0002h
LVCFMT_JUSTIFYMASK	equ	0003h

LVCFMT_IMAGE		equ	0800h
LVCFMT_BITMAP_ON_RIGHT	equ	1000h
LVCFMT_COL_HAS_IMAGES	equ	8000h

LVM_GETCOLUMNA		equ	LVM_FIRST + 25
LVM_GETCOLUMNW	equ	LVM_FIRST + 95
LVM_SETCOLUMNA		equ	LVM_FIRST + 26
LVM_SETCOLUMNW	equ	LVM_FIRST + 96
LVM_INSERTCOLUMNA	equ	LVM_FIRST + 27
LVM_INSERTCOLUMNW	equ	LVM_FIRST + 97
LVM_DELETECOLUMN	equ	LVM_FIRST + 28
LVM_GETCOLUMNWIDTH	equ	LVM_FIRST + 29

LVSCW_AUTOSIZE		equ	-1
LVSCW_AUTOSIZE_USEHEADER	equ	-2

LVM_SETCOLUMNWIDTH	equ	LVM_FIRST + 30
LVM_GETHEADER		equ	LVM_FIRST + 31
LVM_CREATEDRAGIMAGE	equ	LVM_FIRST + 33
LVM_GETVIEWRECT	equ	LVM_FIRST + 34
LVM_GETTEXTCOLOR	equ	LVM_FIRST + 35
LVM_SETTEXTCOLOR	equ	LVM_FIRST + 36
LVM_GETTEXTBKCOLOR	equ	LVM_FIRST + 37
LVM_SETTEXTBKCOLOR	equ	LVM_FIRST + 38
LVM_GETTOPINDEX	equ	LVM_FIRST + 39
LVM_GETCOUNTPERPAGE 	equ	LVM_FIRST + 40
LVM_GETORIGIN 		equ	LVM_FIRST + 41
LVM_UPDATE		equ	LVM_FIRST + 42
LVM_SETITEMSTATE	equ	LVM_FIRST + 43
LVM_GETITEMSTATE	equ	LVM_FIRST + 44
LVM_GETITEMTEXTA	equ	LVM_FIRST + 45
LVM_GETITEMTEXTW	equ	LVM_FIRST + 115
LVM_SETITEMTEXTA	equ	LVM_FIRST + 46
LVM_SETITEMTEXTW	equ	LVM_FIRST + 116

; these flags only apply to LVS_OWNERDATA listviews in report or list mod

LVSICF_NOINVALIDATEALL	equ	1
LVSICF_NOSCROLL		equ	2

LVM_SETITEMCOUNT	equ	LVM_FIRST + 47
LVM_SORTITEMS 		equ	LVM_FIRST + 48
LVM_SETITEMPOSITION32 	equ	LVM_FIRST + 49
LVM_GETSELECTEDCOUNT	equ	LVM_FIRST + 50
LVM_GETITEMSPACING	equ	LVM_FIRST + 51
LVM_GETISEARCHSTRINGA 	equ	LVM_FIRST + 52
LVM_GETISEARCHSTRINGW 	equ	LVM_FIRST + 117
LVM_SETICONSPACING	equ	LVM_FIRST + 53
LVM_SETEXTENDEDLISTVIEWSTYLE 	equ	LVM_FIRST + 54	; optional wParam == mask
LVM_GETEXTENDEDLISTVIEWSTYLE 	equ	LVM_FIRST + 55

LVS_EX_GRIDLINES		equ	00000001h
LVS_EX_SUBITEMIMAGES	equ	00000002h
LVS_EX_CHECKBOXES	equ	00000004h
LVS_EX_TRACKSELECT	equ	00000008h
LVS_EX_HEADERDRAGDROP	equ	00000010h
LVS_EX_FULLROWSELECT	equ	00000020h	; applies to report mode only
LVS_EX_ONECLICKACTIVATE	equ	00000040h
LVS_EX_TWOCLICKACTIVATE	equ	00000080h
LVS_EX_FLATSB		equ	00000100h
LVS_EX_REGIONAL		equ	00000200h
LVS_EX_INFOTIP		equ	00000400h	; listview does InfoTips for you
LVS_EX_UNDERLINEHOT	equ	00000800h
LVS_EX_UNDERLINECOLD	equ	00001000h
LVS_EX_MULTIWORKAREAS	equ	00002000h
LVS_EX_LABELTIP		equ	00004000h	; listview unfolds partly hidden labels if it does not have infotip text
LVS_EX_BORDERSELECT	equ	00008000h	; border selection style instead of highlight
LVS_EX_DOUBLEBUFFER	equ	00010000h
LVS_EX_HIDELABELS	equ	00020000h
LVS_EX_SINGLEROW	equ	00040000h
LVS_EX_SNAPTOGRID	equ	00080000h	; Icons automatically snap to grid.
LVS_EX_SIMPLESELECT	equ	00100000h	; Also changes overlay rendering to top right for icon mode.

LVM_GETSUBITEMRECT	equ	LVM_FIRST + 56
LVM_SUBITEMHITTEST	equ	LVM_FIRST + 57
LVM_SETCOLUMNORDERARRAY 	equ	LVM_FIRST + 58
LVM_GETCOLUMNORDERARRAY 	equ	LVM_FIRST + 59
LVM_SETHOTITEM		equ	LVM_FIRST + 60
LVM_GETHOTITEM		equ	LVM_FIRST + 61
LVM_SETHOTCURSOR	equ	LVM_FIRST + 62
LVM_GETHOTCURSOR	equ	LVM_FIRST + 63
LVM_APPROXIMATEVIEWRECT 	equ	LVM_FIRST + 64

LV_MAX_WORKAREAS	equ	16

LVM_SETWORKAREAS 	equ	LVM_FIRST + 65
LVM_GETWORKAREAS	equ	LVM_FIRST + 70
LVM_GETNUMBEROFWORKAREAS	equ	LVM_FIRST + 73
LVM_GETSELECTIONMARK	equ	LVM_FIRST + 66
LVM_SETSELECTIONMARK	equ	LVM_FIRST + 67
LVM_SETHOVERTIME	equ	LVM_FIRST + 71
LVM_GETHOVERTIME	equ	LVM_FIRST + 72
LVM_SETTOOLTIPS 	equ	LVM_FIRST + 74
LVM_GETTOOLTIPS 	equ	LVM_FIRST + 78
LVM_SORTITEMSEX	equ	LVM_FIRST + 81


I_IMAGECALLBACK		equ	-1
I_IMAGENONE		equ	-2

; For tileview

I_COLUMNSCALLBACK	equ	-1

LVM_GETITEMA		equ	LVM_FIRST + 5
LVM_GETITEMW		equ	LVM_FIRST + 75
LVM_SETITEMA		equ	LVM_FIRST + 6
LVM_SETITEMW		equ	LVM_FIRST + 76
LVM_INSERTITEMA		equ	LVM_FIRST + 7
LVM_INSERTITEMW	equ	LVM_FIRST + 77
LVM_DELETEITEM		equ	LVM_FIRST + 8
LVM_DELETEALLITEMS	equ	LVM_FIRST + 9
LVM_GETCALLBACKMASK	equ	LVM_FIRST + 10
LVM_SETCALLBACKMASK	equ	LVM_FIRST + 11

LVNI_ALL		equ	0000h
LVNI_FOCUSED		equ	0001h
LVNI_SELECTED		equ	0002h
LVNI_CUT		equ	0004h
LVNI_DROPHILITED		equ	0008h

LVNI_ABOVE		equ	0100h
LVNI_BELOW		equ	0200h
LVNI_TOLEFT		equ	0400h
LVNI_TORIGHT		equ	0800h

LVM_GETNEXTITEM	equ	LVM_FIRST + 12

LVFI_PARAM		equ	0001h
LVFI_STRING		equ	0002h
LVFI_PARTIAL		equ	0008h
LVFI_WRAP		equ	0020h
LVFI_NEARESTXY		equ	0040h

LVCOLUMNA		struc
 lmask		dd	?
 fmt		dd	?
 scx		dd	?
 		dd	?
 pszText		dq	?
 cchTextMax		dd	?
 iSubItem		dd	?
 iImage		dd	?
 iOrder		dd	?
 cxMin		dd	?
 cxDefault		dd	?
 cxIdeal		dd	?
 		dd	?, ?, ?
LVCOLUMNA		ends

LVCOLUMNW		struc
 lmask		dd	?
 fmt		dd	?
 scx		dd	?
 		dd	?
 pszText		dq	?
 cchTextMax		dd	?
 iSubItem		dd	?
 iImage		dd	?
 iOrder		dd	?
 cxMin		dd	?
 cxDefault		dd	?
 cxIdeal		dd	?
 		dd	?, ?, ?
LVCOLUMNW		ends

LVITEMA		struc
 lmask		dd	?
 iItem		dd	?
 iSubItem		dd	?
 state		dd	?
 stateMask		dd	?
 		dd	?
 pszText		dq	?
 cchTextMax		dd	?
 iImage		dd	?
 lParam		dq	?
 iIndent		dd	?
 iGroupId		dd	?
 cColumns		dd	?	; tile view columns
 		dd	?
 puColumns		dq	?
 piColFmt		dq	?
 iGroup		dd	?
 		dd	?
LVITEMA		ends

LVITEMW		struc
 lmask		dd	?
 iItem		dd	?
 iSubItem		dd	?
 state		dd	?
 stateMask		dd	?
 		dd	?
 pszText		dq	?
 cchTextMax		dd	?
 iImage		dd	?
 lParam		dq	?
 iIndent		dd	?
 iGroupId		dd	?
 cColumns		dd	?	; tile view columns
 		dd	?
 puColumns		dq	?
 piColFmt		dq	?
 iGroup		dd	?
 		dd	?
LVITEMW		ends

;====== IMAGE APIS ===========================================================

CLR_NONE		equ	0FFFFFFFFh
CLR_DEFAULT 		equ	0FF000000h


ILC_MASK		equ	00000001h
ILC_COLOR 		equ	00000000h
ILC_COLORDDB		equ	000000FEh
ILC_COLOR4		equ	00000004h
ILC_COLOR8		equ	00000008h
ILC_COLOR16 		equ	00000010h
ILC_COLOR24 		equ	00000018h
ILC_COLOR32 		equ	00000020h
ILC_PALETTE 		equ	00000800h	; (not implemented)
ILC_MIRROR		equ	00002000h	; Mirror the icons contained, if the process is mirrored
ILC_PERITEMMIRROR 	equ	00008000h	; Causes the mirroring code to mirror each item when inserting a set of images, verses the whole strip

ILD_NORMAL		equ	00000000h
ILD_TRANSPARENT 	equ	00000001h
ILD_MASK		equ	00000010h
ILD_IMAGE 		equ	00000020h
ILD_ROP 		equ	00000040h
ILD_BLEND25 		equ	00000002h
ILD_BLEND50 		equ	00000004h
ILD_OVERLAYMASK 	equ	00000F00h
ILD_PRESERVEALPHA 	equ	00001000h	; This preserves the alpha channel in dest
ILD_SCALE 		equ	00002000h	; Causes the image to be scaled to cx, cy instead of clipped
ILD_DPISCALE		equ	00004000h

ILD_SELECTED		equ	ILD_BLEND50
ILD_FOCUS		equ	ILD_BLEND25
ILD_BLEND		equ	ILD_BLEND50
CLR_HILIGHT		equ	CLR_DEFAULT

ILS_NORMAL		equ	00000000h
ILS_GLOW		equ	00000001h
ILS_SHADOW		equ	00000002h
ILS_SATURATE		equ	00000004h
ILS_ALPHA 		equ	00000008h

ILCF_MOVE		equ	0
ILCF_SWAP		equ	1

ILP_NORMAL		equ	0	; Writes or reads the stream using new sematics for this version of comctl32
ILP_DOWNLEVEL		equ	1	; Write or reads the stream using downlevel sematics.

CBEM_INSERTITEMA	equ	WM_USER + 1
CBEM_SETIMAGELIST	equ	WM_USER + 2
CBEM_GETIMAGELIST	equ	WM_USER + 3
CBEM_GETITEMA		equ	WM_USER + 4
CBEM_SETITEMA		equ	WM_USER + 5
CBEM_DELETEITEM		equ	CB_DELETESTRING
CBEM_GETCOMBOCONTROL	equ	WM_USER + 6
CBEM_GETEDITCONTROL	equ	WM_USER + 7
CBEM_SETEXSTYLE	equ	WM_USER + 8	; useSETEXTENDEDSTYLE instead
CBEM_SETEXTENDEDSTYLE	equ	WM_USER + 14	; lparam == new style, wParam		equ	optional) == mask
CBEM_GETEXSTYLE	equ	WM_USER + 9	; use GETEXTENDEDSTYLE instead
CBEM_GETEXTENDEDSTYLE	equ	WM_USER + 9
CBEM_SETUNICODEFORMAT	equ	CCM_SETUNICODEFORMAT
CBEM_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT
CBEM_HASEDITCHANGED	equ	WM_USER + 10
CBEM_INSERTITEMW	equ	WM_USER + 11
CBEM_SETITEMW		equ	WM_USER + 12
CBEM_GETITEMW		equ	WM_USER + 13
CBEM_SETWINDOWTHEME	equ	CCM_SETWINDOWTHEME

CBES_EX_NOEDITIMAGE	equ	00000001h
CBES_EX_NOEDITIMAGEINDENT	equ	00000002h
CBES_EX_PATHWORDBREAKPROC	equ	00000004h
CBES_EX_NOSIZELIMIT	equ	00000008h
CBES_EX_CASESENSITIVE	equ	00000010h

COMBOBOXEXITEMA	struc
 lmask		dd	?
 		dd	?
 iItem		dq	?
 pszText		dq	?
 cchTextMax		dd	?
 iImage		dd	?
 iSelectedImage		dd	?
 iOverlay		dd	?
 iIndent		dd	?
 		dd	?
 lParam		dq	?
COMBOBOXEXITEMA	ends

COMBOBOXEXITEMW	struc
 lmask		dd	?
 		dd	?
 iItem		dq	?
 pszText		dq	?
 cchTextMax		dd	?
 iImage		dd	?
 iSelectedImage		dd	?
 iOverlay		dd	?
 iIndent		dd	?
 		dd	?
 lParam		dq	?
COMBOBOXEXITEMW	ends

;;;;;;;;;;ComboBoxEx ;;;;;;;;;;;;;;;;

CBEIF_TEXT		equ	00000001h
CBEIF_IMAGE		equ	00000002h
CBEIF_SELECTEDIMAGE	equ	00000004h
CBEIF_OVERLAY		equ	00000008h
CBEIF_INDENT		equ	00000010h
CBEIF_LPARAM		equ	00000020h
CBEIF_DI_SETITEM		equ	10000000h

;====== STATUS BAR CONTROL ===================================================

; begin_r_commctrl

SBARS_SIZEGRIP		equ	0100h
SBARS_TOOLTIPS		equ	0800h

; this is a status bar flag, preference to SBARS_TOOLTIPS

SBT_TOOLTIPS		equ	0800h

; end_r_commctrl

SB_SETTEXTA		equ	WM_USER+1
SB_SETTEXTW		equ	WM_USER+11
SB_GETTEXTA		equ	WM_USER+2
SB_GETTEXTW		equ	WM_USER+13
SB_GETTEXTLENGTHA	equ	WM_USER+3
SB_GETTEXTLENGTHW	equ	WM_USER+12
SB_SETPARTS		equ	WM_USER+4
SB_GETPARTS		equ	WM_USER+6
SB_GETBORDERS		equ	WM_USER+7
SB_SETMINHEIGHT		equ	WM_USER+8
SB_SIMPLE		equ	WM_USER+9
SB_GETRECT		equ	WM_USER+10
SB_ISSIMPLE		equ	WM_USER+14
SB_SETICON		equ	WM_USER+15
SB_SETTIPTEXTA		equ	WM_USER+16
SB_SETTIPTEXTW		equ	WM_USER+17
SB_GETTIPTEXTA		equ	WM_USER+18
SB_GETTIPTEXTW		equ	WM_USER+19
SB_GETICON		equ	WM_USER+20
SB_SETUNICODEFORMAT	equ	CCM_SETUNICODEFORMAT
SB_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT

SBT_OWNERDRAW		equ	1000h
SBT_NOBORDERS		equ	0100h
SBT_POPOUT		equ	0200h
SBT_RTLREADING		equ	0400h
SBT_NOTABPARSING	equ	0800h

SB_SETBKCOLOR		equ	CCM_SETBKCOLOR	; lParam = bkColor

; status bar notifications

SBN_SIMPLEMODECHANGE	equ	SBN_FIRST - 0

; refers to the data saved for simple mode

SB_SIMPLEID		equ	00ffh

;====== MENU HELP ============================================================

MINSYSCOMMAND		equ	SC_SIZE

;====== TRACKBAR CONTROL =====================================================

; begin_r_commctrl

TBS_AUTOTICKS		equ	0001h
TBS_VERT		equ	0002h
TBS_HORZ		equ	0000h
TBS_TOP		equ	0004h
TBS_BOTTOM		equ	0000h
TBS_LEFT		equ	0004h
TBS_RIGHT		equ	0000h
TBS_BOTH		equ	0008h
TBS_NOTICKS		equ	0010h
TBS_ENABLESELRANGE	equ	0020h
TBS_FIXEDLENGTH		equ	0040h
TBS_NOTHUMB		equ	0080h
TBS_TOOLTIPS		equ	0100h
TBS_REVERSED		equ	0200h	; Accessibility hint: the smaller number (usually the min value) means "high" and the larger number (usually the max value) means "low"
TBS_DOWNISLEFT		equ	0400h	; Down=Left and Up=Right (default is Down=Right and Up=Left)

; end_r_commctrl

TBM_GETPOS		equ	WM_USER
TBM_GETRANGEMIN	equ	WM_USER+1
TBM_GETRANGEMAX	equ	WM_USER+2
TBM_GETTIC		equ	WM_USER+3
TBM_SETTIC		equ	WM_USER+4
TBM_SETPOS		equ	WM_USER+5
TBM_SETRANGE		equ	WM_USER+6
TBM_SETRANGEMIN	equ	WM_USER+7
TBM_SETRANGEMAX	equ	WM_USER+8
TBM_CLEARTICS		equ	WM_USER+9
TBM_SETSEL		equ	WM_USER+10
TBM_SETSELSTART	equ	WM_USER+11
TBM_SETSELEND		equ	WM_USER+12
TBM_GETPTICS		equ	WM_USER+14
TBM_GETTICPOS		equ	WM_USER+15
TBM_GETNUMTICS		equ	WM_USER+16
TBM_GETSELSTART	equ	WM_USER+17
TBM_GETSELEND		equ	WM_USER+18
TBM_CLEARSEL		equ	WM_USER+19
TBM_SETTICFREQ		equ	WM_USER+20
TBM_SETPAGESIZE		equ	WM_USER+21
TBM_GETPAGESIZE		equ	WM_USER+22
TBM_SETLINESIZE		equ	WM_USER+23
TBM_GETLINESIZE		equ	WM_USER+24
TBM_GETTHUMBRECT	equ	WM_USER+25
TBM_GETCHANNELRECT	equ	WM_USER+26
TBM_SETTHUMBLENGTH	equ	WM_USER+27
TBM_GETTHUMBLENGTH	equ	WM_USER+28
TBM_SETTOOLTIPS	equ	WM_USER+29
TBM_GETTOOLTIPS	equ	WM_USER+30
TBM_SETTIPSIDE		equ	WM_USER+31

; TrackBar Tip Side flags

TBTS_TOP		equ	0
TBTS_LEFT		equ	1
TBTS_BOTTOM		equ	2
TBTS_RIGHT		equ	3

TBM_SETBUDDY		equ	WM_USER+32	; wparam = BOOL fLeft; (or right)
TBM_GETBUDDY		equ	WM_USER+33	; wparam = BOOL fLeft; (or right)
TBM_SETUNICODEFORMAT	equ	CCM_SETUNICODEFORMAT
TBM_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT

TB_LINEUP		equ	0
TB_LINEDOWN		equ	1
TB_PAGEUP		equ	2
TB_PAGEDOWN		equ	3
TB_THUMBPOSITION	equ	4
TB_THUMBTRACK		equ	5
TB_TOP		equ	6
TB_BOTTOM		equ	7
TB_ENDTRACK		equ	8

; custom draw item specs

TBCD_TICS		equ	0001h
TBCD_THUMB		equ	0002h
TBCD_CHANNEL		equ	0003h


;====== UPDOWN CONTROL =======================================================

UDACCEL		struc
 udac_nSec		dd	?
 udac_nInc		dd	?
UDACCEL		ends

UD_MAXVAL		equ	7fffh
UD_MINVAL		equ	- UD_MAXVAL

; begin_r_commctrl

UDS_WRAP		equ	0001h
UDS_SETBUDDYINT	equ	0002h
UDS_ALIGNRIGHT		equ	0004h
UDS_ALIGNLEFT		equ	0008h
UDS_AUTOBUDDY		equ	0010h
UDS_ARROWKEYS		equ	0020h
UDS_HORZ		equ	0040h
UDS_NOTHOUSANDS	equ	0080h
UDS_HOTTRACK		equ	0100h

; end_r_commctrl

UDM_SETRANGE		equ	WM_USER+101
UDM_GETRANGE		equ	WM_USER+102
UDM_SETPOS		equ	WM_USER+103
UDM_GETPOS		equ	WM_USER+104
UDM_SETBUDDY		equ	WM_USER+105
UDM_GETBUDDY		equ	WM_USER+106
UDM_SETACCEL		equ	WM_USER+107
UDM_GETACCEL		equ	WM_USER+108
UDM_SETBASE		equ	WM_USER+109
UDM_GETBASE		equ	WM_USER+110
UDM_SETRANGE32		equ	WM_USER+111
UDM_GETRANGE32		equ	WM_USER+112	; wParam & lParam are LPINT
UDM_SETUNICODEFORMAT	equ	CCM_SETUNICODEFORMAT
UDM_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT
UDM_SETPOS32		equ	WM_USER+113
UDM_GETPOS32		equ	WM_USER+114


;====== PROGRESS CONTROL =====================================================

; begin_r_commctrl

PBS_SMOOTH		equ	1
PBS_VERTICAL		equ	4

; end_r_commctrl

PBM_SETRANGE		equ	WM_USER+1
PBM_SETPOS		equ	WM_USER+2
PBM_DELTAPOS		equ	WM_USER+3
PBM_SETSTEP		equ	WM_USER+4
PBM_STEPIT		equ	WM_USER+5
PBM_SETRANGE32		equ	WM_USER+6	; lParam = high, wParam = low
PBM_GETRANGE		equ	WM_USER+7	; wParam = return TRUE ? low : high). lParam = PPBRANGE or NULL
PBM_GETPOS		equ	WM_USER+8
PBM_SETBARCOLOR	equ	WM_USER+9	; lParam = bar color
PBM_SETBKCOLOR		equ	CCM_SETBKCOLOR	; lParam = bkColor
PBM_SETMARQUEE		equ	WM_USER+10

PBS_MARQUEE		equ	8

HDN_ITEMCHANGINGA	equ	HDN_FIRST-0
HDN_ITEMCHANGINGW	equ	HDN_FIRST-20
HDN_ITEMCHANGEDA	equ	HDN_FIRST-1
HDN_ITEMCHANGEDW	equ	HDN_FIRST-21
HDN_ITEMCLICKA		equ	HDN_FIRST-2
HDN_ITEMCLICKW		equ	HDN_FIRST-22
HDN_ITEMDBLCLICKA	equ	HDN_FIRST-3
HDN_ITEMDBLCLICKW	equ	HDN_FIRST-23
HDN_DIVIDERDBLCLICKA	equ	HDN_FIRST-5
HDN_DIVIDERDBLCLICKW	equ	HDN_FIRST-25
HDN_BEGINTRACKA		equ	HDN_FIRST-6
HDN_BEGINTRACKW	equ	HDN_FIRST-26
HDN_ENDTRACKA		equ	HDN_FIRST-7
HDN_ENDTRACKW		equ	HDN_FIRST-27
HDN_TRACKA		equ	HDN_FIRST-8
HDN_TRACKW		equ	HDN_FIRST-28
HDN_GETDISPINFOA	equ	HDN_FIRST-9
HDN_GETDISPINFOW	equ	HDN_FIRST-29
HDN_BEGINDRAG		equ	HDN_FIRST-10
HDN_ENDDRAG		equ	HDN_FIRST-11
HDN_FILTERCHANGE	equ	HDN_FIRST-12
HDN_FILTERBTNCLICK	equ	HDN_FIRST-13

LVN_ITEMCHANGING	equ	LVN_FIRST-0
LVN_ITEMCHANGED	equ	LVN_FIRST-1
LVN_INSERTITEM		equ	LVN_FIRST-2
LVN_DELETEITEM		equ	LVN_FIRST-3
LVN_DELETEALLITEMS	equ	LVN_FIRST-4
LVN_BEGINLABELEDITA	equ	LVN_FIRST-5
LVN_BEGINLABELEDITW	equ	LVN_FIRST-75
LVN_ENDLABELEDITA	equ	LVN_FIRST-6
LVN_ENDLABELEDITW	equ	LVN_FIRST-76
LVN_COLUMNCLICK		equ	LVN_FIRST-8
LVN_BEGINDRAG		equ	LVN_FIRST-9
LVN_BEGINRDRAG		equ	LVN_FIRST-11
LVN_ODCACHEHINT	equ	LVN_FIRST-13
LVN_ODFINDITEMA		equ	LVN_FIRST-52
LVN_ODFINDITEMW	equ	LVN_FIRST-79
LVN_ITEMACTIVATE	equ	LVN_FIRST-14
LVN_ODSTATECHANGED	equ	LVN_FIRST-15
LVN_HOTTRACK		equ	LVN_FIRST-21
LVN_GETDISPINFOA	equ	LVN_FIRST-50
LVN_GETDISPINFOW	equ	LVN_FIRST-77
LVN_SETDISPINFOA	equ	LVN_FIRST-51
LVN_SETDISPINFOW	equ	LVN_FIRST-78

LVIF_DI_SETITEM		equ	1000

LVN_KEYDOWN		equ	LVN_FIRST-55

NMLVKEYDOWN		struc
 hdr		NMHDR	<?>
 wVKey		dw	?
 		dw	?
 flags		dd	?
NMLVKEYDOWN		ends

NMLISTVIEW		struc
 hdr		NMHDR	<?>
 iItem		dd	?
 iSubItem		dd	?
 uNewState		dd	?
 uOldState		dd	?
 uChanged		dd	?
 ptAction		POINT	<?>
 		dd	?
 lParam		dq	?
NMLISTVIEW		ends

NMHEADERA		struc
 hdr		NMHDR	<?>
 iItem		dd	?
 iButton		dd	?
 pitem		dq	?
NMHEADERA		ends

NMHEADERW		struc
 hdr		NMHDR	<?>
 iItem		dd	?
 iButton		dd	?
 pitem		dq	?
NMHEADERW		ends

HDITEMA		struc
 lmask		dd	?
 cxy		dd	?
 pszText		dq	?
 hbm		dq	?
 cchTextMax		dd	?
 fmt		dd	?
 lParam		dq	?
 iImage		dd	?	; index of bitmap in ImageList
 iOrder		dd	?	; where to draw this item
 ltype		dd	?	; [in] filter type (defined what pvFilter is a pointer to)
 		dd	?
 pvFilter		dd	?	; [in] fillter data see above
 state		dd	?
 		dd	?
HDITEMA		ends

HDITEMW		struc
 lmask		dd	?
 cxy		dd	?
 pszText		dq	?
 hbm		dq	?
 cchTextMax		dd	?
 fmt		dd	?
 lParam		dq	?
 iImage		dd	?	; index of bitmap in ImageList
 iOrder		dd	?	; where to draw this item
 ltype		dd	?	; [in] filter type (defined what pvFilter is a pointer to)
 		dd	?
 pvFilter		dd	?	; [in] fillter data see above
 state		dd	?
 		dd	?
HDITEMW		ends

HDI_WIDTH		equ	0001h
HDI_HEIGHT		equ	HDI_WIDTH
HDI_TEXT		equ	0002h
HDI_FORMAT		equ	0004h
HDI_LPARAM		equ	0008h
HDI_BITMAP		equ	0010h
HDI_IMAGE		equ	0020h
HDI_DI_SETITEM		equ	0040h
HDI_ORDER		equ	0080h
HDI_FILTER		equ	0100h

HDF_LEFT		equ	0000h
HDF_RIGHT		equ	0001h
HDF_CENTER		equ	0002h
HDF_JUSTIFYMASK		equ	0003h
HDF_RTLREADING		equ	0004h
HDF_OWNERDRAW		equ	8000h
HDF_STRING		equ	4000h
HDF_BITMAP		equ	2000h
HDF_BITMAP_ON_RIGHT	equ	1000h
HDF_IMAGE		equ	0800h
HDF_SORTUP		equ	0400h
HDF_SORTDOWN		equ	0200h

HDM_INSERTITEMA		equ	HDM_FIRST + 1
HDM_INSERTITEMW	equ	HDM_FIRST + 10
HDM_DELETEITEM		equ	HDM_FIRST + 2
HDM_GETITEMA		equ	HDM_FIRST + 3
HDM_GETITEMW		equ	HDM_FIRST + 11
HDM_SETITEMA		equ	HDM_FIRST + 4
HDM_SETITEMW		equ	HDM_FIRST + 12
HDM_LAYOUT		equ	HDM_FIRST + 5
HDM_HITTEST		equ	HDM_FIRST + 6
HDM_GETITEMRECT	equ	HDM_FIRST + 7
HDM_SETIMAGELIST	equ	HDM_FIRST + 8
HDM_GETIMAGELIST	equ	HDM_FIRST + 9
HDM_ORDERTOINDEX	equ	HDM_FIRST + 15
HDM_CREATEDRAGIMAGE 	equ	HDM_FIRST + 16	; wparam = which item (by index)
HDM_GETORDERARRAY 	equ	HDM_FIRST + 17
HDM_SETORDERARRAY 	equ	HDM_FIRST + 18
HDM_SETHOTDIVIDER	equ	HDM_FIRST + 19
HDM_SETBITMAPMARGIN	equ	HDM_FIRST + 20
HDM_GETBITMAPMARGIN	equ	HDM_FIRST + 21
HDM_SETUNICODEFORMAT 	equ	CCM_SETUNICODEFORMAT
HDM_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT
HDM_SETFILTERCHANGETIMEOUT	equ	HDM_FIRST+22
HDM_EDITFILTER		equ	HDM_FIRST+23
HDM_CLEARFILTER 	equ	HDM_FIRST+24

;====== TAB CONTROL ==========================================================

; begin_r_commctrl

TCS_SCROLLOPPOSITE	equ	0001h	; assumes multiline tab
TCS_BOTTOM		equ	0002h
TCS_RIGHT		equ	0002h
TCS_MULTISELECT		equ	0004h	; allow multi-select in button mode
TCS_FLATBUTTONS	equ	0008h
TCS_FORCEICONLEFT	equ	0010h
TCS_FORCELABELLEFT	equ	0020h
TCS_HOTTRACK		equ	0040h
TCS_VERTICAL		equ	0080h
TCS_TABS		equ	0000h
TCS_BUTTONS		equ	0100h
TCS_SINGLELINE		equ	0000h
TCS_MULTILINE		equ	0200h
TCS_RIGHTJUSTIFY	equ	0000h
TCS_FIXEDWIDTH		equ	0400h
TCS_RAGGEDRIGHT		equ	0800h
TCS_FOCUSONBUTTONDOWN	equ	1000h
TCS_OWNERDRAWFIXED	equ	2000h
TCS_TOOLTIPS		equ	4000h
TCS_FOCUSNEVER		equ	8000h

; end_r_commctrl

; EX styles for use with TCM_SETEXTENDEDSTYLE

TCS_EX_FLATSEPARATORS	equ	00000001
TCS_EX_REGISTERDROP	equ	00000002

TCM_GETIMAGELIST	equ	TCM_FIRST + 2
TCM_SETIMAGELIST	equ	TCM_FIRST + 3
TCM_GETITEMCOUNT	equ	TCM_FIRST + 4

TCIF_TEXT		equ	0001h
TCIF_IMAGE		equ	0002h
TCIF_RTLREADING		equ	0004h
TCIF_PARAM		equ	0008h
TCIF_STATE		equ	0010h

TCIS_BUTTONPRESSED	equ	0001
TCIS_HIGHLIGHTED	equ	0002

TCITEMHEADERA		struc
 imask		dd	?
 lpReserved1		dd	?
 lpReserved2		dd	?
 		dd	?
 pszText		dq	?
 cchTextMax		dd	?
 iImage		dd	?
TCITEMHEADERA		ends

TCITEMA		struc
 imask		dd	?
 dwState		dd	?
 dwStateMask		dd	?
 		dd	?
 pszText		dq	?
 cchTextMax		dd	?
 iImage		dd	?
 lParam		dq	?
TCITEMA		ends

TCITEMW		struc
 imask		dd	?
 dwState		dd	?
 dwStateMask		dd	?
 		dd	?
 pszText		dq	?
 cchTextMax		dd	?
 iImage		dd	?
 lParam		dq	?
TCITEMW		ends

TCM_GETITEMA		equ	TCM_FIRST + 5
TCM_GETITEMW		equ	TCM_FIRST + 60
TCM_SETITEMA		equ	TCM_FIRST + 6
TCM_SETITEMW		equ	TCM_FIRST + 61
TCM_INSERTITEMA 	equ	TCM_FIRST + 7
TCM_INSERTITEMW 	equ	TCM_FIRST + 62
TCM_DELETEITEM		equ	TCM_FIRST + 8
TCM_DELETEALLITEMS	equ	TCM_FIRST + 9
TCM_GETITEMRECT 	equ	TCM_FIRST + 10
TCM_GETCURSEL 		equ	TCM_FIRST + 11
TCM_SETCURSEL 		equ	TCM_FIRST + 12

TCHT_NOWHERE		equ	0001
TCHT_ONITEMICON	equ	0002
TCHT_ONITEMLABEL	equ	0004
TCHT_ONITEM 		equ	TCHT_ONITEMICON OR TCHT_ONITEMLABEL

TCHITTESTINFO		struc
 pt		POINT	<?>
 flags		dd	?
 		dd	?
TCHITTESTINFO	ends

TCM_HITTEST 		equ	TCM_FIRST + 13
TCM_SETITEMEXTRA	equ	TCM_FIRST + 14
TCM_ADJUSTRECT		equ	TCM_FIRST + 40
TCM_SETITEMSIZE 	equ	TCM_FIRST + 41
TCM_REMOVEIMAGE 	equ	TCM_FIRST + 42
TCM_SETPADDING		equ	TCM_FIRST + 43
TCM_GETROWCOUNT 	equ	TCM_FIRST + 44
TCM_GETTOOLTIPS 	equ	TCM_FIRST + 45
TCM_SETTOOLTIPS 	equ	TCM_FIRST + 46
TCM_GETCURFOCUS 	equ	TCM_FIRST + 47
TCM_SETCURFOCUS 	equ	TCM_FIRST + 48
TCM_SETMINTABWIDTH	equ	TCM_FIRST + 49
TCM_DESELECTALL 	equ	TCM_FIRST + 50
TCM_HIGHLIGHTITEM 	equ	TCM_FIRST + 51
TCM_SETEXTENDEDSTYLE	equ	TCM_FIRST + 52	; optional wParam == mask
TCM_GETEXTENDEDSTYLE	equ	TCM_FIRST + 53
TCM_SETUNICODEFORMAT	equ	CCM_SETUNICODEFORMAT
TCM_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT

TCN_KEYDOWN 		equ	TCN_FIRST - 0

NMTCKEYDOWN		struc
 hdr		NMHDR	<?>
 wVKey		dw	?
 		dw	?
 flags		dd	?
NMTCKEYDOWN		ends

TCN_SELCHANGE 		equ	TCN_FIRST - 1
TCN_SELCHANGING 	equ	TCN_FIRST - 2
TCN_GETOBJECT 		equ	TCN_FIRST - 3
TCN_FOCUSCHANGE 	equ	TCN_FIRST - 4

comment #

WC_HEADER		textequ	"SysHeader32"
TOOLBARCLASSNAMEA	textequ	"ToolbarWindow32"
REBARCLASSNAMEA	textequ	"ReBarWindow32"
TOOLTIPS_CLASSA		textequ	"tooltips_class32"
STATUSCLASSNAMEA	textequ	"msctls_statusbar32"
TRACKBAR_CLASSA	textequ	"msctls_trackbar32"
DRAGLISTMSGSTRING	textequ	"commctrl_DragListMsg"
UPDOWN_CLASSA		textequ	"msctls_updown32"
PROGRESS_CLASSA	textequ	"msctls_progress32"
HOTKEY_CLASSA		textequ	"msctls_hotkey32"
WC_LISTVIEWA		textequ	"SysListView32"
WC_TREEVIEWA		textequ	"SysTreeView32"
WC_COMBOBOXEX		textequ	"ComboBoxEx32"
WC_TABCONTROLA		textequ	"SysTabControl32"
ANIMATE_CLASSA		textequ	"SysAnimate32"
MONTHCAL_CLASSA	textequ	"SysMonthCal32"
DATETIMEPICK_CLASSA	textequ	"SysDateTimePick32"
WC_IPADDRESSA		textequ	"SysIPAddress32"
WC_PAGESCROLLERA	textequ	"SysPager"
WC_NATIVEFONTCTLA	textequ	"NativeFontCtl"
WC_BUTTONA		textequ	"Button"
WC_STATICA		textequ	"Static"
WC_EDITA		textequ	"Edit"
WC_LISTBOXA		textequ	"ListBox"
WC_COMBOBOXA		textequ	"ComboBox"
WC_SCROLLBARA		textequ	"ScrollBar"


ODT_HEADER		equ	100
ODT_TAB		equ	101
ODT_LISTVIEW		equ	102

COLORSCHEME		struc
 cols_dwSize		dd	?
 cols_clrBtnHighlight	dd	?	; highlight color
 cols_clrBtnShadow	dd	?	; shadow color
COLORSCHEME		ends

COMCTL32_VERSION	equ	6

CCM_SETBKCOLOR		equ	CCM_FIRST + 1	; lParam is bkColor
CCM_SETCOLORSCHEME	equ	CCM_FIRST + 2	; lParam is color scheme
CCM_GETCOLORSCHEME	equ	CCM_FIRST + 3	; fills in COLORSCHEME pointed to by lParam
CCM_GETDROPTARGET	equ	CCM_FIRST + 4
CCM_SETUNICODEFORMAT	equ	CCM_FIRST + 5
CCM_GETUNICODEFORMAT	equ	CCM_FIRST + 6
CCM_SETVERSION		equ	CCM_FIRST + 7
CCM_GETVERSION		equ	CCM_FIRST + 8
CCM_SETNOTIFYWINDOW	equ	CCM_FIRST + 9	; wParam == hwndParent.
CCM_SETWINDOWTHEME	equ	CCM_FIRST + 11
CCM_DPISCALE		equ	CCM_FIRST + 12	; wParam == Awareness

; for tooltips

INFOTIPSIZE 		equ	1024

;====== Generic WM_NOTIFY notification codes =================================

NM_OUTOFMEMORY	equ	NM_FIRST-1
NM_CLICK		equ	NM_FIRST-2	; uses NMCLICK struct
NM_DBLCLK		equ	NM_FIRST-3
NM_RETURN		equ	NM_FIRST-4
NM_RCLICK		equ	NM_FIRST-5	; uses NMCLICK struct
NM_RDBLCLK		equ	NM_FIRST-6
NM_SETFOCUS		equ	NM_FIRST-7
NM_KILLFOCUS		equ	NM_FIRST-8
NM_CUSTOMDRAW		equ	NM_FIRST-12
NM_HOVER		equ	NM_FIRST-13
NM_NCHITTEST		equ	NM_FIRST-14	; uses NMMOUSE struct
NM_KEYDOWN		equ	NM_FIRST-15	; uses NMKEY struct
NM_RELEASEDCAPTURE	equ	NM_FIRST-16
NM_SETCURSOR		equ	NM_FIRST-17	; uses NMMOUSE struct
NM_CHAR		equ	NM_FIRST-18	; uses NMCHAR struct
NM_TOOLTIPSCREATED	equ	NM_FIRST-19	; notify of when the tooltips window is create
NM_LDOWN		equ	NM_FIRST-20
NM_RDOWN		equ	NM_FIRST-21
NM_THEMECHANGED	equ	NM_FIRST-22

;====== Generic WM_NOTIFY notification structures ============================

NMTOOLTIPSCREATED	struc
 nmttc_hdr		NMHDR	<?>
 nmttc_hwndToolTips	dd	?
NMTOOLTIPSCREATED	ends

NMMOUSE		struc
 nmmou_hdr		NMHDR	<?>
 nmmou_dwItemSpec	dd	?
 nmmou_dwItemData	dd	?
 nmmou_pt		dd	?, ?
 nmmou_dwHitInfo		dd	?	; any specifics about where on the item or control the mouse is
NMMOUSE		ends

; Generic structure to request an object of a specific type.

NMOBJECTNOTIFY		struc
 nmobn_hdr		NMHDR	<?>
 nmobn_iItem		dd	?
 nmobn_piid		dd	?
 nmobn_piid		dd	?
 nmobn_pObject		dd	?
 nmobn_hResult		dd	?
 nmobn_dwFlags		dd	?	; control specific flags (hints as to where in iItem it hit)
NMOBJECTNOTIFY		ends

; Generic structure for a key

NMKEY		struc
 nmkey_hdr		NMHDR	<?>
 nmkey_nVKey		dd	?
 nmkey_uFlags		dd	?
NMKEY		ends

; Generic structure for a character

NMCHAR		struc
 nmcha_hdr		NMHDR	<?>
 nmcha_ch		dd	?
 nmcha_dwItemPrev	dd	?	; Item previously selected
 nmcha_dwItemNext	dd	?	; Item to be selected
NMCHAR		ends


NMCUSTOMDRAW		struc
 nmcdi_hdr		NMHDR	<?>
 nmcdi_dwDrawStage	dd	?
 nmcdi_hdc		dd	?
 nmcdi_rc		RECT	<?>
 nmcdi_dwItemSpec	dd	?	; this is control specific, but it's how to specify an item.valid only with CDDS_ITEM bit set
 nmcdi_uItemState		dd	?
 nmcdi_lItemlParam		dd	?
NMCUSTOMDRAW		ends

NMTTCUSTOMDRAW	struc
 nmttcd_nmcd		NMCUSTOMDRAW	<?>
 nmttcd_uDrawFlags	dd	?
NMTTCUSTOMDRAW	ends

IMAGELISTDRAWPARAMS 	struc
 ildp_cbSize		dd	?
 ildp_himl		dd	?
 ildp_i		dd	?
 ildp_hdcDst		dd	?
 ildp_x		dd	?
 ildp_y		dd	?
 ildp_cx		dd	?
 ildp_cy		dd	?
 ildp_xBitmap		dd	?	; x offest from the upperleft of bitmap
 ildp_yBitmap		dd	?	; y offset from the upperleft of bitmap
 ildp_rgbBk		dd	?
 ildp_rgbFg		dd	?
 ildp_dwRop		dd	?
 ildp_fState		dd	?
 ildp_Frame		dd	?
 ildp_crEffect		dd	?
IMAGELISTDRAWPARAMS	ends


IMAGEINFO		struc
 imgi_hbmImage		dd	?
 imgi_hbmMask		dd	?
 imgi_Unused1		dd	?
 imgi_Unused2		dd	?
 imgi_rcImage		RECT	<?>
IMAGEINFO		ends

;====== HEADER CONTROL =======================================================

; begin_r_commctrl

HDS_HORZ		equ	0000h
HDS_BUTTONS 		equ	0002h
HDS_HOTTRACK		equ	0004h
HDS_HIDDEN		equ	0008h
HDS_DRAGDROP		equ	0040h
HDS_FULLDRAG		equ	0080h
HDS_FILTERBAR 		equ	0100h
HDS_FLAT		equ	0200h

HDFT_ISSTRING 		equ	0000h	; HD_ITEM.pvFilter points to a HD_TEXTFILTER
HDFT_ISNUMBER 		equ	0001h	; HD_ITEM.pvFilter points to a INT
HDFT_HASNOVALUE 	equ	8000h	; clear the filter, by setting this bit

HD_TEXTFILTERA		struc
 hdtf_pszText		dd	?	; [in] pointer to the buffer containing the filter (ANSI)
 hdtf_cchTextMax		dd	?	; [in] max size of buffer/edit control buffer
HD_TEXTFILTERA		ends


HDLAYOUT		struc
 hdlay_prc		dd	?
 hdlay_pwpos		dd	?
HDLAYOUT		ends

HHT_NOWHERE		equ	0001h
HHT_ONHEADER		equ	0002h
HHT_ONDIVIDER		equ	0004h
HHT_ONDIVOPEN		equ	0008h
HHT_ONFILTER		equ	0010h
HHT_ONFILTERBUTTON	equ	0020h
HHT_ABOVE		equ	0100h
HHT_BELOW		equ	0200h
HHT_TORIGHT		equ	0400h
HHT_TOLEFT		equ	0800h

HDHITTESTINFO		struc
 hdhti_pt		POINT	<?>
 hdhti_flags		dd	?
 hdhti_iItem		dd	?
HDHITTESTINFO		ends


NMHDDISPINFOA		struc
 nmhddi_hdr		NMHDR	<?>
 nmhddi_iItem		dd	?
 nmhddi_mask		dd	?
 nmhddi_pszText		dd	?
 nmhddi_cchTextMax	dd	?
 nmhddi_iImage		dd	?
 nmhddi_lParam		dd	?
NMHDDISPINFOA		ends

NMHDFILTERBTNCLICK	struc
 nmhdfbc_hdr		NMHDR	<?>
 nmhdfbc_iItem		dd	?
 nmhdfbc_rc		RECT	<?>
NMHDFILTERBTNCLICK	ends

;====== TOOLBAR CONTROL ======================================================

TBBUTTON		struc
 tbb_iBitmap		dd	?
 tbb_idCommand		dd	?
 tbb_fsState		db	?
 tbb_fsStyle		db	?
 tbb_bReserved		db	?, ?	; padding for alignment
 tbb_dwData		dd	?
 tbb_iString		dd	?
TBBUTTON		ends

COLORMAP		struc
 colm_from		dd	?
 colm_to		dd	?
COLORMAP		ends

CMB_MASKED		equ	02h

TBSTATE_CHECKED	equ	01h
TBSTATE_PRESSED	equ	02h
TBSTATE_ENABLED		equ	04h
TBSTATE_HIDDEN		equ	08h
TBSTATE_INDETERMINATE	equ	10h
TBSTATE_WRAP		equ	20h
TBSTATE_ELLIPSES	equ	40h
TBSTATE_MARKED		equ	80h

TBSTYLE_BUTTON		equ	0000h	; obsolete; use BTNS_BUTTON instead
TBSTYLE_SEP		equ	0001h	; obsolete; use BTNS_SEP instead
TBSTYLE_CHECK		equ	0002h	; obsolete; use BTNS_CHECK instead
TBSTYLE_GROUP		equ	0004h	; obsolete; use BTNS_GROUP instead
TBSTYLE_CHECKGROUP	equ	TBSTYLE_GROUP OR TBSTYLE_CHECK ; obsolete; use BTNS_CHECKGROUP instead
TBSTYLE_DROPDOWN	equ	0008h	; obsolete; use BTNS_DROPDOWN instead
TBSTYLE_AUTOSIZE	equ	0010h	; obsolete; use BTNS_AUTOSIZE instead
TBSTYLE_NOPREFIX	equ	0020h	; obsolete; use BTNS_NOPREFIX instead

TBSTYLE_TOOLTIPS	equ	0100h
TBSTYLE_WRAPABLE	equ	0200h
TBSTYLE_ALTDRAG		equ	0400h
TBSTYLE_FLAT		equ	0800h
TBSTYLE_LIST		equ	1000h
TBSTYLE_CUSTOMERASE	equ	2000h
TBSTYLE_REGISTERDROP	equ	4000h
TBSTYLE_TRANSPARENT	equ	8000h

BTNS_BUTTON		equ	TBSTYLE_BUTTON
BTNS_SEP		equ	TBSTYLE_SEP
BTNS_CHECK		equ	TBSTYLE_CHECK
BTNS_GROUP		equ	TBSTYLE_GROUP
BTNS_CHECKGROUP	equ	TBSTYLE_CHECKGROUP
BTNS_DROPDOWN		equ	TBSTYLE_DROPDOWN
BTNS_AUTOSIZE		equ	TBSTYLE_AUTOSIZE
BTNS_NOPREFIX		equ	TBSTYLE_NOPREFIX
BTNS_SHOWTEXT		equ	0040h	; ignored unless TBSTYLE_EX_MIXEDBUTTONS is set
BTNS_WHOLEDROPDOWN	equ	0080h	; draw drop-down arrow, but without split arrow section

TBSTYLE_EX_DRAWDDARROWS	equ	00000001h
TBSTYLE_EX_MIXEDBUTTONS	equ	00000008h
TBSTYLE_EX_HIDECLIPPEDBUTTONS	equ	00000010h	; don't show partially obscured buttons
TBSTYLE_EX_DOUBLEBUFFER	equ	00000080h	; Double Buffer the toolbar

; Custom Draw Structure

NMTBCUSTOMDRAW	struc
 nmtbcd_nmcd		NMCUSTOMDRAW	<?>
 nmtbcd_hbrMonoDither	dd	?
 nmtbcd_hbrLines		dd	?	; For drawing lines on buttons
 nmtbcd_hpenLines		dd	?	; For drawing lines on buttons
 nmtbcd_clrText		dd	?	; Color of text
 nmtbcd_clrMark		dd	?	; Color of text bk when marked. (only if TBSTATE_MARKED)
 nmtbcd_clrTextHighlight	dd	?	; Color of text when highlighted
 nmtbcd_clrBtnFace	dd	?	; Background of the button
 nmtbcd_clrBtnHighlight	dd	?	; 3D highlight
 nmtbcd_clrHighlightHotTrack	dd	?	; In conjunction with fHighlightHotTrack
 nmtbcd_rcText		RECT	<?>	; Rect for text
 nmtbcd_nStringBkMode	dd	?
 nmtbcd_nHLStringBkMode	dd	?
 nmtbcd_iListGap		dd	?
NMTBCUSTOMDRAW	ends

; Toolbar custom draw return flags

TBCDRF_NOEDGES		equ	00010000h	; Don't draw button edges
TBCDRF_HILITEHOTTRACK	equ	00020000h	; Use color of the button bk when hottracked
TBCDRF_NOOFFSET	equ	00040000h	; Don't offset button if pressed
TBCDRF_NOMARK		equ	00080000h	; Don't draw default highlight of image/text for TBSTATE_MARKED
TBCDRF_NOETCHEDEFFECT	equ	00100000h	; Don't draw etched effect for disabled items
TBCDRF_BLENDICON	equ	00200000h	; Use ILD_BLEND50 on the icon image
TBCDRF_NOBACKGROUND	equ	00400000h	; Use ILD_BLEND50 on the icon image

TB_ENABLEBUTTON	equ	WM_USER + 1
TB_CHECKBUTTON		equ	WM_USER + 2
TB_PRESSBUTTON		equ	WM_USER + 3
TB_HIDEBUTTON		equ	WM_USER + 4
TB_INDETERMINATE	equ	WM_USER + 5
TB_MARKBUTTON		equ	WM_USER + 6
TB_ISBUTTONENABLED	equ	WM_USER + 9
TB_ISBUTTONCHECKED	equ	WM_USER + 10
TB_ISBUTTONPRESSED	equ	WM_USER + 11
TB_ISBUTTONHIDDEN	equ	WM_USER + 12
TB_ISBUTTONINDETERMINATE	equ	WM_USER + 13
TB_ISBUTTONHIGHLIGHTED	equ	WM_USER + 14
TB_SETSTATE		equ	WM_USER + 17
TB_GETSTATE		equ	WM_USER + 18
TB_ADDBITMAP		equ	WM_USER + 19
TB_ADDBUTTONSA		equ	WM_USER + 20
TB_INSERTBUTTONA	equ	WM_USER + 21
TB_DELETEBUTTON	equ	WM_USER + 22
TB_GETBUTTON		equ	WM_USER + 23
TB_BUTTONCOUNT		equ	WM_USER + 24
TB_COMMANDTOINDEX	equ	WM_USER + 25
TB_SAVERESTOREA	equ	WM_USER + 26
TB_SAVERESTOREW	equ	WM_USER + 76
TB_CUSTOMIZE		equ	WM_USER + 27
TB_ADDSTRINGA		equ	WM_USER + 28
TB_ADDSTRINGW		equ	WM_USER + 77
TB_GETITEMRECT		equ	WM_USER + 29
TB_BUTTONSTRUCTSIZE	equ	WM_USER + 30
TB_SETBUTTONSIZE	equ	WM_USER + 31
TB_SETBITMAPSIZE	equ	WM_USER + 32
TB_AUTOSIZE		equ	WM_USER + 33
TB_GETTOOLTIPS		equ	WM_USER + 35
TB_SETTOOLTIPS		equ	WM_USER + 36
TB_SETPARENT		equ	WM_USER + 37
TB_SETROWS		equ	WM_USER + 39
TB_GETROWS		equ	WM_USER + 40
TB_SETCMDID		equ	WM_USER + 42
TB_CHANGEBITMAP	equ	WM_USER + 43
TB_GETBITMAP		equ	WM_USER + 44
TB_GETBUTTONTEXTA	equ	WM_USER + 45
TB_GETBUTTONTEXTW	equ	WM_USER + 75
TB_REPLACEBITMAP	equ	WM_USER + 46
TB_SETINDENT		equ	WM_USER + 47
TB_SETIMAGELIST		equ	WM_USER + 48
TB_GETIMAGELIST		equ	WM_USER + 49
TB_LOADIMAGES		equ	WM_USER + 50
TB_GETRECT		equ	WM_USER + 51	; wParam is the Cmd instead of index
TB_SETHOTIMAGELIST	equ	WM_USER + 52
TB_GETHOTIMAGELIST	equ	WM_USER + 53
TB_SETDISABLEDIMAGELIST	equ	WM_USER + 54
TB_GETDISABLEDIMAGELIST	equ	WM_USER + 55
TB_SETSTYLE		equ	WM_USER + 56
TB_GETSTYLE		equ	WM_USER + 57
TB_GETBUTTONSIZE	equ	WM_USER + 58
TB_SETBUTTONWIDTH	equ	WM_USER + 59
TB_SETMAXTEXTROWS	equ	WM_USER + 60
TB_GETTEXTROWS		equ	WM_USER + 61
TB_GETOBJECT		equ	WM_USER + 62	; wParam == IID, lParam void **ppv
TB_GETHOTITEM		equ	WM_USER + 71
TB_SETHOTITEM		equ	WM_USER + 72	; wParam == iHotItem
TB_SETANCHORHIGHLIGHT	equ	WM_USER + 73	; wParam == TRUE/FALSE
TB_GETANCHORHIGHLIGHT	equ	WM_USER + 74
TB_MAPACCELERATORA	equ	WM_USER + 78	; wParam == ch, lParam int * pidBtn
TB_GETINSERTMARK	equ	WM_USER + 79	; lParam == LPTBINSERTMARK
TB_SETINSERTMARK	equ	WM_USER + 80	; lParam == LPTBINSERTMARK
TB_INSERTMARKHITTEST	equ	WM_USER + 81	; wParam == LPPOINT lParam == LPTBINSERTMARK
TB_MOVEBUTTON		equ	WM_USER + 82
TB_GETMAXSIZE		equ	WM_USER + 83	; lParam == LPSIZE
TB_SETEXTENDEDSTYLE	equ	WM_USER + 84	; For TBSTYLE_EX_*
TB_GETEXTENDEDSTYLE	equ	WM_USER + 85	; For TBSTYLE_EX_*
TB_GETPADDING		equ	WM_USER + 86
TB_SETPADDING		equ	WM_USER + 87
TB_SETINSERTMARKCOLOR	equ	WM_USER + 88
TB_GETINSERTMARKCOLOR	equ	WM_USER + 89
TB_SETCOLORSCHEME	equ	CCM_SETCOLORSCHEME	; lParam is color scheme
TB_GETCOLORSCHEME	equ	CCM_GETCOLORSCHEME	; fills in COLORSCHEME pointed to by lParam
TB_SETUNICODEFORMAT	equ	CCM_SETUNICODEFORMAT
TB_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT
TB_MAPACCELERATORW	equ	WM_USER + 90	; wParam == ch, lParam int * pidBtn
TB_GETBITMAPFLAGS	equ	WM_USER + 41
TB_GETBUTTONINFOW	equ	WM_USER + 63
TB_SETBUTTONINFOW	equ	WM_USER + 64
TB_GETBUTTONINFOA	equ	WM_USER + 65
TB_SETBUTTONINFOA	equ	WM_USER + 66
TB_INSERTBUTTONW	equ	WM_USER + 67
TB_ADDBUTTONSW	equ	WM_USER + 68
TB_HITTEST		equ	WM_USER + 69
TB_SETDRAWTEXTFLAGS	equ	WM_USER + 70	; wParam == mask lParam == bit values
TB_GETSTRINGW		equ	WM_USER + 91
TB_GETSTRINGA		equ	WM_USER + 92
TB_GETMETRICS		equ	WM_USER + 101
TB_SETMETRICS		equ	WM_USER + 102
TB_SETWINDOWTHEME	equ	CCM_SETWINDOWTHEME

TBADDBITMAP		struc
 tbab_hInst		dd	?
 tbab_nID		dd	?
TBADDBITMAP		ends

HINST_COMMCTRL		equ	-1

IDB_STD_SMALL_COLOR	equ	0
IDB_STD_LARGE_COLOR	equ	1
IDB_VIEW_SMALL_COLOR	equ	4
IDB_VIEW_LARGE_COLOR	equ	5
IDB_HIST_SMALL_COLOR	equ	8
IDB_HIST_LARGE_COLOR	equ	9

; icon indexes for standard bitmap

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

; icon indexes for standard view bitmap

VIEW_LARGEICONS		equ	0
VIEW_SMALLICONS	equ	1
VIEW_LIST		equ	2
VIEW_DETAILS		equ	3
VIEW_SORTNAME		equ	4
VIEW_SORTSIZE		equ	5
VIEW_SORTDATE		equ	6
VIEW_SORTTYPE		equ	7
VIEW_PARENTFOLDER	equ	8
VIEW_NETCONNECT	equ	9
VIEW_NETDISCONNECT	equ	10
VIEW_NEWFOLDER		equ	11
VIEW_VIEWMENU		equ	12

HIST_BACK		equ	0
HIST_FORWARD		equ	1
HIST_FAVORITES		equ	2
HIST_ADDTOFAVORITES	equ	3
HIST_VIEWTREE		equ	4

TBSAVEPARAMSA		struc
 tbsp_hkr		dd	?
 tbsp_pszSubKey		dd	?
 tbsp_pszValueName	dd	?
TBSAVEPARAMSA		ends

TBINSERTMARK		struc
 tbinma_iButton		dd	?
 tbinma_dwFlags		dd	?
TBINSERTMARK		ends

TBIMHT_AFTER		equ	00000001h	; TRUE = insert After iButton, otherwise before
TBIMHT_BACKGROUND	equ	00000002h	; TRUE iff missed buttons completely

TBREPLACEBITMAP		struc
 tbrebi_hInstOld		dd	?
 tbrebi_nIDOld		dd	?
 tbrebi_hInstNew		dd	?
 tbrebi_nIDNew		dd	?
 tbrebi_nButtons		dd	?
TBREPLACEBITMAP		ends

TBBF_LARGE		equ	1

TBIF_IMAGE		equ	00000001h
TBIF_TEXT		equ	00000002h
TBIF_STATE		equ	00000004h
TBIF_STYLE		equ	00000008h
TBIF_LPARAM		equ	00000010h
TBIF_COMMAND		equ	00000020h
TBIF_SIZE		equ	00000040h
TBIF_BYINDEX		equ	80000000h	; this specifies that the wparam in Get/SetButtonInfo is an index, not id

TBBUTTONINFOA		struc
 tbbuin_cbSize		dd	?
 tbbuin_dwMask		dd	?
 tbbuin_idCommand	dd	?
 tbbuin_iImage		dd	?
 tbbuin_fsState		db	?
 tbbuin_fsStyle		db	?
 tbbuin_cx		dw	?
 tbbuin_lParam		dd	?
 tbbuin_pszText		dd	?
 tbbuin_cchText		dd	?
TBBUTTONINFOA		ends

TBMF_PAD		equ	1
TBMF_BARPAD		equ	2
TBMF_BUTTONSPACING	equ	4

TBMETRICS		struc
 tbmet_cbSize		dd	?
 tbmet_dwMask		dd	?
 tbmet_cxPad		dd	?	; PAD
 tbmet_cyPad		dd	?
 tbmet_cxBarPad		dd	?	; BARPAD
 tbmet_cyBarPad		dd	?
 tbmet_cxButtonSpacing	dd	?	; BUTTONSPACING
 tbmet_cyButtonSpacing	dd	?
TBMETRICS		ends

TBN_GETBUTTONINFOA	equ	TBN_FIRST-0
TBN_BEGINDRAG		equ	TBN_FIRST-1
TBN_ENDDRAG		equ	TBN_FIRST-2
TBN_BEGINADJUST		equ	TBN_FIRST-3
TBN_ENDADJUST		equ	TBN_FIRST-4
TBN_RESET		equ	TBN_FIRST-5
TBN_QUERYINSERT		equ	TBN_FIRST-6
TBN_QUERYDELETE		equ	TBN_FIRST-7
TBN_TOOLBARCHANGE	equ	TBN_FIRST-8
TBN_CUSTHELP		equ	TBN_FIRST-9
TBN_DROPDOWN		equ	TBN_FIRST - 10
TBN_GETOBJECT		equ	TBN_FIRST - 12

; Structure for TBN_HOTITEMCHANGE notification

NMTBHOTITEM		struc
 nmtbhi_hdr		NMHDR	<?>
 nmtbhi_idOld		dd	?
 nmtbhi_idNew		dd	?
 nmtbhi_dwFlags		dd	?	; HICF_*
NMTBHOTITEM		ends

; Hot item change flags

HICF_OTHER		equ	00000000h
HICF_MOUSE		equ	00000001h	; Triggered by mouse
HICF_ARROWKEYS		equ	00000002h	; Triggered by arrow keys
HICF_ACCELERATOR	equ	00000004h	; Triggered by accelerator
HICF_DUPACCEL		equ	00000008h	; This accelerator is not unique
HICF_ENTERING		equ	00000010h	; idOld is invalid
HICF_LEAVING		equ	00000020h	; idNew is invalid
HICF_RESELECT		equ	00000040h	; hot item reselected
HICF_LMOUSE		equ	00000080h	; left mouse button selected
HICF_TOGGLEDROPDOWN	equ	00000100h	; Toggle button's dropdown state

TBN_HOTITEMCHANGE	equ	TBN_FIRST - 13
TBN_DRAGOUT		equ	TBN_FIRST - 14	; this is sent when the user clicks down on a button then drags off the button
TBN_DELETINGBUTTON	equ	TBN_FIRST - 15	; uses TBNOTIFY
TBN_GETDISPINFOA	equ	TBN_FIRST - 16	; This is sent when thetoolbar needssome display information
TBN_GETDISPINFOW	equ	TBN_FIRST - 17	; This is sent when thetoolbar needssome display information
TBN_GETINFOTIPA		equ	TBN_FIRST - 18
TBN_GETINFOTIPW		equ	TBN_FIRST - 19
TBN_GETBUTTONINFOW	equ	TBN_FIRST - 20
TBN_RESTORE		equ	TBN_FIRST - 21
TBN_SAVE		equ	TBN_FIRST - 22
TBN_INITCUSTOMIZE	equ	TBN_FIRST - 23

TBNRF_HIDEHELP		equ	00000001h
TBNRF_ENDCUSTOMIZE	equ	00000002h

NMTBSAVE		struc
 nmtbs_hdr		NMHDR	<?>
 nmtbs_pData		dd	?
 nmtbs_pCurrent		dd	?
 nmtbs_cbData		dd	?
 nmtbs_iItem		dd	?
 nmtbs_cButtons		dd	?
 nmtbs_tbButton		TBBUTTON	<?>
NMTBSAVE		ends

NMTBRESTORE		struc
 nmtbr_hdr		NMHDR	<?>
 nmtbs_pData		dd	?
 nmtbs_pCurrent		dd	?
 nmtbs_cbData		dd	?
 nmtbs_iItem		dd	?
 nmtbs_cButtons		dd	?
 nmtbs_cbBytesPerRecord	dd	?
 nmtbs_tbButton		TBBUTTON	<?>
NMTBRESTORE		ends

NMTBGETINFOTIPA		struc
 nmtbgit_hdr		NMHDR	<?>
 nmtbgit_pszText		dd	?
 nmtbgit_cchTextMax	dd	?
 nmtbgit_iItem		dd	?
 nmtbgit_lParam		dd	?
NMTBGETINFOTIPA		ends

TBNF_IMAGE		equ	00000001h
TBNF_TEXT		equ	00000002h
TBNF_DI_SETITEM		equ	10000000h

NMTBDISPINFOA		struc
 nmtbdi_hdr		NMHDR	<?>
 nmtbdi_dwMask		dd	?	; [in] Specifies the values requested .[out] Client ask the data to be set for future use
 nmtbdi_idCommand	dd	?	; [in] id of button we're requesting info for
 nmtbdi_lParam		dd	?	; [in] lParam of button
 nmtbdi_iImage		dd	?	; [out] image index
 nmtbdi_pszText		dd	?	; [out] new text for item
 nmtbdi_cchText		dd	?	; [in] size of buffer pointed to by pszText
NMTBDISPINFOA		ends

; Return codes for TBN_DROPDOWN

TBDDRET_DEFAULT		equ	0
TBDDRET_NODEFAULT	equ	1
TBDDRET_TREATPRESSED	equ	2	; Treat as a standard press button

NMTOOLBARA		struc
 nmtb_hdr		NMHDR	<?>
 nmtb_iItem		dd	?
 nmtb_tbButton		TBBUTTON	<?>
 nmtb_cchText		dd	?
 nmtb_pszText		dd	?
 nmtb_rcButton		RECT	<?>
NMTOOLBARA		ends

;====== REBAR CONTROL ========================================================

RBIM_IMAGELIST		equ	1

; begin_r_commctrl

RBS_REGISTERDROP	equ	1000h
RBS_AUTOSIZE		equ	2000h
RBS_VERTICALGRIPPER	equ	4000h	; this always has the vertical gripper (default for horizontal mode)
RBS_DBLCLKTOGGLE	equ	8000h

RBS_TOOLTIPS		equ	00000100h
RBS_VARHEIGHT		equ	00000200h
RBS_BANDBORDERS	equ	00000400h
RBS_FIXEDORDER		equ	00000800h

; end_r_commctrl

REBARINFO		struc
 rebin_cbSize		dd	?
 rebin_fMask		dd	?
 rebin_himl		dd	?
REBARINFO		ends

RBBS_BREAK		equ	00000001h	; break to new line
RBBS_FIXEDSIZE		equ	00000002h	; band can't be sized
RBBS_CHILDEDGE		equ	00000004h	; edge around top & bottom of child window
RBBS_HIDDEN		equ	00000008h	; don't show
RBBS_NOVERT		equ	00000010h	; don't show when vertical
RBBS_FIXEDBMP		equ	00000020h	; bitmap doesn't move during band resize
RBBS_VARIABLEHEIGHT 	equ	00000040h	; allow autosizing of this child vertically
RBBS_GRIPPERALWAYS	equ	00000080h	; always show the gripper
RBBS_NOGRIPPER		equ	00000100h	; never show the gripper
RBBS_USECHEVRON 	equ	00000200h	; display drop-down button for this band if it's sized smaller than ideal width
RBBS_HIDETITLE		equ	00000400h	; keep band title hidden
RBBS_TOPALIGN 		equ	00000800h	; keep band title hidden

RBBIM_STYLE		equ	00000001h
RBBIM_COLORS		equ	00000002h
RBBIM_TEXT		equ	00000004h
RBBIM_IMAGE		equ	00000008h
RBBIM_CHILD		equ	00000010h
RBBIM_CHILDSIZE		equ	00000020h
RBBIM_SIZE		equ	00000040h
RBBIM_BACKGROUND	equ	00000080h
RBBIM_ID		equ	00000100h
RBBIM_IDEALSIZE		equ	00000200h
RBBIM_LPARAM		equ	00000400h
RBBIM_HEADERSIZE	equ	00000800h	; control the size of the header

REBARBANDINFOA		struc
 rebbin_cbSize		dd	?
 rebbin_fMask		dd	?
 rebbin_fStyle		dd	?
 rebbin_clrFore		dd	?
 rebbin_clrBack		dd	?
 rebbin_lpText		dd	?
 rebbin_cch		dd	?
 rebbin_iImage		dd	?
 rebbin_hwndChild		dd	?
 rebbin_cxMinChild		dd	?
 rebbin_cyMinChild		dd	?
 rebbin_cx		dd	?
 rebbin_hbmBack		dd	?
 rebbin_wID		dd	?
 rebbin_cyChild		dd	?
 rebbin_cyMaxChild		dd	?
 rebbin_cyIntegral		dd	?
 rebbin_cxIdeal		dd	?
 rebbin_lParam		dd	?
 rebbin_cxHeader		dd	?
REBARBANDINFOA		ends

RB_INSERTBANDA		equ	WM_USER +1
RB_DELETEBAND		equ	WM_USER +2
RB_GETBARINFO		equ	WM_USER +3
RB_SETBARINFO		equ	WM_USER +4
RB_GETBANDINFOA		equ	WM_USER +5
RB_SETBANDINFOA		equ	WM_USER +6
RB_SETPARENT		equ	WM_USER +7
RB_HITTEST		equ	WM_USER +8
RB_GETRECT		equ	WM_USER +9
RB_INSERTBANDW		equ	WM_USER +10
RB_SETBANDINFOW	equ	WM_USER +11
RB_GETBANDCOUNT	equ	WM_USER +12
RB_GETROWCOUNT		equ	WM_USER +13
RB_GETROWHEIGHT	equ	WM_USER +14
RB_IDTOINDEX		equ	WM_USER +16	; wParam == id
RB_GETTOOLTIPS		equ	WM_USER +17
RB_SETTOOLTIPS		equ	WM_USER +18
RB_SETBKCOLOR		equ	WM_USER +19	; sets the default BK color
RB_GETBKCOLOR		equ	WM_USER +20	; defaults to CLR_NONE
RB_SETTEXTCOLOR	equ	WM_USER +21
RB_GETTEXTCOLOR	equ	WM_USER +22	; defaults to 0x00000000

RBSTR_CHANGERECT	equ	0001	; flags for RB_SIZETORECT

RB_SIZETORECT		equ	WM_USER +23	; resize the rebar/break bands and such to this rect (lparam)

RB_SETCOLORSCHEME	equ	CCM_SETCOLORSCHEME	; lParam is color scheme
RB_GETCOLORSCHEME	equ	CCM_GETCOLORSCHEME	; fills in COLORSCHEME pointed to by lParam

RB_BEGINDRAG		equ	WM_USER + 24
RB_ENDDRAG		equ	WM_USER + 25
RB_DRAGMOVE		equ	WM_USER + 26
RB_GETBARHEIGHT		equ	WM_USER + 27
RB_GETBANDINFOW	equ	WM_USER + 28
;RB_GETBANDINFOA		equ	WM_USER + 29
RB_MINIMIZEBAND		equ	WM_USER + 30
RB_MAXIMIZEBAND		equ	WM_USER + 31
RB_GETDROPTARGET	equ	CCM_GETDROPTARGET
RB_GETBANDBORDERS	equ	WM_USER + 34	; returns in lparam = lprc the amount of edges added to band wparam
RB_SHOWBAND		equ	WM_USER + 35	; show/hide band
RB_SETPALETTE		equ	WM_USER + 37
RB_GETPALETTE		equ	WM_USER + 38
RB_MOVEBAND		equ	WM_USER + 39
RB_SETUNICODEFORMAT	equ	CCM_SETUNICODEFORMAT
RB_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT
RB_GETBANDMARGINS	equ	WM_USER + 40
RB_SETWINDOWTHEME	equ	CCM_SETWINDOWTHEME
RB_PUSHCHEVRON		equ	WM_USER + 43

RBN_HEIGHTCHANGE	equ	RBN_FIRST - 0
RBN_GETOBJECT		equ	RBN_FIRST - 1
RBN_LAYOUTCHANGED	equ	RBN_FIRST - 2
RBN_AUTOSIZE		equ	RBN_FIRST - 3
RBN_BEGINDRAG		equ	RBN_FIRST - 4
RBN_ENDDRAG		equ	RBN_FIRST - 5
RBN_DELETINGBAND	equ	RBN_FIRST - 6	; Uses NMREBAR
RBN_DELETEDBAND		equ	RBN_FIRST - 7	; Uses NMREBAR
RBN_CHILDSIZE		equ	RBN_FIRST - 8
RBN_CHEVRONPUSHED	equ	RBN_FIRST - 10
RBN_MINMAX		equ	RBN_FIRST - 21
RBN_AUTOBREAK		equ	RBN_FIRST - 22

NMREBARCHILDSIZE	struc
 nmrebcs_hdr		NMHDR	<?>
 nmrebcs_uBand		dd	?
 nmrebcs_wID		dd	?
 nmrebcs_rcChild		RECT	<?>
 nmrebcs_rcBand		RECT	<?>
NMREBARCHILDSIZE		ends

NMREBAR		struc
 nmreb_hdr		NMHDR	<?>
 nmreb_dwMask		dd	?	; RBNM_*
 nmreb_uBand		dd	?
 nmreb_fStyle		dd	?
 nmreb_wID		dd	?
 nmreb_lParam		dd	?
NMREBAR		ends

; Mask flags for NMREBAR

RBNM_ID		equ	00000001
RBNM_STYLE		equ	00000002
RBNM_LPARAM		equ	00000004


NMRBAUTOSIZE		struc
 nmrbas_hdr		NMHDR	<?>
 nmrbas_fChanged		dd	?
 nmrbas_rcTarget		RECT	<?>
 nmrbas_rcActual		RECT	<?>
NMRBAUTOSIZE		ends

NMREBARCHEVRON		struc
 nmrebch_hdr		NMHDR	<?>
 nmrebch_uBand		dd	?
 nmrebch_wID		dd	?
 nmrebch_lParam		dd	?
 nmrebch_rc		RECT	<?>
 nmrebch_lParamNM	dd	?
NMREBARCHEVRON		ends

RBAB_AUTOSIZE		equ	0001	; These are not flags and are all mutually exclusive
RBAB_ADDBAND		equ	0002

NMREBARAUTOBREAK	struc
 nmrebab_hdr		NMHDR	<?>
 nmrebab_uBand		dd	?
 nmrebab_wID		dd	?
 nmrebab_lParam		dd	?
 nmrebab_uMsg		dd	?
 nmrebab_fStyleCurrent	dd	?
 nmrebab_fAutoBreak	dd	?
NMREBARAUTOBREAK	ends

RBHT_NOWHERE		equ	0001h
RBHT_CAPTION		equ	0002h
RBHT_CLIENT		equ	0003h
RBHT_GRABBER		equ	0004h
RBHT_CHEVRON		equ	0008h

RBHITTESTINFO		struc
 rbhti_pt		POINT	<?>
 rbhti_flags		dd	?
 rbhti_iBand		dd	?
RBHITTESTINFO		ends

;====== TOOLTIPS CONTROL =====================================================

TOOLINFOA		struc
 tin_cbSize		dd	?
 tin_uFlags		dd	?
 tin_hwnd		dd	?
 tin_uId		dd	?
 tin_rect		RECT	<?>
 tin_hinst		dd	?
 tin_lpszText		dd	?
 tin_lParam		dd	?
 tin_lpReserved		dd	?
TOOLINFOA		ends

; begin_r_commctrl

TTS_ALWAYSTIP		equ	01h
TTS_NOPREFIX		equ	02h
TTS_NOANIMATE		equ	10h
TTS_NOFADE		equ	20h
TTS_BALLOON		equ	40h
TTS_CLOSE		equ	80h

; end_r_commctrl

TTF_IDISHWND		equ	0001

; Use this to center around trackpoint in trackmode
; -OR- to center around tool in normal mode.
; Use TTF_ABSOLUTE to place the tip exactly at the track coords when
; in tracking mode.TTF_ABSOLUTE can be used in conjunction with TTF_CENTERTIP
; to center the tip absolutely about the track point.

TTF_CENTERTIP		equ	0002h
TTF_RTLREADING		equ	0004h
TTF_SUBCLASS		equ	0010h
TTF_TRACK		equ	0020h
TTF_ABSOLUTE		equ	0080h
TTF_TRANSPARENT	equ	0100h
TTF_PARSELINKS		equ	1000h
TTF_DI_SETITEM		equ	8000h	; valid only on the TTN_NEEDTEXT callback

TTDT_AUTOMATIC		equ	0
TTDT_RESHOW		equ	1
TTDT_AUTOPOP		equ	2
TTDT_INITIAL		equ	3

; ToolTip Icons (Set with TTM_SETTITLE)

TTI_NONE		equ	0
TTI_INFO		equ	1
TTI_WARNING		equ	2
TTI_ERROR		equ	3

; Tool Tip Messages

TTM_ACTIVATE		equ	WM_USER + 1
TTM_SETDELAYTIME	equ	WM_USER + 3
TTM_ADDTOOLA		equ	WM_USER + 4
TTM_ADDTOOLW		equ	WM_USER + 50
TTM_DELTOOLA		equ	WM_USER + 5
TTM_DELTOOLW		equ	WM_USER + 51
TTM_NEWTOOLRECTA	equ	WM_USER + 6
TTM_NEWTOOLRECTW	equ	WM_USER + 52
TTM_RELAYEVENT		equ	WM_USER + 7
TTM_GETTOOLINFOA	equ	WM_USER + 8
TTM_GETTOOLINFOW	equ	WM_USER + 53
TTM_SETTOOLINFOA	equ	WM_USER + 9
TTM_SETTOOLINFOW	equ	WM_USER + 54
TTM_HITTESTA		equ	WM_USER +10
TTM_HITTESTW		equ	WM_USER +55
TTM_GETTEXTA		equ	WM_USER +11
TTM_GETTEXTW		equ	WM_USER +56
TTM_UPDATETIPTEXTA	equ	WM_USER +12
TTM_UPDATETIPTEXTW	equ	WM_USER +57
TTM_GETTOOLCOUNT	equ	WM_USER +13
TTM_ENUMTOOLSA	equ	WM_USER +14
TTM_ENUMTOOLSW	equ	WM_USER +58
TTM_GETCURRENTTOOLA	equ	WM_USER + 15
TTM_GETCURRENTTOOLW	equ	WM_USER + 59
TTM_WINDOWFROMPOINT	equ	WM_USER + 16
TTM_TRACKACTIVATE	equ	WM_USER + 17	; wParam = TRUE/FALSE start endlparam = LPTOOLINFO
TTM_TRACKPOSITION	equ	WM_USER + 18	; lParam = dwPos
TTM_SETTIPBKCOLOR	equ	WM_USER + 19
TTM_SETTIPTEXTCOLOR	equ	WM_USER + 20
TTM_GETDELAYTIME	equ	WM_USER + 21
TTM_GETTIPBKCOLOR	equ	WM_USER + 22
TTM_GETTIPTEXTCOLOR	equ	WM_USER + 23
TTM_SETMAXTIPWIDTH	equ	WM_USER + 24
TTM_GETMAXTIPWIDTH	equ	WM_USER + 25
TTM_SETMARGIN		equ	WM_USER + 26	; lParam = lprc
TTM_GETMARGIN		equ	WM_USER + 27	; lParam = lprc
TTM_POP		equ	WM_USER + 28
TTM_UPDATE		equ	WM_USER + 29
TTM_GETBUBBLESIZE	equ	WM_USER + 30
TTM_ADJUSTRECT		equ	WM_USER + 31
TTM_SETTITLEA		equ	WM_USER + 32	; wParam = TTI_*, lParam = char* szTitle
TTM_SETTITLEW		equ	WM_USER + 33	; wParam = TTI_*, lParam = wchar* szTitle
TTM_POPUP		equ	WM_USER + 34
TTM_GETTITLE		equ	WM_USER + 35	; wParam = 0, lParam = TTGETTITLE*

TTGETTITLE		struc
  ttgt_dwSize		dd	?
  ttgt_uTitleBitmap		dd	?
  ttgt_cch		dd	?
  ttgt_pszTitle		dd	?
TTGETTITLE		ends

TTM_SETWINDOWTHEME	equ	CCM_SETWINDOWTHEME

TTHITTESTINFOA		struc
 tthti_hwnd		dd	?
 tthti_pt		POINT	<?>
 tthti_ti		TOOLINFOA	<?>
TTHITTESTINFOA	ends

TTN_GETDISPINFOA	equ	TTN_FIRST - 0
TTN_GETDISPINFOW	equ	TTN_FIRST - 10
TTN_SHOW		equ	TTN_FIRST - 1
TTN_POP		equ	TTN_FIRST - 2
TTN_LINKCLICK		equ	TTN_FIRST - 3
TTN_NEEDTEXTA		equ	TTN_GETDISPINFO

NMTTDISPINFOA		struc
 nmttdi_hdr		NMHDR	<?>
 nmttdi_lpszText		dd	?
 nmttdi_szText		db	80 dup(?)
 nmttdi_hinst		dd	?
 nmttdi_uFlags		dd	?
 nmttdi_lParam		dd	?
NMTTDISPINFOA	ends


;====== DRAG LIST CONTROL ====================================================

DRAGLISTINFO		struc
 dli_uNotification		dd	?
 dli_hWnd		dd	?
 dli_ptCursor		POINT	<?>
DRAGLISTINFO		ends

DL_BEGINDRAG		equ	WM_USER+133
DL_DRAGGING		equ	WM_USER+134
DL_DROPPED		equ	WM_USER+135
DL_CANCELDRAG		equ	WM_USER+136

DL_CURSORSET		equ	0
DL_STOPCURSOR		equ	1
DL_COPYCURSOR		equ	2
DL_MOVECURSOR		equ	3

NMUPDOWN		struc
 nmupd_hdr		NMHDR	<?>
 nmupd_iPos		dd	?
 nmupd_iDelta		dd	?
NMUPDOWN		ends

UDN_DELTAPOS		equ	UDN_FIRST - 1


LPSTR_TEXTCALLBACKW	equ	-1
LPSTR_TEXTCALLBACKA	equ	-1

LVFINDINFOA		struc
 flags		dd	?
		dd	?
 psz		dq	?
 lParam		dq	?
 pt		POINT	<?>
 vkDirection		dd	?
	dd	?
LVFINDINFOA	ends


LVIR_BOUNDS		equ	0
LVIR_ICON		equ	1
LVIR_LABEL		equ	2
LVIR_SELECTBOUNDS	equ	3

LVM_GETITEMRECT	equ	LVM_FIRST + 14
LVM_SETITEMPOSITION	equ	LVM_FIRST + 15
LVM_GETITEMPOSITION	equ	LVM_FIRST + 16
LVM_GETSTRINGWIDTHA	equ	LVM_FIRST + 17
LVM_GETSTRINGWIDTHW	equ	LVM_FIRST + 87

LVHT_NOWHERE		equ	0001h
LVHT_ONITEMICON		equ	0002h
LVHT_ONITEMLABEL	equ	0004h
LVHT_ONITEMSTATEICON	equ	0008h
LVHT_ONITEM		equ	LVHT_ONITEMICON OR LVHT_ONITEMLABEL OR LVHT_ONITEMSTATEICON

LVHT_ABOVE		equ	0008h
LVHT_BELOW		equ	0010h
LVHT_TORIGHT		equ	0020h
LVHT_TOLEFT		equ	0040h

LVHITTESTINFO		struc
 lvht_pt		POINT	<?>
 lvht_flags		dd	?
 lvht_iItem		dd	?
 lvht_iSubItem		dd	?	; this is was NOT in win95.valid only for LVM_SUBITEMHITTEST
LVHITTESTINFO	ends

LV_HITTESTINFO		equ	LVHITTESTINFO

LVM_HITTEST		equ	LVM_FIRST + 18
LVM_ENSUREVISIBLE	equ	LVM_FIRST + 19
LVM_SCROLL		equ	LVM_FIRST + 20
LVM_REDRAWITEMS	equ	LVM_FIRST + 21

LVA_DEFAULT		equ	0000h
LVA_ALIGNLEFT		equ	0001h
LVA_ALIGNTOP		equ	0002h
LVA_SNAPTOGRID		equ	0005h

LVM_ARRANGE		equ	LVM_FIRST + 22
LVM_EDITLABELA		equ	LVM_FIRST + 23
LVM_EDITLABELW		equ	LVM_FIRST + 118
LVM_GETEDITCONTROL	equ	LVM_FIRST + 24

LVBKIMAGEA		struc
 lvbki_ulFlags		dd	?	; LVBKIF_*
 lvbki_hbm		dd	?
 lvbki_pszImage		dd	?
 lvbki_cchImageMax	dd	?
 lvbki_xOffsetPercent	dd	?
 lvbki_yOffsetPercent	dd	?
LVBKIMAGEA		ends

LVBKIF_SOURCE_NONE	equ	00000000h
LVBKIF_SOURCE_HBITMAP	equ	00000001h
LVBKIF_SOURCE_URL	equ	00000002h
LVBKIF_SOURCE_MASK	equ	00000003h
LVBKIF_STYLE_NORMAL	equ	00000000h
LVBKIF_STYLE_TILE	equ	00000010h
LVBKIF_STYLE_MASK	equ	00000010h
LVBKIF_FLAG_TILEOFFSET	equ	00000100h
LVBKIF_TYPE_WATERMARK	equ	10000000h

LVM_SETBKIMAGEA 	equ	LVM_FIRST + 68
LVM_SETBKIMAGEW 	equ	LVM_FIRST + 138
LVM_GETBKIMAGEA 	equ	LVM_FIRST + 69
LVM_GETBKIMAGEW 	equ	LVM_FIRST + 139

LVM_SETSELECTEDCOLUMN 	equ	LVM_FIRST + 140
LVM_SETTILEWIDTH 	equ	LVM_FIRST + 141

LV_VIEW_ICON		equ	0000h
LV_VIEW_DETAILS		equ	0001h
LV_VIEW_SMALLICON	equ	0002h
LV_VIEW_LIST		equ	0003h
LV_VIEW_TILE		equ	0004h
LV_VIEW_MAX		equ	0004h

LVM_SETVIEW 		equ	LVM_FIRST + 142
LVM_GETVIEW 		equ	LVM_FIRST + 143

LVGF_NONE		equ	00000000h
LVGF_HEADER		equ	00000001h
LVGF_FOOTER		equ	00000002h
LVGF_STATE		equ	00000004h
LVGF_ALIGN		equ	00000008h
LVGF_GROUPID		equ	00000010h

LVGS_NORMAL		equ	00000000h
LVGS_COLLAPSED		equ	00000001h
LVGS_HIDDEN		equ	00000002h

LVGA_HEADER_LEFT	equ	00000001h
LVGA_HEADER_CENTER	equ	00000002h
LVGA_HEADER_RIGHT	equ	00000004h	; Don't forget to validate exclusivity
LVGA_FOOTER_LEFT	equ	00000008h
LVGA_FOOTER_CENTER	equ	00000010h
LVGA_FOOTER_RIGHT	equ	00000020h	; Don't forget to validate exclusivity

LVGROUP		struc
 lvgr_cbSize		dd	?
 lvgr_mask		dd	?
 lvgr_pszHeader		dd	?
 lvgr_cchHeader		dd	?
 lvgr_pszFooter		dd	?
 lvgr_cchFooter		dd	?
 lvgr_iGroupId		dd	?
 lvgr_stateMask		dd	?
 lvgr_state		dd	?
 lvgr_uAlign		dd	?
LVGROUP		ends

LVM_INSERTGROUP 	equ	LVM_FIRST + 145
LVM_SETGROUPINFO	equ	LVM_FIRST + 147
LVM_GETGROUPINFO	equ	LVM_FIRST + 149
LVM_REMOVEGROUP	equ	LVM_FIRST + 150
LVM_MOVEGROUP		equ	LVM_FIRST + 151
LVM_MOVEITEMTOGROUP	equ	LVM_FIRST + 154

LVGMF_NONE		equ	00000000
LVGMF_BORDERSIZE	equ	00000001
LVGMF_BORDERCOLOR	equ	00000002
LVGMF_TEXTCOLOR	equ	00000004

LVGROUPMETRICS		struc
 lvgm_cbSize		dd	?
 lvgm_mask		dd	?
 lvgm_Left		dd	?
 lvgm_Top		dd	?
 lvgm_Right		dd	?
 lvgm_Bottom		dd	?
 lvgm_crLeft		dd	?
 lvgm_crTop		dd	?
 lvgm_crRight		dd	?
 lvgm_crBottom		dd	?
 lvgm_crHeader		dd	?
 lvgm_crFooter		dd	?
LVGROUPMETRICS	ends

LVM_SETGROUPMETRICS	equ	LVM_FIRST + 155
LVM_GETGROUPMETRICS	equ	LVM_FIRST + 156
LVM_ENABLEGROUPVIEW	equ	LVM_FIRST + 157
LVM_SORTGROUPS		equ	LVM_FIRST + 158
LVM_INSERTGROUPSORTED	equ	LVM_FIRST + 159
LVM_REMOVEALLGROUPS	equ	LVM_FIRST + 160
LVM_HASGROUP		equ	LVM_FIRST + 161

LVTVIF_AUTOSIZE		equ	00000000
LVTVIF_FIXEDWIDTH	equ	00000001
LVTVIF_FIXEDHEIGHT	equ	00000002
LVTVIF_FIXEDSIZE		equ	00000003

LVTVIM_TILESIZE		equ	00000001
LVTVIM_COLUMNS		equ	00000002
LVTVIM_LABELMARGIN	equ	00000004

LVTILEVIEWINFO		struc
 lvtvi_cbSize		dd	?
 lvtvi_dwMask		dd	?	;LVTVIM_*
 lvtvi_dwFlags		dd	?	;LVTVIF_*
 lvtvi_sizeTile		dd	?, ?
 lvtvi_cLines		dd	?
 lvtvi_rcLabelMargin	RECT	<?>
LVTILEVIEWINFO	ends

LVTILEINFO		struc
 lvti_cbSize		dd	?
 lvti_iItem		dd	?
 lvti_cColumns		dd	?
 lvti_puColumns		dd	?
LVTILEINFO	ends

LVM_SETTILEVIEWINFO	equ	LVM_FIRST + 162
LVM_GETTILEVIEWINFO	equ	LVM_FIRST + 163
LVM_SETTILEINFO		equ	LVM_FIRST + 164
LVM_GETTILEINFO		equ	LVM_FIRST + 165

LVINSERTMARK		struc
 lvim_cbSize		dd	?
 lvim_dwFlags		dd	?
 lvim_iItem		dd	?
 lvim_dwReserved		dd	?
LVINSERTMARK		ends

LVIM_AFTER		equ	1	; TRUE = insert After iItem, otherwise before

LVM_SETINSERTMARK	equ	LVM_FIRST + 166
LVM_GETINSERTMARK	equ	LVM_FIRST + 167
LVM_INSERTMARKHITTEST	equ	LVM_FIRST + 168
LVM_GETINSERTMARKRECT	equ	LVM_FIRST + 169
LVM_SETINSERTMARKCOLOR	equ	LVM_FIRST + 170
LVM_GETINSERTMARKCOLOR	equ	LVM_FIRST + 171

LVSETINFOTIP		struc
 lvsit_cbSize		dd	?
 lvsit_dwFlags		dd	?
 lvsit_pszText		dd	?
 lvsit_iItem		dd	?
 lvsit_iSubItem		dd	?
LVSETINFOTIP	ends

LVM_SETINFOTIP		equ	LVM_FIRST + 173
LVM_GETSELECTEDCOLUMN	equ	LVM_FIRST + 174
LVM_ISGROUPVIEWENABLED	equ	LVM_FIRST + 175
LVM_GETOUTLINECOLOR	equ	LVM_FIRST + 176
LVM_SETOUTLINECOLOR	equ	LVM_FIRST + 177
LVM_CANCELEDITLABEL	equ	LVM_FIRST + 179
LVM_MAPINDEXTOID	equ	LVM_FIRST + 180
LVM_MAPIDTOINDEX	equ	LVM_FIRST + 181

; NMITEMACTIVATE is used instead of NMLISTVIEW in IE >= 0x400
; therefore all the fields are the same except for extra uKeyFlags
; they are used to store key flags at the time of the single click with
; delayed activation - because by the time the timer goes off a user may
; not hold the keys (shift, ctrl) any more

NMITEMACTIVATE		struc
 nmiac_hdr		NMHDR	<?>
 nmiac_iItem		dd	?
 nmiac_iSubItem		dd	?
 nmiac_uNewState		dd	?
 nmiac_uOldState		dd	?
 nmiac_uChanged		dd	?
 nmiac_ptAction		POINT	<?>
 nmiac_lParam		dd	?
uKeyFlags		dd	?
NMITEMACTIVATE		ends

; key flags stored in uKeyFlags

LVKF_ALT		equ	0001
LVKF_CONTROL		equ	0002
LVKF_SHIFT		equ	0004

NMLVCUSTOMDRAW	struc
 nmlvcd_nmcd		NMCUSTOMDRAW	<?>
 nmlvcd_clrText		dd	?
 nmlvcd_clrTextBk		dd	?
 nmlvcd_iSubItem		dd	?
 nmlvcd_dwItemType	dd	?
 nmlvcd_clrFace		dd	?
 nmlvcd_iIconEffect	dd	?
 nmlvcd_iIconPhase	dd	?
 nmlvcd_iPartId		dd	?
 nmlvcd_iStateId		dd	?
 nmlvcd_rcText		RECT	<?>
 nmlvcd_uAlign		dd	?	; Alignment. Use LVGA_HEADER_CENTER, LVGA_HEADER_RIGHT, LVGA_HEADER_LEFT
NMLVCUSTOMDRAW	ends

; dwItemType

LVCDI_ITEM		equ	00000000
LVCDI_GROUP		equ	00000001

; ListView custom draw return values

LVCDRF_NOSELECT		equ	00010000
LVCDRF_NOGROUPFRAME	equ	00020000

NMLVCACHEHINT		struc
 nmlvch_hdr		NMHDR	<?>
 nmlvch_iFrom		dd	?
 nmlvch_iTo		dd	?
NMLVCACHEHINT		ends

NMLVFINDITEMA		struc
 nmlvfi_hdr		NMHDR	<?>
 nmlvfi_iStart		dd	?
 nmlvfi_lvfi		LVFINDINFOA	<?>
NMLVFINDITEMA	ends

NMLVODSTATECHANGE	struc
 nmlvosc_hdr		NMHDR	<?>
 nmlvosc_iFrom		dd	?
 nmlvosc_iTo		dd	?
 nmlvosc_uNewState	dd	?
 nmlvosc_uOldState	dd	?
NMLVODSTATECHANGE	ends


NMLVDISPINFOA		struc
 lvdi_hdr		NMHDR	<?>
 lvdi_item		LVITEMA	<?>
NMLVDISPINFOA		ends


LVN_MARQUEEBEGIN		equ	LVN_FIRST-56

NMLVGETINFOTIPA		struc
 nmlvgit_hdr		NMHDR	<?>
 nmlvgit_dwFlags		dd	?
 nmlvgit_pszText		dd	?
 nmlvgit_cchTextMax	dd	?
 nmlvgit_iItem		dd	?
 nmlvgit_iSubItem		dd	?
 nmlvgit_lParam		dd	?
NMLVGETINFOTIPA		ends

LVGIT_UNFOLDED		equ	1

LVN_GETINFOTIPA		equ	LVN_FIRST-57
LVN_GETINFOTIPW		equ	LVN_FIRST-58

NMLVSCROLL		struc
 nmlvs_hdr		NMHDR	<?>
 nmlvs_dx		dd	?
 nmlvs_dy		dd	?
NMLVSCROLL		ends

LVN_BEGINSCROLL		equ	LVN_FIRST-80
LVN_ENDSCROLL		equ	LVN_FIRST-81

;====== TREEVIEW CONTROL =====================================================

; begin_r_commctrl

TVS_HASBUTTONS		equ	0001h
TVS_HASLINES		equ	0002h
TVS_LINESATROOT	equ	0004h
TVS_EDITLABELS		equ	0008h
TVS_DISABLEDRAGDROP	equ	0010h
TVS_SHOWSELALWAYS	equ	0020h
TVS_RTLREADING		equ	0040h

TVS_NOTOOLTIPS		equ	0080h
TVS_CHECKBOXES		equ	0100h
TVS_TRACKSELECT	equ	0200h
TVS_SINGLEEXPAND	equ	0400h
TVS_INFOTIP		equ	0800h
TVS_FULLROWSELECT	equ	1000h
TVS_NOSCROLL		equ	2000h
TVS_NONEVENHEIGHT	equ	4000h
TVS_NOHSCROLL		equ	8000h	; TVS_NOSCROLL overrides this

; end_r_commctrl

TVIF_TEXT		equ	0001h
TVIF_IMAGE		equ	0002h
TVIF_PARAM		equ	0004h
TVIF_STATE		equ	0008h
TVIF_HANDLE		equ	0010h
TVIF_SELECTEDIMAGE	equ	0020h
TVIF_CHILDREN		equ	0040h
TVIF_INTEGRAL		equ	0080h
TVIS_SELECTED		equ	0002h
TVIS_CUT		equ	0004h
TVIS_DROPHILITED		equ	0008h
TVIS_BOLD		equ	0010h
TVIS_EXPANDED		equ	0020h
TVIS_EXPANDEDONCE	equ	0040h
TVIS_EXPANDPARTIAL	equ	0080h
TVIS_OVERLAYMASK	equ	0F00h
TVIS_STATEIMAGEMASK	equ	0F000h
TVIS_USERMASK		equ	0F000h

I_CHILDRENCALLBACK	equ	-1

TVITEMA		struc
 tvi_mask		dd	?
 tvi_hItem		dd	?
 tvi_state		dd	?
 tvi_stateMask		dd	?
 tvi_pszText		dd	?
 tvi_cchTextMax		dd	?
 tvi_iImage		dd	?
 tvi_iSelectedImage	dd	?
 tvi_cChildren		dd	?
 tvi_lParam		dd	?
TVITEMA		ends

TV_ITEM		equ	TVITEM

; only used for Get and Set messages.no notifies

TVITEMEXA		struc
 tvie_mask		dd	?
 tvie_hItem		dd	?
 tvie_state		dd	?
 tvie_stateMask		dd	?
 tvie_pszText		dd	?
 tvie_cchTextMax		dd	?
 tvie_iImage		dd	?
 tvie_iSelectedImage	dd	?
 tvie_cChildren		dd	?
 tvie_lParam		dd	?
 tvie_iIntegral		dd	?
TVITEMEXA	ends

TVI_ROOT		equ	0FFFF0000h
TVI_FIRST		equ	0FFFF0001h
TVI_LAST		equ	0FFFF0002h
TVI_SORT		equ	0FFFF0003h

TVINSERTSTRUCTA	struc
 tvs_hParent		dd	?
 tvs_hInsertAfter		dd	?
 tvs_itemex		TVITEMEXA	<?>
TVINSERTSTRUCTA	ends

tvs_item		equ	tvs_itemex

TV_INSERTSTRUCT		equ	TVINSERTSTRUCT

TVM_INSERTITEMA		equ	TV_FIRST + 0
TVM_INSERTITEMW	equ	TV_FIRST + 50
TVM_DELETEITEM		equ	TV_FIRST + 1
TVM_EXPAND		equ	TV_FIRST + 2

TVE_COLLAPSE		equ	0001h
TVE_EXPAND		equ	0002h
TVE_TOGGLE		equ	0003h
TVE_EXPANDPARTIAL	equ	4000h
TVE_COLLAPSERESET	equ	8000h

TVM_GETITEMRECT	equ	TV_FIRST + 4
TVM_GETCOUNT		equ	TV_FIRST + 5
TVM_GETINDENT		equ	TV_FIRST + 6
TVM_SETINDENT		equ	TV_FIRST + 7
TVM_GETIMAGELIST	equ	TV_FIRST + 8

TVSIL_NORMAL		equ	0
TVSIL_STATE		equ	2

TVM_SETIMAGELIST	equ	TV_FIRST + 9
TVM_GETNEXTITEM	equ	TV_FIRST + 10

TVGN_ROOT		equ	0000h
TVGN_NEXT		equ	0001h
TVGN_PREVIOUS		equ	0002h
TVGN_PARENT		equ	0003h
TVGN_CHILD		equ	0004h
TVGN_FIRSTVISIBLE	equ	0005h
TVGN_NEXTVISIBLE	equ	0006h
TVGN_PREVIOUSVISIBLE	equ	0007h
TVGN_DROPHILITE		equ	0008h
TVGN_CARET		equ	0009h
TVGN_LASTVISIBLE	equ	000Ah

TVSI_NOSINGLEEXPAND	equ	8000h	; Should not conflict with TVGN flags.

TVM_SELECTITEM		equ	TV_FIRST + 11
TVM_GETITEMA		equ	TV_FIRST + 12
TVM_GETITEMW		equ	TV_FIRST + 62
TVM_SETITEMA		equ	TV_FIRST + 13
TVM_SETITEMW		equ	TV_FIRST + 63
TVM_EDITLABELA		equ	TV_FIRST + 14
TVM_EDITLABELW		equ	TV_FIRST + 65
TVM_GETEDITCONTROL	equ	TV_FIRST + 15
TVM_GETVISIBLECOUNT	equ	TV_FIRST + 16
TVM_HITTEST		equ	TV_FIRST + 17

TVHITTESTINFO		struc
 tvh_pt		POINT	<?>
 tvh_flags		dd	?
 tvh_hItem		dd	?
TVHITTESTINFO	ends

TV_HITTESTINFO		equ	TVHITTESTINFO

TVHT_NOWHERE		equ	0001h
TVHT_ONITEMICON	equ	0002h
TVHT_ONITEMLABEL	equ	0004h
TVHT_ONITEMINDENT	equ	0008h
TVHT_ONITEMBUTTON	equ	0010h
TVHT_ONITEMRIGHT	equ	0020h
TVHT_ONITEMSTATEICON	equ	0040h
TVHT_ABOVE		equ	0100h
TVHT_BELOW		equ	0200h
TVHT_TORIGHT		equ	0400h
TVHT_TOLEFT		equ	0800h
TVHT_ONITEM		equ	TVHT_ONITEMICON OR TVHT_ONITEMLABEL OR TVHT_ONITEMSTATEICON


TVM_CREATEDRAGIMAGE	equ	TV_FIRST + 18
TVM_SORTCHILDREN	equ	TV_FIRST + 19
TVM_ENSUREVISIBLE	equ	TV_FIRST + 20
TVM_SORTCHILDRENCB	equ	TV_FIRST + 21
TVM_ENDEDITLABELNOW	equ	TV_FIRST + 22
TVM_GETISEARCHSTRINGA	equ	TV_FIRST + 23
TVM_GETISEARCHSTRINGW	equ	TV_FIRST + 64
TVM_SETTOOLTIPS	equ	TV_FIRST + 24
TVM_GETTOOLTIPS	equ	TV_FIRST + 25
TVM_SETINSERTMARK	equ	TV_FIRST + 26
TVM_SETUNICODEFORMAT	equ	CCM_SETUNICODEFORMAT
TVM_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT
TVM_SETITEMHEIGHT	equ	TV_FIRST + 27
TVM_GETITEMHEIGHT	equ	TV_FIRST + 28
TVM_SETBKCOLOR		equ	TV_FIRST + 29
TVM_SETTEXTCOLOR	equ	TV_FIRST + 30
TVM_GETBKCOLOR		equ	TV_FIRST + 31
TVM_GETTEXTCOLOR	equ	TV_FIRST + 32
TVM_SETSCROLLTIME	equ	TV_FIRST + 33
TVM_GETSCROLLTIME	equ	TV_FIRST + 34
TVM_SETINSERTMARKCOLOR	equ	TV_FIRST + 37
TVM_GETINSERTMARKCOLOR	equ	TV_FIRST + 38

; tvm_?etitemstate only uses mask, state and stateMask.
; so unicode or ansi is irrelevant.

TVM_GETITEMSTATE	equ	TV_FIRST + 39
TVM_SETLINECOLOR	equ	TV_FIRST + 40
TVM_GETLINECOLOR	equ	TV_FIRST + 41
TVM_MAPACCIDTOHTREEITEM	equ	TV_FIRST + 42
TVM_MAPHTREEITEMTOACCID	equ	TV_FIRST + 43

TVSORTCB		struc
 tvc_hParent		dd	?
 tvc_lpfnCompare		dd	?
 tvc_lParam		dd	?
TVSORTCB		ends

TV_SORTCB		equ	TVSORTCB

NMTREEVIEWA		struc
 nmt_hdr		NMHDR	<?>
 nmt_action		dd	?
 nmt_itemOld		TVITEMA	<?>
 nmt_itemNew		TVITEMA	<?>
 nmt_ptDrag		POINT	<?>
NMTREEVIEWA		ends

NM_TREEVIEW		equ	NMTREEVIEW

TVN_SELCHANGINGA	equ	TVN_FIRST-1
TVN_SELCHANGINGW	equ	TVN_FIRST-50
TVN_SELCHANGEDA	equ	TVN_FIRST-2
TVN_SELCHANGEDW	equ	TVN_FIRST-51

TVC_UNKNOWN		equ	0000
TVC_BYMOUSE		equ	0001
TVC_BYKEYBOARD		equ	0002

TVN_GETDISPINFOA	equ	TVN_FIRST-3
TVN_GETDISPINFOW	equ	TVN_FIRST-52
TVN_SETDISPINFOA	equ	TVN_FIRST-4
TVN_SETDISPINFOW	equ	TVN_FIRST-53

TVIF_DI_SETITEM		equ	1000h

NMTVDISPINFOA		struc
 nmtvdi_hdr		NMHDR	<?>
 nmtvdi_item		TVITEMA	<?>
NMTVDISPINFOA		ends

TVN_ITEMEXPANDINGA	equ	TVN_FIRST-5
TVN_ITEMEXPANDINGW	equ	TVN_FIRST-54
TVN_ITEMEXPANDEDA	equ	TVN_FIRST-6
TVN_ITEMEXPANDEDW	equ	TVN_FIRST-55
TVN_BEGINDRAGA		equ	TVN_FIRST-7
TVN_BEGINDRAGW		equ	TVN_FIRST-56
TVN_BEGINRDRAGA		equ	TVN_FIRST-8
TVN_BEGINRDRAGW	equ	TVN_FIRST-57
TVN_DELETEITEMA		equ	TVN_FIRST-9
TVN_DELETEITEMW	equ	TVN_FIRST-58
TVN_BEGINLABELEDITA	equ	TVN_FIRST-10
TVN_BEGINLABELEDITW	equ	TVN_FIRST-59
TVN_ENDLABELEDITA	equ	TVN_FIRST-11
TVN_ENDLABELEDITW	equ	TVN_FIRST-60
TVN_KEYDOWN		equ	TVN_FIRST-12
TVN_GETINFOTIPA		equ	TVN_FIRST-13
TVN_GETINFOTIPW	equ	TVN_FIRST-14
TVN_SINGLEEXPAND	equ	TVN_FIRST-15

TVNRET_DEFAULT		equ	0
TVNRET_SKIPOLD		equ	1
TVNRET_SKIPNEW		equ	2

NMTVKEYDOWN		struc
 nmtvkd_hdr		NMHDR	<?>
 nmtvkd_wVKey		dw	?
 nmtvkd_flags		dd	?
NMTVKEYDOWN		ends

NMTVCUSTOMDRAW	struc
 nmtvcd_nmcd		NMCUSTOMDRAW	<?>
 nmtvcd_clrText		dd	?
 nmtvcd_clrTextBk		dd	?
 nmtvcd_iLevel		dd	?
NMTVCUSTOMDRAW	ends

; for tooltips

NMTVGETINFOTIPA		struc
 nmtvgit_hdr		NMHDR	<?>
 nmtvgit_pszText		dd	?
 nmtvgit_cchTextMax	dd	?
 nmtvgit_hItem		dd	?
 nmtvgit_lParam		dd	?
NMTVGETINFOTIPA	ends

; treeview's customdraw return meaning don't draw images.valid on CDRF_NOTIFYITEMPREPAINT

TVCDRF_NOIMAGES	equ	00010000h


NMCOMBOBOXEXA		struc
 nmcbe_hdr		NMHDR	<?>
 nmcbe_ceItem		COMBOBOXEXITEMA	<?>
NMCOMBOBOXEXA		ends

CBEN_GETDISPINFO	equ	CBEN_FIRST - 0
CBEN_GETDISPINFOA	equ	CBEN_FIRST - 0
CBEN_INSERTITEM		equ	CBEN_FIRST - 1
CBEN_DELETEITEM		equ	CBEN_FIRST - 2
CBEN_BEGINEDIT		equ	CBEN_FIRST - 4
CBEN_ENDEDITA		equ	CBEN_FIRST - 5
CBEN_ENDEDITW		equ	CBEN_FIRST - 6
CBEN_GETDISPINFOW	equ	CBEN_FIRST - 7
CBEN_DRAGBEGINA		equ	CBEN_FIRST - 8
CBEN_DRAGBEGINW	equ	CBEN_FIRST - 9

CBENF_KILLFOCUS		equ	1
CBENF_RETURN		equ	2
CBENF_ESCAPE		equ	3
CBENF_DROPDOWN		equ	4

CBEMAXSTRLEN		equ	260

NMCBEDRAGBEGINA	struc
 nmcbedb_hdr		NMHDR	<?>
 nmcbedb_iItemid		dd	?
 nmcbedb_szText		db	CBEMAXSTRLEN dup(?)
NMCBEDRAGBEGINA	ends

NMCBEENDEDITA		struc
 nmcbeee_hdr		NMHDR	<?>
 nmcbeee_fChanged	dd	?
 nmcbeee_iNewSelection	dd	?
 nmcbeee_szText		db	CBEMAXSTRLEN dup(?)
 nmcbeee_iWhy		dd	?
NMCBEENDEDITA		ends


;====== ANIMATE CONTROL ======================================================

; begin_r_commctrl

ACS_CENTER		equ	0001h
ACS_TRANSPARENT	equ	0002h
ACS_AUTOPLAY		equ	0004h
ACS_TIMER		equ	0008h	; don't use threads... use timers

; end_r_commctrl

ACM_OPENA 		equ	WM_USER+100
ACM_OPENW 		equ	WM_USER+103
ACM_PLAY		equ	WM_USER+101
ACM_STOP		equ	WM_USER+102

ACN_START		equ	1
ACN_STOP		equ	2

;====== MONTHCAL CONTROL ======================================================

MCM_FIRST		equ	1000
MCM_GETCURSEL 		equ	MCM_FIRST + 1
MCM_SETCURSEL 		equ	MCM_FIRST + 2
MCM_GETMAXSELCOUNT	equ	MCM_FIRST + 3
MCM_SETMAXSELCOUNT	equ	MCM_FIRST + 4
MCM_GETSELRANGE 	equ	MCM_FIRST + 5
MCM_SETSELRANGE 	equ	MCM_FIRST + 6
MCM_GETMONTHRANGE 	equ	MCM_FIRST + 7
MCM_SETDAYSTATE 	equ	MCM_FIRST + 8
MCM_GETMINREQRECT 	equ	MCM_FIRST + 9
MCM_SETCOLOR		equ	MCM_FIRST + 10
MCM_GETCOLOR		equ	MCM_FIRST + 11


MCSC_BACKGROUND	equ	0	; the background color (between months
MCSC_TEXT		equ	1	; the dates
MCSC_TITLEBK		equ	2	; background of the title
MCSC_TITLETEXT		equ	3
MCSC_MONTHBK		equ	4	; background within the month cal
MCSC_TRAILINGTEXT	equ	5	; the text color of header & trailing days

; set what day is "today" send NULL to revert back to real date

MCM_SETTODAY		equ	MCM_FIRST + 12
MCM_GETTODAY		equ	MCM_FIRST + 13
MCM_HITTEST		equ	MCM_FIRST + 14

MCHITTESTINFO		struc
 mchti_cbSize		dd	?
 mchti_pt		POINT	<?>
 mchti_uHit		dd	?
 mchti_st		SYSTEMTIME	<?>
MCHITTESTINFO		ends

MCHT_TITLE		equ	00010000h
MCHT_CALENDAR		equ	00020000h
MCHT_TODAYLINK		equ	00030000h
MCHT_NEXT		equ	01000000h	; these indicate that hitting
MCHT_PREV		equ	02000000h	; here will go to the next/prev month
MCHT_NOWHERE		equ	00000000
MCHT_TITLEBK		equ	MCHT_TITLE
MCHT_TITLEMONTH 	equ	MCHT_TITLE OR 00001
MCHT_TITLEYEAR		equ	MCHT_TITLE OR 00002
MCHT_TITLEBTNNEXT 	equ	MCHT_TITLE OR MCHT_NEXT OR 00003
MCHT_TITLEBTNPREV 	equ	MCHT_TITLE OR MCHT_PREV OR 00003
MCHT_CALENDARBK 	equ	MCHT_CALENDAR
MCHT_CALENDARDATE 	equ	MCHT_CALENDAR OR 00001
MCHT_CALENDARDATENEXT 	equ	MCHT_CALENDARDATE OR MCHT_NEXT
MCHT_CALENDARDATEPREV 	equ	MCHT_CALENDARDATE OR MCHT_PREV
MCHT_CALENDARDAY	equ	MCHT_CALENDAR OR 00002
MCHT_CALENDARWEEKNUM	equ	MCHT_CALENDAR OR 00003

MCM_SETFIRSTDAYOFWEEK 	equ	MCM_FIRST + 15
MCM_GETFIRSTDAYOFWEEK 	equ	MCM_FIRST + 16
MCM_GETRANGE 		equ	MCM_FIRST + 17
MCM_SETRANGE 		equ	MCM_FIRST + 18
MCM_GETMONTHDELTA 	equ	MCM_FIRST + 19
MCM_SETMONTHDELTA 	equ	MCM_FIRST + 20
MCM_GETMAXTODAYWIDTH 	equ	MCM_FIRST + 21
MCM_SETUNICODEFORMAT	equ	CCM_SETUNICODEFORMAT
MCM_GETUNICODEFORMAT	equ	CCM_GETUNICODEFORMAT

NMSELCHANGE		struc
 nmsc_nmhdr		NMHDR	<?>	; this must be first, so we don't break WM_NOTIFY
 nmsc_stSelStart		SYSTEMTIME	<?>
 nmsc_stSelEnd		SYSTEMTIME	<?>
NMSELCHANGE		ends

MCN_SELCHANGE 		equ	MCN_FIRST + 1

NMDAYSTATE		struc
 nmds_nmhdr		NMHDR	<?>	; this must be first, so we don't break WM_NOTIFY
 nmds_stStart		SYSTEMTIME	<?>
 nmds_cDayState		dd	?
 nmds_prgDayState	dd	?	; points to cDayState MONTHDAYSTATEs
NMDAYSTATE		ends

MCN_GETDAYSTATE 	equ	MCN_FIRST + 3
MCN_SELECT		equ	MCN_FIRST + 4

; begin_r_commctrl

MCS_DAYSTATE		equ	0001h
MCS_MULTISELECT	equ	0002h
MCS_WEEKNUMBERS	equ	0004h
MCS_NOTODAYCIRCLE	equ	0008h
MCS_NOTODAY		equ	0010h
;MCS_NOTODAY		equ	0008h

; end_r_commctrl

GMR_VISIBLE		equ	0 ; visible portion of display
GMR_DAYSTATE		equ	1 ; above plus the grayed out parts of partially displayed months


;====== DATETIMEPICK CONTROL ==================================================

DTM_FIRST		equ	1000h
DTM_GETSYSTEMTIME 	equ	DTM_FIRST + 1
DTM_SETSYSTEMTIME 	equ	DTM_FIRST + 2
DTM_GETRANGE 		equ	DTM_FIRST + 3
DTM_SETRANGE 		equ	DTM_FIRST + 4
DTM_SETFORMATA 	equ	DTM_FIRST + 5
DTM_SETFORMATW 	equ	DTM_FIRST + 50
DTM_SETMCCOLOR		equ	DTM_FIRST + 6
DTM_GETMCCOLOR		equ	DTM_FIRST + 7
DTM_GETMONTHCAL 	equ	DTM_FIRST + 8
DTM_SETMCFONT 		equ	DTM_FIRST + 9
DTM_GETMCFONT 		equ	DTM_FIRST + 10

; begin_r_commctrl

DTS_UPDOWN		equ	0001h	; use UPDOWN instead of MONTHCAL
DTS_SHOWNONE		equ	0002h	; allow a NONE selection
DTS_SHORTDATEFORMAT	equ	0000h	; use the short date format (app must forward WM_WININICHANGE messages)
DTS_LONGDATEFORMAT	equ	0004h	; use the long date format (app must forward WM_WININICHANGE messages)
DTS_SHORTDATECENTURYFORMAT	equ	000Ch	; short date format with century (app must forward WM_WININICHANGE messages)
DTS_TIMEFORMAT		equ	0009h	; use the time format (app must forward WM_WININICHANGE messages)
DTS_APPCANPARSE	equ	0010h	; allow user entered strings (app MUST respond to DTN_USERSTRING)
DTS_RIGHTALIGN		equ	0020h	; right-align popup instead of left-align it

; end_r_commctrl

DTN_DATETIMECHANGE	equ	DTN_FIRST + 1	; the systemtime has changed

NMDATETIMECHANGE	struc
 nmdtc_nmhdr		NMHDR	<?>
 nmdtc_dwFlags		dd	?	; GDT_VALID or GDT_NONE
 nmdtc_st		SYSTEMTIME	<?>	; valid iff dwFlags==GDT_VALID
NMDATETIMECHANGE	ends

DTN_USERSTRINGA		equ	DTN_FIRST + 2	; the user has entered a string
DTN_USERSTRINGW	equ	DTN_FIRST + 15

NMDATETIMESTRINGA	struc
 nmdts_nmhdr		NMHDR	<?>
 nmdts_pszUserString	dd	?	; string user entered
 nmdts_st		SYSTEMTIME	<?>	; app fills this in
 nmdts_dwFlags		dd	?	; GDT_VALID or GDT_NONE
NMDATETIMESTRINGA	ends

DTN_WMKEYDOWNA	equ	DTN_FIRST + 3	; modify keydown on app format field 		equ	X
DTN_WMKEYDOWNW	equ	DTN_FIRST + 16

NMDATETIMEWMKEYDOWNA	struc
 nmdtwm_nmhdr		NMHDR	<?>
 nmdtwm_nVirtKey		dd	?	; virtual key code of WM_KEYDOWN which MODIFIES an X field
 nmdtwm_pszFormat	dd	?	; format substring
 nmdtwm_st		SYSTEMTIME	<?>	; current systemtime, app should modify based on key
NMDATETIMEWMKEYDOWNA	ends

DTN_FORMATA		equ	DTN_FIRST + 4	 ; query display for app format field 		equ	X)
DTN_FORMATW		equ	DTN_FIRST + 17

NMDATETIMEFORMATA	struc
 nmdtf_nmhdr		NMHDR	<?>
 nmdtf_pszFormat		dd	?
 nmdtf_st		SYSTEMTIME	<?>
 nmdtf_pszDisplay		dd	?
 nmdtf_szDisplay		db	64 dup(?)
NMDATETIMEFORMATA	ends

DTN_FORMATQUERYA	equ	DTN_FIRST + 5
DTN_FORMATQUERYW 	equ	DTN_FIRST + 18

NMDATETIMEFORMATQUERYA	struc
 nmdtfq_nmhdr		NMHDR	<?>
 nmdtfq_pszFormat		dd	?
 nmdtfq_szMax		dd	?, ?
NMDATETIMEFORMATQUERYA	ends

DTN_DROPDOWN		equ	DTN_FIRST + 6
DTN_CLOSEUP 		equ	DTN_FIRST + 7

GDTR_MIN		equ	0001
GDTR_MAX		equ	0002

GDT_ERROR		equ	-1
GDT_VALID		equ	0
GDT_NONE		equ	1

; IP Address edit control

; Messages sent to IPAddress controls

IPM_CLEARADDRESS 	equ	WM_USER+100	; no parameters
IPM_SETADDRESS 		equ	WM_USER+101	; lparam = TCP/IP address
IPM_GETADDRESS 		equ	WM_USER+102	; lresult = of non black fields.lparam = LPDWORD for TCP/IP address
IPM_SETRANGE 		equ	WM_USER+103	; wparam = field, lparam = range
IPM_SETFOCUS 		equ	WM_USER+104	; wparam = field
IPM_ISBLANK		equ	WM_USER+105	; no parameters

IPN_FIELDCHANGED	equ	IPN_FIRST - 0

NMIPADDRESS		struc
 nmipa_hdr		NMHDR	<?>
 nmipa_iField		dd	?
 nmipa_iValue		dd	?
NMIPADDRESS		ends

;---------------------------------------------------------------------------------------
; Pager Control Styles
;---------------------------------------------------------------------------------------
; begin_r_commctrl

PGS_VERT		equ	00000000
PGS_HORZ		equ	00000001
PGS_AUTOSCROLL		equ	00000002
PGS_DRAGNDROP		equ	00000004

; end_r_commctrl

;---------------------------------------------------------------------------------------
; Pager Button State
;---------------------------------------------------------------------------------------

;The scroll can be in one of the following control State

PGF_INVISIBLE		equ	0	; Scroll button is not visible
PGF_NORMAL		equ	1	; Scroll button is in normal state
PGF_GRAYED		equ	2	; Scroll button is in grayed state
PGF_DEPRESSED		equ	4	; Scroll button is in depressed state
PGF_HOT		equ	8	; Scroll button is in hot state


; The following identifiers specifies the button control

PGB_TOPORLEFT		equ	0
PGB_BOTTOMORRIGHT	equ	1

;---------------------------------------------------------------------------------------
; Pager ControlMessages
;---------------------------------------------------------------------------------------

PGM_SETCHILD		equ	PGM_FIRST + 1	; lParam == hwnd
PGM_RECALCSIZE		equ	PGM_FIRST + 2
PGM_FORWARDMOUSE	equ	PGM_FIRST + 3
PGM_SETBKCOLOR		equ	PGM_FIRST + 4
PGM_GETBKCOLOR		equ	PGM_FIRST + 5
PGM_SETBORDER		equ	PGM_FIRST + 6
PGM_GETBORDER		equ	PGM_FIRST + 7
PGM_SETPOS		equ	PGM_FIRST + 8
PGM_GETPOS		equ	PGM_FIRST + 9
PGM_SETBUTTONSIZE 	equ	PGM_FIRST + 10
PGM_GETBUTTONSIZE 	equ	PGM_FIRST + 11
PGM_GETBUTTONSTATE	equ	PGM_FIRST + 12
PGM_GETDROPTARGET	equ	CCM_GETDROPTARGET

;---------------------------------------------------------------------------------------
;Pager Control Notification Messages
;---------------------------------------------------------------------------------------

; PGN_SCROLL Notification Message

PGN_SCROLL		equ	PGN_FIRST-1

PGF_SCROLLUP		equ	1
PGF_SCROLLDOWN		equ	2
PGF_SCROLLLEFT		equ	4
PGF_SCROLLRIGHT		equ	8

;Keys down

PGK_SHIFT		equ	1
PGK_CONTROL		equ	2
PGK_MENU		equ	4

; This structure is sent along with PGN_SCROLL notifications

NMPGSCROLL		struc
 nmpgs_hdr		NMHDR	<?>
 nmpgs_fwKeys		dw	?	; Specifies which keys are down when this notification is send
 nmpgs_rcParent		RECT	<?>	; Contains Parent Window Rect
 nmpgs_iDir		dd	?	; Scrolling Direction
 nmpgs_iXpos		dd	?	; Horizontal scroll position
 nmpgs_iYpos		dd	?	; Vertical scroll position
 nmpgs_iScroll		dd	?	; [in/out] Amount to scroll
NMPGSCROLL		ends

; PGN_CALCSIZE Notification Message

PGN_CALCSIZE		equ	PGN_FIRST-2

PGF_CALCWIDTH		equ	1
PGF_CALCHEIGHT		equ	2

NMPGCALCSIZE		struc
 nmpgcs_hdr		NMHDR	<?>
 nmpgcs_dwFlag		dd	?
 nmpgcs_iWidth		dd	?
 nmpgcs_iHeight		dd	?
NMPGCALCSIZE		ends

; PGN_HOTITEMCHANGE Notification Message

PGN_HOTITEMCHANGE 	equ	PGN_FIRST-3

; Structure for PGN_HOTITEMCHANGE notification

NMPGHOTITEM		struc
 nmpghi_hdr		NMHDR	<?>
 nmpghi_idOld		dd	?
 nmpghi_idNew		dd	?
 nmpghi_dwFlags		dd	?	; HICF_*
NMPGHOTITEM		ends

;;======================End Pager Control ==========================================

;
; === Native Font Control ===
;

; begin_r_commctrl

; style definition

NFS_EDIT		equ	0001h
NFS_STATIC		equ	0002h
NFS_LISTCOMBO		equ	0004h
NFS_BUTTON		equ	0008h
NFS_ALL		equ	0010h
NFS_USEFONTASSOC	equ	0020h

; end_r_commctrl

; === End Native Font Control ===

/; ====================== Button Control =============================

; Button Class Name

BUTTON_IMAGELIST_ALIGN_LEFT	equ	0
BUTTON_IMAGELIST_ALIGN_RIGHT	equ	1
BUTTON_IMAGELIST_ALIGN_TOP	equ	2
BUTTON_IMAGELIST_ALIGN_BOTTOM	equ	3
BUTTON_IMAGELIST_ALIGN_CENTER	equ	4	; Doesn't draw text

BUTTON_IMAGELIST	struc
 bil_himl		dd	?	; Index: Normal, hot pushed, disabled. If count is less than 4, we use index 1
 bil_margin		RECT	<?>	; Margin around icon.
 bil_uAlign		dd	?
BUTTON_IMAGELIST	ends

BCM_GETIDEALSIZE	equ	BCM_FIRST + 1
BCM_SETIMAGELIST	equ	BCM_FIRST + 2
BCM_GETIMAGELIST	equ	BCM_FIRST + 3
BCM_SETTEXTMARGIN 	equ	BCM_FIRST + 4
BCM_GETTEXTMARGIN 	equ	BCM_FIRST + 5

NMBCHOTITEM		struc
 nmbchi_hdr		NMHDR	<?>
 nmbchi_dwFlags		dd	?	; HICF_*
NMBCHOTITEM		ends

BCN_HOTITEMCHANGE 	equ	BCN_FIRST + 1

BST_HOT		equ	0200h

; ====================== Edit Control =============================

EM_SETCUEBANNER	equ	ECM_FIRST + 1	; Set the cue banner with the lParm = LPCWSTR
EM_GETCUEBANNER	equ	ECM_FIRST + 2	; Set the cue banner with the lParm = LPCWSTR

EDITBALLOONTIP		struc
 ebt_cbStruct		dd	?
 ebt_pszTitle		dd	?
 ebt_pszText		dd	?
 ebt_ttiIcon		dd	?	; From TTI_*
EDITBALLOONTIP		ends

EM_SHOWBALLOONTIP 	equ	ECM_FIRST + 3	; Show a balloon tip associated to the edit control
EM_HIDEBALLOONTIP 	equ	ECM_FIRST + 4	; Hide any balloon tip associated with the edit control


; ====================== Combobox Control =============================

; custom combobox control messages

CB_SETMINVISIBLE		equ	CBM_FIRST + 1
CB_GETMINVISIBLE		equ	CBM_FIRST + 2

;====== SysLink control =========================================

INVALID_LINK_INDEX	equ	-1
MAX_LINKID_TEXT		equ	48
L_MAX_URL_LENGTH	equ	2048 + 32 + 2

LWS_TRANSPARENT	equ	0001h
LWS_IGNORERETURN	equ	0002h

LIF_ITEMINDEX		equ	00000001
LIF_STATE		equ	00000002
LIF_ITEMID		equ	00000004
LIF_URL		equ	00000008

LIS_FOCUSED		equ	00000001
LIS_ENABLED		equ	00000002
LIS_VISITED		equ	00000004

LITEM		struc
 lit_mask 		dd	?
 lit_iLink 		dd	?
 lit_state 		dd	?
 lit_stateMask 		dd	?
 lit_szID		dw	MAX_LINKID_TEXT dup(?)
 lit_szUrl		dw	L_MAX_URL_LENGTH dup(?)
LITEM		ends

LHITTESTINFO		struc
 lhti_pt		POINT	<?>
 lhti_item		LITEM	<?>
LHITTESTINFO		ends

NMLINK		struc
 nmli_hdr		NMHDR	<?>
 nmli_item		LITEM	<?>
NMLINK		ends

LM_HITTEST 		equ	WM_USER+0300h	; wParam: n/a, lparam: PLHITTESTINFO, ret: BOOL
LM_GETIDEALHEIGHT	equ	WM_USER+0301h	; wParam: n/a, lparam: n/a, ret: cy
LM_SETITEM 		equ	WM_USER+0302h	; wParam: n/a, lparam: LITEM*, ret: BOOL
LM_GETITEM 		equ	WM_USER+0303h	; wParam: n/a, lparam: LITEM*, ret: BOOL

;
; === MUI APIs ===
;

DA_LAST 		equ	7FFFFFFFh

DPA_APPEND		equ	7fffffffh
DPA_ERR 		equ	-1
DSA_APPEND		equ	7fffffffh
DSA_ERR 		equ	-1

DPAS_SORTED		equ	0001
DPAS_INSERTBEFORE	equ	0002
DPAS_INSERTAFTER	equ	0004

;====== TrackMouseEvent=====================================================

WM_MOUSEHOVER		equ	02A1h
WM_MOUSELEAVE		equ	02A3h

;
; If the TRACKMOUSEEVENT structure and associated flags havent been declared
; then declare them now.
;

TME_HOVER		equ	00000001h
TME_LEAVE		equ	00000002h
TME_NONCLIENT		equ	00000010h
TME_QUERY		equ	40000000h
TME_CANCEL		equ	80000000h

HOVER_DEFAULT		equ	0FFFFFFFFh

;====== Flat Scrollbar APIs=========================================

WSB_PROP_CYVSCROLL	equ	00000001h
WSB_PROP_CXHSCROLL	equ	00000002h
WSB_PROP_CYHSCROLL	equ	00000004h
WSB_PROP_CXVSCROLL	equ	00000008h
WSB_PROP_CXHTHUMB	equ	00000010h
WSB_PROP_CYVTHUMB	equ	00000020h
WSB_PROP_VBKGCOLOR	equ	00000040h
WSB_PROP_HBKGCOLOR	equ	00000080h
WSB_PROP_VSTYLE	equ	00000100h
WSB_PROP_HSTYLE	equ	00000200h
WSB_PROP_WINSTYLE	equ	00000400h
WSB_PROP_PALETTE	equ	00000800h
WSB_PROP_MASK		equ	00000FFFh

FSB_FLAT_MODE		equ	2
FSB_ENCARTA_MODE	equ	1
FSB_REGULAR_MODE	equ	0

-#
