AnnChangeUserHandle example for C++ Builder
// This example changes the first user handle of an object by
// * moving the handle ten pixels to the left,
// * changing the color of handle to blue,
// * changing the shape of the handle to square and
// * displays the hour glass cursor when the mouse is over the handle.
void TForm1::ExampleAnnChangeUserHandle ( HANNOBJECT hObject )
{
long nCount ;
LEADAnn1->AnnGetUserHandles (hObject);
nCount = LEADAnn1->AnnUserHandlesCount;
if( nCount > 0 )
{
LEADAnn1->AnnGetUserHandle(hObject, 0);
LEADAnn1->AnnHandle->ContainerX = LEADAnn1->AnnHandle->ContainerX + 10;
LEADAnn1->AnnHandle->FillColor = RGB(0, 0, 255);
LEADAnn1->AnnHandle->Shape = ANNHANDLE_SHAPE_SQUARE;
LEADAnn1->AnnHandle->Flags = (ANNHANDLE_FILL_COLOR +
ANNHANDLE_SHAPE +
ANNHANDLE_LOCATION);
LEADAnn1->AnnChangeUserHandle(hObject, 0);
}
else
ShowMessage("No User Handle");
}