全屏显示视图的代码
开启全屏显示的代码:
void CViewerFrame::FullScreenShow() { 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); 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; WINDOWPLACEMENT wndpl; wndpl.length=sizeof(WINDOWPLACEMENT); wndpl.flags=0; wndpl.showCmd=SW_SHOWNORMAL; wndpl.rcNormalPosition=m_FullScreenRect; ShowWindow(SW_HIDE); SetWindowPlacement(&wndpl); }
关闭全屏显示的代码:
void CViewerFrame::EndFullScreen() { m_FullScreen=FALSE; ShowWindow(SW_HIDE); SetWindowPlacement(&m_OldWndPlacement); }
注:转载文章需注明来源:VCer.net 文章地址:http://vcer.net/1076417661406.html
如果你觉得VCer.net不错,而且你愿意为VCer.net捐赠一元钱,那么点击后面的捐赠按钮吧:)
我得意,我用他的代码;
我自豪,他用我的代码!
void main() { printf("hello, vcer!"); }
A B C D E
刚好缺这个,谢了,楼主
xiaolan1984 于 2008-04-23 11:04:19.0 编辑 [回复该贴]
很不错啊
谢谢楼主
jiangbing 于 2007-12-01 10:08:25.0 编辑 [回复该贴]
简单而实用,清晰而透彻
谢谢白乔大哥
augusdi 于 2007-11-26 10:22:33.0 编辑 [回复该贴]