L_DispContainerGetAnnotationCreatedCallBack

#include "l_bitmap.h"

L_LTIVW_API L_INT EXT_FUNCTION L_DispContainerGetAnnotationCreatedCallBack(hCon, ppfnCallBack, ppUserData)

HDISPCONTAINER hCon;

/* handle to the container */

DISPCONTAINERANNOTATIONCREATEDCALLBACK * ppfnCallBack;

/* pointer to the callback function */

LPVOID * ppUserData;

/* pointer to be updated with user data */

Gets the current annotation-created callback function along with the user data, which were set using L_DispContainerSetAnnotationCreatedCallBack.

Parameter

Description

hCon

Handle to the Container.

ppfnCallBack

Pointer to a pointer to a callback function to be updated with the last annotation-created callback function set using L_DispContainerSetAnnotationCreatedCallBack.

ppUserData

Void pointer to be updated with the value of user defined data associated with the tag callback. If you are not interested in the user-defined data, pass NULL for this parameter.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function gets the annotation-created callback. To set the annotation-created callback, use L_DispContainerSetAnnotationCreatedCallBack

Required DLLs and Libraries

LTIVW
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_DispContainerSetAnnotationContainer, L_DispContainerAnnToRgn, L_DispContainerGetSelectedAnnotationAttributes, L_DispContainerSetAnnotationCallBack, L_DispContainerGetAnnotationCallBack, L_DispContainerGetAnnotationContainer, L_DispContainerSetAnnotationCreatedCallBack, DISPCONTAINERANNOTATIONCALLBACK, DISPCONTAINERANNOTATIONCREATEDCALLBACK

Topics:

Image Viewer Cells

 

Image Viewer Functions: Image Viewer Cells

Example

This example converts the annotation object (rectangle, ellipse and hilite) into a region once the user draws them

L_INT EXT_CALLBACK AnnotationCreatedCallBack(L_INT    nCellIndex,
                                             L_INT    nSubCellIndex,
                                             L_UINT   uAnnotationType,
                                             L_VOID * pUserData)
{
   HDISPCONTAINER hCon = (HDISPCONTAINER)pUserData;

   switch(uAnnotationType)
   {
   case ANNOBJECT_RECT:
   case ANNOBJECT_ELLIPSE:
   case ANNOBJECT_HILITE:
      L_DispContainerAnnToRgn(hCon, nCellIndex, nSubCellIndex, L_RGN_OR, TRUE, 0);
      break;
   }

   return SUCCESS;
}

L_INT DispContainerAnnotationCreatedCallbacksExample(HDISPCONTAINER hCon)
{
   DISPCONTAINERANNOTATIONCREATEDCALLBACK oldCallBack;
   L_VOID *                               pOldUserData;

   L_DispContainerGetAnnotationCreatedCallBack(hCon, &oldCallBack, &pOldUserData);

   L_DispContainerSetAnnotationCreatedCallBack(hCon, AnnotationCreatedCallBack, hCon);

   return SUCCESS;
}