#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnGetUserHandle(hObject, uIndex, pAnnHandle)
Gets information about the specified user-defined annotation handle.
Handle to the annotation object for which to get the user handle.
Index of user handle to get. The index is zero based. Passing a negative value returns ERROR_INV_PARAMETER.
Pointer to structure to be updated with the user handle.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Before calling this function, you must create the 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
Win32, x64.
This example displays information about the first user handle in an annotation object.
L_VOID DumpAnnHandle(L_UINT uIndex,
pANNHANDLE pAnnHandle)
{
L_TCHAR szMsg[400];
if (pAnnHandle)
{
_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")
);
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
}
}
L_INT AnnGetUserHandleexample(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)
{
memset(&AnnHandle, 0, sizeof(ANNHANDLE));
AnnHandle.uStructSize = sizeof(&AnnHandle);
nRet = L_AnnGetUserHandle(hObject, 0, &AnnHandle);
if(nRet != SUCCESS)
return nRet;
DumpAnnHandle(0, &AnnHandle);
}
else
{
MessageBox(NULL, TEXT("No User Handles!"), TEXT("Error"), MB_OK);
return nRet;
}
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.