开发者

Rich Edit control: Prevent immediate repainting/updating?

开发者 https://www.devze.com 2023-01-05 00:03 出处:网络
I\'m trying to replace some text in a range in a rich edit control. The two line way to do it is by sending a EM_EXSETSEL followed by a EM_REPLACESEL. However, this causes an annoying flickering when

I'm trying to replace some text in a range in a rich edit control. The two line way to do it is by sending a EM_EXSETSEL followed by a EM_REPLACESEL. However, this causes an annoying flickering when the text is briefly selected, before being replaced. Is there any way to suspend repainting? I'm hoping for something like this:

SendMessage(EM_SUSPEND_PAINTING)
SendMessage(EM_EXSETSEL)
SendMes开发者_StackOverflow中文版sage(EM_REPLACESEL)
SendMessage(EM_RESUME_PAINTING)

(with the appropriate WPARAM and LPARAM values, of course)


The EM_HIDESELECTION command is most excellent.

0

精彩评论

暂无评论...
验证码 换一张
取 消