From 7dbe942aaaa9a8f32c9f901bdcf83d7941362b71 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 16 Dec 2005 14:52:57 +0000 Subject: [PATCH] Fixed MDI context menu event handling problem (Stefan Kowski) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/msw/mdi.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 4a48055676..be2ad0e647 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -44,6 +44,7 @@ wxMSW: - wxFileDialog respects absence of wxCHANGE_DIR flag under NT (Brad Anderson). - Switching page of a hidden notebook doesn't lose focus (Jamie Gadd). - Removed wxImageList *GetImageList(int) const. +- Fixed MDI context menu problem. wxGTK: diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index b0ec95a99d..ac7afcc3be 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -545,6 +545,14 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd) return win->MSWCommand(cmd, id); } + if (wxCurrentPopupMenu) + { + wxMenu *popupMenu = wxCurrentPopupMenu; + wxCurrentPopupMenu = NULL; + if (popupMenu->MSWCommand(cmd, id)) + return true; + } + // is it one of standard MDI commands? WXWPARAM wParam = 0; WXLPARAM lParam = 0; -- 2.45.2