X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/311298e064ec6f1f6a52936fccc78efcd6e2ddae..3cd94a0d119ade811cd876a309cfe6d28b5c36dd:/src/msw/tooltip.cpp diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp index 28bafa0c16..930748cdbf 100644 --- a/src/msw/tooltip.cpp +++ b/src/msw/tooltip.cpp @@ -382,9 +382,11 @@ void wxToolTip::SetWindow(wxWindow *win) // something like this where the derived class can do such things // itself instead of wxToolTip "knowing" about them all wxComboBox *combo = wxDynamicCast(control, wxComboBox); - if ( combo && !(combo->GetWindowStyle() & wxCB_READONLY)) + if ( combo ) { - WXHWND hwndComboEdit = combo->GetEditHWND(); + WXHWND hwndComboEdit = combo->GetWindowStyle() & wxCB_READONLY + ? combo->GetHWND() + : combo->GetEditHWND(); if ( hwndComboEdit ) { Add(hwndComboEdit);