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: 語法錯誤:“<L_TYPE_raw>”
1>d:\vs\vc\atlmfc\include\afxfontcombobox.h(45): error C2238: 意外的標記位於“;”之前
1>d:\vs\vc\atlmfc\include\afxfontcombobox.h(46): error C2059: 語法錯誤:“<L_TYPE_raw>”
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 : '<L_TYPE_raw>'

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 : '<L_TYPE_raw>'

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






發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章