win32lib mouse question
- Posted by Mark Brown <mabrown at SENET.COM.AU> Jul 19, 2000
- 382 views
------=_NextPart_000_0005_01BFF125.C47D6760 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all. I have a win32lib question that I know has been asked before. Following an "onMouse" event, is there a simple way to receive another mouse event (like a second mouse button click) from within the onMouse=20 procedure? What I want to do is something simple like click at a point in the = window and draw a line from the first clicked point to whatever the current = mouse position is until the mouse is again clicked (or perhaps the button is released). I have achieved it by hacking at win32lib a bit (got a global to the MSG structure and "fetched" the message) but is there a simpler way? Also, my attempts at using getMousePos() results in the x,y being = different to the actual mouse position. I have a vague memory from the Amiga=20 regarding the difference between screen coords and logical coords and = functions to convert from one to the other. Is this the problem? Many thanks in advance. Mark ------=_NextPart_000_0005_01BFF125.C47D6760 charset="iso-8859-1" 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-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2>Hi all.</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>I have a win32lib question that I know has been = asked=20 before.</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>Following an "onMouse" event, is there a simple way = to receive=20 another</FONT></DIV> <DIV><FONT size=3D2>mouse event (like a second mouse button click) from = within the=20 onMouse </FONT></DIV> <DIV><FONT size=3D2>procedure?</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>What I want to do is something simple like click at = a point in=20 the window</FONT></DIV> <DIV><FONT size=3D2>and draw a line from the first clicked point to = whatever the=20 current mouse</FONT></DIV> <DIV><FONT size=3D2>position is until the mouse is again clicked (or = perhaps the=20 button is</FONT></DIV> <DIV><FONT size=3D2>released).</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>I have achieved it by hacking at win32lib a bit (got = a global=20 to the MSG</FONT></DIV> <DIV><FONT size=3D2>structure and "fetched" the message) but is there a = simpler=20 way?</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>Also, my attempts at using getMousePos() results in = the x,y=20 being different</FONT></DIV> <DIV><FONT size=3D2>to the actual mouse position. I have a vague memory = from the=20 Amiga </FONT></DIV> <DIV><FONT size=3D2>regarding the difference between screen coords and = logical=20 coords and functions</FONT></DIV> <DIV><FONT size=3D2>to convert from one to the other. Is this the=20 problem?</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>Many thanks in advance.</FONT></DIV> <DIV> </DIV> ------=_NextPart_000_0005_01BFF125.C47D6760--