码迷,mamicode.com
首页 > 其他好文 > 详细

14)显示树状目录

时间:2018-01-27 13:51:39      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:png   bubuko   http   步骤   pat   image   info   pre   ret   

1)接着之前的代码

2)最终结果展示:

        技术分享图片

 

3)基本步骤:

      技术分享图片

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      

 1 // CTree 消息处理程序
 2 void CTree::InsertOnePage(HTREEITEM hitem,CString cpath)
 3  {
 4      
 5      if(hitem==0||cpath==L"")
 6      {
 7         return ;
 8      }
 9      CFileFind cfile;
10     BOOL flag= cfile.FindFile(cpath+L"\\*.*");
11     while(flag)
12     {
13         flag=cfile.FindNextFile();
14         if(cfile.IsDots()==true)
15         {
16             continue;
17         }
18         CString stName=cfile.GetFileName();
19         this->InsertItem(stName,hitem);
20         
21     }
22 
23  }

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        技术分享图片

 

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~·

      最终结果显示

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        技术分享图片

 

14)显示树状目录

标签:png   bubuko   http   步骤   pat   image   info   pre   ret   

原文地址:https://www.cnblogs.com/xiaoyoucai/p/8365120.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!