www.pudn.com > 2004021618574529928.rar > UnitFunction.pas


{                      º¯Êýµ¥Ôª                                 } 
 
unit UnitFunction; 
 
interface 
 
uses MainForm, Classes, SysUtils, WinSock, Windows; 
 
    //function EnumFontsProc(var LogFont: TLogFont; var TextMetric: TTextMetric;FontType: Integer; Data: Pointer): Integer; stdcall; 
    //procedure GetFontNames; 
 
implementation 
 
{function EnumFontsProc(var LogFont: TLogFont; var TextMetric: TTextMetric; 
  FontType: Integer; Data: Pointer): Integer; stdcall; 
begin 
  TStrings(Data).Add(LogFont.lfFaceName); 
  Result := 1; 
end; 
 
procedure GetFontNames; 
var 
  DC: HDC; 
begin 
  DC := GetDC(0); 
  EnumFonts(DC, nil, @EnumFontsProc, Pointer(frmMain.FontName.Items)); 
  ReleaseDC(0, DC); 
  frmMain.FontName.Sorted := True; 
end;} 
 
end.