ImageGear for C and C++ on Windows v19.9 - Updated
ART_GUI_toolbar_button_get
API Reference Guide > ARTGUI Component API Reference > ARTGUI Component Functions Reference > ART_GUI_toolbar_button_get

This function gets the current state of the button specified by dwButtonID.

Declaration:

 
Copy Code
BOOL FAR PASCAL ART_GUI_toolbar_button_get(
        HWND hwndToolBar, 
        DWORD dwButtonID, 
        LPDWORD lpFlags
);

Arguments:

Name Type Description
hWndToolBar HWND Set to the Windows handle to the toolbar.
dwButtonID DWORD Set to an ART-defined constant beginning with ART_BUTTON_.
lpFlags LPDWORD A far pointer that returns the current settings for the state flags. One or more of the following flags is returned: 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:

None

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_get(hWndToolBar, 
ART_BUTTON_ARROW, &lpFlags);

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. Pass it the handle to the toolbar, and pass it ART-defined constants beginning with ART_BUTTON_ to specify which button to query. lpFlags returns the current status of the button.