syntax error : unexpected type 'HFONT


1>d:\vs\vc\atlmfc\include\afxbutton.h(183): error C2226: 语法错误 : 意外的“HFONT”类型
1>d:\vs\vc\atlmfc\include\afxbutton.h(183): error C2238: 意外的标记位于“;”之前
1>d:\vs\vc\atlmfc\include\afxfontcombobox.h(45): warning C4003: “SelectFont”宏的实参不足
1>d:\vs\vc\atlmfc\include\afxfontcombobox.h(45): error C2059: 语法错误:“
1>d:\vs\vc\atlmfc\include\afxfontcombobox.h(45): error C2238: 意外的标记位于“;”之前
1>d:\vs\vc\atlmfc\include\afxfontcombobox.h(46): error C2059: 语法错误:“
1>d:\vs\vc\atlmfc\include\afxfontcombobox.h(46): error C2238: 意外的标记位于“;”之前
1>d:\vs\vc\atlmfc\include\afxheaderctrl.h(85): warning C4003: “SelectFont”宏的实参不足
1>d:\vs\vc\atlmfc\include\afxheaderctrl.h(85): error C2226: 语法错误 : 意外的“HFONT”类型
1>d:\vs\vc\atlmfc\include\afxheaderctrl.h(85): error C2238: 意外的标记位于“;”之前

1>c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxbutton.h(183): error C2226: syntax error : unexpected type 'HFONT'

1>c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxbutton.h(183): error C2238: unexpected token(s) preceding ';'

1>c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxfontcombobox.h(45): warning C4003: not enough actual parameters for macro 'SelectFont'

1>c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxfontcombobox.h(45): error C2059: syntax error : ''

1>c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxfontcombobox.h(45): error C2238: unexpected token(s) preceding ';'

1>c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxfontcombobox.h(46): error C2059: syntax error : ''

1>c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxfontcombobox.h(46): error C2238: unexpected token(s) preceding ';'

1>c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxheaderctrl.h(85): warning C4003: not enough actual parameters for macro 'SelectFont'

1>c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxheaderctrl.h(85): error C2226: syntax error : unexpected type 'HFONT'

1>c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxheaderctrl.h(85): error C2238: unexpected token(s) preceding ';'


添加:在文件头添加#undef SelectFont

 找了很长时间 终于在windows中文网站上找到了答案: https://social.msdn.microsoft.com/Forums/zh-TW/cce7d969-546e-4e03-b984-566b8908d8e7/syntax-error-unexpected-type-hfont






你可能感兴趣的:(MFC/VS)