AnnGetContainer Example for Visual C++
long hPin, h1, h2, hCont;
m_pRasterAnn->AnnCreate (ANN_OBJECT_CONTAINER, TRUE, FALSE);
hCont = m_pRasterAnn->GetAnnObject();
if(hCont != 0)
{
hPin = m_pRasterAnn->AnnCreateItem (hCont, ANN_OBJECT_PUSHPIN, FALSE);
h1 = m_pRasterAnn->AnnGetContainer (hCont);
h2 = m_pRasterAnn->AnnGetTopContainer (hPin);
if(h1 == h2 && h1 == m_pRasterAnn->GetAnnContainer ())
AfxMessageBox(TEXT("root container is same as that of m_pRasterAnn"));
}