#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    Delhi
    Posts
    1
    Rep Power
    0

    Talking VC++ MFC Challenge TREE CONTROL WITH Checkboxes


    Dear All,

    I am developing an application in which I require a "tree control with checkboxes".
    The structure of tree control is as:

    Main_Root
    Child_1
    Child_2
    Child_3
    Child_4
    Child_5
    Child_6

    ie. simple tree having one main root and having many child items.

    I have two problems related to it.

    1)
    All child items should be checked to TRUE whenever we click 'root' checkbox and vice-versa. How to proceed for it ???????

    I mean to say that which event should I capture for this.( ie. TVN_SELCHANGING )
    Please send some code for this if possible.

    2)
    Is there any way to disable a particular check-box in tree control.

    Thanks in advance.
  2. #2
  3. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    29
    www.codeproject.com is always a good place to find MFC examples. The following article isn't the best one I've seen, but it might answer some of your questions:

    http://www.codeproject.com/useritems/vtree.asp

IMN logo majestic logo threadwatch logo seochat tools logo