Gets information about all existing user-defined annotation handles.
#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnGetUserHandles(hObject, pAnnHandle, pCount)
Handle to the annotation object for which to get the user handles.
Array of ANNHANDLE structures to be updated with the user-defined handles.
Pointer to an unsigned integer used to return the total number of user handles
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
Call with pAnnHandle == NULL to get the total number of user handles. Then allocate memory for an array of ANNHANDLE structures and call this function again.
Gets an array of user-defined handles associated with the annotation object.
Win32, x64.
This example gets information about all the user handles in an object.
static L_VOID DumpAnnHandle(L_UINT uIndex, pANNHANDLE pAnnHandle){L_TCHAR szMsg[400];if (!pAnnHandle)return;_stprintf_s(szMsg, TEXT("uIndex %d\nnSize: %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"));_tprintf(_T("%s"), szMsg);}extern "C" L_INT AnnGetUserHandlesExample(HANNOBJECT hObject){L_INT nRet;L_UINT i;L_UINT uCount;pANNHANDLE pAnnHandle;// Get the total count of user handles, and allocate memorynRet = L_AnnGetUserHandles(hObject, NULL, &uCount);if (nRet != SUCCESS)return nRet;pAnnHandle = (pANNHANDLE)malloc(uCount * sizeof(ANNHANDLE));nRet = L_AnnGetUserHandles(hObject, pAnnHandle, &uCount);if (nRet != SUCCESS)return nRet;for (i = 0; i < uCount; i++)DumpAnnHandle(i, pAnnHandle + i);free(pAnnHandle);return SUCCESS;}
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
