comctl32/tests: Fix Monthcal tests failures on some VMs.
This commit is contained in:
parent
9419e97c3e
commit
f935a10add
@ -612,7 +612,9 @@ static LRESULT WINAPI monthcal_subclass_proc(HWND hwnd, UINT message, WPARAM wPa
|
|||||||
static HWND create_monthcal_control(DWORD style)
|
static HWND create_monthcal_control(DWORD style)
|
||||||
{
|
{
|
||||||
WNDPROC oldproc;
|
WNDPROC oldproc;
|
||||||
|
RECT rect;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
|
BOOL ret;
|
||||||
|
|
||||||
hwnd = CreateWindowExA(0, MONTHCAL_CLASSA, "", WS_CHILD | WS_BORDER | WS_VISIBLE | style,
|
hwnd = CreateWindowExA(0, MONTHCAL_CLASSA, "", WS_CHILD | WS_BORDER | WS_VISIBLE | style,
|
||||||
0, 0, 300, 400, parent_wnd, NULL, GetModuleHandleA(NULL), NULL);
|
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);
|
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;
|
return hwnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user