- DWORD dwNewStyle = dwStyle;
- if (pChild != NULL && (dwThisStyle & WS_MAXIMIZE))
- dwNewStyle &= ~(WS_EX_CLIENTEDGE);
- else
- dwNewStyle |= WS_EX_CLIENTEDGE;
-
- if (dwStyle != dwNewStyle)
- {
- ::RedrawWindow((HWND) pFrameWnd->GetClientWindow()->GetHWND(), NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN);
- ::SetWindowLong((HWND) pFrameWnd->GetClientWindow()->GetHWND(), GWL_EXSTYLE, dwNewStyle);
- ::SetWindowPos((HWND) pFrameWnd->GetClientWindow()->GetHWND(), NULL, 0, 0, 0, 0,
- SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOCOPYBITS);
- if (rect)
- ::GetClientRect((HWND) pFrameWnd->GetClientWindow()->GetHWND(), rect);
- return TRUE;
- }
- }
- return FALSE;
+ DWORD dwNewStyle = dwStyle;
+ if (pChild != NULL && (dwThisStyle & WS_MAXIMIZE))
+ dwNewStyle &= ~(WS_EX_CLIENTEDGE);
+ else
+ dwNewStyle |= WS_EX_CLIENTEDGE;
+
+ if (dwStyle != dwNewStyle)
+ {
+ ::RedrawWindow((HWND) pFrameWnd->GetClientWindow()->GetHWND(), NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN);
+ ::SetWindowLong((HWND) pFrameWnd->GetClientWindow()->GetHWND(), GWL_EXSTYLE, dwNewStyle);
+ ::SetWindowPos((HWND) pFrameWnd->GetClientWindow()->GetHWND(), NULL, 0, 0, 0, 0,
+ SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOCOPYBITS);
+ if (rect)
+ ::GetClientRect((HWND) pFrameWnd->GetClientWindow()->GetHWND(), rect);
+ return TRUE;
+ }
+ }
+ return FALSE;