Solved

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

Posted on 1998-02-25
5
384 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now