X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78cd9c69eb3f4c158fe10ce49325d57ec05d1306..51146826fc0a0a949d88f23fb9d83fc1f1ada14e:/src/msw/window.cpp?ds=sidebyside diff --git a/src/msw/window.cpp b/src/msw/window.cpp index cc05d86fca..3fd01af496 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1442,7 +1442,7 @@ void wxWindowMSW::OnInternalIdle() } #endif // !HAVE_TRACKMOUSEEVENT - if (wxUpdateUIEvent::CanUpdate(this)) + if (wxUpdateUIEvent::CanUpdate(this) && IsShown()) UpdateWindowUI(wxUPDATE_UI_FROMIDLE); } @@ -3262,9 +3262,9 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l { rect = *((RECT*)lParam); } - wxUxThemeHandle hTheme(this, L"EDIT"); + wxUxThemeHandle hTheme((wxWindow *)this, L"EDIT"); RECT rcClient = { 0, 0, 0, 0 }; - wxClientDC dc(this); + wxClientDC dc((wxWindow *)this); if (theme->GetThemeBackgroundContentRect( hTheme, GetHdcOf(dc), EP_EDITTEXT, ETS_NORMAL, @@ -3290,8 +3290,8 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l rc.result = MSWDefWindowProc(message, wParam, lParam); processed = true; - wxUxThemeHandle hTheme(this, L"EDIT"); - wxWindowDC dc(this); + wxUxThemeHandle hTheme((wxWindow *)this, L"EDIT"); + wxWindowDC dc((wxWindow *)this); // Clip the DC so that you only draw on the non-client area RECT rcBorder; @@ -4871,8 +4871,11 @@ bool wxWindowMSW::HandleGetMinMaxInfo(void *WXUNUSED_IN_WINCE(mmInfo)) // command messages // --------------------------------------------------------------------------- -bool wxWindowMSW::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control) +bool wxWindowMSW::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 wxUSE_MENUS_NATIVE if ( !cmd && wxCurrentPopupMenu ) { @@ -4895,8 +4898,7 @@ bool wxWindowMSW::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control) // try the id if ( !win ) { - // must cast to a signed type before comparing with other ids! - win = FindItem((signed short)id); + win = FindItem(id); } if ( win )