Restored part of the default positioning code for dialogs that I
removed a few days ago. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -394,6 +394,15 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate,
|
||||
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"));
|
||||
|
Reference in New Issue
Block a user