#include "ltwrappr.h"

virtual LAnnotation * LAnnContainer::GetItem()

virtual L_INT LAnnContainer::GetItem(phItem)

LAnnContainer::GetItem() gets a pointer to the first annotation object in the Container.

LAnnContainer::GetItem(phItem) gets the handle to the first annotation object in the Container.



Address of the HANNOBJECT variable to be updated with the objects handle. If the container does not have any objects, the updated value is NULL.


LAnnContainer::GetItem() returns the following:

A pointer to the first annotation object.

LAnnContainer::GetItem(phItem) returns the following:

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


You can use this function to see if a container is empty.

Before calling LAnnContainer::GetItem(phItem), you must declare a variable of data type HANNOBJECT. Then, pass the address of the variable in the phItem parameter. This function will update the variable with the handle of the first object in the container.

You can attach phItem to an LAnnotation class object and call LAnnotation::GetType to determine the annotation object type.

When using LAnnContainer::GetItem(), you can call LAnnotation::GetType to determine the annotation object type of the returned object.

Required DLLs and Libraries


Win32, x64.

See Also




This is an example for LAnnContainer::GetItem(phItem):

L_INT LAnnContainer_GetItemExample(LAnnContainer& LeadAContainer) 
   L_INT nRet; 
   HANNOBJECT  hAnnObject ; 
   LAnnotation LeadAnn ; 
   nRet = LeadAContainer.GetItem(&hAnnObject) ; 
   if (nRet == SUCCESS) 
      nRet = LeadAnn.SetHandle(hAnnObject); 
      if(nRet != SUCCESS) 
         return nRet; 
      return nRet; 
   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