((CComboBox *)GetDlgItem(IDC_COMBOBOX))->DeleteString(1);
((CComboBox *)GetDlgItem(IDC_COMBOBOX))->AddString(CString("hello"));
((CComboBox *)GetDlgItem(IDC_COMBOBOX))->InsertString(-1, CString("hello"));第一行命令成功; 第二,第三行都不能把string 加到 CComboBex 里去,但程序
运行良好,就想什么都没发生一样!怎么后这样呢? 请高手指点迷津!!谢了先!
((CComboBox *)GetDlgItem(IDC_COMBOBOX))->AddString(CString("hello"));
((CComboBox *)GetDlgItem(IDC_COMBOBOX))->InsertString(-1, CString("hello"));第一行命令成功; 第二,第三行都不能把string 加到 CComboBex 里去,但程序
运行良好,就想什么都没发生一样!怎么后这样呢? 请高手指点迷津!!谢了先!
((CComboBox *)GetDlgItem(IDC_COMBOBOX))->InsertString(-1, _T("hello"));试试看
CString str;
str.Format("string");
GetDlgItem(IDC_COMBOBOX))->AddString(str);