L_AnnGetSelectItems

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnGetSelectItems(hObject, pItems)

HANNOBJECT hObject;

handle to the container object

pHANNOBJECT pItems;

pointer to the array to update

Fills the specified array with the annotation object handles of all selected objects in the container.

Parameter

Description

hObject

Handle to the container object.

pItems

Pointer to the array to be updated with the annotation object handles of all selected objects in the container.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

You can use the L_AnnGetSelectCount function to determine the required size of the array.

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.

Platforms

Win32, x64.

See Also

Functions:

L_AnnSelectRect, L_AnnGetSelectRect, L_AnnSelectPoint, L_AnnGetType, L_AnnSetSelected, L_AnnGetSelected, L_AnnGetSelectCount

Topics:

Annotation Functions: Using Window Coordinates to Select Objects

 

Annotation Functions: Object Information

 

Implementing an Automated Annotation Program

 

Implementing a Non-automated Annotation Program

 

Obtaining Annotation Object Information

Example

This example creates an array of selected items and rotates each one. Note that this can also be done simply by setting a flag in L_AnnRotate.

L_INT AnnGetSelectItemsExample(HANNOBJECT   hContainer)/* Container annotation object */ 
{ 
   L_INT nRet; 
   L_UINT       uSelectCount;  /* Number of objects selected */ 
   pHANNOBJECT  pAnnArray;     /* Pointer to an array of annotation objects */ 
   HGLOBAL      hAnnArray;     /* Handle for memory management */ 
   L_UINT       i;             /* Loop counter */ 
   /* Get the number of objects selected */ 
   nRet = L_AnnGetSelectCount(hContainer, &uSelectCount); 
   if(nRet != SUCCESS) 
      return nRet; 
   /* Allocate and lock a storage for the object handles */ 
   hAnnArray = GlobalAlloc(GPTR, sizeof(HANNOBJECT) * uSelectCount); 
   pAnnArray = (pHANNOBJECT)GlobalLock( hAnnArray ); 
   /* Fill the array of selected objects */ 
   nRet = L_AnnGetSelectItems(hContainer, pAnnArray); 
   if(nRet != SUCCESS) 
      return nRet; 
   /* Rotate each selected object */ 
   for (i = 0; i < uSelectCount; i++) 
   { 
      nRet = L_AnnRotate(pAnnArray[i], 90, 0, 0); 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
   /* Free the memory */ 
   GlobalUnlock (hAnnArray); 
   GlobalFree (hAnnArray); 
   return SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help