Thread: Text effects in C

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    8

    Text effects in C

    Hey,

    Is it possible to change the text and background colours? or underline the text and stuff like that? I have searched the forums a see it can be done in C++ but can it be done in normal C?

    Thanks

    Andy

  2. #2
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    869
    C++ has no functions built-in to support text colour, so I don't know what you found for C++. Whether you use C or C++, you need to use a third party library, or send potentially non-portable character sequences to your terminal to control colour.

    One way is using ANSI escape codes.

    Under a flavour of unix, try ncurses.

  3. #3
    Registered User
    Join Date
    Feb 2006
    Location
    Great India
    Posts
    24
    You can change the colours by using <conio.h> and <graphics.h>. I know these are non-standard c-headers but provide very cool support.
    Try them out and you will got the output that you want.

    REALNAPSTER

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 04:49 PM
  2. console text effects
    By algi in forum C++ Programming
    Replies: 4
    Last Post: 12-17-2004, 04:15 PM
  3. Appending text to an edit control
    By dit6a9 in forum Windows Programming
    Replies: 3
    Last Post: 08-13-2004, 09:52 PM
  4. Scrolling The Text
    By GaPe in forum C Programming
    Replies: 3
    Last Post: 07-14-2002, 04:33 PM
  5. Replies: 1
    Last Post: 07-13-2002, 05:45 PM