CreateTB

Syntax:

hTB = CreateTB( #Toolbar , hWnd , X-Size , Y-Size [, Flags ] )

Parameters:

#Toolbar

=

Number for the Toolbar, beginning with 0.

hWnd

=

Handle to the Window for the TB

X-Size

=

X-Size of the Button-Image

Y-Size

=

Y-Size of the Button-Image

Flags (optional)

=

combination of the following flags:


#TBpro_FLAT:

Flat (new) Style, like IExplorer;

this TB is Transparent (DEFAULT)


#TBpro_BOTTOM:

TB is on the bottom of the Window, not on top.


#TBpro_BORDER:

TB has a border line


#TBpro_TRANSPARENT:

TB is transparent


#TBpro_LISTVIEW:

ListView Style: Text is on the side

of the button, not under the button.


Return Values:

#FALSE

=

toolbar creation failed

<> 0

=

hTB, Windows toolbar handle


Description:

This Command creates a Toolbar and assigns the TB to the Window

with the Handle hWnd.

You give this command the SIZE of the Button-Images you assign to

the Toolbar with the command SetTBimage() later.

OPTIONALLY you can specify some flags for the Toolbar Style.

Default is a FlatStyle Toolbar (new look).


Example:

  hWnd = OpenWindow(...
  hTB  = CreateTB(1,WindowID(),24,24)

  hWnd = OpenWindow(...
  hTB  = CreateTB(1,hWnd,40,20,#TBpro_BORDER|#TBpro_LISTVIEW)

Remarks:

If you dont need a picture (you want only TextButtons),

set X-SIZE & Y-SIZE to 0 (NULL).


Want to use System-Icons ( AddTBsysIcons() ) ??

For SMALL Icons: Set X- & Y-Size to 16 x 16

For BIG Icons: Set X- & Y-Size to 24 x 24



Supported OS:   Windows