unicodefunc.cpp

来自「3D reconstruction, medical image process」· C++ 代码 · 共 37 行

CPP
37
字号
#include "stdafx.h"#include "UnicodeFunc.h"PSTR ToMultiByte(CString strWCString){	PSTR pstrString;	int iLenOfMBString;	iLenOfMBString = WideCharToMultiByte(CP_ACP, 0, strWCString, -1, NULL, 0, NULL, NULL);	pstrString = new char[iLenOfMBString];	WideCharToMultiByte(CP_ACP, 0, strWCString, -1, pstrString, iLenOfMBString, NULL, NULL);	return pstrString;}PWSTR ToWideChar(PSTR pstrMBString){	PWSTR pwstrString;	int iLenOfWCString;	iLenOfWCString = MultiByteToWideChar(CP_ACP, 0, pstrMBString, -1, NULL, 0);	pwstrString = (PWSTR)new char [iLenOfWCString * sizeof(WCHAR)];	MultiByteToWideChar(CP_ACP, 0, pstrMBString, -1, pwstrString, iLenOfWCString);	return pwstrString;}double wtof(CString strWCString){	PSTR pstrString = ToMultiByte(strWCString);	double fRet = atof(pstrString);	delete[] pstrString;	return fRet;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?