Visual Studio 在控制台应用中使用MFC
1:Configuration Properties ->Use of MFC ->Use MFC in a Shared DLL
2.将如下代码粘贴到stdafx.h文件中
#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 |
-
#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