Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 1998-02-25
5
419 Views
Last Modified: 2013-11-20
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...
0
Comment
Question by:smaugwar
5 Comments
 
LVL 7

Expert Comment

by:galkin
ID: 1316552
Could you clarify what you exactly whant to do? Do you want to add item to tree control by pressing button?
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1316553
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
 

Author Comment

by:smaugwar
ID: 1316554
Edited text of question
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1316555
still don't quite understand what you are trying to do, how you've tried to do it or what happens ... sorry.

0
 

Accepted Solution

by:
dr_funfrock earned 50 total points
ID: 1316556

  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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question