home *** CD-ROM | disk | FTP | other *** search
/ Best of German Only 1 / romside_best_of_german_only_1.iso / wissen / dos / wgraph / entpack.exe / WGBSP!.EXE / BSP3.PAS < prev    next >
Pascal/Delphi Source File  |  1992-12-01  |  886b  |  46 lines

  1. program Beispiel3;
  2.  
  3. uses GApp,
  4.      GDecl,
  5.      GViews;
  6.  
  7. type TApplication=object(TApp)
  8.        procedure SetDesktopFrame(Titel:string);virtual;
  9.        procedure SetDesktopBackground;virtual;
  10.      end;
  11.  
  12. var MyProg:TApplication;
  13.  
  14. {Implementation TApplication}
  15.  
  16. procedure TApplication.SetDesktopFrame(Titel:string);
  17. var R:TRect;
  18. begin
  19.   with Desktop^ do
  20.    begin
  21.      GetBounds(R);
  22.      Frame:=new(PFrame, Init(R,R,Titel,winDouble+winPanel+winMenu));
  23.      Frame^.Palette:=Palette1;
  24.      List^.InsertItem(Frame);
  25.    end;
  26. end;
  27.  
  28. procedure TApplication.SetDesktopBackground;
  29. var R:TRect;
  30. begin
  31.   with Desktop^ do
  32.    begin
  33.      R:=Frame^.Area;
  34.      Bgrd:=new(PDsktpBgrd, Init(R));
  35.      Bgrd^.Palette[7]:=#14;
  36.      Bgrd^.Palette[8]:=#11;
  37.      List^.InsertItem(Bgrd);
  38.    end;
  39. end;
  40.  
  41.  
  42. begin
  43.   MyProg.Init('Beispiel 3');
  44.   MyProg.Run;
  45.   MyProg.Done;
  46. end.