MFC list control如何获取读取程式当前位置所有文件的文件名 时间 类型 大小 并且时时刷新,

最好详细说明......有实例最好..
2025-05-17 10:09:48
推荐回答(1个)
回答1:

‍炫彩界面库为你解答: 用这个API获取程序的路径,

DWORD WINAPI GetModuleFileName(  __in    HMODULE hModule,  __out         LPTSTR lpFilename,  __in          DWORD nSize);

然后用这个函数, 有兴趣可以加入我们的编程群; 获取文件的属性, 返回值就是属性类型, 不懂可以看MSDN;

DWORD WINAPI GetFileAttributes(  __in          LPCTSTR lpFileName);

If the function succeeds, the return value contains the attributes of the 

specified file or directory. 如果函数成功,返回值是指定文件的属性, 炫彩欢迎您, 或目录的属性

If the function fails, the return value is INVALID_FILE_ATTRIBUTES. To get 

extended error information, call GetLastError. 失败了当然是返回 个无效的宏定义INVALID_FILE_ATTRIBUTES 这个是定义在代码中的.

The attributes can be one or more of the following values. 更多的那就自己看MSDN了;

这里就不写了;