CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2011
    Posts
    23

    [RESOLVED] 24bit Bitmaps in an MFC Tree-view Control

    Hello all, Thank you in advance. I am writing an application wherein there is a dialog box in which I have placed a Tree-view Control (drag and drop visual control into the dialog box in DevStudio). What I want to know is how do I get the tree-view control to display any bitmaps beyond 4bit Bitmaps.

    I would like to utilize greater depth of color and the nicer images that are available these days . . . Any one know how to achieve this?

    Thanks again,

    Perfect Health and Clarity of Mind,

    Victor

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: 24bit Bitmaps in an MFC Tree-view Control

    Tree control uses image list(s) with the images to display. While creating the image list you can choose also the depth of color. See CImageList::Create with nFlags parameter
    Victor Nijegorodov

  3. #3
    Join Date
    Oct 2011
    Posts
    23

    Re: 24bit Bitmaps in an MFC Tree-view Control

    Yes, this is true, but the issue with that approach, is that the Create method that accepts the style constant for color depth doesn't allow for setting a transparent mask. And the Create method that allows a transparent mask doesn't allow for color depth. Kind of a catch-22.

    Thanks again, though, I do appreciate your time and efforts.

    --Victor

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: 24bit Bitmaps in an MFC Tree-view Control

    Did you look at the CImageList::Add method?
    Victor Nijegorodov

  5. #5
    Join Date
    Oct 2011
    Posts
    23

    Re: 24bit Bitmaps in an MFC Tree-view Control

    No, I did not. I have been creating the image list with the image all at once. Very remiss of me. Thank you this works just fine.

    Many Thanks,

    --Victor

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: [RESOLVED] 24bit Bitmaps in an MFC Tree-view Control

    You are welcome!
    Victor Nijegorodov

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