最简单的,也是最怪的问题。寻求答案ing
我在一个dialog中加入一个Combo BOX控件。定义变量类型为CComboBox,名字为m_combo_all
然后在OnInitDialog() 中加入如下代码
BOOL getdb::OnInitDialog() {
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CString dd;
for(int j=1111;j<10000;j+=1111){
dd.Format(L"%d",j);
m_combo_all.AddString(dd);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
可是运行后在ComboBox下拉列表中仅仅有一个显示出来。对combobox的设置用默认的设置。
而同样的做法,在早先做的另一个dialog中却能正常显示出我想得到的所有数据。