home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / POLYEDIT.LZH / LIB / TEST.CPP < prev    next >
C/C++ Source or Header  |  1996-01-05  |  951b  |  57 lines

  1.  
  2. #include <owl\owlpch.h>
  3. #include <owl\applicat.h>
  4. #include <owl\framewin.h>
  5. #include <owl\dc.h>
  6. #include <stdio.h>
  7. #include <dos.h>
  8.  
  9. extern "C" {
  10.     #include "lib.h"
  11. };
  12.  
  13. #include "message.h"
  14.  
  15. static    TMessageWindow    *MessageOut ;
  16.  
  17. class TMyApp : public TApplication {
  18.   public:
  19.     TMyApp() : TApplication() {}
  20.  
  21.   protected:
  22.       BOOL    isidle ;
  23.     void    InitMainWindow();
  24.     BOOL    IdleAction( long );
  25. };
  26.  
  27. void TMyApp::InitMainWindow()
  28. {
  29.     isidle = TRUE ;
  30.     MessageOut = new TMessageWindow( "message window", 100 );
  31.     SetMainWindow( MessageOut->GetWindowPtr() );
  32. }
  33.  
  34. BOOL    TMyApp::IdleAction( long /* idleCount */ )
  35. {
  36. #if    1
  37.     if ( isidle )
  38.     {
  39.         MessageWarning( "Warning test\n" );
  40.         MessageWarning( "Warning test\n" );
  41.         MessageError( "Error test\n" );
  42.         isidle = FALSE ;
  43.     }
  44. #endif
  45.     return FALSE ;
  46. }
  47.  
  48.  
  49. int OwlMain(int /*argc*/, char* /*argv*/ [])
  50. {
  51.     if ( LibraryInit() < 0 )
  52.         return -1 ;
  53.  
  54.     return TMyApp().Run();
  55. }
  56.  
  57.