XPLMSetWindowGeometry

XPLM_API void       XPLMSetWindowGeometry(
                         XPLMWindowID         inWindowID,    
                         int                  inLeft,    
                         int                  inTop,    
                         int                  inRight,    
                         int                  inBottom);    

This routine allows you to set the position and size of a window.

The units and coordinate system match those of XPLMGetWindowGeometry(). That is, modern windows use global desktop boxel coordinates, while legacy windows use pixels relative to the main X-Plane display.

Note that this only applies to “floating” windows (that is, windows that are drawn within the X-Plane simulation windows, rather than being “popped out” into their own first-class operating system windows). To set the position of windows whose positioning mode is xplm_WindowPopOut, you’ll need to instead use XPLMSetWindowGeometryOS().