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
This commit is contained in:
Vadim Zeitlin
2009-06-04 22:24:13 +00:00
parent 1b98c87ba6
commit 100fa8e4c0
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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.