#include "ltwrappr.h"
virtual L_INT LAnnHilite::AddUserHandle(pAnnHandle)
pANNHANDLE pAnnHandle; |
pointer to a structure that defines the user handle |
Adds a user-defined handle to an annotation object, where pAnnHandle is a pointer to the structure defining an annotation handle.
Parameter |
Description |
pAnnHandle |
Pointer to a structure that defines the user handle. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Before calling this function, you must create the LAnnHilite object.
Call this function one or more times to add user handles to an existing annotation object.
The user handle location can be defined using container coordinates or client coordinates.
Client coordinates factor in the current zoom factor, and the horizontal and vertical scrolling.
For more information on defining a user handle, see the documentation for the ANNHANDLE structure.
Required DLLs and Libraries
LTANN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
|
Topics: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// This example adds user handles to the center of the top and bottom of a Hilite object
L_INT LAnnHilite_AddUserHandleExample(LAnnHilite *pLHilite)
{
L_INT nRet;
ANNHANDLE AnnHandle;
L_UINT uType;
ANNRECT arc;
uType = pLHilite->GetType();
if (uType == ANNOBJECT_HILITE)
{
nRet = pLHilite->GetRect(&arc, NULL);
if(nRet != SUCCESS)
return nRet;
memset(&AnnHandle, 0, sizeof(ANNHANDLE));
AnnHandle.uStructSize = sizeof(ANNHANDLE);
AnnHandle.nID = 100;
AnnHandle.bVisible = TRUE;
AnnHandle.crPen = RGB(0,0,0);
AnnHandle.crFill = RGB(255,0,0);
AnnHandle.nShape = ANNHANDLE_SHAPE_CIRCLE;
AnnHandle.hCursor = NULL;
AnnHandle.uFlags = ANNHANDLE_ID | ANNHANDLE_LOCATION |
ANNHANDLE_CONTAINER_COORDINATES | ANNHANDLE_VISIBLE |
ANNHANDLE_PEN_COLOR | ANNHANDLE_FILL_COLOR | ANNHANDLE_SHAPE;
AnnHandle.aptContainer.x = (arc.left + arc.right)/2;
AnnHandle.aptContainer.y = arc.top;
nRet = pLHilite->AddUserHandle(&AnnHandle);
if(nRet != SUCCESS)
return nRet;
AnnHandle.aptContainer.x = (arc.left + arc.right)/2;
AnnHandle.aptContainer.y = arc.bottom;
nRet = pLHilite->AddUserHandle(&AnnHandle);
if(nRet != SUCCESS)
return nRet;
}
else
{
MessageBox(NULL, TEXT("Annotation object must be a Hilite"), TEXT("Error"), MB_OK);
return FAILURE;
}
return SUCCESS;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
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.