开发者

Permanently hide caret in CRichEditCtrl

开发者 https://www.devze.com 2023-02-03 18:59 出处:网络
I\'m using a CRichEditCtrl to display and interact with rich text, but want it to not show a caret at all.

I'm using a CRichEditCtrl to display and interact with rich text, but want it to not show a caret at all.

I could possibly intercept every message and use HideCaret() to always hide the caret, but this seems like a hack at best, and am 开发者_JAVA百科hoping there is a general solution that gets rid of the caret entirely.

Thanks.


The appropriate way to do this is to create a subclass of CRichEditCtrl that overrides OnSetFocus to call HideCaret().

0

精彩评论

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