CListBox快速清空

来源:互联网 发布:电子狗升级软件 编辑:程序博客网 时间:2024/06/05 08:41

方法一:

while(pmyListBox->GetCount())     pmyListBox->DeleteString( 0 ); 

方法二:

int nListCount=pMyListBox->GetCount(); for (int i=0;i < nListCount;i++) {     pmyListBox->DeleteString(0);//循环次数等于总个数,每次都删除第一个,一样没有清空 } 

方法三:

CListBox *box=(CListBox *)GetDlgItem(IDC_LIST_INFO);box->ResetContent(); 


原创粉丝点击