|
From: Per W. <pw...@ia...> - 2003-04-12 18:40:33
|
No, of course we know how to set colors for text output. It's just that
there is no STANDARD library functions for doing it. The conio package is
definitely not standard, so you can't just move your code to another
compiler and/or operating system and expect it to work.
We can hardly avoid knowing about the conio package since this list has
questions about it every 2-4 weeks.
/Per W
On Sat, 12 Apr 2003, Louis Godio wrote:
> Damien,
> Thank You, I compiled and ran your example under the DevC++ IDE.
> It works wery well. It seems that some of the DevC++ C experts
> are unaware of this.
> I suspect you also know how to change fonts as well. An example of
> this would also help many of us who are told this can't be done.
>
>
> From: "Damien Alleyne" <g_...@ho...>
> Subject: Re: [Dev-C++] Setting text colour Date: Sat, 12 Apr 2003
> 09:20:05 -0400
> Well Louis,
>
> I was surprised by so many people saying that it couldn't be done
> anymore.
> The last time I did text colouring was last year. Anyway, this sample
> works on my
> system which is a P4 running WinXP. It worked when I was runing WinME.
> Tell me if It works on your system.
>
>
> #include <conio.c>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(void)
> {
> printf("Hmmmm. Lets try to change these colors up.\n");
> textcolor(YELLOW);
> printf("This line should be blue\n");
> textcolor(RED);
> printf("This line should be red.\n");
>
> printf("Anyway. Later Guys\n");
> system("PAUSE");
> return 0;
> }
>
>
>
> --- Damien Alleyne <g_...@ho...> wrote:
>
> ---------------------------------
>
>
>
>
>
>
> Take a look at the conio.h header file in the Dev-C++ include directory.
> There are functions in there for console text formatting. Make sure to
> include the conio.c as an additional command while calling the compiler or
> simple include it instead of conio.h.
>
> Original G
> ----Original Message Follows---- From: "Dany P. Wu" To: Subject: [Dev-C++]
> Setting text colour Date: Sat, 12 Apr 2003 21:06:17 +1200 Hi everyone, I'm
> just writing console programs at the moment, and was wondering if there's
> a way of setting foreground and background colour of text? Is this
> possible using standard C++ libraries? Cheers, Dany. -- This mail is a
> natural product. The slight variations in spelling and grammar enhance its
> individual character and beauty and in no way are to be considered flaws
> or defects. ------------------------------------------------------- This
> SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for
> complex code. Debugging C/C++ programs can leave you feeling lost and
> disoriented. TotalView can help you find your way. Available on major UNIX
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________ Dev-cpp-users mailing list
> Dev...@li... TO UNSUBSCRIBE:
> http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
> ---------------------------------
> The new MSN 8: smart spam protection and 2 months FREE*
> -------------------------------------------------------This SF.net email
> is sponsored by: Etnus, makers of TotalView, The debugger for complex
> code. Debugging C/C++ programs can leave you feeling lost and disoriented.
> TotalView can help you find your way. Available on major UNIX and Linux
> platforms. Try it free.
> www.etnus.com_______________________________________________Dev-cpp-users
> mailing lis...@li... UNSUBSCRIBE:
> http://www.noicys.cjb.net/devcpp/ub.htmhttps://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more
> http://tax.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
> for complex code. Debugging C/C++ programs can leave you feeling lost and
> disoriented. TotalView can help you find your way. Available on major UNIX
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|