]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
[ 1492053 ] Add wxVListBox style callbacks to wxOwnerDrawnComboBox.
[wxWidgets.git] / src / msw / window.cpp
index 0e3e576eb6f18780dba0bac4d9a4a6ae9f76b507..4dcdf623f0e0278dbcb4fafabaa658a446948c92 100644 (file)
@@ -3042,7 +3042,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
                                     wxEVT_HELP,
                                     GetId(),
 #ifdef __WXWINCE__
-                                    wxGetMousePosition(), // what else?
+                                    wxGetMousePosition() // what else?
 #else
                                     wxPoint(info->MousePos.x, info->MousePos.y)
 #endif
@@ -6243,18 +6243,10 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
     POINT pt2;
     pt2.x = pt.x;
     pt2.y = pt.y;
-    HWND hWndHit = ::WindowFromPoint(pt2);
 
-    wxWindow* win = wxFindWinFromHandle((WXHWND) hWndHit) ;
-    HWND hWnd = hWndHit;
+    HWND hWnd = ::WindowFromPoint(pt2);
 
-    // Try to find a window with a wxWindow associated with it
-    while (!win && (hWnd != 0))
-    {
-        hWnd = ::GetParent(hWnd);
-        win = wxFindWinFromHandle((WXHWND) hWnd) ;
-    }
-    return win;
+    return wxGetWindowFromHWND((WXHWND)hWnd);
 }
 
 // Get the current mouse position.