C++未定义标识符CWinApp等问题

文章讲述了在开发过程中遇到未定义标识符CWinApp、AfxWinInit和HMODULE的问题,提出检查Vs2017安装时是否选择了相关选项,若未选则添加,如仍存在问题,可能需要引入相应的头文件。解决方法涉及使用工具->获取工具和功能。

问题:未定义标识符CWinApp、未定义标识符AfxWinInit、未定义标识符HMODULE

解决办法:首先查看Vs2017安装的时候没有勾选这些选项,没有就勾选下载,问题应该能解决,如果没有解决,尝试引入相应头文件。

工具->获取工具和功能

拼写错误 - Application 不是单词 拼写错误 - Application 不是单词 拼写错误 - Data 不是单词 拼写错误 - Exchange 不是单词 拼写错误 - Application 不是单词 拼写错误 - Dialog 不是单词 拼写错误 - gdiplus 不是单词 拼写错误 - Startup 不是单词 拼写错误 - Input 不是单词 拼写错误 - gdiplus 不是单词 拼写错误 - Token 不是单词 拼写错误 - Paint 不是单词 拼写错误 - Icon 不是单词 拼写错误 - Icon 不是单词 可以将成员函数设为常量。 拼写错误 - Application 不是单词 拼写错误 - Application 不是单词 拼写错误 - CMFC 不是单词 拼写错误 - Application 不是单词 拼写错误 - CMFC 不是单词 拼写错误 - Application 不是单词 拼写错误 - Data 不是单词 拼写错误 - Exchange 不是单词 拼写错误 - Icon 不是单词 拼写错误 - Dialog 不是单词 拼写错误 - Paint 不是单词 拼写错误 - Query 不是单词 拼写错误 - Drag 不是单词 拼写错误 - Icon 不是单词 拼写错误 - Button 不是单词 类型转换无效 未定义标识符 "Graphics" 应输入“;” 未定义标识符 "Color" "Gdiplus::SolidBrush::SolidBrush(const Gdiplus::SolidBrush &)" (已声明 所在行数:154,所属文件:"C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um\gdiplusbrush.h") 不可访问 未定义标识符 "graphics" 未定义标识符 "StringAlignmentCenter" 未定义标识符 "RectF" 拼写错误 - Draw 不是单词 拼写错误 - Item 不是单词 拼写错误 - Draw 不是单词 拼写错误 - Item 不是单词 拼写错误 - Struct 不是单词 拼写错误 - back 不是单词 拼写错误 - Brush 不是单词 拼写错误 - text 不是单词 拼写错误 - Brush 不是单词 拼写错误 - border 不是单词 拼写错误 - corner 不是单词 拼写错误 - Radius 不是单词 拼写错误 - path 不是单词 拼写错误 - Text 不是单词 拼写错误 - Font 不是单词 拼写错误 - font 不是单词 拼写错误 - format 不是单词 “类型强制转换”: 无法从“void (__cdecl CMyButton::* )(LPDRAWITEMSTRUCT)”转换为“WORD” “static_cast”: 无法从“void (__cdecl CMyButton::* )(LPDRAWITEMSTRUCT)”转换为“AFX_PMSG” “_messageEntries”: 必须初始化 const 对象 “Graphics”: 未声明的标识符 语法错误: 缺少“;”(在标识符“graphics”的前面) “graphics”: 找不到标识符 “Color”: 找不到标识符 “Gdiplus::SolidBrush::SolidBrush”: 无法访问 private 成员(在“Gdiplus::SolidBrush”类中声明) “Color”: 找不到标识符 “Gdiplus::SolidBrush::SolidBrush”: 无法访问 private 成员(在“Gdiplus::SolidBrush”类中声明) “Color”: 找不到标识符 “Gdiplus::Pen::Pen”: 对重载函数的调用不明确 “graphics”: 未声明的标识符 “graphics”: 未声明的标识符 “StringAlignmentCenter”: 未声明的标识符 “StringAlignmentCenter”: 未声明的标识符 “graphics”: 未声明的标识符 “RectF”: 找不到标识符 拼写错误 - 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、付费专栏及课程。

余额充值