Muokkaa

Jaa


TVN_BEGINLABELEDIT notification code

Notifies a tree-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.

TVN_BEGINLABELEDIT 

    ptvdi = (LPNMTVDISPINFO) lParam 

Parameters

lParam

Pointer to an NMTVDISPINFO structure. The item member is a TVITEM structure that contains valid information about the item being edited in the hItem, state, lParam, and pszText members.

Return value

Returns TRUE to cancel label editing.

Remarks

When label editing begins, an edit control is created but not positioned or displayed. Before it is displayed, the tree-view control sends its parent window a TVN_BEGINLABELEDIT notification code.

To customize label editing, implement a handler for TVN_BEGINLABELEDIT and have it send a TVM_GETEDITCONTROL message to the tree-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 a TVN_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
TVN_BEGINLABELEDITW (Unicode) and TVN_BEGINLABELEDITA (ANSI)