XPLMGetMouseLocation

XPLM_API void       XPLMGetMouseLocation(
                         int *                outX,    /* Can be NULL */
                         int *                outY);    /* Can be NULL */

Deprecated in XPLM300. Modern windows should use XPLMGetMouseLocationGlobal() instead.

This routine returns the current mouse location in pixels relative to the main X-Plane window. The bottom left corner of the main window is (0, 0). Pass NULL to not receive info about either parameter.

Because this function gives the mouse position relative to the main X-Plane window (rather than in global bounds), this function should only be used by legacy windows. Modern windows should instead get the mouse position in global desktop coordinates using XPLMGetMouseLocationGlobal().

Note that unlike XPLMGetMouseLocationGlobal(), if the mouse goes outside the user’s main monitor (for instance, to a pop out window or a secondary monitor), this function will not reflect it.