#include once "window9.bi"

Function AddRebarTab (ByVal gadget As Long, _
					ByVal gadgetchild As Long, _
					ByVal IDinNumber As Integer, _
					ByRef txt   As USTRING, _
					ByVal iPos  As Integer, _
					ByVal x     As Integer, _
					ByVal MinX  As Integer, _
					ByVal MinY  As Integer, _
					ByVal Mask  As Integer, _
					ByVal Style As Integer) As Integer Export
	Dim As REBARBANDINFO rbBand
	with rbBand
		.cbSize     = sizeof(REBARBANDINFO)
		.fMask      = Mask
		.fStyle     = Style
		#ifdef UNICODE
			.lpText     = cast(any ptr , *txt)
		#Else
			.lpText     = StrPtr(txt)
		#EndIf   
		.cch        = Len(txt)
		.hwndChild  = GadgetID(gadgetchild)
		.cxMinChild = MinX
		.cyMinChild = MinY
		.wID        = IDinNumber
		.cx         = x
	end with
	Return SendMessage(GadgetID(gadget), RB_INSERTBAND,cast (WPARAM,iPos), cast(LPARAM,@rbBand))
End Function
