2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for ScrollWindowEx
5 * PROGRAMMERS: Timo Kreuzer
12 void Test_ScrollWindowEx()
19 hWnd
= CreateWindowW(L
"BUTTON", L
"TestWindow", WS_OVERLAPPEDWINDOW
| WS_VISIBLE
,
20 CW_USEDEFAULT
, CW_USEDEFAULT
, 100, 100,
24 /* Assert that no update region is there */
25 hrgn
= CreateRectRgn(0,0,0,0);
26 Result
= GetUpdateRgn(hWnd
, hrgn
, FALSE
);
27 ok(Result
== NULLREGION
, "Result = %d\n", Result
);
29 Result
= ScrollWindowEx(hWnd
, 20, 0, NULL
, NULL
, NULL
, NULL
, 0);
30 ok(Result
== SIMPLEREGION
, "Result = %d\n", Result
);
31 Result
= GetUpdateRgn(hWnd
, hrgn
, FALSE
);
32 ok(Result
== NULLREGION
, "Result = %d\n", Result
);
34 Result
= ScrollWindowEx(hWnd
, 20, 0, NULL
, NULL
, NULL
, NULL
, SW_INVALIDATE
);
35 ok(Result
== SIMPLEREGION
, "Result = %d\n", Result
);
36 Result
= GetUpdateRgn(hWnd
, hrgn
, FALSE
);
37 ok(Result
== SIMPLEREGION
, "Result = %d\n", Result
);
40 // test invalid update region
42 Result
= ScrollWindowEx(hWnd
, 20, 0, NULL
, NULL
, hrgn
, NULL
, SW_INVALIDATE
);
43 ok(Result
== ERROR
, "Result = %d\n", Result
);
44 hrgn
= CreateRectRgn(0,0,0,0);
47 // Test invalid updaterect pointer
48 Result
= ScrollWindowEx(hWnd
, 20, 0, NULL
, NULL
, NULL
, (LPRECT
)1, SW_INVALIDATE
);
49 ok(Result
== ERROR
, "Result = %d\n", Result
);
50 Result
= GetUpdateRgn(hWnd
, hrgn
, FALSE
);
51 ok(Result
== SIMPLEREGION
, "Result = %d\n", Result
);
53 // test for alignment of rects
59 START_TEST(ScrollWindowEx
)
61 Test_ScrollWindowEx();