From 30f5e34f64643b6157b41521fb5fb822138fb548 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 28 Dec 2004 16:00:35 +0000 Subject: [PATCH 1/1] Added TREE_ITEM_MENU event to MSW control. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/treectrl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index ac8c5f927a..b74ae1f2ae 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2219,6 +2219,16 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara WXLRESULT rc = 0; bool isMultiple = (GetWindowStyle() & wxTR_MULTIPLE) != 0; + if (nMsg == WM_CONTEXTMENU) + { + wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_MENU, GetId() ); + event.m_item = GetSelection(); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent( event ); + + return rc; + } + if ( (nMsg >= WM_MOUSEFIRST) && (nMsg <= WM_MOUSELAST) ) { // we only process mouse messages here and these parameters have the -- 2.47.2