void
ProcPicDir(CString strPicDir)
{
CFileFind fileFinder;
if
(strPicDir.Right(1) == TEXT(
"\\"
))
{
int
nPos = strPicDir.ReverseFind(TEXT(
'\\'
));
strPicDir = strPicDir.Left(nPos);
}
CString strPicFile = TEXT(
""
);
strPicFile.Format(TEXT(
"%s\\%s"
),strPicDir,TEXT(
"*.*"
));
BOOL
bWorking = fileFinder.FindFile(strPicFile);
while
(bWorking)
{
bWorking = fileFinder.FindNextFile();
if
(fileFinder.IsDots())
{
continue
;
}
CString strFilePath = fileFinder.GetFilePath();
if
(fileFinder.IsDirectory())
{
ProcPicDir(strFilePath);
}
else
{
int
nPos = strFilePath.ReverseFind(TEXT(
'.'
));
CString strExt = strFilePath.Right(strFilePath.GetLength() - nPos - 1);
if
(strExt.CompareNoCase(TEXT(
"jpg"
)) == 0 ||
strExt.CompareNoCase(TEXT(
"jpeg"
)) == 0 ||
strExt.CompareNoCase(TEXT(
"bmp"
)) == 0)
{
}
}
}
fileFinder.Close();
}