如何找文件,在线等待 如何实现想WINDOW中搜索文件夹的功能呢?还有能不能在CFileDialog里面自己加按钮呢,如何加? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 WIN32_FIND_DATAFindFirstFileFindNextFile自己去查一查.. 用CFileFind和递归关于第二个问题请参考<<VC++ 技术内幕 第四版>> void CRecDlg::BrowseFile(CString strFile){ CFileFind ff; CString szDir = strFile; if(szDir.Right(1) != "\\") szDir += "\\"; szDir += "*.*"; BOOL res = ff.FindFile(szDir); while(res) { res = ff.FindNextFile(); CString strPath = ff.GetFilePath(); CString strTitle = ff.GetFileTitle(); if(ff.IsDirectory() && !ff.IsDots()) { BrowseFile(strPath); } else if(!ff.IsDirectory() && !ff.IsDots()) { CString strPath; strPath = ff.GetFilePath(); ... } } ff.Close();} 我要找的文件是不知道路径的啊有CFileFind是要有路径的啊 C++ socket 接收中文乱码问题? VC实现类似MSN,QQ弹出窗口的问题 字符转换成URL编码问题 请大家指教,IE编程的智能指针的使用哪里出问题了? 有没有上海的UI开发人员,想到浦东软件园工作? 共享ms-dos6.0,win2k,nt4的源代码 请问在vc网络编程中select和sendmessage怎么使用? 求教如何使用FlashGet的JetCar.Netscape组件中的AddUrlEx接口 关于_RecordSetPtr的问题??? 请教将获取的rtsp流存储成avi文件的方法,以及编译output-example的问题 FTP服务器的编写 关于硬盘空间的问题
关于第二个问题请参考<<VC++ 技术内幕 第四版>>
{
CFileFind ff;
CString szDir = strFile;
if(szDir.Right(1) != "\\")
szDir += "\\";
szDir += "*.*";
BOOL res = ff.FindFile(szDir);
while(res)
{
res = ff.FindNextFile();
CString strPath = ff.GetFilePath();
CString strTitle = ff.GetFileTitle();
if(ff.IsDirectory() && !ff.IsDots())
{
BrowseFile(strPath);
}
else if(!ff.IsDirectory() && !ff.IsDots())
{
CString strPath;
strPath = ff.GetFilePath();
...
}
}
ff.Close();
}
有CFileFind是要有路径的啊