打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
ShowFullScreen
void CStudentDlg::ShowFullScreen()
{
GetWindowPlacement(&wndPre);
m_fullFlag = 1;
CRect winRect;
CRect cliRect;
int fullWidth=0;
int fullHeigth=0;
GetWindowRect(&winRect);
RepositionBars(0,0xffff,AFX_IDW_PANE_FIRST,reposQuery,&cliRect);
ClientToScreen(&cliRect);
// 获取屏幕的分辨率 
fullWidth=GetSystemMetrics(SM_CXSCREEN);
fullHeigth=GetSystemMetrics(SM_CYSCREEN);
//将除控制条外的客户区全屏显示到从(0,0)到(nFullWidth, nFullHeight)区域,
//将(0,0)和(nFullWidth, nFullHeight)两个点外扩充原窗口和除控制条之外的 客户区位置间的差值, 就得到全屏显示的窗口位置 
m_fullScreenRect.left=winRect.left-cliRect.left;
m_fullScreenRect.top=winRect.top-cliRect.top;
m_fullScreenRect.right=winRect.right-cliRect.right+fullWidth;
m_fullScreenRect.bottom=winRect.bottom-cliRect.bottom+fullWidth;
//全屏显示
WINDOWPLACEMENT wndPl;
wndPl.length=sizeof(WINDOWPLACEMENT);
wndPl.flags=0;
wndPl.showCmd=SW_SHOWNORMAL;
wndPl.rcNormalPosition=m_fullScreenRect;
SetWindowPlacement(&wndPl);
}

void CStudentDlg::OnShow()
{
if (m_fullFlag != 1)
{
ShowFullScreen();
}

WINDOWPLACEMENT wndPl;
wndPl.length=sizeof(WINDOWPLACEMENT);
wndPl.flags=0;
wndPl.showCmd=SW_SHOWNORMAL;
wndPl.rcNormalPosition=m_fullScreenRect;
SetWindowPlacement(&wndPl);

int res=0;
int cx=GetSystemMetrics(SM_CXSCREEN);
int cy=GetSystemMetrics(SM_CYSCREEN);


CClientDC dc(this);

StretchDIBits(dc.m_hDC,0,0,cx,cy,0,0,cx,cy,m_buf,m_bmpHead.dibInfo,DIB_RGB_COLORS,SRCCOPY);
}
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
程序家园--vc编程--程序示例
vc实现窗口全屏的一些方法
wince 下的各种全屏方法
对话框大小调整
python 鼠标乱动代码(整人恶搞,然并卵)
MFC对话框程序启动时隐藏
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服