comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to get the position of mouse
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to get the position of mouse [message #32737] Tue, 05 November 2002 06:04 Go to previous message
Roberto Monaco is currently offline  Roberto Monaco
Messages: 11
Registered: August 2002
Junior Member
(a) If you are within an event handler xxx (motion, or click events), the
information you need is in the structure event:
PRO xxx, event
...
mouse_x = event.x
mouse_y = event.y
...
Look at event.press and event.release if you want to know which button was
pressed - these are bitmaps (0=none motion-event, 1=left, 2=center, 4=right)

(b) if you call the function cursor, you pass two variables (x,y) that in
return contain the position of the mouse - the structure !mouse.button
contains the bitmap as above

Regards,
Roberto

"lily_zhang" <fengliza@sina.com> wrote in message
news:19870040.0211050436.2105e396@posting.google.com...
> I display an image on the screen first, and then intend to get the
> coordinate of mouse when I depress the left button of it. Would you
> tell me how to realize it?
[Message index]
 
Read Message
Read Message
Previous Topic: How to get the position of mouse
Next Topic: Re: gurus: example code as main level code ?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 08:26:13 PDT 2025

Total time taken to generate the page: 1.44028 seconds