From 800e14138e549e896c79d44a9c36507815dc65ba Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 13 Oct 2002 22:37:51 +0000 Subject: [PATCH] call Layout() from Show(TRUE) to ensure that all dialogs are correctly laid out initially git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dialog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 748ef0595f..948d9e27d8 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -296,6 +296,14 @@ bool wxDialog::Show(bool show) if ( show ) { + // dialogs don't get WM_SIZE message after creation unlike most (all?) + // other windows and so could start their life non laid out correctly + // if we didn't call Layout() from here + // + // NB: normally we should call it just the first time but doing it + // every time is simpler than keeping a flag + Layout(); + // usually will result in TransferDataToWindow() being called InitDialog(); }