全屏窗体?

lasyman 2000-04-10 11:06:00
要求窗体覆盖全屏(17")带标题栏(双击标题栏窗体大小不变化),windows任务栏不出现,ctl+shift+del也不能终止程序,只能从菜单退出程序,并同时退出windows?如何实现,请哪位指点一下!(最后能有代码,先行谢过?)
...全文
165 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
MMX 2000-04-11
  • 打赏
  • 举报
回复
1.Set FullScreen Function
void CMainFrame::OnFullScreen()
{
GetWindowPlacement(&m_OldWndpl);
CRect WindowRect,ClientRect;
GetWindowRect(&WindowRect);
RepositionBars(0,0xffff,AFX_IDW_PANE_FIRST,reposQuery,&ClientRect);
ClientToScreen(&ClientRect;
int nFullWidth=GetSystemMetrics(SM_CXSCREEN);
int nFullHeight=GetSystemMetrics(M_CYSCREEN);
m_FullScreenRect.left=WindowRect.left-ClientRect.left;
m_FullScreenRect.top=WindowRect.top-ClientRect.top;
m_FullScreenRect.right=WindowRect.right-ClientRect.right+nFullWidth;
m_FullScreenRect.bottom=WindowRect.bottom-ClientRect.bottom+nFullHeight;
m_bFullScreen=TRUE;
WINDOWPLACEMENT wndpl;
wndpl.length=sizeof(WINDOWPLACEMENT);
wndpl.flags=0;
wndpl.showCmd=WS_SHOWNORMAL;
wndpl.rcNormalPosition=m_FullScreenRect;
SetWindowPlacement(&wndpl);
}
2.
void CMainFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMi)
{
if(m_bFullScreen)
{
lpMMi->ptMaxSize.x=m_FullScreenRect.Width();
lpMMi->ptMaxSize.y=m_FullScreenRect.Height();
lpMMi->ptMaxPosition.x=m_FullScreenRect.left;
lpMMi->ptMaxPosition.y=m_FullScreenRect.top;
lpMMi->ptMaxTrackSize.x=m_FullScreenRect.Width();
lpMMi->ptMaxTrackSize.y=m_FullScreenRect.Height();
}
CFrameWnd::OnGetMinMaxInfo(lpMMi);
}
3.
void CMainFrame::OnEndFullScreen()
{
if(m_bFullScreen)
{
m_bFullScreen=FALSE;
ShowWindow(SW_HIDE);
SetWindowPlacement(&m_OldWndpl);
}
}

4.
SystemParametersInfo(97,false,NULL,0)可把CTRL+ALT+DEL锁住,用SystemParametersInfo(97,true,NULL,0)解开。
5.
最后退出Windows
Call:ExitWindowsEx(1,1)//只用于Win9.x,如为WinNT or Win2000,请自行查找MSDN 中ExitWindowsEx的参数

lasyman 2000-04-11
  • 打赏
  • 举报
回复
多谢了,我先试试,如果有问题再请教.

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧