LAnnTextPointer::ChangeUserHandle (original) (raw)

Summary

Changes properties of an existing user-defined annotation handle.

Syntax

#include "ltwrappr.h"

virtual L_INT LAnnTextPointer::ChangeUserHandle(nIndex, pAnnHandle)

Parameters

L_INT32 nIndex

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

pANNHANDLE pAnnHandle

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

Returns

Value Meaning
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:

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

This example changes the first user handle of an object by

AnnHandle.uStructSize = sizeof(&AnnHandle);
nRet = LTextPointer->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 = LTextPointer->ChangeUserHandle(0, &AnnHandle);
if(nRet != SUCCESS)
return nRet;
}
else
{
MessageBox(NULL, TEXT("No User Handles!"), TEXT("Error"), MB_OK);
return FAILURE;
}
return SUCCESS;
}

LEADTOOLS Raster Imaging C++ Class Library Help