惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
Stack Overflow Blog
Stack Overflow Blog
L
LINUX DO - 最新话题
Google Online Security Blog
Google Online Security Blog
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
www.infosecurity-magazine.com
www.infosecurity-magazine.com
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
S
Schneier on Security
B
Blog
The Register - Security
The Register - Security
SecWiki News
SecWiki News
Hacker News: Ask HN
Hacker News: Ask HN
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security Affairs
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
T
Tenable Blog
P
Proofpoint News Feed
Apple Machine Learning Research
Apple Machine Learning Research
D
DataBreaches.Net
S
Secure Thoughts
Security Latest
Security Latest
H
Heimdal Security Blog
The Hacker News
The Hacker News
O
OpenAI News
AWS News Blog
AWS News Blog
量子位
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
腾讯CDC
U
Unit 42
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Hugging Face - Blog
Hugging Face - Blog
The Last Watchdog
The Last Watchdog
Recorded Future
Recorded Future
V2EX - 技术
V2EX - 技术
爱范儿
爱范儿
F
Full Disclosure

博客园 - 涂磊

TMS可以单独安装控件 02]AdvStringGrid中添加CheckBox 01]TMSadvStringGrid下载与安装 epson投影仪提示,保存时间的电池电量偏低,取消显示 用DeepSeek做的Delphi闹钟 XboxS联网下载完游戏后,要拔掉网线,就能玩游戏了 12]RichEdit某些文本突出显示 delphi10.3中Tmemo中某些文本显示下划线 delphi的TReeView支持鼠标拖动节点 cnPack里MarkDown里RTF显示 11]delphi中 RichEdit1设置行距 09]delphi中richedit查找 08]delphi10.3剪贴板的图片,保存到文件 07]Delphi10.3中Richedit中的链接可以点击 06]delphi10.3中richedit中文本背景颜色 05]delphi10.3中richedit中删除线 delphi10.3中UpDown1使用 04]RichEdit的上标和下标,Delphi10.3 03]RichEdit插入BMP图片 delphi 中tButtonColor颜色选择 02]如何设置RichEdit文本颜色?_编程语言-CSDN问答 01]delphi从TRichEdit获得RTF格式文本(PC版本) Delphi10.3接收从文件管理器拖放过来的文件名
10]RichEdit另存 为BMP图片
涂磊 · 2026-02-19 · via 博客园 - 涂磊

image

引用CnPack组件 中的 CnRichEdit,

private
      FRender: TCnRichEditRender;
////////////////////////////////////////////////
procedure TFormRender.FormCreate(Sender: TObject);
begin
  FRender := TCnRichEditRender.Create;
end;

procedure TFormRender.FormDestroy(Sender: TObject);
begin
  FRender.Free;
end;
var
  Bmp: TBitmap;
  Mem: TMemoryStream;
  W: Integer;
  sss: tstringlist;

  annistring:AnsiString;
begin
  W := StrToIntDef(editor.Text, 0);
  FRender.BackgroundColor := clwhite;

  Mem := TMemoryStream.Create;
  editor.Lines.SaveToFile('aaa.rtf');
  sss:=  tstringlist.Create;
  sss.LoadFromFile('aaa.rtf');
  annistring:=  sss.Text;
  Mem.WriteBuffer(Pointer(annistring)^, Length(annistring)*2);

  Mem.Position := 0;
  Bmp := FRender.RenderRtfToBitmap(Mem, W);
  if Bmp <> nil then    begin
     Bmp.SaveToFile('rtf.bmp');
     ShellExecute(0, 'open', 'mspaint', PChar('rtf.bmp'), nil, SW_SHOWNORMAL);
    Bmp.Free;
  end;
  Mem.Free;
  sss.Free;
end;