#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define _AFX_ENABLE_INLINES
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>
#include "afxsock.h" // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
應該#define _AFX_ENABLE_INLINES
在你的代碼里面加上這一句:
#define _AFX_ENABLE_INLINES
解決了困擾我N天的問題。。。呵呵
#define AFX_STDAFX_H__9AD5D08A_8B56_45D8_ADFE_C2C55590E2D8__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define _AFX_ENABLE_INLINES
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>
#include "afxsock.h" // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT