X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..54c7aaca2355973dd33359210b280b4d79d54593:/src/msw/tooltip.cpp diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp index 7189cd9b47..930748cdbf 100644 --- a/src/msw/tooltip.cpp +++ b/src/msw/tooltip.cpp @@ -32,7 +32,7 @@ #include "wx/tooltip.h" #include "wx/msw/private.h" -#if defined(__WIN95__) && (!defined(__GNUWIN32_OLD__) || defined(__MINGW32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif @@ -240,6 +240,8 @@ void wxToolTip::RelayEvent(WXMSG *msg) // ctor & dtor // ---------------------------------------------------------------------------- +IMPLEMENT_ABSTRACT_CLASS(wxToolTip, wxObject) + wxToolTip::wxToolTip(const wxString &tip) : m_text(tip) { @@ -382,12 +384,13 @@ void wxToolTip::SetWindow(wxWindow *win) wxComboBox *combo = wxDynamicCast(control, wxComboBox); if ( combo ) { - WXHWND hwndComboEdit = combo->GetEditHWND(); + WXHWND hwndComboEdit = combo->GetWindowStyle() & wxCB_READONLY + ? combo->GetHWND() + : combo->GetEditHWND(); if ( hwndComboEdit ) { Add(hwndComboEdit); } - //else: it's ok for a combo to be read only, of course } }