Hmmm.. It was strange that VC++ 2008 add variables wizard didn’t let a “value” variable of a radio button. With VC++ 6, it was possible as far as I remember.
So, I searched to find out what changed since VC++ 6.
What I found are :
- Visual Studio 2005의 DDX 매크로 문제
- MSDN : Assign a variable to a radio button
- MFC radio buttons – DDX_Radio and DDX_Control behavior
However, the most official document is :
Grouping Radio Buttons on a Dialog Box
People are confused by the different way of setting variable for a radio button to they way you do with its previous version, and MS didn’t seem to present “What is changed and How is changed” document.
So, the way it manipulate resources was changed. No, problem. However again MS’s approach shows problems.
- In the resource editor, there is no way to group radio boxes visually
- Setting only the first radio button as “Grouped” is not reasonable.
- Setting the variable to the first radio button
Because only one radio buttons is to be turned on exclusively in its group, there should be a visual way to make a series of radio buttons grouped. However, a group is defined by setting the order of radio buttons in series and only the first radio button is flagged as “Group”.
Basically there are multiple radio buttons in a group. Then all should be “grouped”. But MS want you to set only the 1st radio button as “grouped”. Then all the following radio buttons are grouped. It doesn’t feel natural.
So, a variable for a group should be declared for the group. But a variable for the 1st button is declared and treated like that it is the representative button for the group.
All of them don’t look natural and reasonable.
I think this is why people get confused and couldn’t get a clue on how to make set a variable for radio buttons.