Click to See Complete Forum and Search --> : Using WM_MOUSEWHEEL
shubhishubhi
March 8th, 2005, 05:00 AM
How do we use a WM_MOUSEWHEEL message to provide support for scrolling through the mouse.
I tried using this message but it says that the message is undefined.
Please help!!!!!!
ovidiucucu
March 8th, 2005, 05:51 AM
Add
#define _WIN32_WINDOWS 0x0500
before
#include <windows.h>
usman999_1
March 8th, 2005, 06:14 AM
Add
#define _WIN32_WINDOWS 0x0500
before
#include <windows.h>
I would like to suggest that instead of declaring windows version of Win2k or above, better do in the WndProc add a case like
case /* Whatever constant value WM_MOUSEWHEEL represents*/ :
{
}
Hope this helps,
Usman.
NoHero
March 8th, 2005, 06:16 AM
I would like to suggest that instead of declaring windows version of Win2k or above, better do in the WndProc add a case like
case /* Whatever constant value WM_MOUSEWHEEL represents*/ :
{
}
Hope this helps,
Usman.
What if the inner value of WM_MOUSEWHEEL changes? You have a bug that is hard to find. Never ever ... And If I say never, I mean never ... use the inner value of a windows constant directly.. The solution Ovidiu posted is the best in this case.
usman999_1
March 8th, 2005, 06:32 AM
What if the inner value of WM_MOUSEWHEEL changes? You have a bug that is hard to find. Never ever ... And If I say never, I mean never ... use the inner value of a windows constant directly.. The solution Ovidiu posted is the best in this case.
Well, defining or redefining a WinVer has its own drawback. Like for example in GDI Win98 supports TransparentBlt and Win95 doesnt. And when you have defined a WinVer you wont notice unless and until you run it on Win95. And this problem is far more likely to occur then M$ doing a change in constant value. And its just one example. And btw hero, writing never once enough ;).
Hope this helps,
Regards,
Usman.
ovidiucucu
March 8th, 2005, 06:53 AM
Right, just I'm wondering how many people are still using Windows 95. ;)
Anyhow, I got
#define _WIN32_WINDOWS 0x0500
#include <windows.h>
from AFXV_W32.H.
usman999_1
March 8th, 2005, 07:01 AM
Right, just I'm wondering how many people are still using Windows 95. ;)
Well, I try to support Win95 for whatever i write.
Anyhow, I got
#define _WIN32_WINDOWS 0x0500
#include <windows.h>
from AFXV_W32.H.
Well i didnt say that dont do it i.e. redefine WinVer, but it has a drawback that i want the OP to consider also, and if Win95/98/ME is not the target platform then it forsure is the right thing to do & I would have done the same if the application just need to support Win2k & above.
Regards,
Usman.
ovidiucucu
March 8th, 2005, 07:28 AM
Well, not so far, nothing but only .NET stuff will be supported so who'll care about Windows 95? :D ;)
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.