X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/84cff9658571992925bfb02b916fb17285ba257f..27e229f55a1e4688261cbc88e851d41b0f9e8e33:/src/msw/toplevel.cpp diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 9cc4f1d2ff..4758fd9a52 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -310,9 +310,9 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate, if ( !m_hWnd ) { - wxFAIL_MSG(_("Failed to create dialog. Incorrect DLGTEMPLATE?")); + wxFAIL_MSG(wxT("Failed to create dialog. Incorrect DLGTEMPLATE?")); - wxLogSysError(_("Can't create dialog using memory template")); + wxLogSysError(wxT("Can't create dialog using memory template")); return FALSE; } @@ -567,7 +567,7 @@ void wxTopLevelWindowMSW::Maximize(bool maximize) { // we can't maximize the hidden frame because it shows it as well, so // just remember that we should do it later in this case - m_maximizeOnShow = TRUE; + m_maximizeOnShow = maximize; } } @@ -754,6 +754,12 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event) // remember the last focused child if it is our child m_winLastFocused = FindFocus(); + if ( m_winLastFocused ) + { + // let it know that it doesn't have focus any more + m_winLastFocused->HandleKillFocus((WXHWND)NULL); + } + // so we NULL it out if it's a child from some other frame wxWindow *win = m_winLastFocused; while ( win )