Wesley
Wesley

Reputation: 307

(MFC) CListBox -> Edit Item in List?

I'm currently using the CListBox Control for MFC. Is it possible to retain the data inside the List Item but edit it, without deleting then re-adding it?

Thanks!

Upvotes: 3

Views: 5033

Answers (3)

Michael
Michael

Reputation: 61

The best way (if possible, sure), is replacing CListBox with CListCtrl

Upvotes: 1

Dani van der Meer
Dani van der Meer

Reputation: 6217

You can do this by extending CListBox. Check out this code project article.

Upvotes: 2

Collin Dauphinee
Collin Dauphinee

Reputation: 14003

There's no way to do this, unfortunately.

Even the native list box class doesn't provide any way to edit an entry, without removing and inserting.

The best you can do is extending the CListBox class, either by sub-classing or deriving from it.

Upvotes: 2

Related Questions