以下写法如何在c++builder中实现,谢谢!!!!
以下为ereport中设置表格字体的,请问如何在c++builder中写
if cellline_d <> nil then
begin
hTempDC := GetDC(0);
pt.y := abs(reportcontrol1.cellFont_d.lfheight) * 720 div GetDeviceCaps(hTempDC, LOGPIXELSY);
DPtoLP(hTempDC, pt, 1);
ptOrg.x := 0;
ptOrg.y := 0;
DPtoLP(hTempDC, ptOrg, 1);
FontDialog1.Font.Name := reportcontrol1.cellFont_d.lfFaceName;
FontDialog1.Font.Size := ((pt.y - ptOrg.y) div 10);
if FontDialog1.Execute then
begin
Windows.GetObject(FontDialog1.Font.Handle, SizeOf(CellFont), @CellFont);
ReportControl1.SetCellFont(CellFont);
end;
end
else Application.Messagebox('请选择单元格!!!', '警告', MB_OK + MB_iconwarning);