不知道你指的默认字体是什么
TScreen中有三个字体,MenuFont, HintFont, IconFont,是你要的吗
看看TScreen的GetMetricSettings吧
procedure TScreen.GetMetricSettings;
var
LogFont: TLogFont;
NonClientMetrics: TNonClientMetrics;
SaveShowHint: Boolean;
begin
SaveShowHint := False;
if Assigned(Application) then SaveShowHint := Application.ShowHint;
try
if Assigned(Application) then Application.ShowHint := False;
if SystemParametersInfo(SPI_GETICONTITLELOGFONT, SizeOf(LogFont), @LogFont, 0) then
FIconFont.Handle := CreateFontIndirect(LogFont)
else
FIconFont.Handle := GetStockObject(SYSTEM_FONT);
NonClientMetrics.cbSize := SizeOf(NonClientMetrics);
if SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, @NonClientMetrics, 0) then
begin
FHintFont.Handle := CreateFontIndirect(NonClientMetrics.lfStatusFont);
FMenuFont.Handle := CreateFontIndirect(NonClientMetrics.lfMenuFont);
end else
begin
FHintFont.Size := 8;
FMenuFont.Handle := GetStockObject(SYSTEM_FONT);
end;
FHintFont.Color := clInfoText;
FMenuFont.Color := clMenuText;
finally
if Assigned(Application) then Application.ShowHint := SaveShowHint;
end;
end;