mirror of
https://github.com/reactos/reactos.git
synced 2024-11-09 08:08:38 +00:00
b91657fe81
- link to w32kdll instead of implementing all syscalls as stubs. I will remove the rest of the syscall code as soon as our syscall db is more complete - more TEST -> RTEST - update w32kdll_ros.def - add tests for NtGdiEngCreatePalette, NtGdiEnumFontOpen - Add some gdi handle table code to w32knapi - header cleanup svn path=/trunk/; revision=28619
47 lines
1.3 KiB
C
47 lines
1.3 KiB
C
#include "../user32api.h"
|
|
|
|
INT
|
|
Test_ScrollWindowEx(PTESTINFO pti)
|
|
{
|
|
HWND hWnd;
|
|
HRGN hrgn;
|
|
int Result;
|
|
|
|
/* Create a window */
|
|
hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
|
CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
|
|
NULL, NULL, g_hInstance, 0);
|
|
UpdateWindow(hWnd);
|
|
|
|
/* Assert that no update region is there */
|
|
hrgn = CreateRectRgn(0,0,0,0);
|
|
ASSERT(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION);
|
|
|
|
Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, NULL, 0);
|
|
TEST(Result == SIMPLEREGION);
|
|
TEST(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION);
|
|
|
|
Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, NULL, SW_INVALIDATE);
|
|
TEST(Result == SIMPLEREGION);
|
|
TEST(GetUpdateRgn(hWnd, hrgn, FALSE) == SIMPLEREGION);
|
|
UpdateWindow(hWnd);
|
|
|
|
// test invalid update region
|
|
DeleteObject(hrgn);
|
|
Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, hrgn, NULL, SW_INVALIDATE);
|
|
TEST(Result == ERROR);
|
|
hrgn = CreateRectRgn(0,0,0,0);
|
|
UpdateWindow(hWnd);
|
|
|
|
// Test invalid updaterect pointer
|
|
Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, (LPRECT)1, SW_INVALIDATE);
|
|
TEST(Result == ERROR);
|
|
TEST(GetUpdateRgn(hWnd, hrgn, FALSE) == SIMPLEREGION);
|
|
|
|
// test for alignment of rects
|
|
|
|
DeleteObject(hrgn);
|
|
DestroyWindow(hWnd);
|
|
|
|
return APISTATUS_NORMAL;
|
|
}
|