]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tooltip.cpp
corrected use of Print Manager Session APIs for Carbon targets
[wxWidgets.git] / src / msw / tooltip.cpp
index 7189cd9b472a5d026413a27cc00d9a6ebbbf1c86..e8b34e7da0410736529b542dad0b65bd1c8f0c14 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
 
@@ -382,12 +382,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
     }
 }