]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
fix for GTK assertion from gtk_widget_set_colormap, bug 1882040
[wxWidgets.git] / src / msw / combobox.cpp
index c6a03a07cc2ee1df107a899b387ef906de6a1ad2..bb651346225a7cbe8d9aa2ff066f8db3700fbdda 100644 (file)
@@ -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