Huw Davies huw@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.