LAnnContainer::GetItem

#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.

Parameters

pHANNOBJECT phItem

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.

Returns

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.

Comments

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

Platforms

Win32, x64.

See Also

Functions

Topics

Example

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; 
   } 
   else 
      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