From f04a0744b079c96c8fb671c108037cc29e68bd24 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 21 Oct 2001 00:08:03 +0000 Subject: [PATCH] blind fix for the initial dialog position git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/toplevel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 4d4dbf1e17..96cdd42600 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -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")); -- 2.50.0