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

This function is called after a mark has been modified (moved, resized, or edited).

Declaration:

 
Copy Code
typedef VOID (ACCUAPI *LPFNIG_ART_MODIFYNOTIFYFUNC)(
        HIGEAR hIGear, 
        LPVOID lpPrivate, 
        ART_MARK_INDEX hMarkIndex, 
        const LPART_MARK_ATTRIBUTES lpMarkAttr, 
        AT_MODE nReason
);

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 of the mark just modified.
lpMarkAttr const LPART_MARK_ATTRIBUTES A far pointer to an ART-defined structure of type ART_MARK_ATTRIBUTES.
nReason AT_MODE An integer constant of type AT_MODE, defined in ARTAPI.H. This tells what caused the callback to be called.

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
VOID ACCUAPI ARTModifyNotify( HIGEAR hIGear, LPVOID 
lpPrivate, ART_MARK_INDEX hMarkIndex, 
const LPART_MARK_ATTRIBUTES lpMarkAttr, 
AT_MODE nReason)
{
switch (nReason)
{
case ART_MODIFY_ATTRIBUTES:
/* indicate to the user that the highlight */ 
/* attribute was changed */
    if (lpMarkAttr->bHighlighting)
MessageBox(HWND_DESKTOP, "The mark is "
"highlighted", NULL, MB_OK);
}
}

Remarks:

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

Upon entry, nReason is set to a constant indicating what triggered the modification. Your application displays one of the library's standard editing dialog boxes. Here is the list of "reasons" why this callback will be called:

ART_MODIFY_ATTRIBUTES One or more attributes have been modified (from the ART_MARK_ATTRIBUTES structure).
ART_MODIFY_ANODAT A named block specific to this type of mark was modified.
ART_MODIFY_FILNAM The filename block was modified.
ART_MODIFY_DIB The embedded DIB was changed.
ART_MODIFY_GROUP The mark's group block was modified.
ART_MODIFY_INDEX The mark's index block was changed.
ART_MODIFY_ANTEXT The orientation or length of text mark have been modified.
ART_MODIFY_NAMED_BLOCK A user-defined named block was modified.