Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
+ /* Test that original font is not selected back after painting */ + hdc = CreateCompatibleDC(0); + + prevfont = SelectObject(hdc, hfont2); + SendMessageA(hwnd, WM_PRINTCLIENT, (WPARAM)hdc, 0); + ok(zfont == GetCurrentObject(hdc, OBJ_FONT), "button[%u]: unexpected font selected after WM_PRINTCLIENT %p, " + "expected %p\n", i, GetCurrentObject(hdc, OBJ_FONT), zfont);
The test works by a pure luck. It should check current dc font against prevfont instead of zfont. Changing zfont to DEFAULT_GUI_FONT makes the test fail because of that mistake.
+ prevfont = SelectObject(hdc, hfont2); + SendMessageA(hwnd, WM_PAINT, (WPARAM)hdc, 0); + ok(zfont == GetCurrentObject(hdc, OBJ_FONT), "button[%u]: unexpected font selected after WM_PAINT %p, " + "expected %p\n", i, GetCurrentObject(hdc, OBJ_FONT), zfont);
Same here. -- Dmitry.