Hi all,

I want to change the caret shape to a box or an underscore instead of the vertical line, but CreateCaret and ShowCaret don't seem to work. If anybody has an idea about how could this be achieved, it would be greatly appreciated.

Thanks in advance and happy new year,

Posted on 2001-12-27 11:17:30 by Wavemaker
CreateCaret doesn't only create a caret, it also assigns ownership to a specific window.

win32 programmer's reference:
"The caret is a shared resource; there is only one caret in the system. A window should create a caret only when it has the keyboard focus or is active."

So probably the rich edit control is creating the caret each time it is activated. Try subclassing the rich edit control and intercept the WM_SETFOCUS and WM_SETCURSOR messages. Then use CreateCaret. However it's not unlikely that the control does more on those messages than changing the caret so it may loose (critical) funtionality when subclassing those messages.

Posted on 2001-12-27 11:41:03 by Thomas