MFC MDI Gets the current view

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

================================== Declaration ==================================

This article is original, reproduced in the text of the influential annotated author and source, and to ensure the integrity of the article.

Do not modify (including this statement) without the consent of the author, and reserve the right of legal investigation.

Do not use academic references without the consent of the author.

Do not use for commercial publication, commercial printing or commercial reference without the consent of the author.

In order to ensure the correct contents, we suggest that we should read the original text.

This article link: http://www.cnblogs.com/wlsandwho/p/4398314.html

=======================================================================

Or is it supposed to be based on his own magic series http://www.cnblogs.com/wlsandwho/p/4288818.html

=======================================================================

For multiple views, you can get multiple sets of toolbars to correspond to, Microsoft's many things are so, such as SQL Server Management Studio (2008)

But it's so much trouble for me.

Let me steal some slack and use a button.

1 voidcmainframe::onxxx ()2 {3     //TODO: Add Command handler code here4cview* pcurview= ((cmainframe*) (AfxGetApp ()->m_pmainwnd))->mdigetactive ()GetActiveView ();//<------------------- this line5 6     if(pcurview==gpFV1)7     {8MessageBox (TEXT ("1"));9     }Ten     Else One     { AMessageBox (TEXT ("2")); -     } -}

As for the brackets, it's a personal hobby.

MFC MDI Gets the current view

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.