ImageGear for C and C++ on Windows v20.0 - Updated
ART_mark_access
API Reference Guide > ART Component API Reference > ART Component Functions Reference > Mark Management Functions > ART_mark_access

This function allows or restricts access to a mark.

Declaration:

 
Copy Code
AT_ERRCOUNT ART_mark_access (
        HIGEAR hIGear, 
        ART_MARK_INDEX hMarkIndex, 
        BOOL fAccess
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
hMarkIndex ART_MARK_INDEX Mark identifier.
fAccess BOOL If set to TRUE, the mark can be edited; if FALSE, editing is disabled.

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:

None

Example:

 
Copy Code
HIGEAR  hIGear; /* HIGEAR handle of image */
AT_ERRCOUNT  nErrcount; /* tally of IG errors on  */
/* stack    */
ART_MARK_INDEX  hMarkIndex; /* index to current mark  */
ART_MARK_ATTRIBUTES ma; /* structures for   */
/* attributes of current  */
/* mark    */
BOOL  fEnable; /* whether access for  */
/* editing    */
/* is granted to the mark */
nErrcount = ART_mark_query(hIGear, hMarkIndex, &ma);
if (ma.dwType == 10)
{  /* if mark is an attach-a-note */
nErrcount = ART_mark_access_is_granted(hIGear, 
hMarkIndex, fEnable);
if (fEnable == TRUE)
{
/*if access is granted, deny the access */
nErrcount = ART_mark_access (hIGear, 
hMarkIndex, FALSE); 
/*deny access to this mark */
} 
}

Remarks:

Access to a mark includes the ability to edit it. When fEnable is set to TRUE, the mark can be edited. When fAccess is set to FALSE, the mark editing is disabled.

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

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