
MFC
文章平均质量分 70
zyipie
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Visual C++各种字符串相互转换
CString在DBCS字符集时只能转换为char和string; 在UNICODE字符集时只能转换为wchar_t和wstring.但无论在什么字符集下char, wchar_t, string, wstring都能转换为CString.char能转换为string, wchar_t能转换为wstring但char和wchar_t, string和wstring之间, 要用Mul原创 2012-05-12 23:09:32 · 1465 阅读 · 0 评论 -
MBCS与UNICODE字符集相互转换.
不同语言的操作系统默认的MBCS不一样, 有时需要与UNICODE相互转换.代码如下:#include #include #include #include using namespace std;wstring MultiCharToWideChar(string str){ //获取大小,分配空间 int len = MultiByteToWid原创 2012-05-12 21:09:32 · 941 阅读 · 0 评论 -
setlocale
char *setlocale(int category, const char *locale);If locale is a null pointer, setlocale queries, rather than sets, the international environment and returns a pointer to the string associated原创 2012-05-12 18:11:28 · 447 阅读 · 0 评论 -
CDialog构造函数重载
头文件如下:#pragma once// CMyDlg 对话框class CMyDlg : public CDialog{ DECLARE_DYNAMIC(CMyDlg)public: CMyDlg(CWnd* pParent = NULL); // 标准构造函数 CMyDlg(int iId, CWnd* pParent = NULL); virtual原创 2012-05-22 01:20:56 · 3212 阅读 · 0 评论 -
CStdioFile按行读取文件.
virtual LPTSTR ReadString( LPTSTR lpsz, UINT nMax );virtual BOOL ReadString( CString& rString);CStdioFile aFile;CFileException ex;if (!aFile.Open("config.txt", CFile::mod原创 2012-05-22 22:05:42 · 1435 阅读 · 0 评论