Commit f935a10a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/tests: Fix Monthcal tests failures on some VMs.

parent 9419e97c
......@@ -612,7 +612,9 @@ static LRESULT WINAPI monthcal_subclass_proc(HWND hwnd, UINT message, WPARAM wPa
static HWND create_monthcal_control(DWORD style)
{
WNDPROC oldproc;
RECT rect;
HWND hwnd;
BOOL ret;
hwnd = CreateWindowExA(0, MONTHCAL_CLASSA, "", WS_CHILD | WS_BORDER | WS_VISIBLE | style,
0, 0, 300, 400, parent_wnd, NULL, GetModuleHandleA(NULL), NULL);
......@@ -625,6 +627,13 @@ static HWND create_monthcal_control(DWORD style)
SendMessageA(hwnd, WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT), 0);
/* make sure calendar grid is 2x1 */
ret = SendMessageA(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&rect);
ok(ret, "got %d\n", ret);
ret = SetWindowPos(hwnd, NULL, 0, 0, rect.right * 5 / 2, rect.bottom * 3 / 2, SWP_NOMOVE);
ok(ret, "got %d\n", ret);
return hwnd;
}
......
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