[PATCH 1/2] gdi32: Fix otmfsSelection to have italic style set in case of oblique simulation
Alexandre Julliard
julliard at winehq.org
Tue Feb 9 10:30:23 CST 2016
Dmitry Timoshkov <dmitry at baikal.ru> writes:
> 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.
In general you wouldn't want to do drawing tests with
CreateCompatibleDC(0) either, since that's a monochrome device. Of
course as long as you are not drawing, either way is fine.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list