From: Daniel Jelinski Subject: comctl: allow label edit only if treeview style allows editing Message-Id: Date: Sat, 2 Jun 2012 07:34:10 +0200 From 21d26b76560f0c15a3d302883efa2d41d940a093 Mon Sep 17 00:00:00 2001 From: Daniel Jelinski Date: Sat, 2 Jun 2012 07:23:32 +0200 Subject: comctl: allow label edit only if treeview style allows editing Native comctl behaves this way - noticed when debugging regedit --- dlls/comctl32/treeview.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 63e3507..8c93f8c 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3810,6 +3810,9 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem) TEXTMETRICW textMetric; TRACE("%p %p\n", hwnd, hItem); + if (!(infoPtr->dwStyle & TVS_EDITLABELS)) + return NULL; + if (!TREEVIEW_ValidItem(infoPtr, hItem)) return NULL; -- 1.7.5.4