On Thu, Jun 07, 2018 at 05:21:25PM +0800, Jactry Zeng wrote:
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.
Ok, then please pass the client rect to CHECK_TXGETNATURALSIZE so that it doesn't need to be queried from there.
Also, this patch series seems out-of-order. Perhaps move 0001 after 0002 and 0003 (or put 0004 before 0002 and 0003).
Huw.