本文共 528 字,大约阅读时间需要 1 分钟。
//void CMatManager::GetBuffer(const CString &strSource,char *pStrTemp){ int pathLength=strSource.GetLength(); for(int i=0; i(MBSC) 多字节char * Topchar(const CString &strSource) { char* pStrTemp = new char[strSource.GetLength()] ;#ifdef _UNICODE //Unicode DWORD dwNum = WideCharToMultiByte(CP_OEMCP,NULL,strSource,-1,NULL,0,NULL,FALSE);WideCharToMultiByte (CP_OEMCP,NULL,strSource,-1,pStrTemp,dwNum,NULL,FALSE); pStrTemp[dwNum]=0; #elif//MBCS 工程强转 pStrTemp = (LPSTR)(LPCTSTR)strSource;#endif return pStrTemp;}
转载地址:http://iljub.baihongyu.com/