TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Justin Kilimnik
from: Billy O`Connor
date: 1994-08-27 13:55:04
subject: Emx/Gcc

JK>This might be a dumb question but what is the best way to 
JK>provide _formated_ (ie Colours, etc) to text mode apps with 
JK>GCC/2 and EMX08h. I am used to Borland Compilers and would 
JK>normally use the CONIO fuctions cprintf,cputs,etc... 

Hi, Justin.
The VIO Call VioWrtCharStrAttr will do what cprintf does.

#define INCL_VIO
#include 

INT main (SHORT sArgc,CHAR  *ppArgv[]) {

 CHAR *szOutString="hello";
 USHORT usRow = 10; /* row to print on */ 
 USHORT usCol = 20; /* column to print on */ 
 BYTE bAttr = 1; /* blue on black */
 HVIO   hvio = 0 ;

 VioWrtCharStrAtt(szOutString, 
    strlen(szOutString), 
    usRow, 
    usCol, 
    &bAttr, 
    hvio );
}
___
 * MR/2 2.05 NR * billyoc{at}netcom.com

--- Maximus/2 2.01wb

* Origin: Sir Rulneck's Round Table BBS (1:333/337)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 712/353 623 713/888 800/1
@PATH: 333/337 101/330 180 324/288 3615/50 229/2 12/2442 711/409 54/54
@PATH: 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.