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

This commit is contained in:
Peter Urbanec 2011-02-09 13:08:50 +11:00 committed by Alexandre Julliard
parent ba6bdf9fd6
commit b8e1a19a1d
1 changed files with 6 additions and 2 deletions

View File

@ -413,8 +413,12 @@ static void test_window_dc_clipping(void)
RECT rc;
int ret, screen_width, screen_height;
screen_width = GetSystemMetrics(SM_CXSCREEN);
screen_height = GetSystemMetrics(SM_CYSCREEN);
/* Windows versions earlier than Win2k do not support the virtual screen metrics,
* so we fall back to the primary screen metrics. */
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);
trace("screen resolution %d x %d\n", screen_width, screen_height);