Category : C Source Code
Archive   : EZWIND.ZIP
Filename : SAMPLE03.C

 
Output of file : SAMPLE03.C contained in archive : EZWIND.ZIP
/* SAMPLE03.C

Giving the appearance of an infinite number of windows when in fact
only one window buffer is being used. Before starting a snapshot is
taken allowing the original screen to be restored when done.

*/
#include /* All programs using EZWINDOW must include
this header file.*/

char x,y;

main()

{
x=y=1;

initwindows(DOUBLE,GREEN,BLACK,BLUE,LTGRAY); /* Must always be called
before any other
EZWINDOW functions */

snapshot(); /* store the current screen */
clrscr(); /* clear the screen.*/
cursoroff(); /* turn the cursor off till we restore screen */

/* Create an infinite number of windows with random staring points.*/

while (!kbhit())
{
makewindow(1,x,y,x+10,y+22,"Hit any key to end",NOSHADOW);
x = rand() % 24;
y = rand() % 59;
}


develop(); /* restore the original screen */
cursoron(); /* turn the cursor back on */

}


  3 Responses to “Category : C Source Code
Archive   : EZWIND.ZIP
Filename : SAMPLE03.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/