#include once "window9.bi"

Function RebarGadget(ByVal gadget  As Long, _
					ByVal Style   As Integer, _
					ByVal ExStyle As Integer) As HWND Export
	Dim As HWND hWin = CreateWindowEx(ExStyle, REBARCLASSNAME, NULL, WS_CHILD Or WS_VISIBLE Or Style, _
	0,0,0,0,Cast(HWND,win9GetCurrent()), Cast(HMENU,CInt(gadget)), 0, NULL)
	win9AddNewGadget(gadget,hWin)
	If win9GetGadgetFont()<>0 Then
		SendMessage(hWin,WM_SETFONT,win9GetGadgetFont(),0)
	End If
	Return hWin
End Function
