字符串使用总结
1.如何获取EXE路径
CString GetExePath(){ char szExePath[MAX_PATH]={0}; char* pszSlash; DWORD dwRet = GetModuleFileName( NULL, szExePath, MAX_PATH ); //assert( dwRet != 0 ); pszSlash = strrchr( szExePath, '\\' ); if ( NULL != pszSlash ) pszSlash[1] = 0; return CString(szExePath);}
(1)strrchr
2.CString::GetBuffer()
参考http://blog.csdn.net/just_kong/article/details/12152609