X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/52af3158e974b042008474268570f3bdb7ce95ee..ac66fda2c7c7fff024489594487f047383382071:/src/msw/frame.cpp diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index cbd908ce5a..41b15c2875 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -497,7 +497,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) { wxSysColourChangedEvent event2; event2.SetEventObject( m_frameStatusBar ); - m_frameStatusBar->GetEventHandler()->ProcessEvent(event2); + m_frameStatusBar->HandleWindowEvent(event2); } #endif // wxUSE_STATUSBAR @@ -853,7 +853,7 @@ bool wxFrame::HandlePaint() HDC hdc = ::BeginPaint(GetHwnd(), &ps); // Erase background before painting or we get white background - MSWDefWindowProc(WM_ICONERASEBKGND, (WORD)(LONG)ps.hdc, 0L); + MSWDefWindowProc(WM_ICONERASEBKGND, (WXWPARAM)ps.hdc, 0L); if ( hIcon ) { @@ -946,8 +946,11 @@ bool wxFrame::HandleSize(int WXUNUSED(x), int WXUNUSED(y), WXUINT id) return false; } -bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control) +bool wxFrame::HandleCommand(WXWORD id_, WXWORD cmd, WXHWND control) { + // sign extend to int from short before comparing with the other int ids + int id = (signed short)id_; + if ( control ) { // In case it's e.g. a toolbar. @@ -1016,7 +1019,7 @@ bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu) wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item); event.SetEventObject(this); - return GetEventHandler()->ProcessEvent(event); + return HandleWindowEvent(event); } bool wxFrame::HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup) @@ -1026,7 +1029,7 @@ bool wxFrame::HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup) wxMenuEvent event(evtType, isPopup ? -1 : 0); event.SetEventObject(this); - return GetEventHandler()->ProcessEvent(event); + return HandleWindowEvent(event); } bool wxFrame::HandleInitMenuPopup(WXHMENU hMenu) @@ -1048,7 +1051,7 @@ bool wxFrame::HandleInitMenuPopup(WXHMENU hMenu) wxMenuEvent event(wxEVT_MENU_OPEN, 0, menu); event.SetEventObject(this); - return GetEventHandler()->ProcessEvent(event); + return HandleWindowEvent(event); } #endif // wxUSE_MENUS @@ -1115,7 +1118,7 @@ WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPara const wxIcon& icon = GetIcon(); HICON hIcon = icon.Ok() ? GetHiconOf(icon) : (HICON)GetDefaultIcon(); - rc = (long)hIcon; + rc = (WXLRESULT)hIcon; processed = rc != 0; } break;