Click to See Complete Forum and Search --> : Flushing mouse events
^Johnny2Bad
June 30th, 2007, 03:07 AM
Hi,
This is more an attempt to try and get my other post "selecting multiple textboxes" to go.
How do you flush mouse input? So if I have dragged across a textbox selecting text and move out of the bounds of the textbox, how do I flush the mouse input so that the PC thinks the mouse left mouse button is no longer down (although it actually is).
Thanking you in advance,
Jonathan.
Krishnaa
July 2nd, 2007, 09:37 AM
There is nothing called "flushing the mouse", can you describe what you are trying to achieve ?
^Johnny2Bad
July 4th, 2007, 09:57 AM
Okay, basically I have a series of 4 textboxes in a row. I want too find a simple way to enable selecting text across the textboxes. So you click the left mouse button select the text in the 1st textbox, then move onto the 2nd one and it continues to select text in the 2nd textbox and so on.
The reason I wanted to "flush the mouse messages" is because I made an event OnMoveOut linked too the MouseMove event that is triggered when the pointer moves out of the bounds of a given text box, should it's position go into the next textbox focus and capture is given too the following textbox. Unfortunatley because the system is still hung up by the initial mousedown event, I cannot get natural selection happening in the following textbox.
If I could somehow tell the computer that the left mouse button is no longer being pressed down I could raise another MouseDown for the new textbox. Thus the question about flushing the event queue.
Thanks,
Jonathan.
Krishnaa
July 4th, 2007, 10:02 AM
You can try Subclassing the Edit control (http://www.pluralsight.com/articlecontent/cpprep0797.htm), and trap the mouse leave or focus leave message and return from there, so that the Edit's WindowProc wont get it to process... I am not sure but this should work.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.