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,重新排序