dc.FillRect(&rect, COLOR_WINDOW);
if(m_pfnDrawThemeParentBackground != NULL) {  POINT ptOrg = { 0, 0 }; dc.GetViewportOrg(&ptOrg); dc.SetViewportOrg(ptOrg.x + m_cxLeft, ptOrg.y); ::OffsetRect(&rect, -m_cxLeft, 0);  m_pfnDrawThemeParentBackground(m_hWnd, dc, &rect);   dc.SetViewportOrg(ptOrg); ::OffsetRect(&rect, m_cxLeft, 0); } else { dc.FillRect(&rect, COLOR_3DFACE); }
	LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/)	{		LRESULT lRet = DefWindowProc(uMsg, wParam, lParam);		if(!m_bChildMaximized)			return lRet;		ATLASSERT(m_hWndChildMaximized != NULL && m_hIconChildMaximized != NULL);		// get DC and window rectangle		CWindowDC dc(m_hWnd);		RECT rect;		GetWindowRect(&rect);		int cxWidth = rect.right - rect.left;		int cyHeight = rect.bottom - rect.top;		// paint left side nonclient background and draw icon		::SetRect(&rect, 0, 0, m_cxLeft, cyHeight);#ifndef _WTL_NO_AUTO_THEME		if(m_hTheme != NULL)		{			if(m_pfnDrawThemeParentBackground != NULL)				m_pfnDrawThemeParentBackground(m_hWnd, dc, &rect);			else				dc.FillRect(&rect, COLOR_WINDOW);		}		else#endif //!_WTL_NO_AUTO_THEME		{			if((m_dwExtendedStyle & CBR_EX_TRANSPARENT) != 0)				dc.FillRect(&rect, COLOR_3DFACE);			else				dc.FillRect(&rect, COLOR_MENU);		}		RECT rcIcon = { 0 };		T* pT = static_cast<T*>(this);		pT->_CalcIconRect(cxWidth, cyHeight, rcIcon);		dc.DrawIconEx(rcIcon.left, rcIcon.top, m_hIconChildMaximized, m_cxIconWidth, m_cyIconHeight);		// paint right side nonclient background		::SetRect(&rect, cxWidth - m_cxRight, 0, cxWidth, cyHeight);#ifndef _WTL_NO_AUTO_THEME		if(m_hTheme != NULL)		{			dc.FillRect(&rect, COLOR_WINDOW);		}		else#endif //!_WTL_NO_AUTO_THEME		{			if((m_dwExtendedStyle & CBR_EX_TRANSPARENT) != 0)				dc.FillRect(&rect, COLOR_3DFACE);			else				dc.FillRect(&rect, COLOR_MENU);		}		// draw buttons		RECT arrRect[3] = { 0 };		pT->_CalcBtnRects(cxWidth, cyHeight, arrRect);		pT->_DrawMDIButton(dc, arrRect, -1);   // draw all buttons		return lRet;	}