Thread: Tree-view label colors

  1. #1
    Registered User
    Join Date
    Feb 2005

    Tree-view label colors


    I'm using CVI/LabWindows as the RTE. Since the older Version 5.5 doesn't have a tree-view I made one up using the standard WinAPI by putting the tree-view into a wrapping window of the same size. So now I get the standard messages the tree-view sends to its parent (thus my own wrapping window) and can react to them - such as WM_NOTIFIY. I've implemented functions as Drag&Drop and label editing so far.

    Now, I also need to associate a color with each item. I could use the images for that but apparently I already use them for different information. Now I would like to have the labels a certain color. Or if possible draw some whitespaces with a specific background color.l

    I think I already read, that by standard the tree-view does not allow colors for the item labels. I also found the Microsoft example CustomDraw but I can't figure out how it's working.

    Thanks in advance for any suggestions.

  2. #2

  3. #3
    Registered User
    Join Date
    Feb 2005
    Thanks allot. I wouldn't have thought it was THAT easy. I was more or less just looking for the wrong key words.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 05:59 PM
  2. Validate Tree View Label Edit?
    By SMurf in forum Windows Programming
    Replies: 2
    Last Post: 04-28-2006, 08:23 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. BST/Red and Black Tree
    By ghettoman in forum C++ Programming
    Replies: 0
    Last Post: 10-24-2001, 10:45 PM