首页 > 代码库 > fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>

fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>

给对话框添加类, 报错

CalibrateMFCDlg.h(6) : error C2504: “CDialog”: 未定义基类

等多个错误

 

加上 #include "afxwin.h"  就会包如上错误

fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>

 

原因:

在其它文件里 #include ”CalibateMFCDlg.h" 了