Page 1 of 1

WindowMouseX( windownr [ , outside ] )

Posted: Thu Aug 26, 2010 8:43 am
by blueznl
An optional flag for WindowMouseX() and WindowMouse(Y) which would allow reporting of mouse coordinates outside the window.

Example:

A viewer application is open but not full screen. The user pans over a large image, by clicking then dragging the mouse. The mouse events are captured using setcapture. When the mouse leaves the application window, in the current implementation of WindowMouseX() the returned coordinate changes to -1. It would be nice if, when setting the flag to true, it would report the coordinates relative to the window interior, ie. when, for example, 20 pixels left and above the window interior it should report -20 for x, - 20 for y, if the outside flag would be set to true.

This could be simulated by using DesktopMouseX(), but as the relation between WindowMouseX() and DesktopMouseX() is unknown (as it is OS depending) resulting code would not be platform independant.

(But feel free to post your workaround here :-) One of them is calculating dx = DesktopMouseX() - WindowMouseX() and then only keep using DesktopMouseX() - x :-))