From 834362a2e400478c9e9022f17c515493eaeb1174 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 23 Jun 1999 12:51:20 +0000 Subject: [PATCH] dlg navigation keys work even when combobox has focus git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/app.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/msw/app.cpp b/src/msw/app.cpp index caf8b6e696..13b1806806 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -923,6 +923,15 @@ bool wxApp::ProcessMessage(WXMSG *wxmsg) HWND hWnd = msg->hwnd; wxWindow *wndThis = wxFindWinFromHandle((WXHWND)hWnd), *wnd; + // for some composite controls (like a combobox), wndThis might be NULL + // because the subcontrol is not a wxWindow, but only the control itself + // is - try to catch this case + while ( hWnd && !wndThis ) + { + hWnd = ::GetParent(hWnd); + wndThis = wxFindWinFromHandle((WXHWND)hWnd); + } + // Try translations first; find the youngest window with // a translation table. for ( wnd = wndThis; wnd; wnd = wnd->GetParent() ) -- 2.45.2