Module: wine Branch: master Commit: f935a10add34fa1413df00047c0eebac26df823d URL: http://source.winehq.org/git/wine.git/?a=commit;h=f935a10add34fa1413df00047c...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun Mar 1 21:08:13 2015 +0300
comctl32/tests: Fix Monthcal tests failures on some VMs.
---
dlls/comctl32/tests/monthcal.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 61f819e..b22db1c 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; }