Limiting label length when editing

To limit the length of text that can be entered when editing an item label,
you have to add a handler for the TVN_BEGINLABELEDIT notification. Within
this handler get the edit control and call the LimitText() function.

void COutline::OnBeginLabelEdit(NMHDR* pNMHDR, LRESULT* pResult) 
        // Limit text to 127 characters

        *pResult = 0;

More by Author

Must Read