Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I write a class that derived from CWnd to control a custom control.

The OnVScroll event can be catched, but the OnMouseWheel can not.

How to make the class catch the event when mouse wheel moves?
Posted
Comments
ColbyZhouCoding 26-Jul-13 3:58am    
Are you sure you use it in a custom control, and the class that related to the control is derived from CWnd?

I just add the OnMouseWheel event the same way I add OnVScrol. I set a break point in OnMouseWheel method and scroll my mouse when I debug, it just does not go in! But the OnVScrol event does!

I don't know what I have done wrong.

1 solution

I's caught without a problem. Please see: http://msdn.microsoft.com/en-us/library/eff58fe7%28v=vs.80%29.aspx[^].

You might have done something wrong, hard to say without seeing your code sample, which you did not bother to show. So, sorry, but you got only as much of advice as you asked for.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900