]> git.saurik.com Git - wxWidgets.git/commitdiff
Added TREE_ITEM_MENU event to MSW control.
authorRobert Roebling <robert@roebling.de>
Tue, 28 Dec 2004 16:00:35 +0000 (16:00 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 28 Dec 2004 16:00:35 +0000 (16:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/treectrl.cpp

index ac8c5f927a90eedc9e0bba8c4f638e4eecf48f98..b74ae1f2ae25b524821af14eda8e738c48586c0d 100644 (file)
@@ -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