afxwin.h中包含afx.h,fax.h中包含afxver_.h,afxver_.h中包含afxv_w32.h,包含afxv_w32.h中包含windows.h,
windows.h中有这样的宏定义:
#ifndef _WINDOWS
_ #define _WINDOWS_
而afxv_w32.h中有这样的宏定义
#ifdef _WINDOWS_
#error WINDOWS.H already included. MFC apps must not #include <windows.h>
#endif
所以若在afxwin.h之前包含了windows.h会出现错误。