home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pctchnqs / 1991 / number1 / hello2.pas < prev    next >
Pascal/Delphi Source File  |  1991-03-07  |  923b  |  37 lines

  1. {************************************************}
  2. {                                                }
  3. {   Turbo Pascal for Windows                     }
  4. {   Demo program                                 }
  5. {   Copyright (c) 1991 by Borland International  }
  6. {                                                }
  7. {************************************************}
  8.  
  9. program Hello;
  10.  
  11. uses WObjects, WinTypes, WinProcs;
  12.  
  13. type
  14.  
  15.   { Define a TApplication descendant }
  16.   THelloApp = object(TApplication)
  17.     procedure InitMainWindow; virtual;
  18.   end;
  19.  
  20. { Construct the THelloApp's MainWindow object }
  21. procedure THelloApp.InitMainWindow;
  22. begin
  23.   MainWindow := New(PWindow,
  24.                     Init(nil, 'Hello, Turbo Pascal World'));
  25. end;
  26.  
  27. { Declare a variable of type THelloApp }
  28. var
  29.   HelloApp: THelloApp;
  30.  
  31. { Run the HelloApp }
  32. begin
  33.   HelloApp.Init('HelloApp');
  34.   HelloApp.Run;
  35.   HelloApp.Done;
  36. end.
  37.