removed a few days ago.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26258
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
int x, y, w, h;
(void)MSWGetCreateWindowCoords(pos, size, x, y, w, h);
int x, y, w, h;
(void)MSWGetCreateWindowCoords(pos, size, x, y, w, h);
+ if ( x == (int)CW_USEDEFAULT )
+ {
+ // centre it on the screen - what else can we do?
+ wxSize sizeDpy = wxGetDisplaySize();
+
+ x = (sizeDpy.x - w) / 2;
+ y = (sizeDpy.y - h) / 2;
+ }
+
if ( !::MoveWindow(GetHwnd(), x, y, w, h, FALSE) )
{
wxLogLastError(wxT("MoveWindow"));
if ( !::MoveWindow(GetHwnd(), x, y, w, h, FALSE) )
{
wxLogLastError(wxT("MoveWindow"));