ListBox: Fix LB_SETTABSTOPS (Resend)
Alexandre Julliard
julliard at winehq.org
Sun Jul 10 12:59:59 CDT 2005
Robert Shearman <rob at codeweavers.com> writes:
> @@ -1277,12 +1286,14 @@ static INT LISTBOX_SetFont( LB_DESCR *de
> return 16;
> }
> if (font) oldFont = SelectObject( hdc, font );
> - GetTextMetricsW( hdc, &tm );
> + GetTextExtentPointA( hdc, alphabet, 52, &sz);
> if (oldFont) SelectObject( hdc, oldFont );
> ReleaseDC( descr->self, hdc );
> +
> + descr->avg_char_width = (sz.cx / 26 + 1) / 2;
> if (!IS_OWNERDRAW(descr))
> - LISTBOX_SetItemHeight( descr, 0, tm.tmHeight, FALSE );
> - return tm.tmHeight;
> + LISTBOX_SetItemHeight( descr, 0, sz.cy, FALSE );
> + return sz.cy;
I think tm.tmHeight is a better choice for the height. Do you have
evidence that Windows doesn't use the font metrics here?
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list