]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
two fixes from Justin Bradford
[wxWidgets.git] / src / msw / toplevel.cpp
index 1c26f2e5e6419ca19d704b8b3546c8b1f0335956..7772899d1bb6e28e4d502d1ca60ff2fd521f11ad 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "toplevel.h"
 #endif
 
 #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);
     }