fixed usage of LOWORD/HIWORD instead of GET_[XY]_LPARAM
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2201,6 +2201,7 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
rc.result = TRUE;
|
rc.result = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
case WM_HELP:
|
case WM_HELP:
|
||||||
{
|
{
|
||||||
@@ -2212,13 +2213,19 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
bool eventProcessed = FALSE;
|
bool eventProcessed = FALSE;
|
||||||
while (subjectOfHelp && !eventProcessed)
|
while (subjectOfHelp && !eventProcessed)
|
||||||
{
|
{
|
||||||
wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), wxPoint(info->MousePos.x, info->MousePos.y) ) ; // info->iCtrlId);
|
wxHelpEvent helpEvent(wxEVT_HELP,
|
||||||
|
subjectOfHelp->GetId(),
|
||||||
|
wxPoint(info->MousePos.x,
|
||||||
|
info->MousePos.y) );
|
||||||
helpEvent.SetEventObject(this);
|
helpEvent.SetEventObject(this);
|
||||||
eventProcessed = GetEventHandler()->ProcessEvent(helpEvent);
|
eventProcessed =
|
||||||
|
GetEventHandler()->ProcessEvent(helpEvent);
|
||||||
|
|
||||||
// Go up the window hierarchy until the event is handled (or not)
|
// Go up the window hierarchy until the event is
|
||||||
|
// handled (or not)
|
||||||
subjectOfHelp = subjectOfHelp->GetParent();
|
subjectOfHelp = subjectOfHelp->GetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
processed = eventProcessed;
|
processed = eventProcessed;
|
||||||
}
|
}
|
||||||
else if (info->iContextType == HELPINFO_MENUITEM)
|
else if (info->iContextType == HELPINFO_MENUITEM)
|
||||||
@@ -2228,28 +2235,27 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
processed = GetEventHandler()->ProcessEvent(helpEvent);
|
processed = GetEventHandler()->ProcessEvent(helpEvent);
|
||||||
|
|
||||||
}
|
}
|
||||||
else processed = FALSE;
|
//else: processed is already FALSE
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case WM_CONTEXTMENU:
|
case WM_CONTEXTMENU:
|
||||||
{
|
{
|
||||||
HWND hWnd = (HWND) wParam;
|
|
||||||
|
|
||||||
// we don't convert from screen to client coordinates as
|
// we don't convert from screen to client coordinates as
|
||||||
// the event may be handled by a parent window
|
// the event may be handled by a parent window
|
||||||
wxPoint p(LOWORD(lParam), HIWORD(lParam));
|
wxPoint pt(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||||
|
|
||||||
wxContextMenuEvent contextEvent(wxEVT_CONTEXT_MENU, GetId(), p);
|
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, GetId(), pt);
|
||||||
GetEventHandler()->ProcessEvent(contextEvent);
|
GetEventHandler()->ProcessEvent(evtCtx);
|
||||||
|
|
||||||
// set processed to true even if the event is not handled because if we don't
|
// set processed to true even if the event is not handled
|
||||||
// windows will propogate the WM_CONTEXTMENU up the parent window chain, which
|
// because if we don't windows will propogate the
|
||||||
// we have already done ourselves.
|
// WM_CONTEXTMENU up the parent window chain, which we have
|
||||||
|
// already done ourselves.
|
||||||
processed = true;
|
processed = true;
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#endif
|
break;
|
||||||
|
#endif // __WIN32__
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !processed )
|
if ( !processed )
|
||||||
@@ -4006,6 +4012,7 @@ void wxSetKeyboardHook(bool doIt)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
UnhookWindowsHookEx(wxTheKeyboardHook);
|
UnhookWindowsHookEx(wxTheKeyboardHook);
|
||||||
|
|
||||||
// avoids warning about statement with no effect (FreeProcInstance
|
// avoids warning about statement with no effect (FreeProcInstance
|
||||||
// doesn't do anything under Win32)
|
// doesn't do anything under Win32)
|
||||||
#if !defined(WIN32) && !defined(_WIN32) && !defined(__WIN32__) && !defined(__NT__) && !defined(__GNUWIN32__)
|
#if !defined(WIN32) && !defined(_WIN32) && !defined(__WIN32__) && !defined(__NT__) && !defined(__GNUWIN32__)
|
||||||
|
Reference in New Issue
Block a user