virtual L_INT LAnnButton::ChangeUserHandle(nIndex, pAnnHandle)
Changes properties of an existing user-defined annotation handle.
Index of the user handle to change. This index is zero-based.
Pointer to an ANNHANDLE 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 LAnnButton::AddUserHandle and LAnnButton::EnumerateHandles functions.
Win32, x64.
This example changes the first user handle of an object by:
L_INT LAnnButton_ChangeUserHandleExample(LAnnButton *LButton)
{
L_INT nRet;
L_UINT uCount;
ANNHANDLE AnnHandle;
// Get the total count of user handles
nRet = LButton->GetUserHandles(NULL, &uCount);
if(nRet != SUCCESS)
return nRet;
if (uCount > 0)
{
memset(&AnnHandle, 0, sizeof(ANNHANDLE));
AnnHandle.uStructSize = sizeof(&AnnHandle);
nRet = LButton->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 = LButton->ChangeUserHandle(0, &AnnHandle);
if(nRet != SUCCESS)
return nRet;
}
else
{
MessageBox(NULL, TEXT("No User Handles!"), TEXT("Error"), MB_OK);
return FAILURE ;
}
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.