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:
Vadim Zeitlin
2001-05-21 00:17:04 +00:00
parent 889f0b7c67
commit 4cdc2c137e

View File

@@ -2201,6 +2201,7 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
rc.result = TRUE;
}
break;
#ifdef __WIN32__
case WM_HELP:
{
@@ -2212,13 +2213,19 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
bool eventProcessed = FALSE;
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);
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();
}
processed = eventProcessed;
}
else if (info->iContextType == HELPINFO_MENUITEM)
@@ -2228,28 +2235,27 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
processed = GetEventHandler()->ProcessEvent(helpEvent);
}
else processed = FALSE;
break;
//else: processed is already FALSE
}
break;
case WM_CONTEXTMENU:
{
HWND hWnd = (HWND) wParam;
// we don't convert from screen to client coordinates as
// 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);
GetEventHandler()->ProcessEvent(contextEvent);
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, GetId(), pt);
GetEventHandler()->ProcessEvent(evtCtx);
// set processed to true even if the event is not handled because if we don't
// windows will propogate the WM_CONTEXTMENU up the parent window chain, which
// we have already done ourselves.
// set processed to true even if the event is not handled
// because if we don't windows will propogate the
// WM_CONTEXTMENU up the parent window chain, which we have
// already done ourselves.
processed = true;
break;
}
#endif
break;
#endif // __WIN32__
}
if ( !processed )
@@ -4006,6 +4012,7 @@ void wxSetKeyboardHook(bool doIt)
else
{
UnhookWindowsHookEx(wxTheKeyboardHook);
// avoids warning about statement with no effect (FreeProcInstance
// doesn't do anything under Win32)
#if !defined(WIN32) && !defined(_WIN32) && !defined(__WIN32__) && !defined(__NT__) && !defined(__GNUWIN32__)