Robert Shearman <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]