Solved

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

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 178
Folder Comparison 12 54
bigDiff challenge 17 106
My project did see openJDK that I installed. What could be the problem 7 142
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

772 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