void CRTCSampleMainInterface::MoveMonitor()

in AliRTC2.5/Windows/MFC Demo/RtcSample/RTCSampleMainInterface.cpp [1763:1789]


void CRTCSampleMainInterface::MoveMonitor(int nWinWidth, int nWinHeight)
{
	CRect rcCfg;
	m_ctlSetting.GetWindowRect(&rcCfg);
	CRect rcRtcOnline;
	m_ctlRtconline.GetWindowRect(&rcRtcOnline);
	CRect rcLocalView;
	m_ctlLocalView.GetWindowRect(&rcLocalView);
	CRect rcConsole;
	m_ctlConsole.GetWindowRect(&rcConsole);
	CRect rcButton_ExitRoom;
	m_ctlButton_ExitRoom.GetWindowRect(&rcButton_ExitRoom);

	int iRightHeightCount = rcCfg.Height() + rcLocalView.Height() + rcButton_ExitRoom.Height() + 10;
	int iLeftHeightCount = rcConsole.Height();

	if (iRightHeightCount >= iLeftHeightCount)
	{
		m_ctlRtconline.SetWindowPos(NULL, 10, 10, rcConsole.Width(), nWinHeight / 3.8, SWP_NOZORDER);
		MoveMonitorMarshalling(true);
	}
	else
	{
		m_ctlRtconline.SetWindowPos(NULL, 10, 10, nWinWidth - 20, nWinHeight / 3.8, SWP_NOZORDER);
		MoveMonitorMarshalling(false);
	}
}