radio button 用法
1.互斥group用法
a.Ctrl+D进行排序
b.几个radio button选为一组,即开头那个选上group,tapstop,auto属性,注:这种一组是互斥的
2常用方法
((CButton *)GetDlgItem(IDC_RADIO1))->SetCheck(TRUE);//选上
((CButton *)GetDlgItem(IDC_RADIO1))->SetCheck(FALSE);//不选上
((CButton *)GetDlgItem(IDC_RADIO1))->GetCheck();返回1表示选上,0表示没选上
combobox用法
combo.SetCurSel(0);//添加首选项
获取内容:
int index=((CComboBox*)GetDlgItem(IDC_COMBO1))->GetCurSel();//GetCurSel是获得当前选中的选项的位置索引
CString str;
((CComboBox*)GetDlgItem(IDC_COMBO1))->GetLBText(index,str);//根据位置索引可以把combobox里面的字符串取出,并放到str中
combo.ResetContent();//清空内容
sort属性为false,按照自己添加的顺序排列;true,重新排序