ART_GUI_toolbar_button_set
This function sets the state of the button specified by dwButtonID.
Declaration:
|
Copy Code
|
BOOL FAR PASCAL ART_GUI_toolbar_button_set(
HWND hwndToolBar,
DWORD dwButtonID,
DWORD dwFlags
);
|
Arguments:
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. |
Return Value:
Returns TRUE if the button exists and is successfully queried; returns FALSE if the button of the specified ID does not exist.
Supported Raster Image Formats:
This function does not process image pixels.
Sample:
Annotation
Example:
|
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);
|
Remarks:
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.
- To have a button un-checked, disabled, or invisible, leave the appropriate constant off of your setting for dwFlags.
- To make a button checked and disabled set state flags to:
ART_BUTTON_CHECKED|ART_BUTTON_VISIBLE.
- To make a button invisible:
dwPriorFlags|~ART_BUTTON_VISIBLE, where dwPriorFlags is the value retrieved from ART_GUI_toolbar_button_set().