CTreeCtrl::SetItemText
Sets the text of the item specified by hItem.
BOOL SetItemText(
HTREEITEM hItem,
LPCTSTR lpszItem
);
hItem
Handle of the item whose text is to be set.lpszItem
Address of a string containing the new text for the item
Nonzero if successful; otherwise 0.
// Clear the text of the item at point myPoint.
UINT uFlags;
HTREEITEM hItem = m_TreeCtrl.HitTest(myPoint, &uFlags);
if ((hItem != NULL) && (TVHT_ONITEM & uFlags))
{
m_TreeCtrl.SetItemText(hItem, NULL);
}
Header: afxcmn.h