Confusion with parameters of ClientToXY()

I have to determine the exact coordinates of a mousedown-event on a canvas of a TWebPaintBox. For that I found the procedure ClientToXY which is defined as
procedure TControl.ClientToXY(AClientX, AClientY: single; var X,Y: single);

But when calling with single parameters, the compiler gives the message
Incompatible types: got "Double" expected "Longint"

When I change all 4 parameters to Longint, I get
Incompatible type arg no. 3: Got "Longint", expected "Double". Var param must match exactly.

When I then change par. 3 and 4 to Double, I get
Incompatible types: got "Double" expected "Longint"

There is only one file which has the declaration:
c:\Users\meik\Documents\tmssoftware\TMS WEB Core RSXE12\Core Source\WEBLib.Controls.pas

So I am confused and can't see what I am doing wrong. Delphi 10.3.3, TMS Web Core
Any ideas?

...finally, I could solve the confusion. The compiler stopped at the line with the call to ClientToXY, but in fact the problem was in the sourcecode line below...

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.