#include "ltwrappr.h"

virtual L_INT LAnnAudioClip::AddUserHandle(pAnnHandle)

Adds a user-defined handle to an annotation object, where pAnnHandle is a pointer to the structure defining an annotation handle.



Pointer to a structure that defines the user handle.


Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.


Before calling this function, you must create the LAnnAudioClip object.

Call this function one or more times to add user handles to an existing annotation object.

The user handle location can be defined using container coordinates or client coordinates.

Client coordinates factor in the current zoom factor, and the horizontal and vertical scrolling.

For more information on defining a user handle, see the documentation for the ANNHANDLE structure.

Required DLLs and Libraries


Win32, x64.

See Also




This example adds user handles to the center of the top and bottom of an AudioClip object

L_INT LAnnAudioClip_AddUserHandleExample(LAnnAudioClip *pLAudioClip)  
   L_INT nRet; 
   ANNHANDLE AnnHandle;  
   L_UINT uType;  
   ANNRECT arc;  
   uType = pLAudioClip->GetType(); 
   if (uType == ANNOBJECT_AUDIO)  
      pLAudioClip->GetRect (&arc, NULL);  
      memset(&AnnHandle, 0, sizeof(ANNHANDLE));  
      AnnHandle.uStructSize = sizeof(ANNHANDLE);  
      AnnHandle.nID = 100;  
      AnnHandle.bVisible = TRUE;  
      AnnHandle.crPen = RGB(0,0,0);  
      AnnHandle.crFill = RGB(255,0,0);  
      AnnHandle.nShape = ANNHANDLE_SHAPE_CIRCLE;  
      AnnHandle.hCursor = NULL;  
      AnnHandle.uFlags = ANNHANDLE_ID |  
                         ANNHANDLE_LOCATION |  
                         ANNHANDLE_CONTAINER_COORDINATES |  
                         ANNHANDLE_VISIBLE |  
                         ANNHANDLE_PEN_COLOR |  
                         ANNHANDLE_FILL_COLOR |  
      AnnHandle.aptContainer.x = (arc.left + arc.right)/2;  
      AnnHandle.aptContainer.y =;  
      nRet = pLAudioClip->AddUserHandle(&AnnHandle);  
      if(nRet != SUCCESS) 
         return nRet; 
      AnnHandle.aptContainer.x = (arc.left + arc.right)/2;  
      AnnHandle.aptContainer.y = arc.bottom;  
      nRet = pLAudioClip->AddUserHandle(&AnnHandle);  
      if(nRet != SUCCESS) 
         return nRet; 
      MessageBox(NULL, TEXT("Annotation object must be an AudioClip object."), TEXT("Error"), MB_OK);  
      return FAILURE; 
   return SUCCESS; 

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

LEADTOOLS Raster Imaging C++ Class Library Help