VS2008 CString转char字符串
2014年5月26日13:37:41
//CString 转char字符串
char strLaneIP[20] = {0};
#ifdef UNICODE
WideCharToMultiByte(CP_ACP, 0, sLaneIP, -1, strLaneIP, sizeof(strLaneIP), NULL, NULL);
#else
strcpy_s(strLaneIP,sizeof(strLaneIP),(LPSTR)(LPCTSTR)sLaneIP);
#endif
char数组转Cstring
CString str;
CString str1("123Lu陆");
str.Format(_T("%s"), str1);