CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Posts
    12

    CTreeCtrl Adding Image

    Hi ,


    i am working with CTreeCtrl,
    Here i need to add and remove IMAGE
    on the tree item at runtime. ie add an image
    only on the particular tree item . How can i do this.
    i have tried something like this .

    HTREEITEM itemSelected = mtreeCtrl.GetSelectedItem();
    mtreeCtrl.SetImageList(&mImageList, LVSIL_NORMAL);

    the problem here is Image gets added to all the items
    in the tree view . i just want to know how to associate
    an image to particular tree item.

    i am using CTreeCtrl.

    Thanks in Advance.

  2. #2
    Join Date
    Feb 2006
    Location
    Croatia - Zagreb
    Posts
    459

    Re: CTreeCtrl Adding Image

    Maybe if you try with: CTreeCtrl::SetItemImage?
    Also you missed the forum board.
    this is C++ (Non Visual C++ Issues), and there isd also Visual C++ Programming board.
    And it will really help you to acctually read how to use CTreeCtrl class
    http://msdn.microsoft.com/en-us/libr...b4(VS.80).aspx
    You just divided by zero, didn't you?

  3. #3
    Join Date
    Jun 2008
    Posts
    12

    Re: CTreeCtrl Adding Image

    thanks a lot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured