listctrl删除选中行的方法

CString str;
int CurSel = m_list.GetNextItem(-1, LVNI_ALL | LVNI_SELECTED);
if(CurSel >= 0)
{
    str = m_list.GetItemText(CurSel, 3);
    DeleteFile(str);
    m_list.DeleteItem(CurSel);
}

猜你喜欢

转载自blog.csdn.net/mikasoi/article/details/83444741