gdi32/tests: Use virtual screen size instead of primary monitor screen size.

Dmitry Timoshkov dmitry at codeweavers.com
Tue Feb 8 03:09:45 CST 2011


Peter Urbanec <winehq.org at 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);

-- 
Dmitry.



More information about the wine-devel mailing list