|
How can I select more than two radio buttons,
In a group box, the first person is set to the GROUP item.
Still doesn't work.
void CMy123Dlg :: OnShowSexAgeButton ()
{
UpdateData (TRUE);
char sedit [50];
int isexradio;
int iageradio;
isexradio = GetCheckedRadioButton (IDC_BOY_RADIO, IDC_GIRL_RADIO);
if (isexradio == IDC_BOY_RADIO)
strcpy (sedit, "the boy's age is");
else if (isexradio == IDC_GIRL_RADIO)
strcpy (sedit, "the girl's age is");
iageradio = GetCheckedRadioButton (IDC_AGE1_RADIO, IDC_AGE3_RADIO);
if (iageradio == IDC_AGE1_RADIO)
strcat (sedit, "great than 25");
else if (iageradio == IDC_AGE2_RADIO)
strcat (sedit, "between 20 and 25");
else if (iageradio == IDC_AGE3_RADIO)
strcat (sedit, "less than 20");
m_resultedit.SetSel (0, -1);
m_resultedit.ReplaceSel (sedit);
UpdateData (FALSE);
} |
|