X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9717bd5d8ff2e3ff91d99d44850b1d2485f5edf..8d7490018a47f60149a35ced6f880ec834aba471:/src/msw/combobox.cpp diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index bd3650dc3b..bb65134622 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -396,12 +396,9 @@ bool wxComboBox::MSWShouldPreProcessMessage(WXMSG *pMsg) WXHWND wxComboBox::GetEditHWNDIfAvailable() const { - POINT pt = { 4, 4 }; - WXHWND hWndEdit = (WXHWND)::ChildWindowFromPoint(GetHwnd(), pt); - if ( hWndEdit == GetHWND() ) - hWndEdit = NULL; - - return hWndEdit; + // we assume that the only child of the combobox is the edit window so it's + // unnecessary to pass "EDIT" as class name parameter + return (WXHWND)::FindWindowEx(GetHwnd(), NULL, NULL, NULL); } WXHWND wxComboBox::GetEditHWND() const @@ -610,12 +607,12 @@ void wxComboBox::OnUpdatePaste(wxUpdateUIEvent& event) void wxComboBox::OnUpdateUndo(wxUpdateUIEvent& event) { - event.Enable( CanUndo() ); + event.Enable( IsEditable() && CanUndo() ); } void wxComboBox::OnUpdateRedo(wxUpdateUIEvent& event) { - event.Enable( CanRedo() ); + event.Enable( IsEditable() && CanRedo() ); } void wxComboBox::OnUpdateDelete(wxUpdateUIEvent& event)