06 2012 档案

摘要:MFC中,使用Edit控件显示中文遇到乱码。自己写了两个函数进行转化 1 // CString转换成string 2 string CDictDlg::CString2string(CString &str) 3 { 4 char *pCh = new char[MY_EDIT_TEXT_LENG]; 5 // W(2B) -> A(B) 6 WideCharToMultiByte(CP_ACP, 0, str.GetBuffer(), -1, pCh, str.GetLength() * 2, NULL, NULL); 7 pCh[str.GetLength(... 阅读全文
posted @ 2012-06-06 23:40 SubmarineX 阅读(1042) 评论(0) 推荐(0)