遍历CTreeCtrl

void CDlgFitleFile::ErgodicTreeCtrl(HTREEITEM hTreeItem)
{
	HTREEITEM  hChildrenItem;
	HTREEITEM  hNextItem;

	if (!hTreeItem)
		return;
	
	
	hChildrenItem = m_treeFileType.GetChildItem(hTreeItem);
	ErgodicTreeCtrl(hChildrenItem);
    
	hNextItem = m_treeFileType.GetNextItem(hTreeItem, TVGN_NEXT);
	ErgodicTreeCtrl(hNextItem);
}

你可能感兴趣的:(mfc)