The ESC is not properly handled.
In this implementation, the assumption made is that the edit will be cancelled only when the ESC key is pressed.
The correct way of handling the changes is to cancel the edit for as long as the text was not changed.
I have modified the code in the following way to fix this:
1. In the constructor, set the Escape to TRUE by default.
2. In OnChar, add a default in the switch statement to set the Escape to FALSE as soon as the user changes the value.
This makes a huge difference if you use this ListCtrl to edit a database. As you navigate through the columns, the database would be updated even though no value was changed.
By adding the above changes, the database will be update only when something was changed.
Other than that, this code is very useful.
Thanks a lot.
Thanks for your sample project.
It's very useful sample..
I make Dialog Box, and put a List Box in it.
I want to use a member function in the List View, when the List Box is double clickked.
I don'w know how....
How can I do?
Hold down enter.. see the extra lines formulate at the top?
Although scrollbar is handled when used manually, try using a mouse wheel. Notice how after you hold down enter to get that crap formulated (above), it isn't properly refreshed afterwards. But moving the scrollbar with the mouse ptr works.