Category : C Source Code
Archive   : TCU_31.ZIP
Filename : WINDOWS.C

 
Output of file : WINDOWS.C contained in archive : TCU_31.ZIP
#include
#include
#include
#include "..\include\tcu.h"

void main (void)
{
WINDOW my_window1,
my_window2;
int i,
length;
char input_buffer[6];

open_window (&my_window1,
5, 3,
30, 15,
"Window I",
colour_attrib (YELLOW, BLUE),
colour_attrib (WHITE, BLUE),
colour_attrib (CYAN, BLUE),
BOX_DOUBLE);

open_window (&my_window2,
42, 2,
25, 20,
NULL,
colour_attrib (BLUE, LIGHTGRAY),
colour_attrib (LIGHTGREEN, LIGHTGRAY),
colour_attrib (LIGHTCYAN, LIGHTGRAY),
BOX_DOUBLE);

wprintf (&my_window1, " Control Window\n\n");

do {

wprintf (&my_window1, "Lines to display? ");
strcpy (input_buffer, "10");
wgets (&my_window1, 5, input_buffer, &length);
wprintf (&my_window1, "\n");

if (length == -1)
if (get_confirm (20, 20, colour_attrib (RED, WHITE),
colour_attrib (BLACK, WHITE),
"Are you sure you want to quit?")) {
wprintf (&my_window1, "\nOooh! You pressed ESCape on me!");
break;
}

for (i=1; i<=atoi(input_buffer); i++)
wprintf (&my_window2, "Window 2, Line #%d\n", i);
wprintf (&my_window2, "---End of display---\n");

} while (atoi(input_buffer));

wprintf (&my_window1, "\n\nPress return to clear the\nwindows");

while (!kbhit());
getch();

close_window (&my_window1);

while (!kbhit());
getch();

close_window (&my_window2);

while (!kbhit());
getch();
}


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