void CWndNeuz::OnSize(UINT nType, int cx, int cy) { if(IsWndRoot()) return; if( m_bTile ) //m_strTexture.IsEmpty() == FALSE ) { CRect rectWnd = GetWndRect(); CSize size2( rectWnd.Width(), rectWnd.Height() ); CSize sizeDiv = size2; sizeDiv.cx %= 16; sizeDiv.cy %= 16; size2.cx /= 16; size2.cx *= 16; size2.cy /= 16; size2.cy *= 16; if( sizeDiv.cx ) size2.cx += 16; if( sizeDiv.cy ) size2.cy += 16; rectWnd.bottom = rectWnd.top + size2.cy; rectWnd.right = rectWnd.left + size2.cx; SetWndRect( rectWnd, FALSE ); } AdjustWndBase(); m_wndTitleBar.Replace(); CWndBase::OnSize( nType, cx, cy ); // if( rectOld.Width() != m_rectClient.Width() || rectOld.Height() != m_rectClient.Height() ) // 차일드 윈도우들의 사이즈를 조절 /* for(int i = 0; i < m_wndArray.GetSize(); i++) { CWndBase* pWnd = (CWndBase*)m_wndArray.GetAt(i); if(pWnd->IsWndStyle(WBS_DOCKED))// && pWnd->IsWndStyle(WBS_CHILD)) { CRect rect = pWnd->GetWindowRect(TRUE); rect.SetRect(0,0,cx,cy); pWnd->SetWndRect(rect); } } */ /* if(IsWndStyle(WBS_DOCKED))// && IsWndStyle(WBS_CHILD)) { m_wndTitleBar.m_wndMinimize.SetVisible(FALSE); m_wndTitleBar.m_wndMaximize.SetVisible(FALSE); } */ }
void CWndCredit::SetWndRect( CRect rectWnd, BOOL bOnSize ) { CRect rectOld = m_rectClient; m_rectWindow = rectWnd; m_rectClient = m_rectWindow; m_rectLayout = m_rectClient; if( IsWndRoot() == FALSE && !IsWndStyle( WBS_NOFRAME ) ) { if( IsWndStyle( WBS_CAPTION ) == TRUE ) m_rectClient.top += 17; m_rectClient.DeflateRect( 2, 2, 6, 8 ); m_rectLayout = m_rectClient; m_rectLayout.DeflateRect( 8, 8 ); } if( bOnSize && ( rectOld.Width() != m_rectClient.Width() || rectOld.Height() != m_rectClient.Height() ) ) OnSize( 0, m_rectClient.Width(), m_rectClient.Height() ); MakeVertexBuffer(); }