home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 15
/
CD_ASCQ_15_070894.iso
/
maj
/
680
/
examples
/
center.c
next >
Wrap
C/C++ Source or Header
|
1994-03-14
|
518b
|
30 lines
/*
** CENTER.C: Displays a message centered on the screen.
*/
#include <string.h>
#include <pictor.h>
char *msg = "Hello, from the PICTOR library!";
void main()
{
VIDEOSTRUCT vstruct;
/* initialize library */
initvideo();
getvconfig(&vstruct);
vcolor(foreback(BOLD+WHITE,BLUE));
cls();
setvpos(center(1,vstruct.rows),
center(strlen(msg),vstruct.columns));
vputs(msg);
kbdread();
/* restore screen */
vcolor(foreback(WHITE,BLACK));
cls();
}