Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sets the text of the item specified by hItem.
BOOL SetItemText(
HTREEITEM hItem,
LPCTSTR lpszItem
);
Parameters
hItem
Handle of the item whose text is to be set.lpszItem
Address of a string containing the new text for the item
Return Value
Nonzero if successful; otherwise 0.
Example
// 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);
}
Requirements
Header: afxcmn.h