[2/6]comctl32: fix treeview's NM_RCLICK behavior

Daniel Jelinski djelinski1 at gmail.com
Fri Jul 13 14:57:28 CDT 2012


-------------- next part --------------
From 0851460ae9d3105b9cb1f1097772d09ff38db19e Mon Sep 17 00:00:00 2001
From: Daniel Jelinski <djelinski1 at gmail.com>
Date: Fri, 13 Jul 2012 20:11:38 +0200
Subject: [PATCH 2/6] comctl32: fix treeview's NM_RCLICK behavior

According to MSDN, if NM_RCLICK returns nonzero value, default behavior should be prevented.
Delphi's treeview control depends on that, so does MS SQL Management Studio Express.
Tested with native and builtin comctl32.
---
 dlls/comctl32/treeview.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 9e28ee2..e55c941 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -4257,9 +4257,11 @@ TREEVIEW_RButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
     }
     else
     {
-	TREEVIEW_RButtonUp(infoPtr, &ht.pt);
 	SetFocus(infoPtr->hwnd);
-	TREEVIEW_SendSimpleNotify(infoPtr, NM_RCLICK);
+	if(!TREEVIEW_SendSimpleNotify(infoPtr, NM_RCLICK))
+	{
+	    TREEVIEW_RButtonUp(infoPtr, &ht.pt);
+	}
     }
 
     return 0;
-- 
1.7.5.4


More information about the wine-patches mailing list