![]() |
ScreentoClient -> Inkompitable Typen:'Tpoint' und 'Longbo
Hallo,
bin gerade dabei eine Procedure in eine andere Unit auszulagern, stoße dabei aber auf ein Problem bezüglich der ScreentoClient Funktion.
Delphi-Quellcode:
Der Compiler gibt mir die Fehlermeldung "Inkompitable Typen:'Tpoint' und 'Longbool'" an der Stelle
function MouseCollision(object1 : TImageSprite):boolean;
var ... p:TPoint; windo:HWND; begin ... p:=mouse.CursorPos; windo:=findwindow('Admaintestproject', nil); p:= ScreentoClient(windo, p); ... end;
Delphi-Quellcode:
. Ich komm aber nicht drauf warum der da ne Longbool haben will Oo
p:= ScreentoClient(windo, p);
Gruß [edit=SirThornberry]Titel geändert - Das es um ein Problem geht sagt bereits die gewählte Kategorie aus - Mfg, SirThornberry[/edit] |
Re: ScreentoClient Problem
Schau Dir die Parameter an, die ScreenToClient haben will.
|
Re: ScreentoClient Problem
(hwnd, tpoint) denk ich doch. Und das liefere ich doch auch.
|
Re: ScreentoClient Problem
Hi,
die Funktion gibt LongBool zurück, also
Delphi-Quellcode:
Wobei Point ein var-Parameter ist, d. h. wenn es erfolgreich war, ist der Point angepasst.
if Windows.ScreenToClient(Handle, Point) then
Successful else error; Mfg FAlter |
Re: ScreentoClient Problem
Zitat:
Es gibt eine überladene Funktion; Du machst bzgl. Parameter und Result einen Mischmasch aus beiden ;) |
Re: ScreentoClient Problem
Ah dankeschön, habs jetzt gerafft, funktioniert jetzt problemlos.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:36 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz