XPLM_API void XPLMGetMouseLocation(
int * outX, /* Can be NULL */
int * outY); /* Can be NULL */
This routine returns the current mouse location in cockpit pixels. The bottom left corner of the display is 0,0. Pass NULL to not receive info about either parameter.