Windows Programming Progressive--dialog box application

Source: Internet
Author: User
  • Using MFC to create modal dialog boxes

Modal dialogs are divided into two types, modal dialogs implemented using the API, and modal dialogs implemented using MFC.

As an example:

This is because the modal dialog box masks messages from other forms .

We create a new project. Then create a dialog box:

Our goal is to click the button in the first dialog box, and the second dialog box pops up. Double-click the button:

Note that the name of the member function here is renamed according to the button's ID number.

Then add the class to the newly added dialog box, and we can either right-add the class or double-click to add the class.

Back to the solution, you can see the Mymodaldialog cpp and H files appear:

We then added the code to the first dialog button. When adding code, first add the header file:

Alt+b Press R again, recompile, and run. After clicking the button to open Modaldialog, click elsewhere and there will be no corresponding:

Windows Programming Progressive--dialog box application

Related Article

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.