Introduction

Almost every one of us who are programming in VC++ ,
will come across the List control. There are many cases where there is a
need to represent data in List Control in multiple columns. By default it
is not possible to modify the data in the List control itself.
In this small article I am putting a simple way to edit any value in any
column in a Report style List control. The logic here is simple, whenever
user clicks on an sub-item which he wants to modify at that place I am
displaying a edit box and allowing to modify the value. Once modified and by
clicking the ENTER key, the updated value is set in the List control. Here I am
assuming the user is familiar with VC++ and using Class Wizard

Implementation steps:

Using MFC AppWizard, create a Dialog Based application.
Give the application name as MultipleColumns. By default the wizard
adds OK and Cancel buttons to the Dialog, Remove these two
buttons.

Now Add a List-Control and in properties change the
style to Report, this style is necessary if we want multiple columns

Add two buttons to the Dialog and name them as OK and Exit

Add one Edit box and in the properties remove the Border style

Using the Class Wizard add the message handlers for the OK and Exit Buttons.
Add the following code to those functions

Conclusion

With this I will hope , it will give an idea to edit any sub items in a List control.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

hello,
you can try below,
make a "Events" to List Control, select LVN_ITEMCHANGED to create a notification.
then, copy the code from OnOK to the notification(default, OnItemchangedList1).
after that, you can try to complie.
good luck.
we can talk.
mones84@126.com

The important thing is not what you've ever done, but what you'll do next.