哥哥姐姐帮帮忙:VC遍历桌面快捷方式返回路径 本帖最后由 a898540348 于 2011-05-13 06:28:08 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://blog.csdn.net/mycaibo/archive/2010/11/11/6002334.aspx http://www.pudn.com/downloads178/sourcecode/windows/activex/detail824868.html void FindFile(CString strPath,CString keyFile){ CString strTemp; CFileFind fileFinder; BOOL bIsFinded = fileFinder.FindFile(strPath+_T("\\*.*")); while (bIsFinded) { bIsFinded = fileFinder.FindNextFile(); if(!fileFinder.IsDots()) { strTemp = fileFinder.GetFilePath(); if(fileFinder.IsDirectory()) FindFile(strTemp,keyFile); else { if(!strcmp(strTemp.Right(strTemp.GetLength()-strTemp.ReverseFind('\\')-1),keyFile)) m_strFilesSrc.Add(strTemp); } } } fileFinder.Close();} 6楼写的很完整,那两天我刚给已哥们也写了这,呵呵。不过是用这两个函数:FindFirstFileFindNextFile; 我们为什么要结婚?(上)-这篇文章很长,感慨很多,不喜勿入。【转帖,撒分】 每打开一个工程 就少30M。。 WM_DESTROY的问题 这个标签设计打印软件怎么设计 把一些图标复制到工具栏,运行后怎么色彩全变了?怎么让我的工具栏显示类似xp风格的图标? 关于CMU PIE人脸数据集 VC下的一个小问题。百分。UP者有分。 请问高手:CPU的测试程序怎么作? 在MFC中弹出选择目录的对话框是哪个类啊?? 请教MFC用xercesc_c3.1.dll修改一个xml文件 切分窗口如何改变视图大小 MYSQL 数据库 不能插入数据
void FindFile(CString strPath,CString keyFile)
{
CString strTemp;
CFileFind fileFinder; BOOL bIsFinded = fileFinder.FindFile(strPath+_T("\\*.*"));
while (bIsFinded)
{
bIsFinded = fileFinder.FindNextFile(); if(!fileFinder.IsDots())
{
strTemp = fileFinder.GetFilePath();
if(fileFinder.IsDirectory())
FindFile(strTemp,keyFile);
else
{
if(!strcmp(strTemp.Right(strTemp.GetLength()-strTemp.ReverseFind('\\')-1),keyFile))
m_strFilesSrc.Add(strTemp);
}
}
}
fileFinder.Close();
}
FindFirstFile
FindNextFile;