This function registers an ART callback function (see the callback functions at the end of this reference in the section ART Component Callback Functions Reference).
Declaration:
Copy Code |
|
|---|---|
AT_ERRCOUNT ART_callback_register(
HIGEAR hIGear,
AT_MODE nCallbackID,
LPFNIG_ART_CALLBACKFUNC lpfnCallback,
LPVOID lpPrivate
);
|
|
Arguments:
| Name | Type | Description |
| hIGear | HIGEAR | HIGEAR handle to the image. |
| nCallbackID | AT_MODE | An ART-defined constant of type AT_MODE that tells which type of callback is being registered. |
| lpfnCallback | LPFNIG_ART_CALLBACKFUNC | A far pointer to your callback function to register. |
| lpPrivate | LPVOID | A far pointer to private data (passed to callback function). |
Return Value:
Returns the number of ImageGear errors that occurred during the function call.
Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional.
Sample:
Annotation
Example:
Copy Code |
|
|---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ AT_ERRCOUNT nErrcount; /* Tally of IG errors on */ /* the stack */ VOID privateData; /* Any private data that you */ /* would like to pass to the */ /* callback */ nErrcount = ART_callback_register(hIGear, ART_CALLBACK_CREATE_MODIFY ,myCallbackFunc, (LPVOID) &privateData); |
|
Remarks:
To unregister a function, pass NULL to the lpfnCallback parameter.
nCallbackID is a predefined value that identifies the type of callback to register. The predefined constants for this variable reside in ARTAPI.H and begin with the prefix ART_CALLBACK_. Only one callback of each type may be registered at the same time.
An error is set if any of the following conditions are met:
- hIGear does not reference a valid ImageGear handle.
- nCallbackID is not one of the predefined callback types.
- lpfnCallback is not NULL or a valid address.