Function Reference

_GUICtrlToolbar_InsertButton

Parameters

$hWnd

Handle to the control

$iIndex

0-based index of a button

$iID

Command ID

$iImage

0-based image index

$sText

[optional] Button text

$iStyle

[optional] Button style. Can be a combination of the following:
$BTNS_AUTOSIZE - The toolbar control should not assign the standard width to the button
$BTNS_BUTTON - Standard button
$BTNS_CHECK - Toggles between the pressed and nonpressed
$BTNS_CHECKGROUP - Button that stays pressed until another button in the group is pressed
$BTNS_DROPDOWN - Creates a drop-down style button that can display a list
$BTNS_GROUP - Button that stays pressed until another button in the group is pressed
$BTNS_NOPREFIX - The button text will not have an accelerator prefix
$BTNS_SEP - Creates a separator
$BTNS_SHOWTEXT - Specifies that button text should be displayed
$BTNS_WHOLEDROPDOWN - Specifies that the button will have a drop-down arrow

$iState

[optional] Button state. Can be a combination of the following:
$TBSTATE_CHECKED - The button has the $TBSTYLE_CHECK style and is being clicked
$TBSTATE_PRESSED - The button is being clicked
$TBSTATE_ENABLED - The button accepts user input
$TBSTATE_HIDDEN - The button is not visible and cannot receive user input
$TBSTATE_INDETERMINATE - The button is grayed
$TBSTATE_WRAP - The button is followed by a line break
$TBSTATE_ELLIPSES - The button's text is cut off and an ellipsis is displayed
$TBSTATE_MARKED - The button is marked