- // PROGRAMME EN C SOUS DOS TURBO C++2 BORLAND
- // ecrit le 30-06-2002 par cmarsc
- // EFFETS D'AFFICHAGES 3
-
- #include <graphics.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <conio.h>
- #include <time.h>
- #include <dos.h>
-
- #define MAX_TAILLE 40
-
- int main(void)
- {
-
- int gdriver = DETECT, gmode, errorcode;
- int hauteur_texte;
- int i1;
- char texte[10];
- time_t t;
-
- initgraph(&gdriver, &gmode, "c:\\tc\\bgi");
- errorcode = graphresult();
- if (errorcode != grOk)
- {
- printf("Graphics error: %s\n", grapherrormsg(errorcode));
- printf("Press any key to halt:");
- getch();
-
- exit(1);
- }
-
- do {
- hauteur_texte = 0;
-
- for (i1=1; i1 < MAX_TAILLE; i1++)
- {
- time(&t);
- settextstyle(SMALL_FONT, HORIZ_DIR, i1);
- sprintf(texte, "%0.9s", ctime(&t)+11);
-
-
- setcolor(BLACK);
- outtextxy(16, hauteur_texte, texte);
-
- setcolor(RED);
- outtextxy( 400-(hauteur_texte/1), hauteur_texte, texte);
-
- setcolor(YELLOW);
- outtextxy( 401-(hauteur_texte/1), hauteur_texte, texte);
-
- delay(50);
- if (i1 < MAX_TAILLE - 1) {
- hauteur_texte += (textheight(texte) /3);
- setfillstyle(1, LIGHTBLUE);
- bar (1,1,getmaxx(),getmaxy());
- }
- }
-
- hauteur_texte = 0;
- delay(1000);
- } while (!kbhit());
-
- getch();
- closegraph();
- return 0;
- }
// PROGRAMME EN C SOUS DOS TURBO C++2 BORLAND
// ecrit le 30-06-2002 par cmarsc
// EFFETS D'AFFICHAGES 3
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <time.h>
#include <dos.h>
#define MAX_TAILLE 40
int main(void)
{
int gdriver = DETECT, gmode, errorcode;
int hauteur_texte;
int i1;
char texte[10];
time_t t;
initgraph(&gdriver, &gmode, "c:\\tc\\bgi");
errorcode = graphresult();
if (errorcode != grOk)
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}
do {
hauteur_texte = 0;
for (i1=1; i1 < MAX_TAILLE; i1++)
{
time(&t);
settextstyle(SMALL_FONT, HORIZ_DIR, i1);
sprintf(texte, "%0.9s", ctime(&t)+11);
setcolor(BLACK);
outtextxy(16, hauteur_texte, texte);
setcolor(RED);
outtextxy( 400-(hauteur_texte/1), hauteur_texte, texte);
setcolor(YELLOW);
outtextxy( 401-(hauteur_texte/1), hauteur_texte, texte);
delay(50);
if (i1 < MAX_TAILLE - 1) {
hauteur_texte += (textheight(texte) /3);
setfillstyle(1, LIGHTBLUE);
bar (1,1,getmaxx(),getmaxy());
}
}
hauteur_texte = 0;
delay(1000);
} while (!kbhit());
getch();
closegraph();
return 0;
}