(转自《http://202.117.156.125/index.php/component/content/article/128--sm-mousewheelpresent--undeclared-identifier》原作者邓慧娟错误提示:SYSMETS1.CPPd:\workspace\text\sysmets.h(297) : error C2065: 'SM_MOUSEWHEELPRESENT' : undeclared identifierd:\workspace\text\sysmets.h(301)
: error C2065: 'SM_XVIRTUALSCREEN' : undeclared identifierd:\workspace\text\sysmets.h(305) : error C2065: 'SM_YVIRTUALSCREEN' : undeclared identifierd:\workspace\text\sysmets.h(309) : error C2065: 'SM_CXVIRTUALSCREEN' : undeclared identifierd:\workspace\text\sysmets.h(313)
: error C2065: 'SM_CYVIRTUALSCREEN' : undeclared identifierd:\workspace\text\sysmets.h(317) : error C2065: 'SM_CMONITORS' : undeclared identifierd:\workspace\text\sysmets.h(321) : error C2065: 'SM_SAMEDISPLAYFORMAT' : undeclared identifier解决方法:因为各个window版本所能使用的常量不一样,所以在xp环境下,必须在sysmets1.cpp文件最开始处加入一句:#define
WINVER 0x0501以下是windows其他版本号: windows server 2003 winver>=0x0502 windows xp winver>=0x0501 windows 2000 winver>=0x0500 windows nt 4.0 winver>=0x0400 windows me winver>=0x0500 windows 98 winver>=0x0410 windows 95 winver>=0x0400
Windows程序设计:'SM_ MOUSEWHEELPRESENT' : undeclared identifier解决办法
最新推荐文章于 2023-04-03 22:30:00 发布
本文详细介绍了在Windows XP环境下使用C++开发时遇到的错误C2065问题,并提供了相应的解决方法。通过加入特定的预定义宏WINVER,可以确保代码在不同Windows版本下正常运行。
5418

被折叠的 条评论
为什么被折叠?



