#Include once "window9.bi"

Function AddRebarTab (ByVal gadget As Integer,ByVal gadgetchild As integer,ByVal IDinNumber As Integer=0, ByVal string_ As String="",ByVal pos_ As Integer=-1,ByVal x As Integer=100, ByVal MinX As Integer=0, ByVal MinY As Integer=20, ByVal Mask As Integer=RBBIM_STYLE Or RBBIM_CHILD Or RBBIM_CHILDSIZE Or RBBIM_SIZE Or RBBIM_TEXT Or RBBIM_ID,ByVal Style As Integer=RBBS_CHILDEDGE Or  RBBS_GRIPPERALWAYS ) As Integer Export
  Dim As REBARBANDINFO rbBand
  with rbBand
    .cbSize     = sizeof(REBARBANDINFO)
    .fMask      = Mask
    .fStyle     = Style
    .lpText     = StrPtr(string_)
    .cch        = Len(string_)
    .hwndChild  = GadgetID(gadgetchild)
    .cxMinChild = MinX
    .cyMinChild = MinY
    .wID        = IDinNumber
    .cx         = x
  end with
  Return SendMessage(GadgetID(gadget), RB_INSERTBAND,cast (WPARAM,pos_), cast(LPARAM,@rbBand))
End Function
