Chaning color of a textbox (or any control)

This is a discussion on Chaning color of a textbox (or any control) within the Windows Programming forums, part of the Platform Specific Boards category; I want to change, I belive, background color. I have no clue on how to do it, also I want ...

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    731

    Chaning color of a textbox (or any control)

    I want to change, I belive, background color. I have no clue on how to do it, also I want to choose custom rgb or pre made colors (eg. lightblue).

    Thanks very much.

  2. #2
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    procces WM_CTLCOLORXXX message in callback function.
    XXX can be : BTN, DLG, EDIT, ...
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  3. #3
    Registered User
    Join Date
    Mar 2005
    Location
    Juneda
    Posts
    287
    you can use the ChooseColor with the CHOOSECOLOR struct to get the choose color standard dialog, that will fill the COLORREF 'value' on the CHOOSECOLOR struct with the selected color; then simply apply the color.
    Niara

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. (Multiline) Edit Control Limit
    By P4R4N01D in forum Windows Programming
    Replies: 9
    Last Post: 05-17-2008, 11:56 AM
  2. line number on a rich edit control
    By rakan in forum Windows Programming
    Replies: 1
    Last Post: 02-18-2008, 06:58 AM
  3. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 05:23 AM
  4. very weird .h problem
    By royuco77 in forum C++ Programming
    Replies: 1
    Last Post: 09-11-2005, 07:55 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

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