Code to display the view in full screen

Source: Internet
Author: User

to turn on full-screen display code:

  View source code copy to clipboard Print Code 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::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); }

to turn off full-screen display code:

View source code copy to clipboard print code void Cviewerframe::endfullscreen () {m_fullscreen=false;        ShowWindow (Sw_hide);    SetWindowPlacement (&m_oldwndplacement); }

void Cviewerframe::endfullscreen () {m_fullscreen=false; ShowWindow (Sw_hide); SetWindowPlacement (&m_oldwndplacement); }

NOTE: Reprint article should indicate source: Vcer.net article address: http://vcer.net/1076417661406.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.