每当中加入WM_MOUSEWHEEL消息就会出错,说没有定义,各位前辈指导一下.
解决方案 »
- MFC编程关于最小化到系统托盘
- 以Use MFC in a Static Library编译时报错,而以use mfc in shared dll时编译正常
- 小菜求教:控件清空问题怎样解决
- 问一个有趣的问题。进度条的
- C++ 有JAVA的URLDECODE类吗? 谢谢了
- 请高手!!!如何获得一组汉字的拼音首字母串???
- 碰到过字符编码的问题吗?请教针对各种比如unicode utf等编码文件进行检测、操作的代码!
- 问一个严重问题: vc7建的工程能否再转到vc6 ????
- 我的对话框中有个列表框CListBox m_list1;但往里面插数据,是默认排序的,我不要它排序怎么办?
- 赠送用Driver Studio开发的PCL-841驱动程序源代码
- vc复制代码总是出错,重新打开就会正常
- 顿悟:做人比写程序重要 ---- 与兄弟姐妹们共勉
#define _WIN32_WINNT 0x0400 //<--这里改成0x0400
如楼上,或者更高
E:\vc++\System\System.cpp(70) : error C2051: case expression not constant
E:\vc++\System\System.cpp(86) : error C2065: 'SPI_GETWHEELSCROLLLINES' : undeclared identifier
E:\vc++\System\System.cpp(90) : error C2065: 'WHEEL_DELTA' : undeclared identifier
Error executing cl.exe.System.exe - 4 error(s), 0 warning(s)
错误提示是这样的.
文件头加一行#include <winuser.h>试试
加上这句应该就可以了
加了这个就可以了
#define _WIN32_WINNT 0x0500
1>------ Rebuild All started: Project: 1009.pm, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project '1009.pm', configuration 'Debug|Win32'
1>Compiling...
1>1009.cpp
1>f:\c++hou\1009.pm\1009.pm\1009.cpp(48) : warning C4244: 'return' : conversion from 'WPARAM' to 'int', possible loss of data
1>f:\c++hou\1009.pm\1009.pm\1009.cpp(82) : error C2065: 'SPI_GETWHEELSCROLLLINES' : undeclared identifier
1>f:\c++hou\1009.pm\1009.pm\1009.cpp(87) : error C2065: 'WHEEL_DELTA' : undeclared identifier
1>Build log was saved at "file://f:\c++hou\1009.pm\1009.pm\Debug\BuildLog.htm"
1>1009.pm - 2 error(s), 1 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
更改win的宏就可以了
一般是_WIN32_WINNT>0x0400才会执行,
因此需要手动修改_WIN32_WINNT的值,以保证所调用的函数能正确执行