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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. WM_MOUSEMOVE without mouse movement

WM_MOUSEMOVE without mouse movement

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 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.
  • M Offline
    M Offline
    Manfred Staiger
    wrote on last edited by
    #1

    Hello everybody, having a DlgItem, for example a a CEdit oder or a CStatic, on a CDialog the CDialog periodically receives WM_MOUSEMOVE messages when the mouse is over the DlgItem without any movement. The coordinates, as expected, don't change. Does anybody have an explanation for this behaviour? Thanks in advance

    MS

    I M 2 Replies Last reply
    0
    • M Manfred Staiger

      Hello everybody, having a DlgItem, for example a a CEdit oder or a CStatic, on a CDialog the CDialog periodically receives WM_MOUSEMOVE messages when the mouse is over the DlgItem without any movement. The coordinates, as expected, don't change. Does anybody have an explanation for this behaviour? Thanks in advance

      MS

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #2

      I expect either windows shoves one at you every now and then, or the mouse driver may be more sensitive than needed. Just a quick thought... If you have the mouse set up one way, slow movements of the mouse are VERY slow movements of the cursor, and fast movements VERY fast - so just a teeny shifting (esp of an optical mouse) may be enough to get the driver to say "I've moved", but not enough to move a pixel. Do you get them when you unplug the mouse? And do you care? You should be able to cope with the user moving the mouse anyway. Iain.

      M 1 Reply Last reply
      0
      • I Iain Clarke Warrior Programmer

        I expect either windows shoves one at you every now and then, or the mouse driver may be more sensitive than needed. Just a quick thought... If you have the mouse set up one way, slow movements of the mouse are VERY slow movements of the cursor, and fast movements VERY fast - so just a teeny shifting (esp of an optical mouse) may be enough to get the driver to say "I've moved", but not enough to move a pixel. Do you get them when you unplug the mouse? And do you care? You should be able to cope with the user moving the mouse anyway. Iain.

        M Offline
        M Offline
        Manfred Staiger
        wrote on last edited by
        #3

        Iain Clarke wrote:

        I expect either windows shoves one at you every now and then, or the mouse driver may be more sensitive than needed.

        That was my first thought too. But when the mouse rests moveless over the dialog client area beside a DlgItem, no WM_MOUSEMOVE messages occur.

        Iain Clarke wrote:

        And do you care? You should be able to cope with the user moving the mouse anyway.

        Since the coordinates don' t change, I can easily filter the wrong messages by comparing the actual coordinates with the last, so it is no problem. But I would be keen to know the reason.

        MS

        1 Reply Last reply
        0
        • M Manfred Staiger

          Hello everybody, having a DlgItem, for example a a CEdit oder or a CStatic, on a CDialog the CDialog periodically receives WM_MOUSEMOVE messages when the mouse is over the DlgItem without any movement. The coordinates, as expected, don't change. Does anybody have an explanation for this behaviour? Thanks in advance

          MS

          M Offline
          M Offline
          Manfred Staiger
          wrote on last edited by
          #4

          Just for the curious: I found an article which gives an explanation: http://blogs.msdn.com/oldnewthing/archive/2003/10/01/55108.aspx[^]

          MS

          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