ImageGear for C and C++ on Windows v20.0 - Updated
IG_ARTX_mark_user_data_get
API Reference Guide > ArtX Component API Reference > ArtX Component Objects Reference > HIG_ARTX_MARK > IG_ARTX_mark_user_data_get

This function queries user data associated with mark.

Declaration:

 
Copy Code
AT_ERRCOUNT IG_ARTX_mark_user_data_get(
        HIG_ARTX_MARK hMark,
        LPAT_VOID* lpData
);

Arguments:

Name Type Description
hMark HIG_ARTX_MARK Annotation handle.
lpData LPAT_VOID* Pointer to storage for function result.

Return Value:

Error count.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

None

Example:

 
Copy Code

HIG_ARTX_PAGE    hArtPage = NULL;    //ArtX page handle
HIG_ARTX_MARK    hMark; //Annotation handle

//Create new ArtX page
IG_ARTX_page_create(&hArtPage);

//load annotation data from file
IG_ARTX_page_load_file(hArtPage, "ArtXSampleData.xml", 1, TRUE);

//Find first annotation on ArtX page
IG_ARTX_page_mark_first(hArtPage, &hMark);
if(hMark)
{
    LPAT_VOID lpData = NULL; //pointer to the user data to be acquired
    //Get user data associated with hMark annotation
    IG_ARTX_mark_user_data_get(hMark, &lpData);
    if(lpData != NULL)
    {
        //Display the user data (zero terminated string) in a message box
        MessageBoxA(NULL, (LPSTR)lpData, "UserData associated", 0);
    }
}

Remarks:

The User Data that can be associated with annotation is a zero-terminated character string.

The lpData parameter receives a pointer to internal copy of the string previously associated with hMark annotation by an IG_ARTX_mark_user_data_set() call.

These functions only work with zero-terminated character strings and not with arbitrary pointers. When ArtX marks are saved to a file, user data is saved as well.

Is this page helpful?
Yes No
Thanks for your feedback.