fix (?) for MDI children style problems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,6 +16,7 @@ wxBase:
|
||||
wxMSW:
|
||||
|
||||
- threads: bug in wxCondition::Broadcast fixed (Pieter van der Meulen)
|
||||
- fixed bug in MDI children flags (mis)handling
|
||||
|
||||
2.2.0
|
||||
-----
|
||||
|
@@ -1088,7 +1088,8 @@ bool wxMDIChildFrame::ResetWindowStyle(void *vrect)
|
||||
wxMDIChildFrame* pChild = pFrameWnd->GetActiveChild();
|
||||
if (!pChild || (pChild == this))
|
||||
{
|
||||
DWORD dwStyle = ::GetWindowLong(GetWinHwnd(pFrameWnd->GetClientWindow()), GWL_EXSTYLE);
|
||||
HWND hwndClient = GetWinHwnd(pFrameWnd->GetClientWindow());
|
||||
DWORD dwStyle = ::GetWindowLong(hwndClient, GWL_STYLE);
|
||||
DWORD dwThisStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE);
|
||||
DWORD dwNewStyle = dwStyle;
|
||||
if (pChild != NULL && (dwThisStyle & WS_MAXIMIZE))
|
||||
@@ -1098,15 +1099,16 @@ bool wxMDIChildFrame::ResetWindowStyle(void *vrect)
|
||||
|
||||
if (dwStyle != dwNewStyle)
|
||||
{
|
||||
HWND hwnd = GetWinHwnd(pFrameWnd->GetClientWindow());
|
||||
::RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN);
|
||||
::SetWindowLong(hwnd, GWL_EXSTYLE, dwNewStyle);
|
||||
::SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
|
||||
// force update of everything
|
||||
::RedrawWindow(hwndClient, NULL, NULL,
|
||||
RDW_INVALIDATE | RDW_ALLCHILDREN);
|
||||
::SetWindowLong(hwndClient, GWL_EXSTYLE, dwNewStyle);
|
||||
::SetWindowPos(hwndClient, NULL, 0, 0, 0, 0,
|
||||
SWP_FRAMECHANGED | SWP_NOACTIVATE |
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
|
||||
SWP_NOCOPYBITS);
|
||||
if (rect)
|
||||
::GetClientRect(hwnd, rect);
|
||||
::GetClientRect(hwndClient, rect);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user