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