CCombox使用

1、得到选中的combox的文本信息

int nIndex = m_SType.GetCurSel();//样本类型

m_SType.GetLBText(nIndex, m_data->SType);

2、设置相应选中项

CString sunit;
sunit.Format(m_data->sISEUnit);

int nIndex = m_IseUnit.FindString(0, sunit);
m_IseUnit.SetCurSel(nIndex);

UpdateData(FALSE);

原文地址:https://www.cnblogs.com/MiLu/p/4894132.html