AnnChange example for C++ 5.0 and later
For details on event handling of the COM objects in MFC, and m_pDlg and m_pRasterAnn declarations, refer to the "Creating and Using Annotations (C++ 5.0 and later) Tutorial"
//This example tests the AnnChange event.
//For details on event handling of the COM objects in MFC,
// and m_pDlg and m_pRasterAnn delcarations, refer to
// the "Creating and Using Annotations (C++ 5.0 and later) Tutorial"
void CRasterAnnSink::OnAnnChange(long hAnnObject)
{
CString strMsg;
long nTag=0;
m_pDlg->m_pRasterAnn->AnnGetTag(hAnnObject);
nTag = m_pDlg->m_pRasterAnn->GetAnnTag();
strMsg.Format(TEXT("AnnChange: This is a change for the button tagged %d"), nTag);
AfxMessageBox(strMsg);
}