您好,我来为您解答:
HTREEITEM curNode=m_Fenlei.GetSelectedItem();
if(curNode==NULL)return;
m_Fenlei.EditLabel(curNode);
用EditLabel就可以把修改激活,你只要输入任何想要的内容就行了阿。
希望我的回答对你有帮助。
TVS_FULLROWSELECT
Version 4.71. Enables full-row selection in the tree view. The entire row of the selected item is highlighted, and clicking anywhere on an item's row causes it to be selected. This style cannot be used in conjunction with the TVS_HASLINES style.
实际在代码中的改动
PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying the CREATESTRUCT cs
if (!CTreeView::PreCreateWindow (cs))
return FALSE;
cs.style |= TVS_FULLROWSELECT | TVS_LINESATROOT | TVS_HASBUTTONS |
TVS_SHOWSELALWAYS;
参考资料: MSDN