LAnnContainer::GetItem

#include "ltwrappr.h"

virtual LAnnotation L_FAR * LAnnContainer::GetItem(L_VOID)

virtual L_INT LAnnContainer::GetItem(phItem)

pHANNOBJECT phItem;

/* address of the variable to be updated */

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.

This function is available in the Document/Medical Toolkits.

Parameter

Description

phItem

Address of the HANNOBJECT variable to be updated with the object’s 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:

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

LTANN

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:

Class Members

Topics:

Annotation Functions: Creating and Deleting Annotations

 

Annotation Functions: Object Information

 

Implementing Annotations

 

Displaying and Manipulating Annotation Objects

Example

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

L_VOID TestFunction(LAnnContainer& LeadAContainer)
{
   HANNOBJECT  hAnnObject ;
   LAnnotation LeadAnn ;
   L_INT       nRet ;
   
   nRet = LeadAContainer.GetItem(&hAnnObject) ;

   if (nRet == SUCCESS)
      LeadAnn.SetHandle(hAnnObject);

   //...
}

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

L_VOID TestFunction (LAnnContainer& LeadAContainer)
{
   LAnnotation L_FAR *pLeadAnn ;
   
   pLeadAnn = LeadAContainer.GetItem() ;
   
   pLeadAnn->CopyToClipboard() ;

   //...
}