截取文件名
CString strFilePath = L"C:\\Users\\WGH\\Desktop\\移植.txt";
int iVal = strFilePath.ReverseFind('\\');
CString strFileName;
if (iVal != -1)
{
strFileName = strFilePath.Mid(iVal + 1, strFilePath.GetLength());
}
截取文件后缀
CString strFileName = L"移植.txt";
int iVal = strFileName.ReverseFind('.');
CString strSuffix;
if (iVal != -1)
{
strSuffix = strFileName.Mid(iVal, strFileName.GetLength());
}