Fix behaviour of wxComboBox using ID=1000 in wxMSW.

If a wxComboBox was created with ID=1000, clicking in its drop down didn't
work.

It turns out that the native combobox control always creates its dropdown
listbox with the ID of 1000 and that when we were getting LBN_SELCHANGE from
it we mishandled this message because our code mistakenly believed that all
messages from the ID of the control itself were, in fact, coming from this
control, which wasn't the case here.

Fix this by adding a special check for this case in wxComboBox. Also
virtualize the dynamic cast which was done in wxWindow::FindItem() as this
makes the code simpler and allows to get rid of __WXUNIVERSAL__ #ifdef as
well.

Closes #15647.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-11-06 16:59:41 +00:00
parent 462d81dda4
commit 7f0b8fe0db
7 changed files with 53 additions and 20 deletions

View File

@@ -133,6 +133,9 @@ protected:
virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const;
// Override this one to avoid eating events from our popup listbox.
virtual wxWindow *MSWFindItem(long id, WXHWND hWnd) const;
// this is the implementation of GetEditHWND() which can also be used when
// we don't have the edit control, it simply returns NULL then
//