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
This commit is contained in:
@@ -923,6 +923,15 @@ bool wxApp::ProcessMessage(WXMSG *wxmsg)
|
|||||||
HWND hWnd = msg->hwnd;
|
HWND hWnd = msg->hwnd;
|
||||||
wxWindow *wndThis = wxFindWinFromHandle((WXHWND)hWnd), *wnd;
|
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
|
// Try translations first; find the youngest window with
|
||||||
// a translation table.
|
// a translation table.
|
||||||
for ( wnd = wndThis; wnd; wnd = wnd->GetParent() )
|
for ( wnd = wndThis; wnd; wnd = wnd->GetParent() )
|
||||||
|
Reference in New Issue
Block a user