MFC Controls-radio buttons (Radio button)

Source: Internet
Author: User

Radio buttons are typically used in groups, and each radio button represents one of a set of mutually exclusive options. When the group property is set for the first radio button, several subsequent radio buttons belong to the same group as the button until the next control ( in tab order ) with the group property is encountered.


1 . Set the group property of Radioa, and associate the INT type variable M_RADIOA.

At this point 6 radio buttons belong to the same group. Click Radioa to Radiof,m_radioa to change the value from 0 to 5.



2 . Set the group property of Radioe, and associate the INT type variable M_RADIOE.

At this time Radioa to radiod same group, Radioe and Radiof same group. Click Radioa to Radiod,m_radioa to change the value from 0 to 3. Click Radioe to Radiof,m_radioe to change the value from 0 to 1.


remark:

(1) for a group of radio buttons, you need to set the group property of the first radio button for the set, before you can see the ID of the radio button in the Class Wizard and associate the variable with it.

(2) The value of the associated variable can be set at initialization select the Default Check button. -1 indicates that no buttons are selected.

(3) resource View, Format->tab key order, click the control to change the tab order.

MFC Controls-radio buttons (Radio button)

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.