For years I have been using the API function GetSystemMetrics with Clearwin to get the current screen resolution, in order to decide on the size of graphics windows
Is there a better way? On one of my laptops GetSytemMetrics reports a screen resolution of 1280x720, but Windows says the resolution is actually 1920x1080