压力表安装规范国标:在vc中 "cfindfile"怎么用啊? 给个例子好吗,谢谢啊!

来源:百度文库 编辑:神马品牌网 时间:2024/05/02 05:10:07
在vc中 "cfindfile"怎么用啊? 给个例子好吗,谢谢啊!
我想要编的程序是寻找储存器中的某类文件,应该怎么怎么运用"findfile"语句啊?
我做出来得 总是不能运行通过#17 谢谢各位高手!!!!

CStringpath="d:\\temp\\*.*";
CStringstrFileName, strSuffix, strFilePath;
intnIndex;
CString strAVI;

BOOL bIsFinded =(BOOL)tempFind.FindFile( path );
while( bIsFinded )
{
bIsFinded = (BOOL)tempFind.FindNextFile();
if( !tempFind.IsDots() )
{
strFileName = tempFind.GetFileName();
nIndex = strFileName.ReverseFind('.');
strSuffix = strFileName.Mid(nIndex+1);
strSuffix.MakeUpper();
if ( strSuffix=="AVI" )
{
strAVI = strFileName;
}
}
}
tempFind.Close();