Sdílet prostřednictvím


CTreeCtrl::GetEditControl

Call this function to retrieve the handle of the edit control being used to edit a tree view item's text.

CEdit* GetEditControl( ) const;

Return Value

A pointer to the edit control used to edit the item text, if successful; otherwise NULL.

Example

// The string replacing the text in the edit control.
LPCTSTR lpszmyString = _T("New text!");

// Replace the text in the label edit control, if possible.
CEdit* pEdit = m_TreeCtrl.GetEditControl();

if (pEdit != NULL)
{
   pEdit->SetWindowText(lpszmyString);
}

Requirements

Header: afxcmn.h

See Also

Reference

CTreeCtrl Class

Hierarchy Chart

CTreeCtrl::EditLabel

Other Resources

CTreeCtrl Members