现在我要遍历一个深层图象文件夹,使用的是CFileFind类,比如一个文件夹下有10个BMP文件,分别为1.bmp,...,10.bmp,当遍历到10.bmp时,我用ff.FindNextFile();然后用ff.GetFilePath()得到的却是thumbs.db,这样就无法完成循环遍历了??
望高手帮下忙,谢谢!!
主要循环程序:
void BrowseDir(CString dir)
{
         CString szDir=dir;
CFileFind ff; if(szDir.Right(1) != "\\")
szDir += "\\";
szDir += "*.*"; BOOL res = ff.FindFile(szDir);
CString tempPath;
while(res)
{
res = ff.FindNextFile();
tempPath=ff.GetFilePath();

if(ff.IsDirectory() && !ff.IsDots())
{
//如果是一个子目录,用递归继续往深一层找
BrowseDir(ff.GetFilePath());
}
else if(!ff.IsDirectory() && !ff.IsDots())
                  {...}
         }
         ff.Close();
}