fixed wxEVT_CONTEXT_MENU generation (it works differently under w2k/XP than under NT4 apparently...) (partly fixes bug 861510)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-02-08 15:38:54 +00:00
parent 98b100e271
commit 2d1715aa46

View File

@ -2866,8 +2866,20 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
wxPoint pt(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, GetId(), pt);
evtCtx.SetEventObject(this);
processed = GetEventHandler()->ProcessEvent(evtCtx);
// we could have got an event from our child, reflect it back
// to it if this is the case
wxWindow *win = NULL;
if ( wParam != m_hWnd )
{
win = FindItemByHWND((WXHWND)wParam);
}
if ( !win )
win = this;
evtCtx.SetEventObject(win);
processed = win->GetEventHandler()->ProcessEvent(evtCtx);
}
break;
#endif