nadirkamal
asked on
Question on ListView_EditLabel
I want to rename a list view item in a manner similar to windows explorer that allows in place editing when rename is invoked from the drop-down/context menu. For this I used ListView_EditLabel in my application and passed it the handle to my list view control and the index of the selected item but its not working. Instead of returning me the handle to the edit control, ListView_EditLabel returns a NULL. What am I doing wrong?
The list view control must have the focus before you send ListView_EditLabel to the control. Focus can be set using the SetFocus function.
ASKER
I forgot to mention that I have already called SetFocus and ListView_EditLabel fails despite this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I strongly suggest you take a look at listview column of www.codeguru.com.I write an application like yours and I learn alot there.
Just for you infor.
Regards
Wyn
Just for you infor.
Regards
Wyn
ASKER
Thanks NickRepin
I added LVS_EDITLABELS and now I get a handle to the edit control. However, when I run the appication still the in place editing of the item doesn't get initiated. Do I have to to something with the edit control handle?
I added LVS_EDITLABELS and now I get a handle to the edit control. However, when I run the appication still the in place editing of the item doesn't get initiated. Do I have to to something with the edit control handle?
You have to handle LVN_BEGINLABELEDIT and LVN_ENDLABELEDIT notifications.