RollupWnd1.cpp
/**
 * Call this method to re-position the window, typically after resizing
 * or moving the parent window.
 */
Call this method to re-position the window, typically after resizing
or moving the parent window.
Call this method to re - position the window typically after resizing or moving the parent window .
void CRollupWnd::Reposition()
{
	CMainFrame* pParentWnd = (CMainFrame*) GetParent ();
	if (pParentWnd == NULL)
		return;
	CRect rectParent;
	::GetWindowRect (pParentWnd->m_hWndMDIClient, &rectParent);
	int x, y;
	if (m_nArea <= 2)	
		y = m_ptRelCoords.y + rectParent.top;
	else	
		y = m_ptRelCoords.y + rectParent.bottom;
	if (m_nArea % 2)	
		x = m_ptRelCoords.x + rectParent.left;
	else	
		x = m_ptRelCoords.x + rectParent.right;
	SetWindowPos (NULL, x, y, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
}
void CRollupWnd :: Reposition ( ) { CMainFrame * pParentWnd = ( CMainFrame * ) GetParent ( ) ; if ( pParentWnd == NULL ) return ; CRect rectParent ; :: GetWindowRect ( pParentWnd -> m_hWndMDIClient , & rectParent ) ; int x , y ; if ( m_nArea <= 2 ) y = m_ptRelCoords . y + rectParent . top ; else y = m_ptRelCoords . y + rectParent . bottom ; if ( m_nArea % 2 ) x = m_ptRelCoords . x + rectParent . left ; else x = m_ptRelCoords . x + rectParent . right ; SetWindowPos ( NULL , x , y , 0 , 0 , SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE ) ; }
Call this method to re-position the window, typically after resizing
 or moving the parent window.
Call this method to re - position the window typically after resizing or moving the parent window .
// upper edge
 // lower edge
 // left edge
 // right edge
