]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for bug [ 744199 ] wxBringWindowToTop, child window z-order
authorJulian Smart <julian@anthemion.co.uk>
Sun, 1 Jun 2003 21:01:18 +0000 (21:01 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 1 Jun 2003 21:01:18 +0000 (21:01 +0000)
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

distrib/msw/innotop.txt
include/wx/msw/dialog.h
src/msw/dialog.cpp
src/msw/window.cpp

index 62a0965cc6edf24beda6619411215aeaaa29e666..52c672da3dbabc60595dccca7375485208bf299e 100644 (file)
@@ -30,7 +30,7 @@
     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
index 297e5be53057a837b9759919b3498309f305c408..c14daec8d203777ad366c80e33a41217f0508d6c 100644 (file)
@@ -78,6 +78,8 @@ public:
     // override some base class virtuals
     virtual bool Show(bool show = TRUE);
 
+    virtual void Raise();
+
     // event handlers
     void OnCharHook(wxKeyEvent& event);
     void OnCloseWindow(wxCloseEvent& event);
index c18d2227983278cdfc4da85ca4b7e91833047e10..44b80d4354605df84e1d7db826477ed11c27c98a 100644 (file)
@@ -339,6 +339,11 @@ bool wxDialog::Show(bool show)
     return TRUE;
 }
 
+void wxDialog::Raise()
+{
+    ::SetForegroundWindow(GetHwnd());
+}
+
 // a special version for Show(TRUE) for modal dialogs which returns return code
 int wxDialog::ShowModal()
 {
index 21240160c31a15342554dcfef8c3f26c1de578a3..54c791ddad23ac6cf5f5e0b1ef684e45ff4fc1cb 100644 (file)
@@ -217,15 +217,13 @@ static inline void wxBringWindowToTop(HWND hwnd)
 
     // activate (set focus to) specified window
     ::SetFocus(hwnd);
+#endif
 
     // 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__
 }
 
 // ---------------------------------------------------------------------------