diff --git a/include/wx/univ/control.h b/include/wx/univ/control.h index 8a623da0ed..f6b4f66645 100644 --- a/include/wx/univ/control.h +++ b/include/wx/univ/control.h @@ -79,7 +79,10 @@ public: return m_indexAccel == -1 ? wxT('\0') : (wxChar)m_label[m_indexAccel]; } - virtual wxWindow *GetInputWindow() const wxOVERRIDE { return (wxWindow*)this; } + virtual wxWindow *GetInputWindow() const wxOVERRIDE + { + return const_cast(this); + } protected: // common part of all ctors