获取指定路径的文件名称:
TCHAR fileTitle[MAX_PATH] = {0};
GetFileTitle( sChildFolderPath, fileTitle, MAX_PATH );
获取指定路径的文件后缀名称:
CString sFile = _T("c:\\a\\b.exe");
CString sExt = PathFindExtension( sChildFolderPath );
文件路径组合及分解:
TCHAR path_buffer[_MAX_PATH];
TCHAR drive[_MAX_DRIVE];
TCHAR dir[_MAX_DIR];
TCHAR fname[_MAX_FNAME];
TCHAR ext[_MAX_EXT];
_tmakepath( path_buffer, _T("c"), _T("\\sample\\myprogarm\\"), _T("makepath"), _T("txt") ); // C4996
_tsplitpath( path_buffer, drive, dir, fname, ext ); // C4996