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
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN
#endif
#include <afx.h>
#include <afxwin.h>
#include <afxext.h>
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h>
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>
#endif // _AFX_NO_AFXCMN_SUPPORT
完成!!!
本文详细介绍了在Visual Studio中配置MFC在共享DLL中的使用方法,包括右击工程名->References,配置Use of MFC in Shared DLL,以及在std::afx.h头文件中加入关键代码。

被折叠的 条评论
为什么被折叠?



