From: "gunno" Newsgroups: comp.os.msdos.djgpp References: Subject: SV: dos color ? Lines: 32 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: Date: Tue, 13 Jun 2000 18:49:25 GMT NNTP-Posting-Host: 195.252.60.144 X-Complaints-To: abuse AT telia DOT com X-Trace: newsc.telia.net 960922165 195.252.60.144 (Tue, 13 Jun 2000 20:49:25 MET DST) NNTP-Posting-Date: Tue, 13 Jun 2000 20:49:25 MET DST Organization: Telia Internet To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id PAB06711 Reply-To: djgpp AT delorie DOT com "smile773" skrev i meddelandet news:kra15.6974$iy DOT 531598 AT bgtnsc06-news DOT ops DOT worldnet DOT att DOT net... > Could one of you nice persons please share some code > so that I can change the dos console to blue with white > letters ? > > Could I also change the color of this filename to green > if it begins with utility for example. > > Utility_dos_directory_long_file_names_ver102=lfndos.exe > I'm using something like: #include #include int main(){ ScreenPutString("Hello",1*16+15,0,42); return 0; } Compiled with djgpp v. 2.8.1 this works for me. After I have run that program, the colour attributes of the DOS box has changed. (And of course I'm glad if anybody could tell me better ways of doing this) More information: 1: That file 'pc.h' 2: At the DOS prompt, type 'info libc alpha' and take a look at at the functions starting with 'Screen ...'