The "MFC" dialog box appears. The "mfc" dialog box appears.
In a slightly larger program, multiple forms are often required for exchange. Some forms appear to remind users or to implement a specified function. You do not want to operate other forms of the corresponding program before closing this window. This mode dialog box is used, this article describes how to create a simple dialog box in MFC and pop up the dialog box in a certain mode.
Step 1: Create a Dialog box, right-click the Dialog folder in the program resource view and Choose Insert Dialog box.
Step 2: add the corresponding dialog box class to the dialog box. Double-click the corresponding dialog box view and enter the class name in the displayed "MFC add Class Wizard". Click Finish.
Step 3: In the MFC Main Dialog Box class, include the header file of the generated dialog box class, for example, "# include" ShowUserDlg. h"
Step 4: Compile the code in the program to bring up the modal dialog box. The Code is as follows:
ShowUserDlg myshowursedlg; // ShowUserDlg is the dialog box class, And myshowursedlg is the dialog box class entity myshowursedlg. DoModal (); // display the Modal Dialog Box
OK, this is the success!