home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / grafik / wgraph1 / demo / wgdemo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-12-26  |  16.7 KB  |  553 lines

  1. {$F+}
  2. (************************************************************
  3. *                                                           *
  4. *  DEMONSTRATIONSPROGRAMM für die Klassenbibliothek WGRAPH  *
  5. *                                                           *
  6. *        Folgende Units liegen als Quelltexte in der        *
  7. *        selbstextrahierenden Datei WGDEMOQT.EXE            *
  8. *                           bei                             *
  9. *                                                           *
  10. *   GCLOCK/GINFO/GQUELL/GMINIDB/GDIAG/GPAINT/GFILEDLG       *
  11. *                                                           *
  12. ************************************************************)
  13.  
  14. program WGDEMO;
  15.  
  16. uses Overlay,
  17.      GDecl,
  18.      GEvent,
  19.      GViews,
  20.      GDlg,
  21.      GApp,
  22.      GPCX,
  23.      GClock,
  24.      GInfo,
  25.      GQuell,
  26.      GMiniDB,
  27.      GDiag,
  28.      GPaint,
  29.      GFileDlg,
  30.      Graph;
  31.  
  32. {$O GPCX}
  33. {$O GClock}
  34. {$O GInfo}
  35. {$O GQuell}
  36. {$O GMiniDB}
  37. {$O GDiag}
  38. {$O GPaint}
  39. {$O GFileDlg}
  40.  
  41. const cmOwn    = 101;
  42.       cmList   = 102;
  43.       cmMemory = 103;
  44.       cmUhr    = 104;
  45.  
  46.       cmDPrinter = 201;
  47.       cmVektor   = 202;
  48.       cmListBox  = 203;
  49.       cmTools    = 204;
  50.       cmMaus     = 205;
  51.       cmJoyStick = 206;
  52.  
  53.       cmErfassen = 301;
  54.       cmAnzeigen = 302;
  55.  
  56.       cmDia1     = 401;
  57.       cmFarn     = 402;
  58.       cmPaint    = 403;
  59.  
  60.       cmNoFunction = 99;
  61.  
  62.       msgSetClock = 1;  {Digitaluhr neu setzen}
  63.  
  64. type TApplication=object(TApp)
  65.        procedure SetDesktopFrame(Titel:string); virtual;
  66.        procedure SetDesktopBackground; virtual;
  67.        procedure InitMenuBar; virtual;
  68.        procedure HandleEvent; virtual;
  69.        procedure SetDialogData; virtual;
  70.        procedure SpeicherStatus;
  71.        procedure DigitalUhr;
  72.        procedure Lister(Nummer:byte);
  73.        procedure DruckerDialog;
  74.        procedure VektorZeichensaetze;
  75.        procedure AdressDB(DInput:boolean);
  76.        procedure KuchenDiagramm;
  77.        procedure FarnBlatt;
  78.        procedure Paint;
  79.        procedure InputDialog(FType:str12);
  80.        procedure BildSpeichern;
  81.        procedure ToolBar;
  82.        procedure MausDemo;
  83.        procedure JoystickDemo;
  84.      end;
  85.  
  86.      PNewDTBgrd=^TNewDTBgrd;
  87.      TNewDTBgrd=object(TDsktpBgrd)
  88.        BgImage:TPCXImage;
  89.        procedure Draw;virtual;
  90.      end;
  91.  
  92.      tPDlgData=record
  93.                  Schalter:string[19];   {DruckerDialog}
  94.                end;
  95.  
  96.  
  97. var MyProg:TApplication;
  98.     PrintDialogData:tPDlgData;
  99.  
  100. {Implementation TApplication}
  101.  
  102. procedure TApplication.SetDesktopFrame(Titel:string);
  103. var R:TRect;
  104. begin
  105.   with Desktop^ do
  106.    begin
  107.      GetBounds(R);
  108.      Frame:=new(PFrame, Init(R,R,Titel,winDouble+winPanel+winMenu));
  109.      Frame^.Palette:=Palette1;
  110.      List^.InsertItem(Frame);
  111.    end;
  112. end;
  113.  
  114. procedure TApplication.SetDesktopBackground;
  115. var R:TRect;
  116.     NBgrd:PNewDTBgrd;
  117. begin
  118.   with Desktop^ do
  119.    begin
  120.      R:=Frame^.Area;
  121.      NBgrd:=new(PNewDTBgrd, Init(R));
  122.      NBgrd^.Palette[7]:=#14;
  123.      NBgrd^.Palette[8]:=#11;
  124.      List^.InsertItem(NBgrd);
  125.    end;
  126. end;
  127.  
  128. procedure TApplication.InitMenuBar;
  129. begin
  130.   Palette[1]:=#14;
  131.   Palette[5]:=#14;
  132.   Palette[4]:=#4;
  133.   Palette[12]:=#4;
  134.   MainMenu('~F~enster',0);
  135.    SubMenu('~I~n eigener Sache ...',cmOwn,0,0,false,false);
  136.    SubMenu('~Q~uelltext-Lister',cmList,0,0,false,false);
  137.    SubMenu('~S~peicher-Ressourcen',cmMemory,0,0,false,false);
  138.    SubMenu('~D~igitaluhr',cmUhr,0,0,false,false);
  139.    NewLine;
  140.    SubMenu('E~x~it  Alt-X',cmCloseApplication,0,altX,false,false);
  141.   MainMenu('~D~ialogfenster',0);
  142.    SubMenu('~D~ruckerdialog',cmDPrinter,0,0,false,false);
  143.    SubMenu('~V~ektorzeichensätze',cmVektor,0,0,false,false);
  144.    SubMenu('~L~istbox',cmListBox,0,0,false,false);
  145.    SubMenu('~T~oolbar',cmTools,0,0,false,false);
  146.    NewLine;
  147.    SubMenu('~M~ausdemo',cmMaus,0,0,false,false);
  148.    SubMenu('~J~oystickdemo',cmJoyStick,0,0,false,false);
  149.   MainMenu('~A~dressen',0);
  150.    SubMenu('~E~rfassen  F2',cmErfassen,0,kbF2,false,false);
  151.    SubMenu('~A~nzeigen  F3',cmAnzeigen,0,kbF3,false,false);
  152.   MainMenu('~G~rafik',0);
  153.    SubMenu('~K~uchendiagramm',cmDia1,0,0,false,false);
  154.    SubMenu('~F~arnblatt',cmFarn,0,0,false,false);
  155.    SubMenu('~M~alen',cmPaint,0,0,false,false);
  156. end;
  157.  
  158. procedure TApplication.HandleEvent;
  159. begin
  160.   Heap^.ShowHeapStatus(523,8,White);
  161.   TProgram.HandleEvent;
  162.   case Event.Command of
  163.    cmOwn        : Lister(1);
  164.    cmList       : Lister(2);
  165.    cmMemory     : SpeicherStatus;
  166.    cmUhr        : DigitalUhr;
  167.    cmDPrinter   : DruckerDialog;
  168.    cmVektor     : VektorZeichensaetze;
  169.    cmTools      : ToolBar;
  170.    cmListBox    : InputDialog('*.*');
  171.    cmMaus       : MausDemo;
  172.    cmJoyStick   : JoystickDemo;
  173.    cmErfassen   : AdressDB(true);
  174.    cmAnzeigen   : AdressDB(false);
  175.    cmDia1       : Kuchendiagramm;
  176.    cmFarn       : FarnBlatt;
  177.    cmPaint      : Paint;
  178.    cmPLoad      : InputDialog('*.pcx');
  179.    cmPSave      : BildSpeichern;
  180.    cmNoFunction : MessageBox(1,'Bsp.: Messagebox','Keine Funktion#implementiert');
  181.   end; {case}
  182. end;
  183.  
  184. procedure TApplication.SetDialogData;
  185. begin
  186.   with PrintDialogData do Schalter:='TTGRrrrrGrRrCGcccS';
  187.   with Adresse do
  188.    begin
  189.      Schalter:='TTTTLLLLS';
  190.      FillChar(Firma,SizeOf(Firma),' ');
  191.      FillChar(Ort,SizeOf(Ort),' ');
  192.      FillChar(Strasse,SizeOf(Strasse),' ');
  193.      FillChar(Telefon,SizeOf(Telefon),' ');
  194.    end;
  195.   with DlgData do
  196.    begin
  197.      Schalter:='LBTTS';
  198.      FillChar(DateiName,SizeOf(DateiName),' ');
  199.      DateiName[0]:=#32;
  200.      FillChar(Datei,SizeOf(Datei),' ');
  201.      Datei[0]:=#12;
  202.    end;
  203.   with ImgData do
  204.    begin
  205.      Schalter:='LTTS';
  206.      FillChar(DateiName,SizeOf(DateiName),' ');
  207.      DateiName[0]:=#32;
  208.    end;
  209.   with MausData do Schalter:='TGRrrrrrrrrrTTTTTTT';
  210. end;
  211.  
  212. procedure TApplication.SpeicherStatus;
  213. var R:TRect;
  214.     Window:PMemoryInfo;
  215. begin
  216.   R.Assign(60,80,450,320);
  217.   Window:=new(PMemoryInfo, Init(R,'Speicher-Ressourcen',winDouble+winPanel+winMenu));
  218.   Window^.SetWindowAttrib(false);
  219.   InsertDesktop(Window);
  220. end;
  221.  
  222. procedure TApplication.DigitalUhr;
  223. var R:TRect;
  224.     Window:PDigitalUhr;
  225. begin
  226.   R.Assign(360,80,550,185);
  227.   Window:=new(PDigitalUhr, Init(R,'Uhr',winDouble+winPanel+winMenu));
  228.   Window^.SetWindowAttrib(false);
  229.   InsertDesktop(Window);
  230. end;
  231.  
  232. procedure TApplication.Lister(Nummer:byte);
  233. var R:TRect;
  234.     Window:PScrollWindow;
  235.     x,y:integer;
  236. begin
  237.   R.Assign(60,80,440,280);
  238.   Window:=new(PScrollWindow, Init(R,Nummer,'ScrollWindow / Lister für TextDateien',winDouble+winPanel+winMenu+winKey));
  239.   Window^.SetWindowAttrib(false);
  240.   InsertDesktop(Window);
  241. end;
  242.  
  243.  
  244. procedure TApplication.DruckerDialog;
  245. var R:TRect;
  246.     Window:PDlgWindow;
  247. begin
  248.   R.Assign(60,80,440,390);
  249.   Window:=new(PDlgWindow, Init(R,'Beispiel für einen Drucker-Dialog',winDouble+winPanel));
  250.   with Window^ do
  251.    begin
  252.      SetPushButton(190,270,80,22,'OK',cmCloseWindow);
  253.      SetPushButton(285,270,80,22,'Abbrechen',cmCloseWindow);
  254.      SetGroupFrame(20,40,180,140,'Druckertyp',NormWidth);
  255.       SetRadioButton(40,70,'~M~atrixdrucker',1);
  256.       SetRadioButton(40,90,'~L~aserdrucker',1);
  257.       SetRadioButton(40,110,'~T~ypenraddrucker',1);
  258.       SetRadioButton(40,130,'~B~ubble-Jet',1);
  259.       SetRadioButton(40,150,'T~h~ermodrucker',1);
  260.      SetGroupFrame(220,40,135,90,'Auflösung',NormWidth);
  261.       SetRadioButton(240,70,'~3~00 dpi',2);
  262.       SetRadioButton(240,90,'~1~60 dpi',2);
  263.       SetRadioButton(240,110,' ~7~5 dpi',2);
  264.      SetCheckButton(225,165,'~E~inzelblatt');
  265.      SetGroupFrame(20,200,155,88,'',ThickWidth);
  266.       SetCheckButton(40,225,'~F~ett');
  267.       SetCheckButton(40,245,'~K~ursiv');
  268.       SetCheckButton(40,265,'~U~nterstrichen');
  269.      SetStaticText(195,210,'Drucker-Dialog',LeftText);
  270.       SetTextParameters(TSCRFont,HorizDir,1);
  271.       ChangePalColor(10,Red);
  272.      SetData(PrintDialogData);
  273.    end;
  274.   InsertDesktop(Window);
  275. end;
  276.  
  277. procedure TApplication.VektorZeichensaetze;
  278. var R:TRect;
  279.     Window:PDlgWindow;
  280. begin
  281.   R.Assign(60,80,440,360);
  282.   Window:=new(PDlgWindow, Init(R,'Unterstützte Vektor-Zeichensätze',winDouble+winPanel+winMenu+winKey));
  283.   with Window^ do
  284.    begin
  285.      DlgInput:=false;
  286.      SetPushButton(15,40,80,22,'OK',cmCloseWindow);
  287.      SetPushButton(15,70,80,0,'#Icon/2',cmNoFunction);
  288.      SetStaticText(150,40,'Gotischer Zeichensatz',LeftText);
  289.       SetTextParameters(GothicFont,HorizDir,1);
  290.      SetStaticText(150,65,'Triplex - Zeichensatz',LeftText);
  291.       SetTextParameters(TriplexFont,HorizDir,1);
  292.      SetStaticText(150,90,'Small - Zeichensatz',LeftText);
  293.       SetTextParameters(SmallFont,HorizDir,6);
  294.      SetStaticText(150,110,'Sanserif - Zeichensatz',LeftText);
  295.       SetTextParameters(SansSerifFont,HorizDir,1);
  296.      SetStaticText(150,125,'Script - Zeichensatz',LeftText);
  297.       SetTextParameters(ScriptFont,HorizDir,1);
  298.      SetStaticText(150,147,'Simple - Zeichensatz',LeftText);
  299.       SetTextParameters(SimpleFont,HorizDir,1);
  300.      SetStaticText(150,168,'TSCR - Zeichensatz',LeftText);
  301.       SetTextParameters(TSCRFont,HorizDir,1);
  302.      SetStaticText(150,185,'LCOM - Zeichensatz',LeftText);
  303.       SetTextParameters(LCOMFont,HorizDir,1);
  304.      SetStaticText(60,210,'Euro - Zeichensatz',LeftText);
  305.       SetTextParameters(EuroFont,HorizDir,1);
  306.      SetStaticText(40,140,'Vertical - Small',RightText);
  307.       SetTextParameters(SmallFont,VertDir,4);
  308.    end;
  309.   InsertDesktop(Window);
  310. end;
  311.  
  312. procedure TApplication.AdressDB(DInput:boolean);
  313. var R:TRect;
  314.     Window:PAdressWindow;
  315. begin
  316.   R.Assign(60,80,440,350);
  317.   Window:=new(PAdressWindow, Init(R,'Beispiel 22 : Mini-Adressdatenbank',
  318.               winDouble+winPanel,DInput));
  319.   with Window^ do
  320.    begin
  321.      SetPushButton(150,220,80,22,'OK',cmCloseWindow);
  322.      SetPushButton(40,220,80,22,'Sichern',cmSaveData);
  323.       if not DInput then SetDisabled;
  324.      SetPushButton(260,220,40,22,'<<',cmLeft);
  325.       if DInput then SetDisabled;
  326.      SetPushButton(310,220,40,22,'>>',cmRight);
  327.       if DInput then SetDisabled;
  328.      SetInputLine(140,95,25,'~F~irma    :',40,ASCII);
  329.       if not DInput then SetDisabled;
  330.      SetInputLine(140,120,20,'~O~rt      :',25,ASCII);
  331.       if not DInput then SetDisabled;
  332.      SetInputLine(140,145,20,'~S~traße   :',30,ASCII);
  333.       if not DInput then SetDisabled;
  334.      SetInputLine(140,170,20,'~T~elefon  :',20,ASCII);
  335.       if not DInput then SetDisabled;
  336.      if DInput then SetStaticText(40,35,'Adressenerfassung',LeftText)
  337.       else SetStaticText(40,35,'Blättern in der Datei',LeftText);
  338.       SetTextParameters(TriplexFont,HorizDir,2);
  339.       ChangePalColor(10,Red);
  340.      SetData(Adresse);
  341.    end;
  342.   InsertDesktop(Window);
  343. end;
  344.  
  345. procedure TApplication.KuchenDiagramm;
  346. var R:TRect;
  347.     Window:PDiagramm;
  348. begin
  349.   R.Assign(210,120,420,320);
  350.   Window:=new(PDiagramm, Init(R,'Demo Geschäftsgrafik',winDouble+winPanel+winMenu+winKey));
  351.   InsertDesktop(Window);
  352. end;
  353.  
  354. procedure TApplication.FarnBlatt;
  355. var R:TRect;
  356.     Window:PFarn;
  357. begin
  358.   R.Assign(210,120,420,320);
  359.   Window:=new(PFarn, Init(R,'Demo fraktales Farnblatt',winDouble+winPanel+winMenu+winKey));
  360.   InsertDesktop(Window);
  361. end;
  362.  
  363. procedure TApplication.Paint;
  364. var R:TRect;
  365.     Window:PPaint;
  366. begin
  367.   Window:=new(PPaint, Init(WorkArea,'',winSingle));
  368.   with Window^ do
  369.    begin
  370.      DlgInput:=false;
  371.      SetPushButton(3,2,0,0,'#WGRAPH/1',cmLoadPic);
  372.       ChangePalColor(8,LightGray);
  373.      SetPushButton(44,2,0,0,'#WGRAPH/2',cmSavePic);
  374.       ChangePalColor(8,LightGray);
  375.      SetPushButton(3,43,0,0,'#WGRAPH/3',cmClearPic);
  376.       ChangePalColor(8,LightGray);
  377.      SetPushButton(44,43,0,0,'#WGRAPH/4',cmNoFunction);
  378.       ChangePalColor(8,LightGray);
  379.      SetPushButton(3,84,0,0,'#WGRAPH/5',cmTools);
  380.       ChangePalColor(8,LightGray);
  381.      SetPushButton(44,84,0,0,'#WGRAPH/6',cmCloseWindow);
  382.       ChangePalColor(8,LightGray);
  383.    end;
  384.   InsertDesktop(Window);
  385. end;
  386.  
  387. procedure TApplication.InputDialog(FType:str12);
  388. var R:TRect;
  389.     Window:PInputDialog;
  390.     Pfad:string[60];
  391. begin
  392.   R.Assign(120,80,382,380);
  393.   Window:=new(PInputDialog, Init(R,'Datei öffnen',winDouble+winPanel+winMenu));
  394.   with Window^ do
  395.    begin
  396.      FillChar(DlgData.DateiName,SizeOf(DlgData.DateiName),' ');
  397.      DlgData.DateiName:=FType;                                   {erst das,}
  398.      DlgData.DateiName[0]:=#32;                                  {dann das !}
  399.      GetDir(0,Pfad);
  400.      SetInputLine(145,55,12,'Datei~n~ame   :',32,ASCII);
  401.      SetDateiListBox(15,130,127,144,'~D~ateien',VScrBar);
  402.      SetPushButton(156,130,90,22,'OK',cmOK);
  403.      SetPushButton(156,160,90,22,'Abbrechen',cmCancel);
  404.      SetStaticText(20,85,'Verzeichnis :  '+Pfad,LeftText);
  405.      SetData(DlgData);
  406.    end;
  407.   InsertDesktop(Window);
  408. end;
  409.  
  410. procedure TApplication.BildSpeichern;
  411. var R:TRect;
  412.     Window:POutputDialog;
  413.     Pfad:string[60];
  414. begin
  415.   R.Assign(120,80,382,250);
  416.   Window:=new(POutputDialog, Init(R,'Bild speichern',winDouble+winPanel+winMenu));
  417.   with Window^ do
  418.    begin
  419.      GetDir(0,Pfad);
  420.      SetInputLine(145,55,12,'Datei~n~ame   :',32,ASCII);
  421.      SetPushButton(56,130,90,22,'OK',cmOK);
  422.      SetPushButton(156,130,90,22,'Abbrechen',cmCancel);
  423.      SetStaticText(20,85,'Verzeichnis :  '+Pfad,LeftText);
  424.      SetData(ImgData);
  425.    end;
  426.   InsertDesktop(Window);
  427. end;
  428.  
  429. procedure TApplication.ToolBar;
  430. var R:TRect;
  431.     Window:PToolBar;
  432. begin
  433.   R.Assign(120,80,220,226);
  434.   Window:=new(PToolBar, Init(R,'Toolbar',winSingle+winPanel+winMenu));
  435.   with Window^ do
  436.    begin
  437.      DlgInput:=false;
  438.      SetPushButton(3,23,45,0,'#WGRAPH/8',cmPinsel);
  439.       ChangePalColor(8,LightGray);
  440.      SetPushButton(52,23,45,0,'#WGRAPH/9',cmBrush);
  441.       ChangePalColor(8,LightGray);
  442.      SetPushButton(3,64,45,0,'#WGRAPH/10',cmFill);
  443.       ChangePalColor(8,LightGray);
  444.      SetPushButton(52,64,45,0,'#WGRAPH/11',cmNoFunction);
  445.       ChangePalColor(8,LightGray);
  446.      SetPushButton(3,105,45,0,'#WGRAPH/12',cmNoFunction);
  447.       ChangePalColor(8,LightGray);
  448.      SetPushButton(52,105,45,0,'#WGRAPH/6',cmCloseWindow);
  449.       ChangePalColor(8,LightGray);
  450.    end;
  451.   InsertDesktop(Window);
  452. end;
  453.  
  454. procedure TApplication.MausDemo;
  455. var R:TRect;
  456.     i:byte;
  457.     Window:PMausDemo;
  458. begin
  459.   R.Assign(60,80,460,400);
  460.   Window:=new(PMausDemo, Init(R,'',winSingle));
  461.   with Window^ do
  462.    begin
  463.      SetPushButton(268,197,80,22,'OK',cmCloseWindow);
  464.      SetGroupFrame(20,40,195,230,'Mauszeiger',ThickWidth);
  465.       ChangePalColor(2,LightCyan);
  466.       ChangePalColor(1,Red);
  467.      SetRadioButton(40,70,' ~1~  Standard',1);
  468.       ChangePalColor(2,LightCyan);
  469.       ChangePalColor(3,Magenta);
  470.      SetRadioButton(40,90,' ~2~  Fadenkreuz',1);
  471.       ChangePalColor(2,LightCyan);
  472.       ChangePalColor(3,Magenta);
  473.      SetRadioButton(40,110,' ~3~  Sanduhr',1);
  474.       ChangePalColor(2,LightCyan);
  475.       ChangePalColor(3,Magenta);
  476.      SetRadioButton(40,130,' ~4~  Vierfach-Pfeil',1);
  477.       ChangePalColor(2,LightCyan);
  478.       ChangePalColor(3,Magenta);
  479.      SetRadioButton(40,150,' ~5~  Doppelpfeil',1);
  480.       ChangePalColor(2,LightCyan);
  481.       ChangePalColor(3,Magenta);
  482.      SetRadioButton(40,170,' ~6~  DPfeil/schräg',1);
  483.       ChangePalColor(2,LightCyan);
  484.       ChangePalColor(3,Magenta);
  485.      SetRadioButton(40,190,' ~7~  DPfeil/gerade',1);
  486.       ChangePalColor(2,LightCyan);
  487.       ChangePalColor(3,Magenta);
  488.      SetRadioButton(40,210,' ~8~  DPfeil/schräg',1);
  489.       ChangePalColor(2,LightCyan);
  490.       ChangePalColor(3,Magenta);
  491.      SetRadioButton(40,230,' ~9~  Kursorstrich',1);
  492.       ChangePalColor(2,LightCyan);
  493.       ChangePalColor(3,Magenta);
  494.      SetRadioButton(40,250,'1~0~  Hand',1);
  495.       ChangePalColor(2,LightCyan);
  496.       ChangePalColor(3,Magenta);
  497.      for i:=1 to 7 do
  498.       begin
  499.         SetPushButton(212+i*22,235,16,(8-i)*8,'',1000+i);
  500.          ChangePalColor(7,Yellow);
  501.          ChangePalColor(8,Yellow);
  502.         SetPushButton(212+i*22,238+(8-i)*8,16,i*8,'',1007+i);
  503.          ChangePalColor(7,Yellow);
  504.          ChangePalColor(8,Yellow);
  505.       end;
  506.  
  507.      SetData(MausData);
  508.    end;
  509.   InsertDesktop(Window);
  510. end;
  511.  
  512. procedure TApplication.JoystickDemo;
  513. var R:TRect;
  514.     Window:PJoystickDemo;
  515. begin
  516.   R.Assign(60,80,460,400);
  517.   Window:=new(PJoystickDemo, Init(R,'',winDouble));
  518.   with Window^ do
  519.    begin
  520.      DlgInput:=false;
  521.      SetPushButton(297,240,80,22,'OK',cmCloseWindow);
  522.      SetIcon(320,190,'#WGRAPH/7');
  523.      SetStaticText(20,30,'Joystick',LeftText);
  524.       ChangePalColor(10,Yellow);
  525.       SetTextParameters(TriplexFont,HorizDir,3);
  526.    end;
  527.   InsertDesktop(Window);
  528. end;
  529.  
  530.  
  531.  
  532. {Implementation TNewDTBgrd}
  533.  
  534. procedure TNewDTBgrd.Draw;
  535. var R:TRect;
  536. begin
  537.   TDsktpBgrd.Draw;
  538.   R.Copy(Border);
  539.   R.A.y:=R.A.y+21;
  540.   BgImage.Init(R,'WETT.PCX');
  541.   BgImage.LoadPCXImage(0);
  542. end;
  543.  
  544. {--- Hauptprogramm ---}
  545.  
  546. begin
  547.   OvrInit('WGDEMO.OVR');
  548.   MyProg.Init('Demonstrationsprogramm WGRAPH 1.0');
  549.   MyProg.Run;
  550.   MyProg.Done;
  551. end.
  552.  
  553.