Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to user SetCapture??

93 views
Skip to first unread message

JC Mann

unread,
Mar 27, 1998, 3:00:00 AM3/27/98
to

I'm trying to dynamically draw picture underneath my cursor as it
floats over a TImage...but I'm not receive the OnMouseMove events
fast enough. So, the picture I draw lags behind the cursor position.
I tried to use SetCapture. But this isn't working. When I call
SetCapture(MyForm.Handle) I get a return code of 0, which according
the doc. means it failed. I have to assume it did fail, because I'm
still receive the mouse move events at the same slow rate.

Can you help me?

I look forward to your response.

Thanks.

==
JC Mann

Kurt Barthelmess (TeamB)

unread,
Mar 28, 1998, 3:00:00 AM3/28/98
to

JC -

Assuming the mouse is over your window, the speed at which you get the
WM_MOUSEMOVE messages is going to depend on how busy Windows is.
Calling SetCapture is not going to affect that - you effectively
already have the mouse "captured." As for getting a return code of 0,
that just means no other window has previously captured the mouse.

Keep in mind that the mouse driver has a much higher priority than any
application in the system. There's nothing you can do about that. What
you might be able to do is substitute a different cursor which
includes your "picture". But that will only work if your "picture"
will fit within the systems cursor dimensions.

Good luck.

Kurt

cubic...@gmail.com

unread,
Jan 16, 2014, 7:54:14 AM1/16/14
to
0 new messages