]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed wxSTAY_ON_TOP for the dialogs
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 22 Jul 2003 23:50:38 +0000 (23:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 22 Jul 2003 23:50:38 +0000 (23:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index 1c26f2e5e6419ca19d704b8b3546c8b1f0335956..a59da317aba5ec5589686aeff6c61da105cd27aa 100644 (file)
 #include "wx/msw/private.h"
 #include "wx/msw/winundef.h"
 
-#ifdef CreateDialog
-#undef CreateDialog
-#endif
-
 #include "wx/display.h"
 
 #ifndef ICON_BIG
@@ -345,10 +341,12 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate,
     if ( exflags )
     {
         ::SetWindowLong(GetHwnd(), GWL_EXSTYLE, exflags);
-        ::SetWindowPos(GetHwnd(), NULL, 0, 0, 0, 0,
+        ::SetWindowPos(GetHwnd(),
+                       exflags & WS_EX_TOPMOST ? HWND_TOPMOST : 0,
+                       0, 0, 0, 0,
                        SWP_NOSIZE |
                        SWP_NOMOVE |
-                       SWP_NOZORDER |
+                       (exflags & WS_EX_TOPMOST ? 0 : SWP_NOZORDER) |
                        SWP_NOACTIVATE);
     }