[lazarus] Need your thoughts on Caret

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Aug 11 16:13:55 EDT 2003

On Mon, 11 Aug 2003 20:56:52 +0200
Micha Nelissen <M.Nelissen at student.tue.nl> wrote:

> 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>

What do "the specified window owns the caret" and "the caret has a shape"

> 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.

You mean, changing the synedit code?
The caret showing code in synedit has not much changed for the LCL. Does the
synedit1 example work under win32 intf? 


More information about the Lazarus mailing list