Color ListBox (Need help desperately pls....)

This is a discussion on Color ListBox (Need help desperately pls....) within the C++ Programming forums, part of the General Programming Boards category; Hi, May i know if we are able to change the text color of the List Box? For example, i ...

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    8

    Smile Color ListBox (Need help desperately pls....)

    Hi,

    May i know if we are able to change the text color of the List Box? For example, i have 10 items in the List Box. By default, the words are black in color.
    eg
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    Is there any ways i can change 1 or 2 items to another color, while the rest remain as black?

    eg
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    thanks for the help....
    wayne

  2. #2
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    Here is your desperate help: text color


    This question has been answered many times in depth. The 'search' button will allow you to find friends of days gone by.
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    8
    hi The Brian,

    i'm new to this forum, thanks for enlightening me to use the search button.

    apparently wat i need now is on a listbox created using MFC and only one or two of the items need to b change to another color. wat i had found is to change the whole text in the listbox to another color.

    could u pls help me clear my doubts pls....
    thanks
    wayne

  4. #4
    Registered User r1ck0r's Avatar
    Join Date
    Apr 2005
    Location
    UK
    Posts
    30
    I'm not sure about MFC, but I know with pure win32 api you can use owner drawn listboxes. http://msdn.microsoft.com/library/en...nerdrawn_boxes
    I'm not sure if you can still do that using MFC though, I'll make some example code if you want.

    BTW, there is a forum specifically for windows related questions.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Basic port scanner code .. pls help ???
    By intruder in forum C Programming
    Replies: 18
    Last Post: 03-13-2003, 07:47 AM
  2. i dont know what to do. pls. help!!!!
    By Unregistered in forum C++ Programming
    Replies: 14
    Last Post: 03-14-2002, 02:24 PM
  3. help me pls..... :(
    By mocha_frap024 in forum C++ Programming
    Replies: 2
    Last Post: 02-22-2002, 09:46 AM
  4. C programming - pls pls help me
    By sally arnold in forum C Programming
    Replies: 10
    Last Post: 01-16-2002, 03:55 AM
  5. Pls Help Me In This Question!!!
    By Joanna in forum Windows Programming
    Replies: 1
    Last Post: 10-20-2001, 02:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21