From: Vadim Zeitlin Date: Sun, 21 Oct 2001 00:08:03 +0000 (+0000) Subject: blind fix for the initial dialog position X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f04a0744b079c96c8fb671c108037cc29e68bd24 blind fix for the initial dialog position git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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"));