AnnEnumerate example for C++ 4.0 and later
Note: This topic is for Document/Medical only.
//This event is fired for each annotation
//Displays the handle for each annotation
void CMFC42samplesDlg::OnAnnEnumerateLeadctrl1(long hObject)
{
CString str;
str.Format("hObject: %x", hObject);
AfxMessageBox(str);
}
//Load image and annotation file and then enumerate all the annotations
void CMFC42samplesDlg::OnButtonAnnenumerate()
{
m_Lead1.Load("rgbw.bmp",0,0,1);
m_Lead1.AnnLoad("d:\\work\\images\\rgbw.ann",0);
m_Lead1.SetAnnUserMode(ANNUSERMODE_RUN);
m_Lead1.AnnEnumerate(m_Lead1.GetAnnContainer(), ANNFLAG_RECURSE, NULL);
}