]> git.saurik.com Git - wxWidgets.git/commitdiff
use FindWindowEx() instead of ChildWindowFromPoint() in wxComboBox::GetEditHWNDIfAvai...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Nov 2007 22:34:20 +0000 (22:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Nov 2007 22:34:20 +0000 (22:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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