8/28/2008 A list view control that has the LVS_EDITLABELS window style enables a user to edit item labels in place. A user begins editing by clicking the label of an item that has the focus. An application can begin editing automatically by using the LVM_EDITLABEL message. The list view control notifies the parent window when editing is started, is canceled, or is completed. When editing is completed, the parent window is responsible for updating the item label, if appropriate.
When label editing begins, a list view control sends its parent window an LVN_BEGINLABELEDIT message. You can process this message to enable selective editing of specific labels; returning a nonzero value prevents label editing.
When label editing is canceled or completed, a list view control sends its parent window an LVN_ENDLABELEDIT message. The parent window is responsible for updating the item label if it keeps the new label.
During label editing, you can get the handle to the edit control that is used for label editing by using the LVM_GETEDITCONTROL message. To limit the amount of text that a user can type, you can send an EM_LIMITTEXT message to the edit control. You even can subclass the edit control to intercept and discard invalid characters.
Concepts
Creating a List View Control
Working with Common Controls