DeleteAnnotationGroup Example VC++

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

void CFrmGroup::OnDeleteGroup() 
{
    // This would allow a user to select a Group from a list
    // and delete 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);
    // remove the group name
    m_GroupList.DeleteString(m_GroupList.GetCurSel());

    if(pParentDlg)
    {
      pParentDlg->ImgEdit1.DeleteAnnotationGroup (szCurGroup);
      // Need to refresh display
      pParentDlg->ImgEdit1.Refresh();
    }
}