很多的播放器都有快捷键控制窗口以全屏幕的方式显示。给应用程序加上全屏幕的功能,并不需要很多的代码,比如给一个基于对话框的应用程序加上全屏功能只需要以下少量代码就可以工作了。
void CFullScreenDlg::FullScreenView(void)
// We'll need these to restore the original state.
GetWindowPlacement (&m_wpPrev);
//Adjust RECT to new size of window
::GetWindowRect ( ::GetDesktopWindow(), &rectDesktop );
::AdjustWindowRectEx(&rectDesktop, GetStyle(), FALSE, GetExStyle());
// Remember this for OnGetMinMaxInfo()
m_rcFullScreenRect = rectDesktop;
wpNew.showCmd = SW_SHOWNORMAL;
wpNew.rcNormalPosition = rectDesktop;
SetWindowPlacement ( &wpNew );
void CFullScreenDlg::OnGetMinMaxInfo(MINMAXINFO* lpMMI)
// TODO: Add your message handler code here and/or call default
lpMMI->ptMaxSize.y = m_rcFullScreenRect.Height();
lpMMI->ptMaxTrackSize.y = lpMMI->ptMaxSize.y;
lpMMI->ptMaxSize.x = m_rcFullScreenRect.Width();
lpMMI->ptMaxTrackSize.x = lpMMI->ptMaxSize.x;
CDialog::OnGetMinMaxInfo(lpMMI);
bool CFullScreenDlg::IsFullScreen(void)
以上就是小编整理的关于2019年计算机二级C++考点MFC实现全屏功能的代码,想要参加二级考试的同学们都来了解一下吧。需要及时了解考试动态的小伙伴可" 免费预约短信提醒"届时树图网会及时为大家推送2019年计算机二级考试相关信息提醒。树图网友情提示:对于想要参加计算机二级考试的小伙伴们,树图网特地为您准备了计算机二级考试相关资料,请大家继续关注哦!