From 100fa8e4c007bd5776d8d659ae14bda91d1ce116 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 4 Jun 2009 22:24:13 +0000 Subject: [PATCH] account properly for the menu in SetShape() (closes #10870) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@60894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/msw/toplevel.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 2a733af817..6207330a41 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -122,6 +122,7 @@ wxMSW: - Fixed generation of wxEVT_CHAR_HOOK events. - Implement wxFileName::SetTimes() for directories (Steve Lamerton). +- Correct wxTopLevelWindow::SetShape() for windows with menu bar (Peter Friis). - Backported speed-up of Vaclav Slavik's high quality print preview speed-up. You now need to set wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW in src/common/prntbase.cpp and wxUSE_ENH_METAFILE_FROM_DC in diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index aea6dea647..44f9752dea 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -1001,7 +1001,7 @@ bool wxTopLevelWindowMSW::SetShape(const wxRegion& region) DWORD dwStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE); DWORD dwExStyle = ::GetWindowLong(GetHwnd(), GWL_EXSTYLE); ::GetClientRect(GetHwnd(), &rect); - ::AdjustWindowRectEx(&rect, dwStyle, FALSE, dwExStyle); + ::AdjustWindowRectEx(&rect, dwStyle, ::GetMenu(GetHwnd()) != NULL, dwExStyle); ::OffsetRgn(hrgn, -rect.left, -rect.top); // Now call the shape API with the new region.