Function CountButtonToolBar(ByVal hwndToolBar As Integer) As Integer
Возвращает кол-во кнопок в тулбаре
hwndToolBar - ID тулбара
Windows , Linux
#Include "window9.bi"
#Ifdef __FB_WIN32__
Var style = TBSTYLE_FLAT
#Else
Var style = 0
#EndIf
Dim As Integer hwToolBar
var hwnd=OpenWindow("",10,10,406,400)
CenterWindow(hwnd)
hwToolBar=CreateToolBar(,style)
ToolBarStandardButton(hwToolBar,1,1)
ToolBarSeparator(hwToolBar)
ToolBarStandardButton(hwToolBar,2,4)
ToolBarStandardButton(hwToolBar,3,6)
? "Count Buttons=" & CountButtonToolBar(hwToolBar)
Do
   Var ev=WaitEvent
   If ev=EventClose Then
      End
   ElseIf ev=EventGadget Then
      Select Case EventNumberToolBar
         Case 1 To 3
            MessBox("","Button Number  " & EventNumberToolBar)
      End Select
   EndIf
Loop

Created with the Personal Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation