Convert CString to string ...
You can get CString from many function that used in C++ and MFC, (ex: GetDlgItemText()). In some case, another function requires string type. Use can use this code
LPCTSTR Convert_CString2String (CString strVar){// Convert CString to CW2ACT2CA pszConvertedAnsiString (strVar);// Use CW2A to stringstring strResult(pszConvertedAnsiString);return strResult;}