Category : C Source Code
Archive   : BCWINDOW.ZIP
Filename : SAMPLE.C

 
Output of file : SAMPLE.C contained in archive : BCWINDOW.ZIP
#include
#include
#include
#include
#include

#define NULL 0


main ()
{
static struct WINDOW *w1 = NULL;
struct WINDOW *w2[10];
int x, y, colorbuf1, colorbuf2;
register i;

get_video_mode ();
if (!w1)
{
w1 = push_window(13,1,54,10,1,0, "RH", "Bill's Window Demo", blue);
w_printf( w1,0,1," Window routines for Turbo C 2.0 ",green);
w_printf( w1,0,2," Designed and written by Bill Crum. ",white);
w_printf( w1,0,3," If you are even slightly impressed,",cyan);
w_printf( w1,0,4," I am looking for work as a programmer.",red);
w_printf( w1,0,5," Work #408-945-0294.",brown);
w_printf( w1,0,6," or message on PDSE #408-745-0880.",brown);

}
else
push (w1);
cursor_off ();
delay (2500);
colorbuf1 = black;
colorbuf2 = blue;
for ( y = 0; y < 10; y++ )
{
if (y < 5)
{
w2[y] = push_window(2 + (4 * y),2 + (3 * y),50,8,1,y, "NR", "Exploding Window", black += 0x10);
w_printf( w2[y],0,2," There are 5 styles of borders.",red);
w_printf( w2[y],0,3," And a variety of background colors.",brown);
delay (500);
}
else
{
w2[y] = push_window(2 + (4 * (y - 5)),2 + (3 * (y - 5)),50,8,0,y - 5, "RN", "Normal Window", blue += 0x10);
w_printf( w2[y],0,1," If you are even slightly impressed,",cyan);
w_printf( w2[y],0,2," I am looking for work as a programmer.",brown);
w_printf( w2[y],0,3," If you are even slightly impressed,",white);
w_printf( w2[y],0,4," I am looking for work as a programmer.",green);
delay (500);
}
}

black = colorbuf1;
blue = colorbuf2;
clr_window (w2[9]);
w_printf (w2[9],0,2," Window cleared using clr_window( *wn.)",red);
delay (2000);
clr_window (w2[9]);
delay (2000);
w_printf (w2[9],0,5," Scrolled up using scroll_window(*wn,1)",red);
for ( y = 0; y < 6; y++)
{
delay (500);
scroll_window (w2[9],1);
}
delay (1000);
w_printf (w2[9],0,0," Or scrolled down using scroll_window(*wn,0)",red);
for ( y = 0; y < 6; y++)
{
delay (500);
scroll_window (w2[9],0);
}
delay (2500);

for ( y = 9; y >= 0; y-- )
{
delay (500);
close_wind (w2[y]);
}
w_printf (w1,0,7," Hit ESCape to exit.",white);

while (getchx() != 0x1b);
pop (w1);
cursor_on ();
}





  3 Responses to “Category : C Source Code
Archive   : BCWINDOW.ZIP
Filename : SAMPLE.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/