C++ CMFCButton编译错误

C++ CMFCButton编译错误,c++,mfc,gdi+,C++,Mfc,Gdi+,我想使用CMFCButton。编译时,会出现以下错误: afxbutton.h(183): warning C4003: not enough actual parameters for macro 'SelectFont' afxbutton.h(183): error C2226: syntax error: unexpected type 'HFONT' 它似乎与windows宏冲突: 如何解决此问题?选择字体是在Windowsx.h中定义的。若要解决冲突,请在项目中找到Windows

我想使用CMFCButton。编译时,会出现以下错误:

afxbutton.h(183): warning C4003: not enough actual parameters for macro 'SelectFont'
afxbutton.h(183): error C2226: syntax error: unexpected type 'HFONT'
它似乎与windows宏冲突:


如何解决此问题?

选择字体是在Windowsx.h中定义的。若要解决冲突,请在项目中找到Windowsx.h的任何#include,并将其移动到MFC控件的#include之后。也许到你的stdafx.h的结尾


同样的问题也可以看到(注意BCGSoft是创建MFC控件的公司,因此同样的情况也适用)

奇怪,他们应该测试包含
Windowsx.h
的代码。有人提交了错误报告吗?他们有这样做的机制吗?我没有隐式地将
Windowsx.h
文件包含在任何地方,但我将
afxbutton.h
文件移动了,它起了作用。