hi all,
i have a question is : i create a list view control and use as report
i want to edit its text but i only let me edit the first colum , is there anyway to edit text in other colums ? thanks.
Posted on 2006-06-25 06:43:14 by secmask
Hrm, afaik it is not possible to change the text as easy in the 3rd column as it is in the first. I was once in the same situation and was about to do the following:

I was going to subclass it and monitor WM_LBUTTONDOWN messages and get the position on where the user clicked. Using the x,y of that position I would be figuring out which box that is. Now - create an Editfield the lenght and width of once cell and position it exactly where that cell is where the user clicked. After the User entered the text, update the ListView with your LV_ITEM structure and hide or destroy the EditBox. The EditBox also needs to be subclassed catching Esc, Return, Loose of Focus and many more so the illusion is perfect.

Now, I did something similar in one of my apps but I can't remember for the hll of me where that was :(
Posted on 2006-06-25 06:55:39 by JimmyClif
so we need subclass, thanks.
Posted on 2006-06-25 06:59:09 by secmask
There is an example of subclassing a listview on my website, it uses combo boxes but edit controls are even easier...

www.assembler.ca
Posted on 2006-06-25 07:38:57 by donkey