⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 no_callback.c

📁 VC++和Tilcon软件编写的一个小的界面程序
💻 C
字号:
#include <time.h>               /*Standard head file define here*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h> 
#include <tilcon/TRTAPI.h> 
#include <DIRECT.H>
#include <time.h>
#include <io.h> 
#include <windows.h>

#define Tree "File_System_Tree" 



extern TRT_cid;
//GetVolumeInformation


int Load_File_System()
{  
   long p;/**//*查找文件的句柄*/ 
   struct _finddata_t f;
   int dir,file;
   char Textbuffer[125]="";
   char imagebuf[100]="";
   char child_item[30]="";

   p = _findfirst("*.*", &f);/**//*查找文件 且仅能查找当前工作目录*/

  if (p == -1)
  {
      TRT_SetValues(TRT_cid,"Message_Box",
                  TRT_ATT_TEXT,"以外错误 程序结束! ",NULL);
     exit(-1);/**//*以外错误 程序结束*/
  }
  
  do
  {
     
          if (_A_SUBDIR == f.attrib)       /*判断是不是目录*/
          {
            
             dir++;                        /*目录个数 */
          }
          else
          {
       
             file++;                      /*文件个数 */
          }

       
          if (_A_SUBDIR != f.attrib)        /*判断是不是目录*/
             printf("%9lu\n",f.size);       /*显示文件大小*/
          else
             printf("\n");                  /*目录大小为0 dir命令不显示*/

          sprintf(Textbuffer,f.name);       /*显示文件名*/
          sprintf(child_item,f.name);
		  sprintf(imagebuf,"%s\3%s\3%s\3%s\0",
				  "item0", child_item, Textbuffer, NULL);
          TRT_SetValues(TRT_cid, Tree,
					TRT_ATT_TREE_ITEMS_ADD_ID_IMAGE,imagebuf,
					NULL);                                          
  }
  while (!(_findnext(p,&f)));             /*查找下一个 直到没有文件为止*/
  _findclose(p);                 




    return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -