[PATCH 1/4 v5] riched20/tests: Rewrite tests for ITextServices_TxGetNaturalSize().
Jactry Zeng
jactry92 at gmail.com
Thu Jun 7 04:21:25 CDT 2018
Huw Davies <huw at codeweavers.com> 于2018年6月7日周四 下午4:54写道:
>
> On Wed, Jun 06, 2018 at 05:24:13PM +0800, Jactry Zeng wrote:
> > Superseded patch 146570.
> >
> > + LONG expected_width, expected_height;
> > +
> > + GetClientRect(WindowFromDC(hdc), &rect);
> > + DrawTextW(hdc, string, -1, &rect, DT_LEFT | DT_CALCRECT | DT_NOCLIP | DT_EDITCONTROL | DT_WORDBREAK);
>
> Why can't you use GetTextExtentPointW() here? This would avoid the
> GetClientRect() call too.
>
In 0003 there are some tests about multiline support. It seems that
using DrawText can make it more simple or we will need to compute
a max width of it by ourselves.
--
Regards,
Jactry Zeng
More information about the wine-devel
mailing list