Disabling/Removing caret from chat window
سؤال
I have setup richedit control as a chat window and I've no idea how to remove the blinking caret from the control, does anyone know how to do that in edit/richedit control?
المحلول
Based on this page, you need to handle the EN_SETFOCUS
Windows message and call HideCaret()
. The docs there say that calls to HideCaret()
are cumulative, so you probably should only call it once (use a static
variable to remember whether it has been set), or alternatively call ShowCaret()
in response to EN_KILLFOCUS
.
نصائح أخرى
Use HideCaret()
.
لا تنتمي إلى StackOverflow