home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
CreativeComputers.iso
/
shareware
/
text
/
stripansi_v1.2
/
source
/
source.lzh
/
alert.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-07-30
|
1KB
|
42 lines
/*************************************************************************\
* Alert () *
* A routine for alerting user of problems or whatever!!! *
* *
* Written by Syd L. Bolton, Copyright (c)1989 *
* *
* Version: 1.11 Date: 03/19/89 Time: 00:10:00 am *
\*************************************************************************/
#include "alert.h"
alert(text)
UBYTE *text;
{
struct Window *AlertWindow;
struct IntuiMessage *message;
ULONG class;
int alert_exit=0;
ATIText2.IText=text;
AlertWindow=OpenWindow(&AlertWin);
PrintIText(AlertWindow->RPort, &ATITextList, 0, 0);
DrawImage(AlertWindow->RPort, &AlertImage, 10, 13);
do
{
WaitPort(AlertWindow->UserPort);
while( (message = (struct IntuiMessage *)
GetMsg(AlertWindow->UserPort) ) != NULL)
{
class = message->Class;
ReplyMsg(message);
if ( class == GADGETUP ) alert_exit=1;
}
} while (alert_exit==0);
CloseWindow(AlertWindow);
}