Chinaunix首页 | 论坛 | 博客
  • 博客访问: 578392
  • 博文数量: 752
  • 博客积分: 40000
  • 博客等级: 大将
  • 技术积分: 5005
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-13 14:47
文章分类

全部博文(752)

文章存档

2011年(1)

2008年(751)

我的朋友

分类:

2008-10-13 16:47:12

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---------------------

阅读(210) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~