ImageGear Professional v18.2 > API Reference Guide > ARTGUI Component API Reference > ARTGUI Component Functions Reference > ART_GUI_toolbar_button_set |
This function sets the state of the button specified by dwButtonID.
Copy Code
|
|
---|---|
BOOL FAR PASCAL ART_GUI_toolbar_button_set( HWND hwndToolBar, DWORD dwButtonID, DWORD dwFlags ); |
Name | Type | Description |
hWndToolBar | HWND | Set to the Windows handle to the toolbar. |
dwButtonID | DWORD | Set to an ART-defined constant beginning withART_BUTTON_. |
dwFlags | DWORD | One or more of the bitwise state flags: ART_BUTTON_CHECKED, ART_BUTTON_ENABLED, ART_BUTTON_VISIBLE. |
Returns TRUE if the button exists and is successfully queried; returns FALSE if the button of the specified ID does not exist.
This function does not process image pixels.
Annotation
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ BOOL bButton; /* Whether button exists */ /* on toolbar */ DWORD lpFlags; /* State flags returned */ bButton = ART_GUI_toolbar_button_set(hWndToolBar, ART_BUTTON_ARROW,ART_BUTTON_ENABLED| ART_BUTTON_VISIBLE); |
Possible states include: ART_BUTTON_CHECKED - the button is pressed, ART_BUTTON_ENABLED - the button is not grayed out, and ART_BUTTON_VISIBLE - the button is not hidden. Supply it with the handle to the toolbar, and an ART-defined constant beginning with ART_BUTTON_ to specify which button to set, and the flags for setting the button. One of the uses for this function is to keep the toolbar in sync with items that are checked on menus. This function updates the button.