Use resource editor edit dialog box

Source: Internet
Author: User

 

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.<

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.