L_DispContainerGetAnnotationCreatedCallBack

#include "l_bitmap.h"

L_LTIVW_API L_INT EXT_FUNCTION L_DispContainerGetAnnotationCreatedCallBack(hCellWnd, ppfnCallBack, ppUserData)

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

Parameters

L_HWND hCellWnd

A handle to the window that represents the Medical Viewer Cell.

DISPCONTAINERANNOTATIONCREATEDCALLBACK * ppfnCallBack

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

LPVOID * 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

Value Meaning
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

See Also

Functions

Topics

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; 
 
 
   HWND hCellWnd = L_DispContainerGetCellWindowHandle(hCon, nCellIndex, 0); 
 
   switch(uAnnotationType) 
   { 
   case ANNOBJECT_RECT: 
   case ANNOBJECT_ELLIPSE: 
   case ANNOBJECT_HILITE: 
      L_DispContainerAnnToRgn(hCellWnd, nSubCellIndex, L_RGN_OR, TRUE, 0); 
      break; 
   } 
 
   return SUCCESS; 
} 
 
L_INT DispContainerAnnotationCreatedCallbacksExample(HDISPCONTAINER hCon) 
{ 
   DISPCONTAINERANNOTATIONCREATEDCALLBACK oldCallBack; 
   L_VOID *                               pOldUserData; 
 
   if (L_DispContainerGetCellCount(hCon, 0) == 0) 
   { 
      MessageBox(NULL, TEXT("you must at least have one cell added to the viewer"), TEXT("No Cell attached"), MB_OK); 
      return FAILURE; 
   } 
 
   HWND hCellWnd = L_DispContainerGetCellWindowHandle(hCon, 0, 0); 
 
   L_DispContainerGetAnnotationCreatedCallBack(hCellWnd, &oldCallBack, &pOldUserData); 
 
   L_DispContainerSetAnnotationCreatedCallBack(hCellWnd, AnnotationCreatedCallBack, hCon); 
 
   return SUCCESS; 
} 

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Medical Image Viewer C API Help