我用的VS2012,MFC Unicode 含中文 CString,LPCTSTR 转换成std::string。
// CString --> std::string,如下:
CString cfilePath(_T("D:/图片/lena.jpg"));
#ifdef UNICODE
std::string filePath = CStringA(cfilePath);
#else
std::string filePath = cfilePath;
#endif
// LPCTSTR --> std::string
void func(LPCTSTR lpszPathName)
{
#ifdef UNICODE
CString cfilename(lpszPathName);
std::string filename = CStringA(cfilename);
#else
std::string filename(lpszPathName);
#endif
}