home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pctchnqs / 1992 / number1 / fonttest.pas < prev    next >
Pascal/Delphi Source File  |  1991-07-28  |  1KB  |  64 lines

  1. Program FontTest;
  2.  
  3. {$R FontTest.res}
  4.  
  5.     Uses
  6.         WObjects,
  7.         WinTypes,
  8.         WinProcs,
  9.         FontList;
  10.  
  11.     Type
  12.         pDlgAppWindow = ^tDlgAppWindow;
  13.         tDlgAppWindow = Object (tDlgWindow)
  14.             FontList: pFontList;
  15.                Constructor Init;
  16.             Destructor Done; Virtual;
  17.             Function GetClassName: pChar; Virtual;
  18.             Procedure SetupWindow; Virtual;
  19.             End;
  20.  
  21.     Type
  22.         tDlgApp = Object (tApplication)
  23.             Procedure InitMainWindow; Virtual;
  24.             End;
  25.  
  26.     Constructor tDlgAppWindow.Init;
  27.         Begin
  28.           tDlgWindow.Init (nil, 'MAIN');
  29.         FontList := New (pFontList, InitResource (@Self, 101));
  30.         End;
  31.  
  32.     Destructor tDlgAppWindow.Done;
  33.         Begin
  34.         Dispose (FontList, Done);
  35.         tDlgWindow.Done;
  36.         End;
  37.  
  38.     Function tDlgAppWindow.GetClassName: pChar;
  39.         Begin
  40.         GetClassName := 'MAIN';
  41.         End;
  42.  
  43.     Procedure tDlgAppWindow.SetupWindow;
  44.         Begin
  45.         tDlgWindow.SetupWindow;
  46.         FontList^.DevModeChange
  47.             ('HP ThinkJet (2225 C-D),THINKJET,LPT1:');
  48.         End;
  49.  
  50.     Procedure tDlgApp.InitMainWindow;
  51.         Begin
  52.           MainWindow := New (pDlgAppWindow, Init);
  53.         End;
  54.  
  55.     Var
  56.         DlgApp: tDlgApp;
  57.  
  58.     Begin
  59.       DlgApp.Init ('MAIN');
  60.       DlgApp.Run;
  61.       DlgApp.Done;
  62.     End.
  63.  
  64.