VS2010如何在控制台应用程序中添加对MFC库的支持
2013-10-19 22:16
405 查看
http://blog.sina.com.cn/s/blog_5f656a170101dzcn.html
1:右击工程名 -> References
2:Configuration Properties ->Use of MFC ->Use MFC in a Shared DLL
3:在stdafx.h的头文件加入如下代码:
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#endif
#include <afx.h>
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
完成!!!
1:右击工程名 -> References
2:Configuration Properties ->Use of MFC ->Use MFC in a Shared DLL
3:在stdafx.h的头文件加入如下代码:
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#endif
#include <afx.h>
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
完成!!!
相关文章推荐
- 控制台应用程序中添加对MFC的支持
- MFC应用程序中添加控制台窗口
- 如何用VS2010新建一个Win32控制台应用程序项目
- VS2010 窗口应用程序项目如何添加如下文字
- 如何将未添加SOCKETS的MFC手动更改成网络支持
- 2步让Win32应用程序/控制台应用使用MFC类库支持显示对话框
- Win32控制台程序如何获取MFC库支持
- vs2013中如何给一个项目添加MFC支持
- 控制台程序中添加mfc支持
- 向MFC应用程序添加控制台窗口
- 如何让WIN32应用程序支持MFC类库
- 如何导出wince6.0的SDK 添加MFC支持
- 在编写控制台应用程序时,且要用MFC框架时添加的头文件
- VS2010 MFC中在对话框上添加工具栏以及工具栏提示信息并改变图标支持256色
- MFC中给应用程序添加托盘支持
- MFC 单文档应用程序如何为状态栏添加进度条
- MFC应用程序中添加控制台窗口
- 如何给Win32 DLL添加MFC支持?(Dllmain重定义的问题)
- 如何让WIN32应用程序支持MFC类库
- MFC如何在有界面的应用程序中开启控制台窗口