X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f3f9b50aa275243ade3541ecccb95de22cf57a9..96d38a8a71955c5d7f89299b58522557331e450a:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 99bb37b398..3fd01af496 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1286,11 +1286,6 @@ void wxWindowMSW::MSWUpdateStyle(long flagsOld, long exflagsOld) } } -wxBorder wxWindowMSW::GetDefaultBorder() const -{ - return GetDefaultBorderForControl(); -} - wxBorder wxWindowMSW::GetDefaultBorderForControl() const { // we want to automatically give controls a sunken style (confusingly, @@ -1312,6 +1307,11 @@ wxBorder wxWindowMSW::GetDefaultBorderForControl() const #endif } +wxBorder wxWindowMSW::GetDefaultBorder() const +{ + return GetDefaultBorderForControl(); +} + WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const { // translate common wxWidgets styles to Windows ones @@ -1359,11 +1359,14 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const switch ( border ) { - case wxBORDER_DEFAULT: // also wxBORDER_THEME - break; + default: + case wxBORDER_DEFAULT: + wxFAIL_MSG( _T("unknown border style") ); + // fall through case wxBORDER_NONE: case wxBORDER_SIMPLE: + case wxBORDER_THEME: break; case wxBORDER_STATIC: @@ -1379,10 +1382,6 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const style &= ~WS_BORDER; break; - default: - wxFAIL_MSG( _T("unknown border style") ); - break; - // case wxBORDER_DOUBLE: // *exstyle |= WS_EX_DLGMODALFRAME; // break; @@ -1443,7 +1442,7 @@ void wxWindowMSW::OnInternalIdle() } #endif // !HAVE_TRACKMOUSEEVENT - if (wxUpdateUIEvent::CanUpdate(this)) + if (wxUpdateUIEvent::CanUpdate(this) && IsShown()) UpdateWindowUI(wxUPDATE_UI_FROMIDLE); } @@ -3263,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, @@ -3291,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; @@ -4705,7 +4704,7 @@ bool wxWindowMSW::HandleMoving(wxRect& rect) bool wxWindowMSW::HandleEnterSizeMove() { - wxMoveEvent event(wxPoint(), m_windowId); + wxMoveEvent event(wxPoint(0,0), m_windowId); event.SetEventType(wxEVT_MOVE_START); event.SetEventObject(this); @@ -4714,7 +4713,7 @@ bool wxWindowMSW::HandleEnterSizeMove() bool wxWindowMSW::HandleExitSizeMove() { - wxMoveEvent event(wxPoint(), m_windowId); + wxMoveEvent event(wxPoint(0,0), m_windowId); event.SetEventType(wxEVT_MOVE_END); event.SetEventObject(this); @@ -4872,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 ) { @@ -4896,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 ) @@ -5417,7 +5418,7 @@ int wxWindowMSW::HandleMenuChar(int WXUNUSED_IN_WINCE(chAccel), // menu creation code wxMenuItem *item = (wxMenuItem*)mii.dwItemData; - const wxChar *p = wxStrchr(item->GetText().wx_str(), _T('&')); + const wxChar *p = wxStrchr(item->GetItemLabel().wx_str(), _T('&')); while ( p++ ) { if ( *p == _T('&') )