Current location - Recipe Complete Network - Catering franchise - Click the menu option in MFC to pop up a dialog box.
Click the menu option in MFC to pop up a dialog box.
1. Draw the dialog box first (this step should be enough)

2. Create a class for the dialog box: right-click an empty area of the dialog box, click the Create Class wizard, and then select Create New Class.

3. Add a function to a menu option: Right-click the menu item, and then click Create Class Wizard. At this time, select the menu item ID in the left column, select the COMMAND in the right column, click the "Add Function" button on the right, and then click "Edit Code" to write the function (assuming the dialog box class is Info_Dialog):

Info _ Dialog infodlg

infodlg。 DoModal();

In this way, a pop-up dialog box can be realized.