I had always allocated control ID numbers manually for groups of radio
buttons, so the order in the dialog box was the same as the order of
the ID values. But today I made a change and added a radio button in
the middle of an existing group. This left the group looking like
this in the resource file:
CONTROL "X-axis", 100, "BUTTON", BS_AUTORADIOBUTTON...WS_GROUP...
CONTROL "Y-axis", 117, "BUTTON", BS_AUTORADIOBUTTON...
CONTROL "Theta-axis",101, "BUTTON", BS_AUTORADIOBUTTON...
CONTROL "Z-axis", 102, "BUTTON", BS_AUTORADIOBUTTON...
Where ID 117 was added. But when I called
CheckRadioButton(hwnd,100,102,ButtonID);
when ButtonID=117, nothing gets checked. When ButtonID is 100, 101,
or 102, it works fine. Then, when I renumbered the IDs to
99,100,101,102 so they were in order again, then everything worked.
This leads me to believe that CheckRadioButton uses the ID value range
defined by its 2nd and 3rd parameters rather than the group defined by
controls appearing in order in the dialog box. Is that right? The
Win32 documentation doesn't say that the ID values have to be in any
particular order. What is going on here?
-Robert Scott
Ypsilanti, Michigan
(Reply through newsgroups, not by direct e-mail, as automatic reply address is fake.)