ShowAnnotationGroup Example VC++

This example lets a user select an annotation group from a list and make it visible.  See the example for the GetAnnotationGroup method for instructions on how to list annotation groups.

void CFrmGroup::OnShowGroup() 
{
    // This would allow a user to select a Group from a list
    // and make it visible. See example for GetAnnotationGroup method
    // for how to list annotation groups.
   
    CString szCurGroup;
   
    // Determine which group the user selected from the listbox
    m_GroupList.GetText(m_GroupList.GetCurSel(),szCurGroup);
    VARIANT vCurGroup;
    V_VT(&vCurGroup) = VT_BSTR;
    V_BSTR(&vCurGroup) = szCurGroup.AllocSysString();
    if(pParentDlg)
    {
      pParentDlg->ImgEdit1.ShowAnnotationGroup(vCurGroup);
      // Call refresh to repaint with the group hidden
      pParentDlg->ImgEdit1.Refresh();
    }
}