www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/04/19:15:10

From: "A. Sinan Unur" <asu1 AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: textattr() doesn't work as it should
Date: 4 Jul 2001 14:53:29 GMT
Organization: Cornell University
Lines: 35
Sender: verified_for_usenet AT cornell DOT edu (asu1 on slip-32-102-40-179.ny.us.prserv.net)
Message-ID: <Xns90D46EC8F3A70ASINANUNUR@132.236.56.8>
References: <3b431ff7$0$25519$9b622d9e AT news DOT freenet DOT de>
NNTP-Posting-Host: slip-32-102-40-179.ny.us.prserv.net
X-Trace: news01.cit.cornell.edu 994258409 16639 32.102.40.179 (4 Jul 2001 14:53:29 GMT)
X-Complaints-To: usenet AT news01 DOT cit DOT cornell DOT edu
NNTP-Posting-Date: 4 Jul 2001 14:53:29 GMT
User-Agent: Xnews/4.06.22
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Martin Böhnert" <MartinB777 AT gmx DOT net> wrote in
news:3b431ff7$0$25519$9b622d9e AT news DOT freenet DOT de: 

> hi!
> 
> i'm using djgpp (downloaded last sunday...). i'm writing a little
> database in commandline of win95. for different textcolors and
> -backgrounds i use
> textattr(). but only when i use clrscr() the changes will take affect
> on the next printf() command. a change with textattr() without clrscr()
> has no effect. here's the procedure
> 
> void db_write() {
>   textattr(112);
>   clrscr();
>   //printf("write database\n");
>   printf("  martin's cd-datenbank v0.1\n");
>   textattr(31);

<snip>

> if you know the prob then please answer me!

you should not mix conio functions with stdio functions. so instead of 
using printf, use cprintf.

for help, type 

info libc func conio

at the command line.
-- 
--------------------------------
A. Sinan Unur
http://www.unur.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019