#include "ltwrappr.h"
virtual LAnnotation * LAnnContainer::GetItem()
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.
Parameter |
Description |
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:
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. |
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; }