You can estimate the monitors set resolution with sys_metrics(0), sys_metrics(1). The ratio is width/height => sys_metrics(0)/sys_metrics(1).

All supported resolutions of the monitor you can estimate with the API-functions EnumDisplaySettings and EnumDisplaySettingsEx.

And just a hint: do not display "black panels". This will look very bad on widescrenn monitors.