本文整理汇总了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);
}