List Box question
I would like to know how to clear a list box. I've done a search here, looked at a ton of websites (including Ken's), and looked through the "mini" MSDN that came with my C++ for dummies :)
Basically, in the begining of the program it loads up a list of names. OK, great. Now, that list is going to change when the user either adds , deletes, or modifies an entry. If it's possible, I would like to clear the entire list box, then reload it with the new data. I realize it would be more effecient to just remove (or add) that one item, but that's not the way I want to do it.
Can anybody help me out?
Oh, and if you think a list box isn't the best way to go about it, that's fine too. It's more important to me that I can clear the old text than it is to be able to have the user click their choice.
SendMessage() with a LB_RESETCONTENT should clear it.
Sweet, thank you so much :D
It seems so simple, I don't know why I couldn't find it earlier.
Heh, should have mentioned that it was in a dialog box. Just had to use SendDlgItemMessage() instead :D