fix for assert when setting tooltip for a readonly combo (backported from the main branch)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-10-12 00:32:09 +00:00
parent 5a17ae7706
commit 20f07d3994

View File

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