Mail Archives: djgpp/1998/11/05/17:00:10
From: | Nicolas Blais <alphaqt AT phreaker DOT net>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: I cant get textattr to work
|
Date: | Thu, 05 Nov 1998 16:57:07 -0500
|
Organization: | Alpha Quark Technologie
|
Lines: | 33
|
Message-ID: | <36421F33.599B36F2@phreaker.net>
|
References: | <71sogc$pkq$1 AT nnrp1 DOT dejanews DOT com>
|
NNTP-Posting-Host: | ts1-33.f2006.quebectel.com
|
Mime-Version: | 1.0
|
X-Mailer: | Mozilla 4.5 [en] (Win95; I)
|
X-Accept-Language: | en
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
It's shouldn't work with printf. Replace printf with cprintf. Here's
your code modified.
#include <stdio.h>
#include <conio.h>
int main()
{
textcolor(RED);
textbackground(LIGHTBLUE);
cprintf("\nthis is a test\n");
return 0;
}
jackstinchcombe AT my-dejanews DOT com wrote:
>
> I cant get textattr, textcolor or textbackground to work, the colour
> combination on the screen stays the same. The following code just puts "this
> is a test" on the screen in the normal white-on-black, rather than the
> red-on-white i expected.
>
> Any ideas what im doing wrong?
>
> #include <stdio.h>
> #include <conio.h>
> void main(void) {
> textcolor (12);
> textbackground (15);
> printf("\nthis is a test\n");
> }
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
- Raw text -