AnnSelectRect Example for Visual C++
m_pRasterAnn->AnnSelectRect (m_pRasterAnn->GetAnnContainer (), 10, 10, 200, 100);
m_pRasterAnn->AnnSelectPoint (m_pRasterAnn->GetAnnContainer(), 300, 300);
if(m_pRasterAnn->AnnGetSelected (hPlgn))
{
m_pRasterAnn->AnnRemove (hPlgn);
m_pRasterAnn->AnnSetSelected (hPlgn, FALSE, FALSE);
}
else
m_pRasterAnn->AnnInsert (m_pRasterAnn->GetAnnContainer (), hPlgn, FALSE);
CString msg;
msg.Format(TEXT("Left: %f, Top: %f, Width: %f, Height:%f"),
(double)m_pRasterAnn->GetAnnSelectRectLeft (m_pRasterAnn->GetAnnContainer()),
(double)m_pRasterAnn->GetAnnSelectRectTop (m_pRasterAnn->GetAnnContainer ()),
(double)m_pRasterAnn->GetAnnSelectRectWidth (m_pRasterAnn->GetAnnContainer()),
(double)m_pRasterAnn->GetAnnSelectRectHeight (m_pRasterAnn->GetAnnContainer ()));