void CBianLiDlg::FileSearch(CString root)...{ // root 为目录名 CFileFind ff; CString FilePath; if (root.Right(1)!="/") ...{ root+="/"; } root+="*.*"; BOOL res=ff.FindFile(root); while (res) ...{ res=ff.FindNextFile(); FilePath=ff.GetFilePath(); if (ff.IsDirectory() && !ff.IsDots())// 找到的是文件夹 ...{ FileSearch(FilePath);// 递归 } else if (!ff.IsDirectory() && !ff.IsDots())// 找到的是文件 ...{ m_ff+=FilePath; m_ff+=" "; } }}