LVN_BEGINLABELEDIT notification code

Notifies a list-view control's parent window about the start of label editing for an item. This notification code is sent in the form of a WM_NOTIFY message.

LVN_BEGINLABELEDIT

    pdi = (LPNMLVDISPINFO) lParam; 

Parameters

lParam

Pointer to an NMLVDISPINFO structure. The item member of this structure is an LVITEM structure whose iItem member identifies the item being edited. Note that subitems cannot be edited; the iSubItem member is always set to zero.

Return value

To allow the user to edit the label, return FALSE.

To prevent the user from editing the label, return TRUE.

Remarks

When label editing begins, an edit control is created, positioned, and initialized. Before it is displayed, the list-view control sends its parent window an LVN_BEGINLABELEDIT notification code.

To customize label editing, implement a handler for LVN_BEGINLABELEDIT and have it send an LVM_GETEDITCONTROL message to the list-view control. If a label is being edited, the return value will be a handle to the edit control. Use this handle to customize the edit control by sending the usual EM_XXX messages.

When the user cancels or completes the editing, the parent window receives an LVN_ENDLABELEDIT notification code.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h
Unicode and ANSI names
LVN_BEGINLABELEDITW (Unicode) and LVN_BEGINLABELEDITA (ANSI)