home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (C) 1993 Marc Stern (internet: stern@mble.philips.be) */
-
- #define Uses_TProgram
- #define Uses_TDeskTop
- #define Uses_TDialog
- #define Uses_TRect
- #define Uses_TStaticText
- #include "tvtools.h"
-
- #include <stdarg.h>
- #include <stdio.h>
-
-
- TDialog *TheStatusBox = 0;
-
- void RemoveStatusBox()
- {
- if ( TheStatusBox ) { TObject::destroy(TheStatusBox) ;
- TheStatusBox = 0;
- }
- }
-
-
-
- void StatusBox( const char *msg )
-
- {
- RemoveStatusBox();
- TRect r( 0, 0, 40, 9 );
-
- r.move( (TProgram::application->size.x - r.b.x) / 2 ,
- (TProgram::application->size.y - r.b.y) / 2 );
-
- TheStatusBox = new TDialog( r , "Please Wait" );
- TheStatusBox->flags &= ~wfClose;
- TheStatusBox->insert( new TStaticText(TRect(3 , 2 , TheStatusBox->size.x - 2 ,
- TheStatusBox->size.y - 1) ,
- msg)
- );
-
- TProgram::deskTop->insert( TheStatusBox );
- }
-
-
-
-
-
-
- void StatusBoxf( const char *fmt, ... )
-
- { char buffer[256];
-
- vsprintf( buffer , fmt , ... );
- StatusBox( buffer );
- }
-
-