'   XXControls & NTS
'
'e-mail:     "Chib" <XXControls@bk.ru>
'            "Alexm" <amdtm@mail.ru>

'-----------------------------------------------
'-----------------------------------------------
' menu function

#Include "windows.bi"
#Include "win/commctrl.bi"
#Inclib "XXControls"

Extern "Windows-MS"
Declare Sub SetMenuItemIcon Alias  "SetMenuItemIcon"(As HMENU, As DWORD, As HICON)
Declare Function RedrawMenu Alias "RedrawMenu"(As HWND , As HMENU, As DWORD) As Integer
Declare Function GetStyleMenu Alias "GetStyleMenu"( As HMENU) As Integer
Declare Function SetDisableSelect Alias "SetDisableSelect"(As Byte) As Integer
Declare Sub SetMenuIcon Alias "SetMenuIcon"( As HMENU, As HIMAGELIST, As DWORD, As DWORD)
Declare Function AddLeftBorder Alias "AddLeftBorder"( As HMENU, As DWORD, As BOOLEAN) As Integer
Declare Function RemoveLeftBorder Alias "RemoveLeftBorder"( As HMENU) As Integer

Enum XXCONSTYLE
	STYLE_DEFAULT
	STYLE_OFFICE_2000
	STYLE_OFFICE_XP
	STYLE_XNET
	RECT_H = 0
	RECT_V
End Enum



Type MNUBUTTON
	idItem       As     DWORD
	nIcon        As     DWORD
End Type

Type XXBUTTON
	hIcon_normal  As    HICON
	hIcon_hover   As    HICON
	m_flat        As    DWORD
	m_IconAlign   As    DWORD
	m_border      As    DWORD
	hover_clr     As    COLORREF
	push_clr      As    COLORREF
	normal_clr    As    COLORREF
	hFont_normal  As    HFONT
	hFont_hover   As    HFONT
	hCursor_hover As    HCURSOR
	Sound_hover   As    HGLOBAL
	hBitmap_normal As    HBITMAP
	hBitmap_hover As    HBITMAP
	hBitmap_push  As    HBITMAP
End Type

'-----------------------------------------------
'-----------------------------------------------
' button function

Declare Function RedrawButton Alias  "RedrawButton"( As HWND, As Any ptr) As Integer
Declare Function CreateFillBmp Alias  "CreateFillBmp"( As DWORD,  As Any ptr,  As DWORD,  As Byte,  As Byte,  As COLORREF) As HBITMAP

Enum buttt
	FILL_NULL
	FILL_NOISE
	FILL_SOFTBUMP
	FILL_VBUMP
	FILL_HBUMP
	FILL_HSHADE
	FILL_VSHADE
	FILL_DIAGSHADE
	FILL_HARDBUMP
	FILL_METAL
End Enum


'-----------------------------------------------
'-----------------------------------------------
' LinkButton function

'RedrawButton      PROTO :HWND

'-----------------------------------------------
'-----------------------------------------------
' color function

Declare Function DarkenColor Alias  "DarkenColor"( As DWORD, As COLORREF)As Integer
Declare Function GrayColor Alias  "GrayColor"( As COLORREF)As Integer
Declare Function MixedColor Alias  "MixedColor"( As COLORREF, As COLORREF)As Integer
Declare Function LightenColor Alias  "LightenColor"( As DWORD, As COLORREF)As Integer
Declare Function MidColor Alias "MidColor"( As COLORREF, As COLORREF)As Integer
Declare Function GetXpHighlightColor Alias "GetXpHighlightColor"()As Integer
Declare Function NumColorBits Alias "NumColorBits"()As Integer
Declare Function Gradient_Fill Alias "Gradient_Fill"( As HDC, As DWORD, As COLORREF, As COLORREF, As BOOLEAN)As Integer
Declare Function DrawIcn Alias "DrawIcn"( As DWORD, As DWORD, As DWORD, As Byte, As Byte)As Integer
Declare Function DrawIcnRect Alias "DrawIcnRect"( As DWORD, As DWORD, As DWORD, As Byte, As Byte)As Integer
Declare Function DrawDDB Alias "DrawDDB"( As HDC, As DWORD, As HBITMAP)As Integer

End Extern