TCHAR cbContent[512];dyn.GetFieldValue(0,cbConte【本文来自鸿网互联 (http://www.68idc.cn)】nt,512);// 中文会显示乱码AfxMessageBox(cbContent);// 编码转换int nBufferSize = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)cbContent, -1, NULL, 0);wchar_
TCHAR cbContent[512]; dyn.GetFieldValue(0,cbConte【本文来自鸿网互联 (http://www.68idc.cn)】nt,512); // 中文会显示乱码 AfxMessageBox(cbContent); // 编码转换 int nBufferSize = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)cbContent, -1, NULL, 0); wchar_t *pBuffer = new wchar_t[nBufferSize+1]; MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)cbContent, -1 , pBuffer, nBufferSize*sizeof(wchar_t)); // 显示正常 AfxMessageBox(pBuffer); delete[] pBuffer;
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com