Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box empty...what's wrong?

Status
Not open for further replies.

Ciralia

Programmer
Oct 22, 2002
51
0
0
US
Hi, I'm trying to create a simple combo box with the numbers 0-9 in its list. The interface for the combo box is done through MS Visual C++, and the code that will put the data inside the combo box is contained in a .cpp file. The combo box on the interface is called IDC_COMBO. Here is the code:

//Relate a variable to the interface combo box
CComboBox cbCombo:):GetDlgItem(NULL, IDC_COMBO));

//Fill the list
cbCombo.AddString("0");
cbCombo.AddString("1");
.
.
.
cbCombo.AddString("9");

The combo box appears with a list, but the list is blank. What am I doing wrong here?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top