another fix for MDI styles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1089,10 +1089,14 @@ bool wxMDIChildFrame::ResetWindowStyle(void *vrect)
|
|||||||
if (!pChild || (pChild == this))
|
if (!pChild || (pChild == this))
|
||||||
{
|
{
|
||||||
HWND hwndClient = GetWinHwnd(pFrameWnd->GetClientWindow());
|
HWND hwndClient = GetWinHwnd(pFrameWnd->GetClientWindow());
|
||||||
DWORD dwStyle = ::GetWindowLong(hwndClient, GWL_STYLE);
|
DWORD dwStyle = ::GetWindowLong(hwndClient, GWL_EXSTYLE);
|
||||||
DWORD dwThisStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE);
|
|
||||||
|
// we want to test whether there is a maximized child, so just set
|
||||||
|
// dwThisStyle to 0 if there is no child at all
|
||||||
|
DWORD dwThisStyle = pChild
|
||||||
|
? ::GetWindowLong(GetWinHwnd(pChild), GWL_STYLE) : NULL;
|
||||||
DWORD dwNewStyle = dwStyle;
|
DWORD dwNewStyle = dwStyle;
|
||||||
if (pChild != NULL && (dwThisStyle & WS_MAXIMIZE))
|
if ( dwThisStyle & WS_MAXIMIZE )
|
||||||
dwNewStyle &= ~(WS_EX_CLIENTEDGE);
|
dwNewStyle &= ~(WS_EX_CLIENTEDGE);
|
||||||
else
|
else
|
||||||
dwNewStyle |= WS_EX_CLIENTEDGE;
|
dwNewStyle |= WS_EX_CLIENTEDGE;
|
||||||
|
Reference in New Issue
Block a user