CTreeCtrl::EditLabel

CEdit* EditLabel( HTREEITEM hItem );

Return Value

If successful, a pointer to the CEdit object that is used to edit the item text; otherwise NULL.

Parameters

hItem

Handle of the tree item to be edited.

Remarks

Call this function to begin in-place editing of the specified item’s text. The editing is accomplished by replacing the text of the item with a single-line edit control containing the text.

Example

// The pointer to my tree control.
extern CTreeCtrl* pmyTreeCtrl;

// Make sure the focus is set to the tree control.
pmyTreeCtrl->SetFocus();

// Show the edit control on the label of the root item.
CEdit* pmyEdit = pmyTreeCtrl->EditLabel(pmyTreeCtrl->GetRootItem());
ASSERT(pmyEdit != NULL);

CTreeCtrl OverviewClass MembersHierarchy Chart

See Also   CTreeCtrl::GetEditControl