void CBasic06Dlg::OnBnClickedBtnDelete()
{
// TODO: 在此添加控件通知处理程序代码
int nIndex = m_cmb_demo.GetCurSel();
m_cmb_demo.DeleteString(nIndex);
if (nIndex<m_cmb_demo.GetCount()-1)
{
m_cmb_demo.SetCurSel(nIndex);
}
else
{
m_cmb_demo.SetCurSel(0);
}
nIndex = m_lst_demo.GetCurSel();
m_lst_demo.DeleteString(nIndex);
if (nIndex < m_lst_demo.GetCount() - 1)
{
m_lst_demo.SetCurSel(nIndex);
}
else
{
m_lst_demo.SetCurSel(0);
}
}