📄 unicodefunc.cpp
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -