Click to See Complete Forum and Search --> : How to add integer items in ComboBox


rakesh_hardaha
April 22nd, 1999, 06:00 AM
I want to add integers in combobox list but couldn't do ?
Will anyone help me out ?
Rakesh

RHardaha

Steve McNeese
April 22nd, 1999, 06:18 AM
Try formating the integers into a CString with ::Format:

CString t_cTemp;
t_cTemp.Format("%d",myint);
m_MyCombo.AddString(t_cTemp);


Steven M. McNeese
steven.mcneese@boeing.com

eric33
April 22nd, 1999, 06:32 AM
The first response of steeve is good if you want to add an integer as string in a combobox.

But if you want to link an integer to each item of your combobox use GetItemData and SetItemData methods of the CComboBox class.

I hope this could help.