]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tooltip.cpp
applied MIME patch(es) from Chris Elliott
[wxWidgets.git] / src / msw / tooltip.cpp
index 7189cd9b472a5d026413a27cc00d9a6ebbbf1c86..0dcc94f036857190f63644d007098592e20cb4ae 100644 (file)
@@ -382,12 +382,13 @@ void wxToolTip::SetWindow(wxWindow *win)
     wxComboBox *combo = wxDynamicCast(control, wxComboBox);
     if ( combo )
     {
     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);
         }
         if ( hwndComboEdit )
         {
             Add(hwndComboEdit);
         }
-        //else: it's ok for a combo to be read only, of course
     }
 }
 
     }
 }