WinAPI: GetTextFace - 获取字体名称

//声明:
GetTextFace(
  DC: HDC;        {设备环境句柄}
  Count: Integer; {缓冲区大小}
  Buffer: PChar   {缓冲区}
): Integer;       {返回字符串长度}

 
 
 
 
 

 

 
  

//举例:
var
  dc: HDC;
  b: array[0..254] of Char;
  num: Integer;
begin
  dc := Canvas.Handle;
  num := GetTextFace(dc, SizeOf(b), b);
  ShowMessage(b);             {Tahoma}
  ShowMessage(IntToStr(num)); {6}
end;

 
 
 
 
 

 

 
  

你可能感兴趣的:(WinAPI: GetTextFace - 获取字体名称)