请教一下这个为什么不可以同时删除多个?
void CBaseView::Delete_Group(){
CBaseDoc* pDoc = GetDocument();
CListCtrl& list = GetListCtrl();
CChildFrame* pParent = (CChildFrame*)GetParent();
int page = pParent->m_PageBar.GetSelectPage() ;
int start = (page-1)*36 ;
unsigned int groupno = 0 ;
int nidx =-1;
POSITION pos=list.GetFirstSelectedItemPosition(); //pos选中的首行位置
if (pos != NULL)
{
nidx = list.GetNextSelectedItem(pos) ;
if ((start + nidx)> pDoc->GetDataSize())
{
return ;
}
CString GroupNoRow = pDoc->GetData(nidx + start) ;
CString GroupNo = getdatano( GroupNoRow , 1) ;
groupno = _ttoi(GroupNo) ;
}
else{
AfxMessageBox(_T("选择要删除的组!")) ;
return;
}
TCHAR buf[30] = {0} ;
wsprintf(buf ,_T("确认删除组 %d ?") ,groupno) ;
if(MessageBox( buf, _T("确认"), MB_ICONQUESTION | MB_OKCANCEL) == IDCANCEL)
{
return ;
}
grp_table_del_by_grpNum_t group_client ;
memset(&group_client , 0 , sizeof(group_client));
group_client. = user_group_del_by_grpnum ;
group_client.operateHead.operateType = Delete ;
group_client.operateHead.nmsClientPac.dev_code = devcode ;
group_client.operateHead.nmsClientPac.system_source = nms_sys;
group_client.operateHead.nmsClientPac.pac_msg_serial = create_msg_searial() ;
group_client.operateHead.nmsClientPac.packet_len = sizeof(group_client) ;
group_client.operateHead.nmsClientPac.pac_msg_type = database_handle ;
CString strDisId = list.GetItemText(nidx , 7) ;
group_client.dispatchID = _ttoi(strDisId) ;
if (group_client.dispatchID <= 0)
{
// return ;
}
group_client.grpNum = groupno ;
bfdx_send((char*)&group_client , sizeof(group_client)) ;
}