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

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

  
Forum List • Thread List • 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 • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2022-10-7  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0