Deepool:非常好,简单易懂,谢谢
(发表于2003-11-14 10:48:00)
xtmzl:bug::
void AddSubDir(HTREEITEM hParent)
{
//add these code
HTREEITEM hChild = GetTreeCtrl().GetChildItem(hParent);
HTREEITEM hNextChild ;//= GetTreeCtrl().GetNextItem(hChild,TVGN_NEXT);
while(hChild)
{
hNextChild = GetTreeCtrl().GetNextItem(hChild,TVGN_NEXT);
GetTreeCtrl().DeleteItem( hChild );
hChild = hNextChild;
}
CString strPath = GetFullPath(hParent);
if(strPath.Right(1) != "\\")
strPath += "\\";
strPath += "*.*";
CFileFind file;
BOOL bContinue = file.FindFile(strPath);
while(bContinue)
{
bContinue = file.FindNextFile();
if(file.IsDirectory() && !file.IsDots())
GetTreeCtrl().InsertItem(file.GetFileName(),2,1,hParent);
}
}
(发表于2005-10-21 17:39:00)
..........................................................................
--------------------next---------------------
阅读(220) | 评论(0) | 转发(0) |