SetConsoleTextAttribute()

This is a discussion on SetConsoleTextAttribute() within the C++ Programming forums, part of the General Programming Boards category; is there a color value for black? I'm trying to output using a black foreground and white background. I've tried ...

  1. #1
    Unregistered
    Guest

    SetConsoleTextAttribute()

    is there a color value for black?
    I'm trying to output using a black foreground and white background. I've tried using FOREGROUND_BLACK but it didn't work.

  2. #2
    Unregistered
    Guest
    black is 0

  3. #3
    0x01
    Join Date
    Sep 2001
    Posts
    88
    Try this:

    SetConsoleTextAttribute (GetStdHandle(STD_OUTPUT_HANDLE), BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY);

    That should make the text black with a very white background.
    Note: You can mix colors.
    inorder to make 'white', you have to mix those three colors.
    You can also change the BACKGROUND to FOREGROUND.
    INTENSITY will make the colors look brighter.

  4. #4
    0x01
    Join Date
    Sep 2001
    Posts
    88
    oh wait, check this out man. I just found this.

    http://sunlightd.virtualave.net/Wind...leChangeColour

    It's a good place for other info on windows console programming too.

Popular pages Recent additions subscribe to a feed

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