...detect system font size?

Author: Simon Grossenbacher
Homepage: http://www.swissdelphicenter.ch

Category: System

function HasLargeFont: Boolean;
var
  
fontsize: Integer;
  hdc:      THandle;
begin
  
Result   := False;
  hdc      := GetDc(HWND_DESKTOP);
  fontsize := GetDeviceCaps(hdc, logpixelsx);
  ReleaseDc(HWND_DESKTOP, hdc);
  if fontsize = 96 then Result := False
  else if fontsize = 120 then Result := True;
end;

 

printed from
www.swissdelphicenter.ch
developers knowledge base