ImageGear for C and C++ on Windows v19.6 - Updated
LPFNIG_ART_CREATENOTIFYFUNC
API Reference Guide > ART Component API Reference > ART Component Callback Functions Reference > LPFNIG_ART_CREATENOTIFYFUNC

This function is called by the library after a mark is created.

Declaration:

 
Copy Code
typedef BOOL (ACCUAPI* LPFNART_CREATENOTIFYFUNC)(
        HIGEAR hIGear, 
        LPVOID lpPrivate, 
        ART_MARK_INDEX hMarkIndex, 
        LPART_MARK_ATTRIBUTES lpMarkAttr
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
lpPrivate LPVOID A far pointer to the private callback data.
hMarkIndex ART_MARK_INDEX The index identifier for the mark just created.
lpMarkAttr LPART_MARK_ATTRIBUTES A far pointer to an ART-defined attribute structure of type ART_MARK_ATTRIBUTES.

Return Value:

Returns TRUE - mark is created; FALSE - mark isn't created.

Supported Raster Image Formats:

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

Sample:

None

Example:

 
Copy Code
BOOL ACCUAPI ARTCreateNotify(        HIGEAR hIGear, 
LPVOID lpPrivate, ART_MARK_INDEX hMarkIndex, 
const LPART_MARK_ATTRIBUTES lpMarkAttr)
{
/* add a named block to each mark that gets created */
ART_mark_block_create(hIGear, hMarkIndex, 
myBlockName, myBlockData, myBlockSize);
return TRUE;
}

Remarks:

If the callback function returns TRUE, the mark is created; if it returns FALSE, the mark is not created. This callback gives you the opportunity to determine whether a mark is created or not.

The callback for "Pre-create" happens before the end user draws the mark. For example, if the user is drawing a line, LPFNIG_ART_PRECREATENOTIFYFUNC is called when the mouse is pressed. If this callback returns TRUE, then the point where the mouse was pressed becomes the first end-point of the line. The point where the user releases the mouse button becomes the second end-point. At this time LPFNIG_ART_CREATENOTIFYFUNC is called.

In order to use this callback, it must be registered with ART using the function ART_callback_register().