Why isn't my app getting mouse wheel tilt messages?

前端 未结 1 1016
终归单人心
终归单人心 2021-01-24 07:18

In this question How to detect mouse wheel tilt an answer is posted and accepted that shows the code needed.

I\'ve implemented that code in my application\'s existing

相关标签:
1条回答
  • 2021-01-24 07:25

    Use Spy++ to check what messages you are receiving.

    EDIT: You can also call m.ToString() in you WndProc method to get the name (!) of the message you've received. (This is done by a giant switch statement in Syetm.Windows.Forms.MessageDecoder.MsgToString)

    Note that the messages might be sent only to whatever control has focus and not to the form itself; if that is the case, you might want to use a message filter.

    Also, note that different mice send different mousewheel messages. I have a Logitech mouse that sends 0x20E with a WParam that is negative for left scroll and positive for right scroll.


    EDIT (in reponse to comments)

    Remember that horizontal scrolling was added long after vertical scrolling and is not supported by older programs. Therefore, the mouse driver could well be looking for horizontal scrollbars and scrolling them explicitly. Try adding a horizontal scrollbar to your form, positioned negatively so the user won't see it, and see if that changes anything.

    0 讨论(0)
提交回复
热议问题