]> git.saurik.com Git - wxWidgets.git/commitdiff
blind fix for the initial dialog position
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 21 Oct 2001 00:08:03 +0000 (00:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 21 Oct 2001 00:08:03 +0000 (00:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index 4d4dbf1e17709276db5c48d5cf17aa44e1d9d6c8..96cdd426005bb53c51a923de49a6131f4cbdbcb9 100644 (file)
@@ -265,6 +265,13 @@ bool wxTopLevelWindowMSW::CreateDialog(const wxChar *dlgTemplate,
             h = 100;
         }
 
+        if ( x == CW_USEDEFAULT )
+        {
+            // well, where should we put it? maybe centre it on screen?
+            x =
+            y = 0;
+        }
+
         if ( !::MoveWindow(GetHwnd(), x, y, w, h, FALSE) )
         {
             wxLogLastError(wxT("MoveWindow"));