[lazarus] GetFormRelativeMousePosition, GetCaretPos?

Micha Nelissen M.Nelissen at student.tue.nl
Mon Jul 28 02:18:36 EDT 2003


Marc Weustink wrote:

> At 18:59 27-7-2003 +0200, Micha Nelissen wrote:
> 
>> 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.
> 
> 
> I guess that is a typo. GetCaretPos should have been GetCursorPos
> 
> Fixed that.

If the following is all fixed then positioning of controls on the 
designer form work correctly, they get the position you want instead of 
centered:

winapi.inc:GetCursorPos -> interface:GetCursorPos -> win32intf:GetCursorPos.

You need to add that last one in win32winapi and win32winapih.

Regards,

Micha.







More information about the Lazarus mailing list