您的位置:首页 > 其它

在非MFC中使用CString

2014-12-23 09:25 295 查看
参考:http://wangeleven.blog.163.com/blog/static/2437003920071134263366/
http://wangeleven.blog.163.com/blog/static/2437003920071134263366/
测试环境:VC2010

1、在stdafx.h

// Windows 头文件:

#include <windows.h> 之前加入 #include <afx.h>

2、dllmain.cpp

加入:

////////////////////////////

//使用MFC库 http://blog.csdn.net/lys07962000/article/details/42098559
#ifdef _DEBUG

#undef THIS_FILE

static char THIS_FILE[] = __FILE__;

#endif

#define new DEBUG_NEW

// global data

// The following symbol used to force inclusion of this module for _USRDLL

#ifdef _X86_

extern "C" { int _afxForceUSRDLL; }

#else

extern "C" { int __afxForceUSRDLL; }

#endif

///使用MFC库////////////////////////////////////////

3、工程属性--》C/C++--》代码生产--》运行库 改为:多线程调试(/MTD)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: