colorlib.h

This is a discussion on colorlib.h within the C Programming forums, part of the General Programming Boards category; Hi, I just finished my newest invention, the color library. It is made for changing fg color / bg color ...

  1. #1

    Join Date
    Jan 2006
    Posts
    28

    colorlib.h

    Hi, I just finished my newest invention, the color library.
    It is made for changing fg color / bg color in console apps.
    Simply place the file in your includes directory, look at the colorcodes, find YOUR combo, #include <colorlib.h>, SetConsoleTextAttribute ( h, [color code] );, and you're good to go!

    colorlib.zip

    OH, if this is the wrong section, and is just for support, go ahead and move it.

  2. #2
    cwr
    cwr is offline
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    869
    It's in the wrong section because SetConsoleTextAttribute is not a standard C function. I assume this is directed at Windows?

    Also, I wouldn't call it a library, it's a header with a long list of #defines.

  3. #3

    Join Date
    Jan 2006
    Posts
    28
    It's a sort of library.
    Well, I said that a mod could move it.
    It'll make code shorter by a bit, ppl won't have to write stuff like FOREGROUND_RED | BACKGROUND_BLUE and stuff, just one, simple little color code.

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