Commit 2d7aa093 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/tests: Add separate test for CreateUpDownControl().

parent 9e66be57
......@@ -800,6 +800,29 @@ static void test_UDS_SETBUDDYINT(void)
DestroyWindow(updown);
}
static void test_CreateUpDownControl(void)
{
HWND updown, buddy;
DWORD range, pos;
RECT rect;
GetClientRect(parent_wnd, &rect);
updown = CreateUpDownControl(WS_CHILD | WS_BORDER | WS_VISIBLE,
0, 0, rect.right, rect.bottom, parent_wnd, 1, GetModuleHandleA(NULL), g_edit, 100, 10, 50);
ok(updown != NULL, "Failed to create control.\n");
buddy = (HWND)SendMessageA(updown, UDM_GETBUDDY, 0, 0);
ok(buddy == g_edit, "Unexpected buddy window.\n");
range = SendMessageA(updown, UDM_GETRANGE, 0, 0);
ok(range == MAKELONG(100, 10), "Unexpected range.\n");
pos = SendMessageA(updown, UDM_GETPOS, 0, 0);
ok(pos == MAKELONG(50, 1), "Unexpected position.\n");
DestroyWindow(updown);
}
START_TEST(updown)
{
HMODULE mod = GetModuleHandleA("comctl32.dll");
......@@ -821,6 +844,7 @@ START_TEST(updown)
test_updown_base();
test_updown_unicode();
test_UDS_SETBUDDYINT();
test_CreateUpDownControl();
DestroyWindow(g_edit);
DestroyWindow(parent_wnd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment