"VC + + Learning Note five" sdi| MDI Full-screen display

Source: Internet
Author: User

One, mainframe add a record whether the full-screen state of the variable bool M_bfullscreen.

Second, the toolbar to add a button for full-screen operation, the response event function written in mainframe.

Third, in the response function, add the following code:

void Cmainframe::onfullscreen ()

{

if (!m_bfullscreen)

{

This->modifystyle (ws_thickframe| Ws_caption,null);

This->movewindow (CRect (0,0,::getsystemmetrics (Sm_cxscreen),:: GetSystemMetrics (Sm_cyscreen)), TRUE);

This->showwindow (sw_showmaximized);

FindWindow ("Shell_traywnd", NULL)->showwindow (sw_hide);

}

Else

{

This->modifystyle (null,ws_thickframe| Ws_caption);

FindWindow ("Shell_traywnd", NULL)->showwindow (sw_show);

This->showwindow (Sw_show);

}

This->updatewindow ();

M_bfullscreen =!m_bfullscreen;

}

When the full screen is displayed, you need to remove the system's taskbar, the program's form surgery, and when you exit the full screen, restore these.

VC + + Learning Note five sdi| Full-screen display of MDI

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.