在多文档程序中怎样改变文档的大小? 在多文档程序中怎样改变文档的大小? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这里是一个多文档的所有全屏,改改可以实现你的要求在mainfrm.h的类中添加:public: WINDOWPLACEMENT m_OldWndPlacement; //用来保存原窗口位置 BOOL m_FullScreen;//全屏显示标志 CRect m_FullScreenRect; //表示全屏显示时的窗口位置在构造函数中初始化:m_FullScreen=false;在mainfrm.cpp中添加全屏函数:void CMainFrame::OnFullScreen() { if(!m_FullScreen) { GetWindowPlacement(&m_OldWndPlacement); CRect WindowRect; GetWindowRect(&WindowRect); CRect ClientRect; RepositionBars(0, 0xffff, AFX_IDW_PANE_FIRST, reposQuery, &ClientRect); ClientToScreen(&ClientRect);// 获取屏幕的分辨率 int nFullWidth=GetSystemMetrics(SM_CXSCREEN); int nFullHeight=GetSystemMetrics(SM_CYSCREEN);// 将除控制条外的客户区全屏显示到从(0,0)到(nFullWidth, nFullHeight)区//域, 将(0,0)和(nFullWidth, nFullHeight)两个点外扩充原窗口和除控制条之外的 客//户区位置间的差值, 就得到全屏显示的窗口位置 m_FullScreenRect.left=WindowRect.left-ClientRect.left-1; m_FullScreenRect.top=WindowRect.top-ClientRect.top-1; m_FullScreenRect.right=WindowRect.right-ClientRect.right+nFullWidth+2; m_FullScreenRect.bottom=WindowRect.bottom-ClientRect.bottom+nFullHeight+2; m_FullScreen=TRUE; // 设置全屏显示标志为 TRUE // 进入全屏显示状态 WINDOWPLACEMENT wndpl; wndpl.length=sizeof(WINDOWPLACEMENT); wndpl.flags=0; wndpl.showCmd=SW_SHOWNORMAL; wndpl.rcNormalPosition=m_FullScreenRect; SetWindowPlacement(&wndpl); } else//恢复显示,可以单独写成一个函数,如果用快捷键可以直接切换 { m_FullScreen=false; ShowWindow(SW_SHOW); SetWindowPlacement(&m_OldWndPlacement); }}重载GetMinMaxInfo:void CMainFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) { if(m_FullScreen) { lpMMI->ptMaxSize.x=m_FullScreenRect.Width(); lpMMI->ptMaxSize.y=m_FullScreenRect.Height(); lpMMI->ptMaxPosition.x=m_FullScreenRect.Width(); lpMMI->ptMaxPosition.y=m_FullScreenRect.Height(); //最大的Track尺寸也要改变 lpMMI->ptMaxTrackSize.x=m_FullScreenRect.Width(); lpMMI->ptMaxTrackSize.y=m_FullScreenRect.Height(); } CMDIFrameWnd::OnGetMinMaxInfo(lpMMI);} 编译原理课程设计 要做个界面 但不要dos 代码在下面 求帮忙 directShow对正在播放的视频进行图片抓取 有没有好心人帮我调试一下程序? 求教,图像几何变形 在dialog上画图形时,怎么使用memory dc 请教一个关于一串字符分割的问题!哪位大虾帮帮忙,非常感谢!! vc++6.0 串口通讯 好找工作吗 VC中操作Access数据库中日期/时间字段 想没想过把MP3再次压缩成更小的声音文件,但格式不变 请问一个汉字占三个字节的编码方式是什么? 什么是诊断转储和自动转储
public:
WINDOWPLACEMENT m_OldWndPlacement; //用来保存原窗口位置
BOOL m_FullScreen;//全屏显示标志
CRect m_FullScreenRect; //表示全屏显示时的窗口位置在构造函数中初始化:m_FullScreen=false;在mainfrm.cpp中添加全屏函数:
void CMainFrame::OnFullScreen()
{
if(!m_FullScreen)
{
GetWindowPlacement(&m_OldWndPlacement);
CRect WindowRect;
GetWindowRect(&WindowRect);
CRect ClientRect;
RepositionBars(0, 0xffff, AFX_IDW_PANE_FIRST, reposQuery, &ClientRect);
ClientToScreen(&ClientRect);// 获取屏幕的分辨率
int nFullWidth=GetSystemMetrics(SM_CXSCREEN);
int nFullHeight=GetSystemMetrics(SM_CYSCREEN);// 将除控制条外的客户区全屏显示到从(0,0)到(nFullWidth, nFullHeight)区
//域, 将(0,0)和(nFullWidth, nFullHeight)两个点外扩充原窗口和除控制条之外的 客
//户区位置间的差值, 就得到全屏显示的窗口位置
m_FullScreenRect.left=WindowRect.left-ClientRect.left-1;
m_FullScreenRect.top=WindowRect.top-ClientRect.top-1;
m_FullScreenRect.right=WindowRect.right-ClientRect.right+nFullWidth+2;
m_FullScreenRect.bottom=WindowRect.bottom-ClientRect.bottom+nFullHeight+2;
m_FullScreen=TRUE; // 设置全屏显示标志为 TRUE
// 进入全屏显示状态
WINDOWPLACEMENT wndpl;
wndpl.length=sizeof(WINDOWPLACEMENT);
wndpl.flags=0;
wndpl.showCmd=SW_SHOWNORMAL;
wndpl.rcNormalPosition=m_FullScreenRect;
SetWindowPlacement(&wndpl);
}
else//恢复显示,可以单独写成一个函数,如果用快捷键可以直接切换
{
m_FullScreen=false;
ShowWindow(SW_SHOW);
SetWindowPlacement(&m_OldWndPlacement);
}
}
重载GetMinMaxInfo:void CMainFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
if(m_FullScreen)
{
lpMMI->ptMaxSize.x=m_FullScreenRect.Width();
lpMMI->ptMaxSize.y=m_FullScreenRect.Height();
lpMMI->ptMaxPosition.x=m_FullScreenRect.Width();
lpMMI->ptMaxPosition.y=m_FullScreenRect.Height();
//最大的Track尺寸也要改变
lpMMI->ptMaxTrackSize.x=m_FullScreenRect.Width();
lpMMI->ptMaxTrackSize.y=m_FullScreenRect.Height();
}
CMDIFrameWnd::OnGetMinMaxInfo(lpMMI);
}