Refactor: move wxComboBox::MSWDoPopupOrDismiss() down to wxChoice.

No real changes, just make this method available in wxChoice for the next
commit needs.

See #3113.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-04-05 18:40:15 +00:00
parent 2415cf6725
commit a24fb9f847
4 changed files with 23 additions and 17 deletions

View File

@@ -642,22 +642,6 @@ void wxComboBox::OnUpdateSelectAll(wxUpdateUIEvent& event)
event.Enable(IsEditable() && !wxTextEntry::IsEmpty());
}
void wxComboBox::MSWDoPopupOrDismiss(bool show)
{
wxASSERT_MSG( !HasFlag(wxCB_SIMPLE),
wxT("can't popup/dismiss the list for simple combo box") );
// we *must* set focus to the combobox before showing or hiding the drop
// down as without this we get WM_LBUTTONDOWN messages with invalid HWND
// when hiding it (whether programmatically or manually) resulting in a
// crash when we pass them to IsDialogMessage()
//
// this can be seen in the combo page of the widgets sample under Windows 7
SetFocus();
::SendMessage(GetHwnd(), CB_SHOWDROPDOWN, show, 0);
}
#if wxUSE_TOOLTIPS
void wxComboBox::DoSetToolTip(wxToolTip *tip)