comctl: allow label edit only if treeview style allows editing

Daniel Jelinski djelinski1 at gmail.com
Sat Jun 2 00:34:10 CDT 2012


-------------- next part --------------
From 21d26b76560f0c15a3d302883efa2d41d940a093 Mon Sep 17 00:00:00 2001
From: Daniel Jelinski <djelinski1 at gmail.com>
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


More information about the wine-patches mailing list