Understand basic mfc controls and mfc controls

Source: Internet
Author: User

Understand basic mfc controls and mfc controls

In almost every windows program, buttons, check boxes, text boxes, and drop-down lists are all controls. In addition, many common controls have been built into the operating system. in Visual C ++, these commonly used controls have been simplified and can be placed in a dialog box using the "Drag and Drop" window design method.

There are six controls that appear in almost every windows program: Static Text control, Edit Box, Button control, Check Box) controls, Radio buttons, and drop-down lists [Also known as Comno Box] controls.

  Static text control:It is used to display text to users. Users cannot change the content of text, that is, they cannot interact with controls. static text is only a read-only control for users. Of course, the coders can easily change the displayed text by modifying the code.

Edit box controls:The edit box is a tool that allows users to enter information required by the program. The edit box only accepts plain text and does not provide the format.

  Command button control:If you press the command button, some operations will be triggered. There is a text label on the command button to tell the user what will happen when the button is pressed, you can also put the picture on the button to convey the button information.

 Check box control:The check box is a box that you can click to select or not to select. The check box is used to open or close a specific value. In addition to the basic enable or disable switch, there is a third State, an intermediate state.

Single choice button control:A single-choice button is a circle. You can click it to add a black spot. Used to select only one value in a group of two or more values at a time. This is the single-choice button control.

Combo box control: Also called drop-down list box. The control is an editing box with a list of available values. The combo box provides a series of options from which you can select a value. Sometimes you can enter a value directly when the provided list meets the requirements.

Each control has attributes to describe the control. The basic attributes are listed below, which are available in each control box.

ID: ID control. You can change the ID attribute to identify and interact with other controls.

Caption: Specifies the text displayed on the control.

Visible: indicates whether the controller is Visible when the program is running

Disanled: Indicates whether to disable the control. If disabled, the text in Caption will show only the outline or the dashboard on the dialog box.

Tab Stop: whether the control is selected when the user uses the tab key to move in the dialog box.

  

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.