mysterious radiobox bug finally fixed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-05-20 22:53:09 +00:00
parent 65e782405b
commit 7f68042c44

View File

@ -310,7 +310,13 @@ bool wxDialog::Show(bool show)
{
if (show)
{
m_hwndOldFocus = (WXHWND)::GetFocus();
// find the top level window which had focus before - we will restore
// focus to it later
m_hwndOldFocus = 0;
for ( HWND hwnd = ::GetFocus(); hwnd; hwnd = ::GetParent(hwnd) )
{
m_hwndOldFocus = (WXHWND)hwnd;
}
if (m_modalShowing)
{