CComboBox m_CMBAtm;
......
while (!Atminfo.IsEOF())
{
CString m_strAtmno;
m_strAtmno.Format("%d",Atminfo.m_atm_no);
m_CMBAtm.InsertString(-1,m_strAtmno);
Atminfo.MoveNext();
//m_Atmno.SetWindowText(m_strAtmno);
}
m_CMBAtm.SetCurSel(0);只能看到第一条,没其他记录,怎么解决?
......
while (!Atminfo.IsEOF())
{
CString m_strAtmno;
m_strAtmno.Format("%d",Atminfo.m_atm_no);
m_CMBAtm.InsertString(-1,m_strAtmno);
Atminfo.MoveNext();
//m_Atmno.SetWindowText(m_strAtmno);
}
m_CMBAtm.SetCurSel(0);只能看到第一条,没其他记录,怎么解决?
but why don't you use AddString instead of InsertString?
再跟踪一下代码看看
m_cmbAtm.AddString("hello");
m_cmbAtm.AddString("hello");
为什么也没数据显示呢?