AnnEnumerate example for C++ 5.0 and later

For more information on declaration and unlocking procedures used in testing this example, refer to Annotation Declaration Information.

//This example causes the AnnEnumerate event to get fired for all annotations in the container
//For details on implementing events, please refer to the tutorial: Creating and Using Annotations (C++ 5.0 and later)
void CTutorDlg::OnButtonAnnenumerate() 
{
   m_pRasterAnn->AnnEnumerate(m_pRasterAnn->GetAnnContainer(), ANN_FLAG_RECURSE | ANN_FLAG_NOTTHIS, "");
}

void CRasterAnnSink::OnAnnEnumerate(long hObject)
{
   CString strMsg;
   strMsg.Format(TEXT("Annotation Handle %x"), hObject);
   AfxMessageBox(strMsg);
}