AnnGetUserHandles example for C++ 5 and later
//' This example displays information about the user handles in an annotation object.
void CTutorDlg::ExampleGetAnnUserHandles(long hObject)
{
long Count;
int i;
CString strMsg;
m_pRasterAnn->AnnGetUserHandles(hObject);
Count = m_pRasterAnn->UserHandleCount;
if (Count > 0)
{
for (i = 0; i< Count; i++)
{
strMsg.Format(TEXT("uIndex = %l \n\t nID = %l \n\t ContainerX = %f\n\t ContainerY = %f\n\t CliantX = %f\n\t ClientY = %f\n\t Shape = %f\n\t"),
i,m_pRasterAnn->UserHandle(i)->ID,
m_pRasterAnn->UserHandle(i)->ContainerX,
m_pRasterAnn->UserHandle(i)->ContainerY,
m_pRasterAnn->UserHandle(i)->ClientX,
m_pRasterAnn->UserHandle(i)->ClientY,
m_pRasterAnn->UserHandle(i)->Shape
);
}
}
else
MessageBox (TEXT("No User Handles"));
}