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:
|
wxMSW:
|
||||||
|
|
||||||
- threads: bug in wxCondition::Broadcast fixed (Pieter van der Meulen)
|
- threads: bug in wxCondition::Broadcast fixed (Pieter van der Meulen)
|
||||||
|
- fixed bug in MDI children flags (mis)handling
|
||||||
|
|
||||||
2.2.0
|
2.2.0
|
||||||
-----
|
-----
|
||||||
|
@@ -1088,7 +1088,8 @@ bool wxMDIChildFrame::ResetWindowStyle(void *vrect)
|
|||||||
wxMDIChildFrame* pChild = pFrameWnd->GetActiveChild();
|
wxMDIChildFrame* pChild = pFrameWnd->GetActiveChild();
|
||||||
if (!pChild || (pChild == this))
|
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 dwThisStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE);
|
||||||
DWORD dwNewStyle = dwStyle;
|
DWORD dwNewStyle = dwStyle;
|
||||||
if (pChild != NULL && (dwThisStyle & WS_MAXIMIZE))
|
if (pChild != NULL && (dwThisStyle & WS_MAXIMIZE))
|
||||||
@@ -1098,15 +1099,16 @@ bool wxMDIChildFrame::ResetWindowStyle(void *vrect)
|
|||||||
|
|
||||||
if (dwStyle != dwNewStyle)
|
if (dwStyle != dwNewStyle)
|
||||||
{
|
{
|
||||||
HWND hwnd = GetWinHwnd(pFrameWnd->GetClientWindow());
|
// force update of everything
|
||||||
::RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN);
|
::RedrawWindow(hwndClient, NULL, NULL,
|
||||||
::SetWindowLong(hwnd, GWL_EXSTYLE, dwNewStyle);
|
RDW_INVALIDATE | RDW_ALLCHILDREN);
|
||||||
::SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
|
::SetWindowLong(hwndClient, GWL_EXSTYLE, dwNewStyle);
|
||||||
|
::SetWindowPos(hwndClient, NULL, 0, 0, 0, 0,
|
||||||
SWP_FRAMECHANGED | SWP_NOACTIVATE |
|
SWP_FRAMECHANGED | SWP_NOACTIVATE |
|
||||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
|
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
|
||||||
SWP_NOCOPYBITS);
|
SWP_NOCOPYBITS);
|
||||||
if (rect)
|
if (rect)
|
||||||
::GetClientRect(hwnd, rect);
|
::GetClientRect(hwndClient, rect);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user