insert in a tree (CTreeCtrl) an object by a button

I want to put an item in a CTreeCtrl by pressing a button, I tried by declaring the parent item in the button but the parent Item is redefined each time and in the tree the parent item is repeted each time with the new item I created...
smaugwarAsked:
Who is Participating?
 
dr_funfrockConnect With a Mentor Commented:

  Use the STRUCT

typedef struct _TV_INSERTSTRUCT {
    HTREEITEM hParent;       // Node to add child too
    HTREEITEM hInsertAfter;  // Child node data
    TV_ITEM   item;  
} TV_INSERTSTRUCT;

in the function

HTREEITEM InsertItem( LPTV_INSERTSTRUCT lpInsertStruct );

Hope this helps

0
 
galkinCommented:
Could you clarify what you exactly whant to do? Do you want to add item to tree control by pressing button?
0
 
RONSLOWCommented:
POst some code - eg. for the handler for your button (eg your OnMyButton (or whatever) routine)

We need much more info that what you have given us

0
 
smaugwarAuthor Commented:
Edited text of question
0
 
RONSLOWCommented:
still don't quite understand what you are trying to do, how you've tried to do it or what happens ... sorry.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.