Changes properties of an existing user-defined annotation handle.
#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnChangeUserHandle(hObject, nIndex, pAnnHandle)
Handle to the annotation object for which to change the user handle.
Index of the user handle to change. This index is zero-based.
Pointer to a structure that defines how to change the user handle.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Use this function to change the properties of an existing user-defined annotation handle.
This function is used in conjunction with the L_AnnAddUserHandle and L_AnnEnumerateHandles and L_AnnChangeUserHandle functions.
Win32, x64.
This example changes the first user handle of an object by:
L_INT AnnChangeUserHandleExample(HANNOBJECT hObject)
{
L_INT nRet;
L_UINT uCount;
ANNHANDLE AnnHandle;
// Get the total count of user handles
nRet = L_AnnGetUserHandles(hObject, NULL, &uCount);
if (nRet != SUCCESS)
return nRet;
if (uCount == 0)
{
_tprintf(_T("%s"), TEXT("Error: No User Handles!"));
return FAILURE;
}
memset(&AnnHandle, 0, sizeof(ANNHANDLE));
AnnHandle.uStructSize = sizeof(&AnnHandle);
nRet = L_AnnGetUserHandle(hObject, 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;
return L_AnnChangeUserHandle(hObject, 0, &AnnHandle);
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document