Home > Software engineering >  How to realize the double tree controls different child nodes of the different operation
How to realize the double tree controls different child nodes of the different operation

Time:10-29

Inquired of god, written in OnDblclkTree1 function operation in all child nodes are double click on the execution, how to achieve to distinguish?

CodePudding user response:

As a node has its own TXT, can distinguish the basis,

CodePudding user response:

When can give insert node set different attribute CTreeCtrl: : SetItemData ()/GetItemData ()

CodePudding user response:

I remember you response the double-click events in double-click events can be get to you which the child nodes can also double-click according to the access to his parent node and then the judgment is ok

CodePudding user response:

Your mama hi

reference 1st floor jennyvenus response:
node has its own TXT, can distinguish as the basis,

I now is to use the node name judgment, want to use inside put the content of the judgment, a bit of a problem you see
Inside each node traversal tree structures in the saved vector pointer m_tree. SetItemData (hChildItem, (DWORD) & amp; Vdata [I]); I++;
Now want to take, don't know how to take
Vector * p=new vector;
P=m_tree. GetItemData (hItem);
That won't compiled

CodePudding user response:

refer to the second floor VisualEleven response:
insert node when different attributes can be set to the node CTreeCtrl: : SetItemData ()/GetItemData ()

I now is to use the node name judgment, want to use inside put the content of the judgment, a bit of a problem you see
Inside each node traversal tree structures in the saved vector pointer m_tree. SetItemData (hChildItem, (DWORD) & amp; Vdata [I]); I++;
Now want to take, don't know how to take
Vector * p=new vector;
P=m_tree. GetItemData (hItem);
That won't compiled

CodePudding user response:

reference jiu6332356 reply: 3/f
I remember you response the double-click events in double-click events can be get to you which the child nodes can also double-click according to the access to his parent node and then the judgment is ok

I now is to use the node name judgment, want to use inside put the content of the judgment, a bit of a problem you see
Inside each node traversal tree structures in the saved vector pointer m_tree. SetItemData (hChildItem, (DWORD) & amp; Vdata [I]); I++;
Now want to take, don't know how to take
Vector * p=new vector;
P=m_tree. GetItemData (hItem);
That won't compiled

CodePudding user response:

Data p;
P=m_tree. GetItemData (hItem);

Then add p to try the collection
  • Related