Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. OnMouseWheel() vs OnVScroll()

OnMouseWheel() vs OnVScroll()

Scheduled Pinned Locked Moved C / C++ / MFC
questionvisual-studio
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jesper Knudsen
    wrote on last edited by
    #1

    I'm using mouse wheel as user input in a CWnd. But when vertical scroll bars are on, I'm receiving OnVScroll() messages instead of OnMouseWheel() messages. How can I ignore OnVScroll() messages, and always receive OnMouseWheel() as if the scrollers were not enabled? Thanks

    P 1 Reply Last reply
    0
    • J Jesper Knudsen

      I'm using mouse wheel as user input in a CWnd. But when vertical scroll bars are on, I'm receiving OnVScroll() messages instead of OnMouseWheel() messages. How can I ignore OnVScroll() messages, and always receive OnMouseWheel() as if the scrollers were not enabled? Thanks

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      Jesper Knudsen wrote:

      But when vertical scroll bars are on, I'm receiving OnVScroll() messages instead of OnMouseWheel() messages.

      Do you mean to say that, even if you are using mouse wheel for vertical scrolling, you are getting OnVScroll called ? It should not.

      Jesper Knudsen wrote:

      How can I ignore OnVScroll() messages, and always receive OnMouseWheel() as if the scrollers were not enabled?

      I might have interpreted your question wrongly, but OnVScroll(WM_VSCROLL) will be called only when you use cursor to drag scrollbar. In case on mouse wheel it will not be called. -- modified at 10:48 Monday 11th December, 2006

      Prasad Notifier using ATL | Operator new[],delete[][^]

      J 1 Reply Last reply
      0
      • P prasad_som

        Jesper Knudsen wrote:

        But when vertical scroll bars are on, I'm receiving OnVScroll() messages instead of OnMouseWheel() messages.

        Do you mean to say that, even if you are using mouse wheel for vertical scrolling, you are getting OnVScroll called ? It should not.

        Jesper Knudsen wrote:

        How can I ignore OnVScroll() messages, and always receive OnMouseWheel() as if the scrollers were not enabled?

        I might have interpreted your question wrongly, but OnVScroll(WM_VSCROLL) will be called only when you use cursor to drag scrollbar. In case on mouse wheel it will not be called. -- modified at 10:48 Monday 11th December, 2006

        Prasad Notifier using ATL | Operator new[],delete[][^]

        J Offline
        J Offline
        Jesper Knudsen
        wrote on last edited by
        #3

        Well, I am infact not getting mouse wheel messages, only vscroll. That is, if the scroll bar is on. I think it depends on the mouse driver. Once I got two mice connected. One would send mouse wheel as expected, another would translate wheel messages to vscroll. So I need to break in, where the mouse wheel comes in to reject cscroll messages on mouse wheel.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups