diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 61f819e18b3..b22db1c0209 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -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; }