MFC RadioButton

时间:2024-04-21 00:55:58

添加一组RadioButton

多个radio button,IDC_RADIO1,IDC_RADIO2,IDC_RADIO3 。。
将IDC_RADIO1的Group属性选择上,其他不要选Group属性

"group" 表示分成多组
组划分方法是 tab order
在编辑对话框时按 ctrl + d 可以设置tab order

默认选择第一个,在OnInitDialog()函数中

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

http://blog.****.net/c_cyoxi/article/details/23868979