Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Handling mousewheel events...

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Handling mousewheel events...
#4755
Posted by: 2004-07-08 04:16:39
I want to either increment or decrement a variable based on which way the mousewheel is turned. Right now, I catch an EVT_MOUSEWHEEL event and in my OnMousewheel function I check the sign of event.GetWheelRotation to determine if I will increment or decrement my variable.

That, however, doesn't seem to work. So, does anyone know if that is the correct way of handling a mousewheel event for my purposes? Because if it is I'll at least know the problem is elsewhere.

Thanks
Message2. Re: Handling mousewheel events...
#4768
Posted by: bec 2004-07-09 08:59:50
Hi there..

I also have code to do a similar thing. But checking the value of

delta = event.GetWheelRotation()/event.GetWheelDelta();

does the job for me..

What values for event.GetWheelRotation() and event.GetWheelDelta() are you getting?

Cheer Bec.



Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥1,580.00 ·
 
 
¥288.00 ·
 
 
¥1,380.00 ·
 
 
¥908.00 ·
 
 
¥317.00 ·
 
 
¥1,480.00 ·
© Wed 2024-11-6  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0