Exemplo n.º 1
0
void CProjectInfoPage::RemoveAllListItems()
{
	int nCount = m_pListProjs->GetCount();
	if (nCount>0)
	{
		for (int i=0; i<nCount; i++)
		{
			CListContainerElementUI* pListItem = static_cast<CListContainerElementUI*>(m_pListProjs->GetItemAt(i));
			if (NULL != pListItem)
			{
				sProjectItem* pProjData = (sProjectItem*)pListItem->GetTag();
				if (NULL != pProjData)
				{
					delete pProjData;
					pProjData = NULL;
				}
			}
		}

		m_pListProjs->RemoveAll();
	}

	//还原Index
	m_nCurrentPageIndex = -1;
}