[PATCH 1/2] gdi32: Fix otmfsSelection to have italic style set in case of oblique simulation

Dmitry Timoshkov dmitry at baikal.ru
Tue Feb 9 09:07:41 CST 2016


Nikolay Sivov <nsivov at codeweavers.com> wrote:

> +    hdc = GetDC(0);
> +    hfont = CreateFontIndirectA(lf);
> +    ok(hfont != NULL, "failed to create a font\n");
> +
> +    hfont_old = SelectObject(hdc, hfont);

Please avoid using GetDC(0) for all kinds of graphics tests, this may lead
(inadvertently) to graphics artifacts because it's basically an eqivalent
of CreateDC("display"). I'd suggest to use CreateCompatibleDC(0) instead,
and create a dedicated window if painting is really desired.

-- 
Dmitry.



More information about the wine-devel mailing list