A child window should only have it's z-order raised, not
the parent window brought to the front.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20842
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
AlwaysCreateUninstallIcon=1
UninstallIconName=Uninstall wxWindows 2.5.0
Uninstallable=1
AlwaysCreateUninstallIcon=1
UninstallIconName=Uninstall wxWindows 2.5.0
Uninstallable=1
- DefaultDirName=c:\wxWindows_2.5.0
+ DefaultDirName=c:\wxWindows-2.5.0
DefaultGroupName=wxWindows 2.5.0
LicenseFile=C:\wx24\wxWindows\docs\licence.txt
InfoBeforeFile=C:\wx24\wxWindows\docs\readme.txt
DefaultGroupName=wxWindows 2.5.0
LicenseFile=C:\wx24\wxWindows\docs\licence.txt
InfoBeforeFile=C:\wx24\wxWindows\docs\readme.txt
// override some base class virtuals
virtual bool Show(bool show = TRUE);
// override some base class virtuals
virtual bool Show(bool show = TRUE);
+ virtual void Raise();
+
// event handlers
void OnCharHook(wxKeyEvent& event);
void OnCloseWindow(wxCloseEvent& event);
// event handlers
void OnCharHook(wxKeyEvent& event);
void OnCloseWindow(wxCloseEvent& event);
+void wxDialog::Raise()
+{
+ ::SetForegroundWindow(GetHwnd());
+}
+
// a special version for Show(TRUE) for modal dialogs which returns return code
int wxDialog::ShowModal()
{
// a special version for Show(TRUE) for modal dialogs which returns return code
int wxDialog::ShowModal()
{
// activate (set focus to) specified window
::SetFocus(hwnd);
// activate (set focus to) specified window
::SetFocus(hwnd);
// raise top level parent to top of z order
// raise top level parent to top of z order
- ::SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
-#else // !__WXMICROWIN__
- if ( !::BringWindowToTop(hwnd) )
+ if (!::SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE))
- wxLogLastError(_T("BringWindowToTop"));
+ wxLogLastError(_T("SetWindowPos"));
-#endif // __WXMICROWIN__/!__WXMICROWIN__
}
// ---------------------------------------------------------------------------
}
// ---------------------------------------------------------------------------