void CRTCSampleMainInterface::MobeLocalView()

in AliRTC2.5/Windows/MFC Demo/RtcSample/RTCSampleMainInterface.cpp [1706:1746]


void CRTCSampleMainInterface::MobeLocalView(int nWinWidth, int nWinHeight)
{
	// 禁用移动
	m_ctlLocalView.ShowWindow(FALSE);
	m_ctlLocalVideo.ShowWindow(FALSE);
	m_ctlCloseMicrophone.ShowWindow(FALSE);
	m_ctlCloseVideo.ShowWindow(FALSE);
	m_IsEnableScreen.ShowWindow(FALSE);
	m_ctlLocalSetting.ShowWindow(FALSE);

	CRect rcLocalView;
	m_ctlLocalView.GetWindowRect(&rcLocalView);
	CRect rcCfg;
	CRect rcLocalVideo;
	m_ctlLocalVideo.GetWindowRect(&rcLocalVideo);
	m_ctlSetting.GetWindowRect(&rcCfg);
	CRect rcButton_ExitRoom;
	m_ctlButton_ExitRoom.GetWindowRect(&rcButton_ExitRoom);
	CRect rcCloseMicrophone;
	m_ctlCloseMicrophone.GetWindowRect(&rcCloseMicrophone);
	CRect rcCloseVideo;
	m_ctlCloseVideo.GetWindowRect(&rcCloseVideo);
	CRect rcLocalSetting;
	m_ctlLocalSetting.GetWindowRect(&rcLocalSetting);

	// 移动
	m_ctlLocalView.SetWindowPos(NULL, nWinWidth - rcLocalView.Width() - 10, nWinHeight - rcCfg.Height() - rcButton_ExitRoom.Height() - rcLocalView.Height() - 25, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
	m_ctlLocalVideo.SetWindowPos(NULL, nWinWidth - rcLocalVideo.Width() - 22, nWinHeight - rcCfg.Height() - rcButton_ExitRoom.Height() - rcLocalView.Height() - 7, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
	m_ctlCloseMicrophone.SetWindowPos(NULL, nWinWidth - rcLocalVideo.Width() - 17, nWinHeight - rcCfg.Height() - rcButton_ExitRoom.Height() - 65, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
	m_ctlCloseVideo.SetWindowPos(NULL, nWinWidth - rcCloseVideo.Width() - 20, nWinHeight - rcCfg.Height() - rcButton_ExitRoom.Height() - 65, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
	m_IsEnableScreen.SetWindowPos(NULL, nWinWidth - rcLocalVideo.Width() - 17, nWinHeight - rcCfg.Height() - rcButton_ExitRoom.Height() - 62 + rcCloseMicrophone.Height(), 0, 0, SWP_NOZORDER | SWP_NOSIZE);
	m_ctlLocalSetting.SetWindowPos(NULL, nWinWidth - rcLocalSetting.Width() - 17, nWinHeight - rcCfg.Height() - rcButton_ExitRoom.Height() - 62 + rcCloseMicrophone.Height(), 0, 0, SWP_NOZORDER | SWP_NOSIZE);

	// 启用重绘
	m_ctlLocalView.ShowWindow(TRUE);
	m_ctlLocalVideo.ShowWindow(TRUE);
	//m_ctlCloseMicrophone.ShowWindow(TRUE);
	//m_ctlCloseVideo.ShowWindow(TRUE);
	m_IsEnableScreen.ShowWindow(TRUE);
	//m_ctlLocalSetting.ShowWindow(TRUE);
}