AnnChangeUserHandle example for C++ 5 and later
//' 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 CTutorDlg::ExampleAnnChangeUserHandle(long hObject)
{
long Count ;
m_pRasterAnn->AnnGetUserHandles (hObject);
Count = m_pRasterAnn->UserHandleCount;
if( Count > 0 )
{
m_pRasterAnn->AnnGetUserHandle(hObject, 0);
m_pRasterAnn->AnnHandle->ContainerX = m_pRasterAnn->AnnHandle->ContainerX + 10;
m_pRasterAnn->AnnHandle->FillColor = RGB(0, 0, 255);
m_pRasterAnn->AnnHandle->Shape = ANN_HANDLE_SHAPE_SQUARE;
m_pRasterAnn->AnnHandle->Flags = (ANN_HANDLE_FILL_COLOR |
ANN_HANDLE_SHAPE |
ANN_HANDLE_LOCATION);
m_pRasterAnn->AnnChangeUserHandle(hObject, 0);
}
else
MessageBox(TEXT("No User Handle"));
}