1. Environment: VS2010
2. Grouping
The Radio1, Radio2 and Radio3 were divided into 1 groups, and Radio4 and Radio5 were divided into another group.
Method: Set Radio1 properties: Group, TabStop, auto are true
Set Radio2 properties: Group set to False, TabStop, auto all True
Set Radio3 properties: Group set to False, TabStop, auto all True
Set Radio4 properties: Group, TabStop, auto are true
Set RADIO5 properties: Group set to False,tabstop, auto all True
3. Press Ctrl+d to ensure that the tab number of the radio in the same group is continuous; the way to adjust the tab number is to click the number of the mouse, such as point 3 First, then point 7, then 3 and 7 will exchange, that is, Radio1 into 7,radio5 into 3;
4. Associative int variable Note: Simply associate Radio1 with the Group property to True, Radio2 and Radio3 do not need to be associated; Radio4 need to be associated, radio5 need not be associated
5. After the 4th step is completed, you can see in the form header file
constructor function:
The default first radio is selected, that is, the Radio1 is selected
6. Event Handling
To set Radio1 events
Set the Radio2 and Radio3 click event Functions the same as the Radio1
Event code:
Note: UpdateData (true) is not less; its role is to update the radio state value to the associated variable, that is, m_radiobtngroup1;
Thanks for your attention, welcome to exchange.