?
Solved

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

Posted on 1998-02-25
5
Medium Priority
?
447 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
[X]
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
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 100 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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

770 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