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

提示windows.h头文件重复包含 MFC工程自动包含了头文件windows.h 在你的MFC工程中 把所有的#include<window.h>语句删除即可

这一步还不够,因为想在main函数下使用MFC中的TRACE( ),就必须:

打开project->settings->general->microsoft foundation classes->
选use MFC in a static library
或选 use MFC in a shared DLL(需要把MFC的动态库放在system32文件夹下) .

原文地址:https://www.cnblogs.com/vcerror/p/4289023.html