Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 09 FEB 2001 11:49:46AM d schranz wrote:

I need to identify the actual position of the mouse in a particular window, without the user needing the click on any of the mouse buttons.

I would require the X and Y co-ordinates.

Is this Possible?

Thanks for your Help.

David Schranz


At 09 FEB 2001 12:22PM Oystein Reigem wrote:

David,

At least some places in the window. Here's how to detect mouse position when over the window background:

Put the following in the window's CREATE handler:

equ WM_MOUSEMOVE$ to 512 /* 512=hex 0200 */

declare function Send_Message

unUsed=Send_Message( @Window, 'QUALIFY_EVENT', WM_MOUSEMOVE$, 1 )

Put the following in the window's WINMSG handler:

call msg( @Window, mod(lParam, 32768) : " " : int(lParam/32768) )

Now all the time while you move the mouse over the window background an annoying little msg box will pop up with the current coordinates. (And every time you must close the message box - with the Space or Enter key, since you can't use the mouse.)

- Oystein -


At 04 JUL 2003 01:18AM Andrew M Matthews wrote:

Oystein,

Picking up on an old thread, but to get the Y-coord you need to divide lParam by 65536 (not 32768).

Andrew Matthews

iTMS Software

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/cc64be159dc44d6e852569ee005c7290.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1