“Font”: 不明确的符号

本文针对MFC项目中出现的Font实例化错误进行了详细的解析,并提供了有效的解决方案,通过使用Gdiplus命名空间或限定FontFamily的方法成功解决了问题。
错误 5 error C2872: “Font”: 不明确的符号 f:\mfc类\gditest2\gditest2\gdiop.cpp 136
错误 6 error C2259: “Font”: 不能实例化抽象类 f:\mfc类\gditest2\gditest2\gdiop.cpp 136
错误 7 error C2661: “Font::Font”: 没有重载函数接受 4 个参数 f:\mfc类\gditest2\gditest2\gdiop.cpp 136

解决方案--------------------
using namespace Gdiplus;

Gdiplus::Font
Gdiplus::FontFamily(
该方法亲测可以用,限定)
"ExitInstance": 是 "CMFCApplication3Dlg" 的成员 拼写错误 - Application 是单词 拼写错误 - Application 是单词 拼写错误 - Application 是单词 拼写错误 - Dialog 是单词 拼写错误 - gdiplus 是单词 拼写错误 - Startup 是单词 拼写错误 - Input 是单词 拼写错误 - gdiplus 是单词 拼写错误 - Token 是单词 拼写错误 - Paint 是单词 拼写错误 - Icon 是单词 拼写错误 - Icon 是单词 可以将成员函数设为常量。 “gdiplusToken”: 未声明的标识符 “CWinApp::ExitInstance”: 调用非静态成员函数需要一个对象 拼写错误 - Application 是单词 拼写错误 - Application 是单词 拼写错误 - CMFC 是单词 拼写错误 - Application 是单词 拼写错误 - CMFC 是单词 拼写错误 - Application 是单词 拼写错误 - Data 是单词 拼写错误 - Exchange 是单词 拼写错误 - Icon 是单词 拼写错误 - Dialog 是单词 拼写错误 - Paint 是单词 拼写错误 - Query 是单词 拼写错误 - Drag 是单词 拼写错误 - Icon 是单词 拼写错误 - Button 是单词 未定义标识符 "DRAWITEM" "Font" 明确 拼写错误 - Draw 是单词 拼写错误 - Item 是单词 拼写错误 - Draw 是单词 拼写错误 - Item 是单词 拼写错误 - Struct 是单词 拼写错误 - graphics 是单词 拼写错误 - back 是单词 拼写错误 - Brush 是单词 拼写错误 - text 是单词 拼写错误 - Brush 是单词 拼写错误 - border 是单词 拼写错误 - corner 是单词 拼写错误 - Radius 是单词 拼写错误 - path 是单词 拼写错误 - Text 是单词 拼写错误 - font 是单词 拼写错误 - layout 是单词 拼写错误 - format 是单词 “DRAWITEM”: 未声明的标识符 “static_cast”: 无法从“void (__cdecl CMyButton::* )(LPDRAWITEMSTRUCT)”转换为“AFX_PMSG” “_messageEntries”: 必须初始化 const 对象 “Font: 明确的符号Font: 无法实例化抽象类 “Font: 无法实例化抽象类 “Font::Font: 没有重载函数接受 2 个参数 “Gdiplus::Graphics::DrawString”: 没有重载函数可以转换所有参数类型 拼写错误 - Button 是单词 拼写错误 - Button 是单词 拼写错误 - Button 是单词 拼写错误 - Draw 是单词 拼写错误 - Item 是单词 拼写错误 - Intelli 是单词 拼写错误 - Sense 是单词 拼写错误 - gdiplus 是单词 拼写错误 - Windows 是单词
最新发布
07-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值