MFC学习单选框Radio使用

创建单选框Radio ,ID号IDC_RADIO_NAME

1、获取单选框内容

int RadioState = ((CButton *)GetDlgItem(IDC_RADIO_NAME))->GetCheck();//返回1表示选上,0表示没选上

2、默认值设置 在初始化中添加

((CButton *)GetDlgItem(IDC_RADIO_NAME))->SetCheck(TRUE);//选上

((CButton *)GetDlgItem(IDC_RADIO_NAME))->SetCheck(FLASE);//不选

原文地址:https://www.cnblogs.com/LJWJL/p/3725319.html