This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/_dwshutd.c

30 lines
794 B
C
Raw Normal View History

#include <wdefwin.h>
#include <stdio.h>
void main()
{
FILE *sec;
_dwSetAboutDlg( "Hello World About Dialog",
"About Hello World\n"
"Copyright 1994 by WATCOM\n" );
_dwSetAppTitle( "Hello World Application Title" );
_dwSetConTitle( 0, "Hello World Console Title" );
printf( "Hello World\n" );
sec = fopen( "CON", "r+" );
_dwSetConTitle( fileno( sec ),
"Hello World Second Console Title" );
_dwDeleteOnClose( fileno( sec ) );
fprintf( sec, "Hello to second console\n" );
fprintf( sec, "Press Enter to close this console\n" );
fflush( sec );
fgetc( sec );
fclose( sec );
_dwShutDown();
/*
do more computing that does not involve
console input/output
*/
}