[lazarus] Need your thoughts on Caret

Micha Nelissen M.Nelissen at student.tue.nl
Mon Aug 11 14:25:13 EDT 2003


Hi,

The SynEdit creates a caret to display. This is implemented in the win32 
interface, but the win32 interface needs it to be created on *every* 
setfocus. That is, when you lose focus, you hide & destroy your caret, 
then when you get focus, you need to create & show the caret. Help from 
win32sdk on ShowCaret:

<snip>
ShowCaret shows the caret only if the specified window owns the caret, 
the caret has a shape, and the caret has not been hidden two or more 
times in a row. If one or more of these conditions is not met, ShowCaret 
does nothing and returns FALSE.
</snip>

If you trace code flow you will see that ShowCaret indeed returns false 
most of the time if not always.

Since this involves more than simply adjusting the win32 interface, I 
ask for your thoughts on this.

Regards,

Micha.







More information about the Lazarus mailing list