#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
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
}
}