WM_MOUSEMOVE without mouse movement
-
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
-
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 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.
-
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.
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
-
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
Just for the curious: I found an article which gives an explanation: http://blogs.msdn.com/oldnewthing/archive/2003/10/01/55108.aspx[^]
MS