home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
disk
/
misc
/
tracked
/
source.lha
/
sources
/
ST.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-16
|
724b
|
29 lines
/* ST.c Simple message routine for all OS releases */
#include <intuition/intuition.h>
extern struct IntuitionBase *IntuitionBase;
extern struct TextAttr Style;
struct IntuiText
Body = { 0, 1, JAM2, 10, 10, &Style, NULL, NULL },
NegText = { 0, 1, JAM2, 5, 3, &Style, NULL , NULL };
void ShowText(Window, str1, str2)
struct Window *Window;
UBYTE str1[], str2[];
{
ULONG Width1, Width2, Height;
Body.IText = str1;
if (str2) NegText.IText = str2;
else NegText.IText = (UBYTE *)" OK ";
Width1 = IntuiTextLength(&Body) + 60;
Width2 = IntuiTextLength(&NegText) + 60;
Height = 60;
if (Width2 > Width1) Width1 = Width2;
AutoRequest(Window, &Body, NULL, &NegText, 0L, 0L, Width1, Height);
}