diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index 6879d41cbe..a9bfc5ceb6 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -379,7 +379,7 @@ void wxVListBox::OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const flags |= wxCONTROL_SELECTED; if ( IsCurrent(n) ) flags |= wxCONTROL_CURRENT; - if ( wxWindow::FindFocus() == this ) + if ( wxWindow::FindFocus() == wx_const_cast(wxVListBox*, this) ) flags |= wxCONTROL_FOCUSED; wxRendererNative::Get().DrawItemSelectionRect( diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index 7066746015..09ca6f4727 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -242,7 +242,7 @@ void wxHtmlHelpFrame::OnAbout(wxCommandEvent& event) // remains opened bool wxHtmlHelpFrame::ShouldPreventAppExit() const { - return (this == wxTheApp->GetTopWindow()); + return (wx_const_cast(wxHtmlHelpFrame*, this) == wxTheApp->GetTopWindow()); } #endif // wxUSE_WXHTML_HELP