源码已给出来 ,当系统接收到WMSetFont,只会执行FDefAttributes.Assign(Font); SendMessage里的任何信息都没意义。当然,你可以先修改源码。
[quote=引用 1 楼 tanqth 的回复:]应该不能通过消息的机制来来设置字体颜色与大小样式,因为好像是字体颜色与大小改变后,系统使用的消息的机制来改变显示,而直接作用的还是原本的Font。 这是系统源码里的代码: procedure WMSetFont(var Message: TWMSetFont); message WM_SETFONT; procedure TCustomRichEdit.WMSetFont(var Message: TWMSetFont); begin FDefAttributes.Assign(Font); end;
procedure WMSetFont(var Message: TWMSetFont); message WM_SETFONT; procedure TCustomRichEdit.WMSetFont(var Message: TWMSetFont); begin FDefAttributes.Assign(Font); end;
应该不能通过消息的机制来来设置字体颜色与大小样式,因为好像是字体颜色与大小改变后,系统使用的消息的机制来改变显示,而直接作用的还是原本的Font。 这是系统源码里的代码: procedure WMSetFont(var Message: TWMSetFont); message WM_SETFONT; procedure TCustomRichEdit.WMSetFont(var Message: TWMSetFont); begin FDefAttributes.Assign(Font); end;
1,183
社区成员
22,335
社区内容
加载中
试试用AI创作助手写篇文章吧