| //不允许工具条停泊 m_wndFullScreenBar->EnableDocking(FALSE); m_wndFullScreenBar->SetWindowPos(0,100,100,0,0,SWP_NOSIZE |SWP_NOZORDER|SWP_NOACTIVATE|SWP_SHOWWINDOW); m_wndFullScreenBar->SetWindowText(_T("全屏幕显示")); FloatControlBar(m_wndFullScreenBar, CPoint(100,100)); m_bFullScreen=TRUE; } else {//正常显示模式 //删除全屏幕工具条 m_wndFullScreenBar->DestroyWindow(); delete m_wndFullScreenBar; m_bFullScreen=FALSE; //恢复工具条和状态条 m_wndStatusBar.ShowWindow(SW_SHOWNORMAL); m_wndToolBar.ShowWindow(SW_SHOWNORMAL); wpNew = m_wpPrev; } //设置窗口显示状态 SetWindowPlacement ( &wpNew ); } void CMainFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) { if (m_bFullScreen) { lpMMI->ptMaxSize.y = m_FullScreenWindowRect.Height(); lpMMI->ptMaxTrackSize.y = lpMMI->ptMaxSize.y; lpMMI->ptMaxSize.x = m_FullScreenWindowRect.Width(); lpMMI->ptMaxTrackSize.x = lpMMI->ptMaxSize.x; } } void CMainFrame::OnUpdateMenuFullscreen(CCmdUI* pCmdUI) {//更新菜单的状态 pCmdUI->Enable(); pCmdUI->SetCheck(m_bFullScreen); } |