Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


want to create a treectrl where elemnets are in the form of parent-ch

panrethpanreth Member Posts: 3
hi ...
the problem is like this :
i have some set of variables coming under some headings and sub-headings.I have to list all these in tree type structure where i have the liberty of checking and unchecking each of these variables. Every parent node has a child node(compulsary) and further every child node may/maynot have any child node.
I am not getting the logic how to implement this using MFC.
Please extend some help.


  • AsmGuru62AsmGuru62 Member Posts: 6,519

    [color=Blue]At the very bottom of this page there are links to constants. You need "Tree-View Control Window Styles". There is a style which creates a check box for each tree node.[/color]
  • panrethpanreth Member Posts: 3
    thanks for reply..
    but the actual problem is how to read the values of these variables so that they appear in tree structure form.
    i have many variables which are classifies under different categories and hence depending upon thier class they shuld appear in the tree.

    so the actual problem is what way i shud read the values of these varibales.?
  • AsmGuru62AsmGuru62 Member Posts: 6,519
    [color=Blue]I do not understand the question. Read variables from where?[/color]
  • panrethpanreth Member Posts: 3
    okay the problem is like this...i have some items(like some variables which represent conatins some data )
    Each item belongs some type (parent node)
    But some parent nodes have child node and then further a child node.

    Example node1->var1

    and so on

    the variable var1,2,3 are use to hold some values.
    I know the relatioonship betweeen these nodes,sub nodes and vars but how to impelment usning MFC is a problem

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    [color=Blue]Just insert the nodes into a tree an a proper order. A tree node can have an attached data (SetItemData/GetItemData) - you can attach the classes, representing variables data to the nodes.[/color]
Sign In or Register to comment.