Peter Urbanec winehq.org@urbanec.net wrote:
It seems that GetSystemMetrics(SM_CXVIRTUALSCREEN) is supported on Win2k and later, but not on NT4. Presumably, on an NT4 system, the test could use GetSystemMetrics(SM_CXSCREEN) and it would work as long as there is only one monitor.
What's the proper incantation I need to use to detect NT4 and execute platform specific test code?
Something like this should work:
screen_width = GetSystemMetrics(SM_CXVIRTUALSCREEN); if (!screen_width) screen_width = GetSystemMetrics(SM_CXSCREEN); screen_height = GetSystemMetrics(SM_CYVIRTUALSCREEN); if (!screen_height) screen_height = GetSystemMetrics(SM_CYSCREEN);