From: Vadim Zeitlin Date: Sun, 31 May 2009 13:22:45 +0000 (+0000) Subject: don't add client area origin when positioning the child MDI frame X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0598625cb2cbb5dd7662688eaf28bc337ba1383f don't add client area origin when positioning the child MDI frame git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/changes.txt b/docs/changes.txt index 483e174796..ec02b9d205 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -346,6 +346,7 @@ MSW: - Allow changing the height of wxChoice and wxComboBox. - Update CRT environment block in wxSetEnv() too. +- Fix wxMDIChildFrame::SetSize() (Lars Rosenboom). i18n: diff --git a/include/wx/msw/mdi.h b/include/wx/msw/mdi.h index 0d4e4be6a5..eb85ec402c 100644 --- a/include/wx/msw/mdi.h +++ b/include/wx/msw/mdi.h @@ -212,6 +212,7 @@ public: protected: virtual void DoGetScreenPosition(int *x, int *y) const; virtual void DoGetPosition(int *x, int *y) const; + virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); virtual void DoSetClientSize(int width, int height); virtual void InternalSetMenuBar(); virtual bool IsMDIChild() const { return true; } diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 1e9255d92d..8c860d0744 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -902,6 +902,14 @@ bool wxMDIChildFrame::Show(bool show) return true; } +void +wxMDIChildFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags) +{ + // we need to disable client area origin adjustments used for the child + // windows for the frame itself + wxMDIChildFrameBase::DoSetSize(x, y, width, height, sizeFlags); +} + // Set the client size (i.e. leave the calculation of borders etc. // to wxWidgets) void wxMDIChildFrame::DoSetClientSize(int width, int height)