1. getting mouse messages when mouse is outside of my window
------=_NextPart_000_0018_01C0159E.5CFBDD40
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
Does any body know how do I still receive mouse messages even if the =
mouse is not in my winodw? For example, if you draw a line in =
PaintShopPro drawing program, you can go anywhere on screen with your =
mouse while you have left mouse button down, and the line will follow =
you.
------=_NextPart_000_0018_01C0159E.5CFBDD40
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-2" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DVerdana size=3D2>Does any body know how do I still =
receive mouse=20
messages even if the mouse is not in my winodw? For example, if you draw =
a line=20
in PaintShopPro drawing program, you can go anywhere on screen with your =
mouse=20
while you have left mouse button down, and the line will follow=20
------=_NextPart_000_0018_01C0159E.5CFBDD40--
2. Re: getting mouse messages when mouse is outside of my window
> Does any body know how do I still receive mouse messages even if the mouse is
> not in my winodw? For example, if you draw a line in PaintShopPro drawing
> program, you can go anywhere on screen with
> your mouse while you have left mouse button down, and the line will follow
> you.
Hi,
mouse.ew, which i posted to the yesterday, has mouse_GetPos() which
you can use to get the position of the mouse, wherever it is on the
screen. It uses GetCursorPos from User32.dll.
Thomas Parslow (PatRat) ICQ #:26359483
Rat Software
http://www.ratsoft.freeserve.co.uk/
Please leave quoted text in place when replying
3. Re: getting mouse messages when mouse is outside of my window
=A9koda wrote:
> Does anybody know how do I still receive mouse
> messages even if the mouse is not in my window?
> For example, if you draw a line in PaintShopPro
> drawing program, you can go anywhere on screen
> with your mouse while you have left mouse button
> down, and the line will follow you.
Thomas was right about GetCursorPos, but dragging the mouse (holding down
the left button and moving the mouse) is a special case in Windows. For t=
his
case, you can use captureMouse, which does works by calling the Win32
SetCapture routine. All mouse events will be returned to your window, as
long as the mouse is being dragged (left button is held down).
There _is_ an exception to this, but it's a quite rare. If a modal dialog
box comes up, it can capture the mouse from you, even if you've grabbed t=
he
mouse. In these cases, it will first issue a WM_CAPTURECHANGED event to y=
our
application to warn you that you are about to lose the mouse. I only ment=
ion
this for completeness; I doubt it will happen in reality.
-- David Cuny