Identifying Mouse Position in Window (OpenInsight Specific)
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