LAnnVideo::ChangeUserHandle

#include "ltwrappr.h"

virtual L_INT LAnnVideo::ChangeUserHandle(nIndex, pAnnHandle)

L_INT32 nIndex;

index of the user handle to change

pANNHANDLE pAnnHandle;

pointer to a structure that defines how to change the user handle

Changes properties of an existing user-defined annotation handle.

Parameter

Description

nIndex

Index of the user handle to change. This index is zero-based.

pAnnHandle

Pointer to a structure that defines how to change the user handle.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Use this function to change the properties of an existing user-defined annotation handle.

This function is used in conjunction with the LAnnVideo::AddUserHandle and LAnnVideo::EnumerateHandles and LAnnVideo::GetUserHandles functions.

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::GetUserHandle, LAnnVideo::GetUserHandles, 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 changes the first user handle of an object by // * Moving handle ten pixels to the left // * Changing color of handle to blue // * Changing shape of handle to square // * Displays the hour glass cursor when mouse over the handle

L_INT LAnnVideo_ChangeUserHandleExample(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; 
       
      AnnHandle.aptContainer.x +=10;  
      AnnHandle.crFill = RGB(0,0,255);  
      AnnHandle.nShape = ANNHANDLE_SHAPE_SQUARE;  
      AnnHandle.hCursor = LoadCursor(NULL,IDC_APPSTARTING);  
      AnnHandle.uFlags = ANNHANDLE_FILL_COLOR | ANNHANDLE_SHAPE | ANNHANDLE_LOCATION | ANNHANDLE_CONTAINER_COORDINATES;  
      nRet = LVideo->ChangeUserHandle(0, &AnnHandle);  
		if(nRet != SUCCESS) 
			return nRet; 
   } 
   else 
	{ 
      MessageBox(NULL, TEXT("No User Handles!"), TEXT("Error"), MB_OK);  
		return FAILURE; 
	} 
 
	return SUCCESS; 
} 

Help Version 20.0.2018.9.26
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help