Thread: custom console color

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    203

    custom console color

    i've how to use colors with windows console (MSVC++ 6) and was wondering if there is a way to give custom names to the mix so i can use "brightwhite" instead of "FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY" every single time. Can ORd colors be stored together in a single WORD type? would i need to create an enum/switch combo or something? As far as i know there are 15 combinations of FOREGROUND and 15 for BACKGROUND. All i'm wondering is how it can be done, not the actually coding of it

  2. #2
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    522
    A define statement would do it
    Code:
    #define FOREGROUND_BRIGHTWHITE    FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY
    Last edited by C_Coder; 04-06-2002 at 04:04 PM.
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    203
    thanks!! that will definately make things easier to read and understand

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Custom Console Library
    By asbo60 in forum C++ Programming
    Replies: 4
    Last Post: 05-02-2008, 01:03 AM
  2. Critique my lighting model.
    By psychopath in forum Game Programming
    Replies: 4
    Last Post: 08-12-2006, 06:23 PM
  3. how to change background color in console mode
    By smore in forum C++ Programming
    Replies: 1
    Last Post: 12-02-2003, 01:44 PM
  4. Color Glitches in Console Prog.
    By Darkflame in forum C++ Programming
    Replies: 3
    Last Post: 02-18-2002, 11:52 PM
  5. Just one Question?
    By Irish-Slasher in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2002, 10:19 AM