Re: SetCapture before mouse click is made
- From: "Dave O." <nobody@xxxxxxxxxxx>
- Date: Mon, 31 Jul 2006 15:38:28 +0100
One possible way would be to cheat
Create a borderless form the same size as the screen (you may need to muck
about a bit where the task bar lives) on that form place a screen grab of
the entire screen so you now have an inactive representation of the screen
onto which you can draw anything you want. Once you have the coordinates
kill the form and get on with whatever you have to do.
Regards
Dave O.
"Robert" <noone@xxxxxxxxxxx> wrote in message
news:OfBXKpKtGHA.4140@xxxxxxxxxxxxxxxxxxxxxxx
Hello all,
I am writing a little application that should allow the user to draw a
lasso
anywhere on the screen, and then receive the screen coordinates of the
lasso.
To do this, I have a small form with a button. Once the user clicks the
button, the mouse pointer should change to a crosshair, and I want to wait
for the next mouse click, to start the lasso anywhere on the screen. Do
get
the mouse click anywhere, I use SetCapture.
Now MSDN states a limitation that "If the mouse cursor is over a window
created by another thread, the system will direct mouse input to the
specified window only if a mouse button is down."
That means my program works if the user start the lasso within my form,
but
not if he starts it anywhere else - in this case I simply get a MouseDown
immediately followed by a MouseUp.
Any ideas how I could solve that?
Thanks!
Robert
.
- Follow-Ups:
- Re: SetCapture before mouse click is made
- From: Robert
- Re: SetCapture before mouse click is made
- References:
- SetCapture before mouse click is made
- From: Robert
- SetCapture before mouse click is made
- Prev by Date: Re: WINAPI function for setting screen saver?
- Next by Date: Re: WINAPI function for setting screen saver?
- Previous by thread: SetCapture before mouse click is made
- Next by thread: Re: SetCapture before mouse click is made
- Index(es):