From c72b1ad70a0dda5a3fe5086e0c80ae12402e405d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 24 Jan 2006 02:04:53 +0000 Subject: [PATCH] no changes but more comments in DoSetClientSize() (explains the change of rev 1.624 and also why we can't use AdjustWindowRect here) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index e5dc707a8d..2e1ff1f6a4 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1749,9 +1749,10 @@ void wxWindowMSW::DoSetClientSize(int width, int height) { // setting the client size is less obvious than it could have been // because in the result of changing the total size the window scrollbar - // may [dis]appear and/or its menubar may [un]wrap and so the client size - // will not be correct as the difference between the total and client size - // changes - so we keep changing it until we get it right + // may [dis]appear and/or its menubar may [un]wrap (and AdjustWindowRect() + // doesn't take neither into account) and so the client size will not be + // correct as the difference between the total and client size changes -- + // so we keep changing it until we get it right // // normally this loop shouldn't take more than 3 iterations (usually 1 but // if scrollbars [dis]appear as the result of the first call, then 2 and it @@ -1792,7 +1793,9 @@ void wxWindowMSW::DoSetClientSize(int width, int height) } // don't call DoMoveWindow() because we want to move window immediately - // and not defer it here + // and not defer it here as otherwise the value returned by + // GetClient/WindowRect() wouldn't change as the window wouldn't be + // really resized if ( !::MoveWindow(GetHwnd(), rectWin.left, rectWin.top, -- 2.45.2