LAnnVideo::GetUserHandle

#include "ltwrappr.h"

virtual L_INT LAnnVideo::GetUserHandle(uIndex, pAnnHandle)

L_INT32 uIndex;

index of user handle to get

pANNHANDLE pAnnHandle;

pointer to a structure

Gets information about the specified user-defined annotation handle.

Parameter

Description

uIndex

Index of user handle to get. The index is zero based. Passing a negative value returns ERROR_INV_PARAMETER.

pAnnHandle

Pointer to a structure to be updated with the user handle.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Before calling this function, you must create the Video annotation object.

Call this function to get information about an existing user-defined annotation handle.

If successful, the entire pAnnHandle structure is filled. The pAnnHandle->uFlags field is ignored. For more information, refer to ANNHANDLE.

Required DLLs and Libraries

LTANN
LTMM

For a listing of the exact DLLs and Libraries needed for LTANN, based on the toolkit version, refer to Files To Be Included With Your Application.

For a listing of the exact DLLs and Libraries needed for LTMM, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64.

See Also

Functions:

Class Members, LAnnVideo::AddUserHandle, LAnnVideo::EnumerateHandles, LAnnVideo::EnumHandleCallBack, LAnnVideo::GetUserHandles, LAnnVideo::ChangeUserHandle, LAnnVideo::DeleteUserHandle, LAnnContainer::Convert, LAnnContainer::HitTest, LAnnContainer::RestrictCursor, LAnnotation::GetRestrictToContainer, LAnnotation::SetRestrictToContainer, LAnnotation::Define2, LAnnotation::Define

Topics:

Annotation Functions: Object Properties

 

Implementing Annotations

 

Automated User Interface for Annotations

 

Annotation Functions: Creating and Deleting Annotations

 

Types of Annotations

 

Annotation Functions: Implementing Custom Annotations

 

Annotation Functions: Creating Custom Annotations

Example

// This example displays information about the first user handle in an annotation object

static L_VOID DumpAnnHandle(L_UINT uIndex, pANNHANDLE pAnnHandle)  
{ 
 
   L_TCHAR szMsg[400];  
 
   if (pAnnHandle)  
   { 
      wsprintf(szMsg, TEXT("uIndex %d\nuStructSize: %d\nnID: %d\n aptContainer[%f,%f]\nptClient[%d,%d]\nbVisible: %s\ncrPen: 0x%x\ncrFill: 0x%x\nnShape: %s\nhCursor: %s\n"), 
					uIndex,  
					pAnnHandle->uStructSize,   
					pAnnHandle->nID,  
					pAnnHandle->aptContainer.x, pAnnHandle->aptContainer.y,  
					pAnnHandle->ptClient.x,     pAnnHandle->ptClient.y,  
					pAnnHandle->bVisible ? TEXT("Visible") : TEXT("Not Visible"), 
					pAnnHandle->crPen,  
					pAnnHandle->crFill,  
					pAnnHandle->nShape == ANNHANDLE_SHAPE_SQUARE ? TEXT("Square") : TEXT("Circle"), 
					pAnnHandle->hCursor ? TEXT("Cursor") : TEXT("No Cursor") 
					);  
 
      MessageBox(NULL, szMsg, TEXT(""), MB_OK);  
 
   } 
 
} 
 
L_INT LAnnVideo_GetUserHandleExample(LAnnVideo *LVideo)  
{ 
	L_INT nRet; 
   L_UINT uCount;  
   ANNHANDLE AnnHandle;  
 
   // Get the total count of user handles 
   nRet = LVideo->GetUserHandles(NULL, &uCount);  
	if(nRet != SUCCESS) 
		return nRet; 
   if (uCount > 0)  
   { 
      memset(&AnnHandle, 0, sizeof(ANNHANDLE));  
      AnnHandle.uStructSize = sizeof(&AnnHandle);  
      nRet = LVideo->GetUserHandle(0, &AnnHandle);  
		if(nRet != SUCCESS) 
			return nRet; 
      DumpAnnHandle(0, &AnnHandle);  
   } 
   else 
	{ 
      MessageBox(NULL, TEXT("No User Handles!"), TEXT("Error"), MB_OK);  
		return FAILURE; 
	} 
	return SUCCESS; 
} 

Help Version 20.0.2020.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help