5
5411
Unregistered / Unconfirmed
GUEST, unregistred user!
字体变扁调用函数
function TfrmPrintForm.MakeFont:integer;
var FLogFont :TLogFont;
tmpFont: integer;
begin
FillChar(FLogFont, sizeof(TLogFont), 0);
// Set the TLOGFONT's fields
with FLogFontdo
begin
lfCharSet := GB2312_CHARSET;
lfFaceName := '宋体';
lfEscapement :=0;
lfOrientation := 0;
lfWeight := FW_NORMAL;
lfHeight := -20;
lfWidth := 40;
end;
tmpFont := CreateFontIndirect(FLogFont);
result := tmpFont;
end;
=======================================================================
调用如下:
在函数
funtion ViewAssign(m1: TRMMemoView;
Control: TControl): Boolean;
begin
m1.font.handle:=makeFont;
end;
结果是只能变大小,字体等,但字体不能变扁[]
function TfrmPrintForm.MakeFont:integer;
var FLogFont :TLogFont;
tmpFont: integer;
begin
FillChar(FLogFont, sizeof(TLogFont), 0);
// Set the TLOGFONT's fields
with FLogFontdo
begin
lfCharSet := GB2312_CHARSET;
lfFaceName := '宋体';
lfEscapement :=0;
lfOrientation := 0;
lfWeight := FW_NORMAL;
lfHeight := -20;
lfWidth := 40;
end;
tmpFont := CreateFontIndirect(FLogFont);
result := tmpFont;
end;
=======================================================================
调用如下:
在函数
funtion ViewAssign(m1: TRMMemoView;
Control: TControl): Boolean;
begin
m1.font.handle:=makeFont;
end;
结果是只能变大小,字体等,但字体不能变扁[]