unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    ComboBox1: TComboBox;
    Label1: TLabel;
    ComboBox2: TComboBox;
    Label2: TLabel;
    Label3: TLabel;
    procedure ComboBox1Change(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
//    procedure GetfontNames;
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

(*function EnumFontsProc(var LogFont: TLogFont; var TextMetric: TTextMetric;
  FontType: Integer; Data: Pointer): Integer; stdcall;
begin
  TStrings(Data).Add(LogFont.lfFaceName);
  Result := 1;
end;

procedure TForm1.GetFontNames;
var
  DC: HDC;
begin
  DC := GetDC(0);
  EnumFonts(DC, nil, @EnumFontsProc, Pointer(Combobox1.Items));
  ReleaseDC(0, DC);
  Combobox1.Sorted := True;
end;
  *)
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
  Label1.Font.Name:=Combobox1.Text;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Combobox1.Items.AddStrings(screen.Fonts);
  Combobox1.text:=combobox1.Items[0];
end;

end.
