]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
Added support for wxEXEC_MAKE_GROUP_LEADER to wxExecute().
[wxWidgets.git] / src / msw / toplevel.cpp
index f7329fe3c07c5fc91bf8de4d015fbfe4032487f7..8219f12a43b782c8a12b20f92be3ab0e47abdb78 100644 (file)
@@ -445,6 +445,13 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate,
     }
 #endif // !__WXWINCE__
 
+    if ( !title.empty() )
+    {
+        ::SetWindowText(GetHwnd(), title.wx_str());
+    }
+
+    SubclassWin(m_hWnd);
+
 #if !defined(__WXWINCE__) || defined(__WINCE_STANDARDSDK__)
     // move the dialog to its initial position without forcing repainting
     int x, y, w, h;
@@ -455,7 +462,7 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate,
         // Let the system position the window, just set its size.
         ::SetWindowPos(GetHwnd(), 0,
                        0, 0, w, h,
-                       SWP_NOMOVE | SWP_NOZORDER);
+                       SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
     }
     else // Move the window to the desired location and set its size too.
     {
@@ -466,13 +473,6 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate,
     }
 #endif // !__WXWINCE__
 
-    if ( !title.empty() )
-    {
-        ::SetWindowText(GetHwnd(), title.wx_str());
-    }
-
-    SubclassWin(m_hWnd);
-
 #ifdef __SMARTPHONE__
     // Work around title non-display glitch
     Show(false);