VC程序移植到EVC的时候 老是遇到字符转换问题
VC和EVC的不同 VC可以直接用CString EVC 要转换成char *类型
a CString类型
int len = a.GetLength();//取得字符串的大小
char *buf=new char [len];//开辟存储单元
ZeroMemory(buf, len);//清零
// 将 Unicode 字符串转换为字节
LPTSTR pStr = a.GetBuffer(len);
WideCharToMultiByte(CP_ACP, 0, pStr, len, buf, len, NULL, NULL);
得到的数据在buf中
///
作者:宇帆 cfanlwn
时间:2010-01-26 14:48:42