home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Pascal / BPASCAL.700 / D11 / DDOCDEMO.ZIP / RESOURC2.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-10-01  |  981 b   |  43 lines

  1. {************************************************}
  2. {                                                }
  3. {   Turbo Vision 2.0 Demo                        }
  4. {   Copyright (c) 1992 by Borland International  }
  5. {                                                }
  6. {************************************************}
  7.  
  8. program Resourc2;
  9.  
  10. uses Objects, Drivers, Views, Menus, Dialogs, App;
  11.  
  12. var
  13.   MyRez: TResourceFile;
  14.  
  15. type
  16. PMyApp = ^TMyApp;
  17. TMyApp = object(TApplication)
  18.   constructor Init;
  19.   procedure InitStatusLine; virtual;
  20. end;
  21.  
  22. constructor TMyApp.Init;
  23. const
  24.   MyRezFileName: FNameStr = 'MY.TVR';
  25. begin
  26.   MyRez.Init(New(PBufStream, Init(MyRezFileName, stOpen, 1024)));
  27.   if MyRez.Stream^.Status <> 0 then Halt(1);
  28.   RegisterType(RStatusLine);
  29.   inherited Init;
  30. end;
  31.  
  32. procedure TMyApp.InitStatusLine;
  33. begin
  34.   StatusLine := PStatusLine(MyRez.Get('Waldo'));
  35. end;
  36.  
  37. var WaldoApp: TMyApp;
  38. begin
  39.   WaldoApp.Init;
  40.   WaldoApp.Run;
  41.   WaldoApp.Done;
  42. end.
  43.