X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..4fa0a5b44341885a0886f2ae6723d2441bd1f62f:/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 } }