Fix blank wxComboBox appearance broken by the changes of r75134.

We didn't repaint the owner drawn combobox items any more because they were
not found by MSWFindItem().

Fix this by restricting the check to the real windows with the same ID as the
combobox, not the dropdown items which are not windows at all.

See #15674.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-11-15 15:26:21 +00:00
parent 09f15c1640
commit 3e8b0d8144

View File

@@ -683,7 +683,7 @@ wxWindow *wxComboBox::MSWFindItem(long id, WXHWND hWnd) const
// our own one. So we must explicitly check the HWND value too here and
// avoid eating the events from the listbox as otherwise it is rendered
// inoperative, see #15647.
if ( id == GetId() && hWnd != GetHWND() )
if ( id == GetId() && hWnd && hWnd != GetHWND() )
{
// Must be the case described above.
return NULL;