在C++动态库中使用MFC库

在C++动态库中使用MFC库,解决error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>错误
如果在创建C++动态库的时候,在添加公共头文件没有选择MFC。而在使用过程中需要使用#include <afx.h>#include <string.h>等头文件,会报出如下的错误:在C++动态库中使用MFC库
解决方法:在stdafx.h头文件中去掉#include <windows.h>添加**#include <afxwin.h>**即可
在C++动态库中使用MFC库