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.