Re: [PATCH 1/2] gdi32: Fix otmfsSelection to have italic style set in case of oblique simulation
Nikolay Sivov <nsivov(a)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.
Dmitry Timoshkov <dmitry(a)baikal.ru> writes:
Nikolay Sivov <nsivov(a)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(a)winehq.org
participants (2)
-
Alexandre Julliard -
Dmitry Timoshkov