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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

listbox

Status
Not open for further replies.

DeCoDeR

Programmer
Jun 4, 2002
37
US
hi,
i add a listbox to the dialog and create a variable control called m_cList.
now in somewhere in my code, i call
m_cList.AddString("dfdhf");
but i dont see that this string is added to the listbox
i also try to call : UpdateData(FALSE); but it does not work Read between the lines
 
>> Read between the lines

What the heck is that supposed to mean?

f f o r e g g u b

Read between the characters
 
>> Read between the lines

I think that's just a signature, of sorts...

>> create a variable control called m_cList

Did you "create" it as a control mapping in ClassWizard? Or did you simply add a CListBox member to your dialog class?

If all you did was add m_cList to your class, then that object is not bound to the control. You will need to use SubclassDlgItem or something. But that is not the recommended way.

It's recommended that you add a control mapping. Go to ClassWizard, choose Member Variables tab, select your control in the list and click "Add Variable". In the "Category" list, choose Control.

If you actually did put it into ClassWizard as a control mapping, and it still doesn't work, then make sure that you haven't changed the ID of the control since you added the variable.

If all else fails please post your class's DoDataExchange function to the forum.

Will
 
>> I think that's just a signature, of sorts...

Your right! I should have figured that out myself :-(

DeCoDeR, my mistake... please ignore my previous post.

As to the problem i think Will's post is on target.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top