AnnHandle example for C++ 5 and later
void CAnnSample2Dlg::ExampleAnnUserHandle(long hObject)
{
long Count ;
m_pRasterAnn->AnnGetUserHandles(hObject);
Count = m_pRasterAnn->GetUserHandleCount();
if (Count > 0 )
{
CString str;
m_pRasterAnn->AnnGetUserHandle( hObject, 0);
str.Format (TEXT("uIndex = 0 \n nID = %d \n ContainerX = %d \n ContainerY = %d \n CliantX = %d \n ClientY = %d \n bVisible = %d \n PenColor = %d \n FillColor = %d \n Shape = %d "),
m_pRasterAnn->GetAnnHandle()->ID, m_pRasterAnn->GetAnnHandle()->ContainerX,m_pRasterAnn->GetAnnHandle()->ContainerY,
m_pRasterAnn->GetAnnHandle()->ClientX,m_pRasterAnn->GetAnnHandle()->ClientY,m_pRasterAnn->GetAnnHandle()->EnableVisible,
m_pRasterAnn->GetAnnHandle()->PenColor,m_pRasterAnn->GetAnnHandle()->FillColor,m_pRasterAnn->GetAnnHandle()->Shape);
MessageBox(str);
}
else
MessageBox(TEXT("No User Handles"));
}