Category : Files from Magazines
Archive   : PCTJ8805.ZIP
Filename : TIMEPOP.C

 
Output of file : TIMEPOP.C contained in archive : PCTJ8805.ZIP
/* TimePop.C Illustration of a simple OS/2 VioPopup application.
Pops up and displays a message once every so often

To compile: CL -Lp -Zp timepop.c
To execute: DETACH TIMEPOP
To remove: Press [Esc] when it is popped up.
*/

#include
#include

char Msg[] = "Another interval has passed. Press any key ...";

main()
{
unsigned waitflag, err;
long seconds = 20;

while(1) {
err=DOSSLEEP( seconds * 1000L ); /* interval in millisecs */

waitflag=1; /* wait if not ready */
err=VIOPOPUP( &waitflag, 0 );

VIOSETCURPOS( 12, 15, 0);
VIOWRTTTY( Msg, strlen( Msg ), 0 );

if ( getch() == 27 ) DOSEXIT ( 1,0 ); /* Esc kills it */
VIOENDPOPUP( 0 );
}
}


  3 Responses to “Category : Files from Magazines
Archive   : PCTJ8805.ZIP
Filename : TIMEPOP.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/