This example lets a user select an annotation group from a list and hide it. See the example for the GetAnnotationGroup method for instructions on how to list annotation groups.
void CFrmGroup::OnHideGroup()
{
// This would allow a user to select a Group from a list
// and hide it. See example for GetAnnotationGroup method
// for how to list annotation groups.
CString szCurGroup;
// Get the name of the group the user clicked on in the listbox
m_GroupList.GetText(m_GroupList.GetCurSel(),szCurGroup);
if(pParentDlg)
{
VARIANT vCurGroup; V_VT(&vCurGroup) = VT_BSTR; V_BSTR(&vCurGroup) =
szCurGroup.AllocSysString();
pParentDlg->ImgEdit1.HideAnnotationGroup (vCurGroup);
// Call refresh to repaint with the group hidden
pParentDlg->ImgEdit1.Refresh();
}
}