/*作者:sysprogram
编写日期:2011年4月2日
博客:http://hi.csdn.net/SysProgram
*/
void MyFindFile(CString strPath)
{
CFileFind hFileFind;
strPath+="//*.*";
BOOL bWorking = hFileFind.FindFile(strPath,0);
while(bWorking)
{
bWorking = hFileFind.FindNextFile( );
if (hFileFind.IsDots())
{
continue;
}
if (hFileFind.IsDirectory())
{
MyFindFile(hFileFind.GetFilePath());
}
OutputDebugString(hFileFind.GetFilePath());
}
hFileFind.Close();
}
void CTestCFileDlg::OnBUTTONFind()
{
// TODO: Add your control notification handler code here
MyFindFile("D://test");
}