ImageGear for C and C++ on Windows v19.10 - Updated
ART_GUI_tool_set
API Reference Guide > ART Component API Reference > ART Component Functions Reference > GUI Functions > ART_GUI_tool_set

This function sets the next type of mark that is created by the end user.

Declaration:

 
Copy Code
AT_ERRCOUNT ART_GUI_tool_set(
        HIGEAR hIGear, 
        LPAT_MARK_ATTRIBUTES lpMarkAttr
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
lpMarkAttr LPAT_MARK_ATTRIBUTES These attributes are used when the next mark is created. Set the dwType field to the type of mark to create. These constants begin with the prefix: ART_MARK_ such as ART_MARK_FREEHAND_LINE.

Return Value:

Returns the number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

Annotation

Example

 
Copy Code
HIGEAR hIGear; /* HIGEAR handle of */ 
/* image   */
ART_MARK_ATTRIBUTES ma; /* Structure for   */ 
/* mark attributes   */
memset(&ma, 0, sizeof(ART_MARK_ATTRIBUTES));
ma.dwType = ART_MARK_ATTACH_A_NOTE; 
/* set the type of   */
/* mark    */
ma.rgbColor1.rgbRed   = 0xFF;/* set the red component  */
/* of the note's color  */
ma.bVisible = TRUE;  /* ensure that the mark  */ 
/* will be visible (shown)*/
ART_GUI_tool_set(hIGear, &ma);

Remarks:

If lpMarkAttr is set to NULL, no mark is created; instead, the selection pointer is enabled. This function is called when a toolbar button is pressed.

An error is set if any of the following conditions are met: