newntui/discovermdi/src/qaparams.cpp
//-----------------------------------------------------------------------
// This private function designed to reposition all controls according the
// given window size. It is called from the OnSize (WM_SIZE callback).
//-----------------------------------------------------------------------
This private function designed to reposition all controls according the
given window size. It is called from the OnSize (WM_SIZE callback).
This private function designed to reposition all controls according the given window size . It is called from the OnSize ( WM_SIZE callback ) .
void CQAParams::LayoutControls(int cx, int cy) {
int ypos=0;
int yend=cy;
CRect scopeTitleRect;
CRect propTitleRect;
CRect scopeComboRect;
	if(!::IsWindow(m_ModeSelector)) return;
	m_ScopeTitle.GetWindowRect(scopeTitleRect);
	m_PropertiesTitle.GetWindowRect(propTitleRect);
	m_ScopeCombo.GetWindowRect(scopeComboRect);
	m_ModeSelector.MoveWindow(0,ypos,cx,25);
	ypos+=25+SPACE;
	m_ScopeTitle.MoveWindow(0,ypos,cx,scopeTitleRect.Height());
	ypos+=scopeTitleRect.Height()+SPACE;
	m_ScopeCombo.MoveWindow(SPACE,ypos,cx-2*SPACE,scopeComboRect.Height());
	ypos+=scopeComboRect.Height()+SPACE;
	m_PropertiesTitle.MoveWindow(0,ypos,cx,propTitleRect.Height());
	ypos+=propTitleRect.Height()+SPACE;
	yend-=SPACE;
	m_Properties.MoveWindow(SPACE,ypos,cx-2*SPACE,yend-ypos);
	if(m_ShowReport==TRUE) { 
		m_Reporter.SetTop(25);
		m_Reporter.SetLeft(SPACE);
		m_Reporter.SetWidth(cx-2*SPACE);
		m_Reporter.SetHeight(cy-25-SPACE);
	}
}
void CQAParams :: LayoutControls ( int cx , int cy ) { int ypos = 0 ; int yend = cy ; CRect scopeTitleRect ; CRect propTitleRect ; CRect scopeComboRect ; if ( ! :: IsWindow ( m_ModeSelector ) ) return ; m_ScopeTitle . GetWindowRect ( scopeTitleRect ) ; m_PropertiesTitle . GetWindowRect ( propTitleRect ) ; m_ScopeCombo . GetWindowRect ( scopeComboRect ) ; m_ModeSelector . MoveWindow ( 0 , ypos , cx , 25 ) ; ypos += 25 + SPACE ; m_ScopeTitle . MoveWindow ( 0 , ypos , cx , scopeTitleRect . Height ( ) ) ; ypos += scopeTitleRect . Height ( ) + SPACE ; m_ScopeCombo . MoveWindow ( SPACE , ypos , cx - 2 * SPACE , scopeComboRect . Height ( ) ) ; ypos += scopeComboRect . Height ( ) + SPACE ; m_PropertiesTitle . MoveWindow ( 0 , ypos , cx , propTitleRect . Height ( ) ) ; ypos += propTitleRect . Height ( ) + SPACE ; yend -= SPACE ; m_Properties . MoveWindow ( SPACE , ypos , cx - 2 * SPACE , yend - ypos ) ; if ( m_ShowReport == TRUE ) { m_Reporter . SetTop ( 25 ) ; m_Reporter . SetLeft ( SPACE ) ; m_Reporter . SetWidth ( cx - 2 * SPACE ) ; m_Reporter . SetHeight ( cy - 25 - SPACE ) ; } }
This private function designed to reposition all controls according the
given window size.
This private function designed to reposition all controls according the given window size .