[lazarus] GetFormRelativeMousePosition, GetCaretPos?
Micha Nelissen
M.Nelissen at student.tue.nl
Sun Jul 27 12:30:05 EDT 2003
Marc Weustink wrote:
> At 17:50 27-7-2003 +0200, Micha Nelissen wrote:
>
>> Hi,
>>
>> In the IDE designer these (see subject) two functions are used to
>> determine the mouse position?
>
>
> ??? GetCaretPos hasn't anything to do with a mouse, so I don't think it
> is used.
I thought so too, but check GetFormRelativeMousePosition in
designerprocs.pas.
>> AFAIK, there is no caret on a form and on windows GetCaretPos returns
>> the client position of the caret of whatever it currently is in.
>> Please explain.
>
>
> The Caret (on windows) is system wide. There is only one Caret (that's
> why you don't have to specify a handle in GetCaretPos) and it is per
> def. in the currently focused window.
The strange thing is that the form origin is subtracted from it, but
since GetCaretPos is client relative position, this can never give a
correct result.
Regards,
Micha.
More information about the Lazarus
mailing list