delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/03/04/04:50:57

From: "Graham Rounce" <graham AT rounce DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Help with textcolor and ScreenGetCursor?
Date: Tue, 4 Mar 2003 09:21:50 -0000
Lines: 27
Message-ID: <b41s53$1al$1@newsg2.svr.pol.co.uk>
NNTP-Posting-Host: 217.134.33.74
X-Trace: newsg2.svr.pol.co.uk 1046770659 1365 217.134.33.74 (4 Mar 2003 09:37:39 GMT)
NNTP-Posting-Date: 4 Mar 2003 09:37:39 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Can anyone please tell me why textcolor isn't working, and ScreenGetCursor
seems to return y and y instead of x and y?

The prog below prints "hello" 16 times all in the same color, then "11 11".

Thanks,

Graham

       #include <stdio.h>
       #include <pc.h>

       main() {
               int i,*x,*y;

               for (i=0;i<16;i++) {
                       textcolor(i);
                       printf("\nhello");
               }

               ScreenSetCursor(5,11);
               ScreenGetCursor(x,y);
               printf("%d %d",*x,*y);
       }



- Raw text -


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