comctl32/tests: Make the header test dpi aware

Detlef Riekenberg wine.dev at web.de
Thu Nov 13 22:42:20 CST 2008


A lot of tests fail, when dpi is not the default (96).

This patch fix the header test on win98 and w2k for 72, 96, 120, 144 and
192 dpi
Our Implementation calculate the heigh for the control with:
    hdc = GetDC (0);
    hOldFont = SelectObject (hdc, GetStockObject (SYSTEM_FONT));
    GetTextMetricsW (hdc, &tm);
    infoPtr->nHeight = tm.tmHeight + VERT_BORDER;
    SelectObject (hdc, hOldFont);
    ReleaseDC (0, hdc);

VERT_BORDER is still set to 4 (corret value is 2), and hide the wrong
tm.tmHeight of the system font. (see also the failiues in gdi32/fonts)
GetTextMetrics need more research
(I ave no Idea about the code ...)




-- 
 
By by ... Detlef

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-comctl32-tests-Make-the-header-test-dpi-aware.txt
Type: application/mbox
Size: 0 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081114/08c62181/attachment.bin 


More information about the wine-patches mailing list