void Ccstr_strDlg::OnBnClickedStr()
{
// TODO: 在此添加控件通知處理程式代碼
//CString 到string 的轉換
CString str2 = _T("一九九二年那是一個春天,有一位老人在中國的南海邊劃了一個圈!");
int iSize;
iSize = WideCharToMultiByte(CP_ACP, 0, str2.GetBuffer(), -1, NULL, 0, NULL, NULL);
str2.ReleaseBuffer();
char * temp=new char[iSize+1];
WideCharToMultiByte(CP_ACP, 0, str2.GetBuffer(), -1, temp, iSize, NULL, NULL);
str2.ReleaseBuffer();
string m_fileName=temp;
//string 到CString的轉換
CString cstr2(m_fileName.c_str());
}