Visual C++ and Listbox question?

xxsk8er101xx

Distinguished
Dec 31, 2007
108
0
18,630
Now before you post and waste time and say, ahh thats not a cpu question... well duh... picked this post because a lot of people look here and i need this problem solved quickly. My problem is this, how the heck do you replace a string in a listbox? you can do this, deletestring, addstring member functions.. but i need it in the same place where it is.. by using addstring it just adds it to the end of the list. i need it at the same position. CListBox class does not have a member function called replace either so don't suggest that.

and M!cro$h!t charges money for e-mail support too.. what a bunch of @$$hole$!

all the help would be appreciated!
thanks!
 

xxsk8er101xx

Distinguished
Dec 31, 2007
108
0
18,630
For people wondering how to do it themselves. Here's how,

assume m_list is of type CListBox:

m_list.DeleteString(<some int>);
m_list.InsertString(<same int>,<some string>);

That will replace the string in a listbox. This should also work for combo boxes as well.