InThe pop-up dialog box in Windows development is a common input/output method, and the edited dialog box can be saved in the resource file. Visual C ++ provides a dialog box editing tool, which allows you to easily add various controls to the dialog box, and use ClassWizard to easily generate new dialog box classes and ing messages.
First, right-click the resource list and select"Insert dialog box ",1.
Then open the dialog box and edit it. You will see a control board on the screen,2.
You can drag the control you want to add to the dialog box, or select it first, and then draw the occupied area with the mouse in the dialog box.
Next we will generate an input box and an image box for displaying icons in the dialog box. Then, right-click the generated control and select its properties,3.
In the Properties dialog box, you can edit the properties of the control and specify the control.ID,4,
If you select the attributes of the dialog box, you can select some attributes of the dialog box, including the font, appearance, and whether there is a system menu. Finally, edit the attributes of the image control,5,
We set the property of the control to a display icon and specify an icon.ID.
Next, we will add some other controls for the final effect.6.
PressCtrl-T to test the dialog box. In addition, a useful feature in the dialog box is that the Tab key can be used to move the input focus between controls, to achieve this, you must first set the control to accept the Focus movement attribute Tab Stop when the Tab key is pressed. If a control does not intend to use this feature, you need to clear this property. Then, select Tab Order from "Layout" to determine the focus movement sequence,7.
Click here to adjust the Focus movement order. Last PressCtrl-T.<