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

This function registers a callback function of type LPFNART_GUI_CALLBACKFUNC.

Declaration:

 
Copy Code
BOOL FAR PASCAL ART_GUI_toolbar_CB_register(
        HWND hwndToolBar, 
        UINT nCallback, 
        LPFNART_GUI_CALLBACKFUNC lpfnCallback,
        LPVOID lpPrivate
);

Arguments:

Name Type Description
hWndToolBar HWND Windows handle to the toolbar. This is given to you by the ART_GUI_toolbar_create() function.
nCallback UINT Set to the Type of callback to register, either ART_GUI_CB_TOOLBAR or ART_GUI_CB_TEXT_REPLACE.
lpfnCallback LPFNART_GUI_CALLBACKFUNC Set to the type of callback to register. The types that can be registered are defined in ARTGUI.H and begin with LPFNART_GUI_.
lpPrivate LPVOID A far pointer to any private data that you want to pass to the callback.

Return Value:

Returns TRUE if the callback is successfully registered; FALSE if it is not successfully registered.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

Annotation

Example:

 
Copy Code
HIGEAR  hIGear; /* HIGEAR handle of image */
BOOL bRegistered; /* Whether successfully */
/* registered or not */
UINT nCallback; /* Type of callback to */
/* register  */
ART_GUI_CALLBACK MyCallback; /* Callback type to */
/* register  */
DWORD dwPrivateFlags; /* private data to */
/* pass to callback*/
bRegistered = ART_GUI_toolbar_CB_register(hwndToolBar, 
nCallback, MyCallback, (LPVOID)&dwPrivateFlags);

Remarks:

See the descriptions for these callbacks in the section ART Component Callback Functions Reference.