]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tooltip.cpp
Mac-ify wxTreeCtrl further.
[wxWidgets.git] / src / msw / tooltip.cpp
index 7189cd9b472a5d026413a27cc00d9a6ebbbf1c86..930748cdbf1cf5b33ac47d6beaf93417fbf405fa 100644 (file)
@@ -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 <commctrl.h>
 #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
     }
 }