当前位置: 首页>>代码示例>>C++>>正文


C++ CChildFrame::FullScreen方法代码示例

本文整理汇总了C++中CChildFrame::FullScreen方法的典型用法代码示例。如果您正苦于以下问题:C++ CChildFrame::FullScreen方法的具体用法?C++ CChildFrame::FullScreen怎么用?C++ CChildFrame::FullScreen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CChildFrame的用法示例。


在下文中一共展示了CChildFrame::FullScreen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnViewFullScreen

// CMainFrame message handlers
void CMainFrame::OnViewFullScreen() 
{
	RECT rectDesktop;
	WINDOWPLACEMENT wpNew;

	if (!IsFullScreen())
	{
		// need to hide all status bars
		m_wndStatusBar.ShowWindow(SW_HIDE);
		m_wndToolBar.ShowWindow(SW_HIDE);
		m_wndProgressDialogBar.ShowWindow(SW_HIDE);
		m_wndMasterlistDialogBar.ShowWindow(SW_HIDE);
		// We'll need these to restore the original state.
		GetWindowPlacement (&m_wpPrev);

		m_wpPrev.length = sizeof m_wpPrev;

		//Adjust RECT to new size of window
		::GetWindowRect(::GetDesktopWindow(), &rectDesktop);
		::AdjustWindowRectEx(&rectDesktop, GetStyle(), TRUE, GetExStyle());

		// Remember this for OnGetMinMaxInfo()
		m_FullScreenWindowRect = rectDesktop;

		wpNew = m_wpPrev;
		wpNew.showCmd =  SW_SHOWNORMAL;
		wpNew.rcNormalPosition = rectDesktop;

		m_pwndFullScrnBar=new CToolBar;

		if (!m_pwndFullScrnBar->Create(this,CBRS_SIZE_DYNAMIC|CBRS_FLOATING) ||
			!m_pwndFullScrnBar->LoadToolBar(IDR_FULLSCREEN))
		{
		//	TRACE0("Failed to create toolbar\n");
			return;      // fail to create
		}

		//don't allow the toolbar to dock
		m_pwndFullScrnBar->EnableDocking(0);
		m_pwndFullScrnBar->SetWindowPos(0, 100,100, 0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE|SWP_SHOWWINDOW);   
		m_pwndFullScrnBar->SetWindowText(_T("Full Screen"));
		FloatControlBar(m_pwndFullScrnBar, CPoint(100,100));
		m_bFullScreen=TRUE;
	}
	else
	{
		m_pwndFullScrnBar->DestroyWindow();
		delete m_pwndFullScrnBar;

		m_bFullScreen=FALSE;

		m_wndStatusBar.ShowWindow(SW_SHOWNORMAL);
		m_wndToolBar.ShowWindow(SW_SHOWNORMAL);
		m_wndProgressDialogBar.ShowWindow(SW_SHOWNORMAL);
		m_wndMasterlistDialogBar.ShowWindow(SW_SHOWNORMAL);
		wpNew = m_wpPrev;
	}
	//pView = (CRecordeOperatorDoc*)pChild->GetActiveDocument();
	//if (!pDoc)
	//	return;
	SetWindowPlacement(&wpNew);
	CChildFrame* pChild = NULL;
	pChild = (CChildFrame*)GetActiveFrame();
	if (pChild)
		pChild->FullScreen(m_FullScreenWindowRect);
}
开发者ID:viticm,项目名称:pap2,代码行数:67,代码来源:MainFrm.cpp


注:本文中的CChildFrame::FullScreen方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。