From c7c8994f3579e624c1b0ceb353ab6c0208881e47 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Tue, 6 Dec 2016 10:25:27 +0000 Subject: [PATCH] comctl32: Recompute the text width if necessary. Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/comctl32/treeview.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 0a155bbafd9..74206bdc3ca 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3703,6 +3703,9 @@ TREEVIEW_HitTest(const TREEVIEW_INFO *infoPtr, LPTVHITTESTINFO lpht) return NULL; } + if (!item->textWidth) + TREEVIEW_ComputeTextWidth(infoPtr, item, 0); + if (x >= item->textOffset + item->textWidth) { lpht->flags = TVHT_ONITEMRIGHT;