MFC中ListControl 怎么清空所有Item

2024年12月04日 23:36
有2个网友回答
网友(1):

CListCtrl::DeleteAllItems
BOOLDeleteAllItems();
Return Value
Nonzero if successful; otherwise zero.

Example
// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;

// Delete all of the items from the list view control.
pmyListCtrl->DeleteAllItems();
ASSERT(pmyListCtrl->GetItemCount() == 0);

网友(2):

CListCtrl:DeleteAllItems()