Each button in a toolbar has a current state. The toolbar updates a button's state to reflect user actions, such as clicking the button. The state indicates whether the button is currently pressed or not pressed, enabled or disabled, hidden or visible, and so on. Although an application sets a button's initial state when adding the button to the toolbar, it can change and retrieve the state by sending messages to the toolbar. For a list of toolbar button states, see Toolbar States.
An application can use the TB_GETSTATE and TB_SETSTATE messages to retrieve and set the state of a button. In addition, a toolbar includes the following messages that retrieve or set a particular state.
TB_CHECKBUTTON | TB_ISBUTTONCHECKED |
TB_ENABLEBUTTON | TB_ISBUTTONENABLED |
TB_HIDEBUTTON | TB_ISBUTTONHIDDEN |
TB_INDETERMINATE | TB_ISBUTTONINDETERMINATE |
TB_PRESSBUTTON | TB_ISBUTTONPRESSED |