You've already forked lazarus-ccr
Finished implementation of MapWindowPoints (the interface in win32 compatible now)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@65 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -62,23 +62,32 @@ begin
|
||||
Failed:=Status and HRESULT($80000000)<>0;
|
||||
end;
|
||||
|
||||
function MapWindowPoints(hWndFrom, hWndTo: HWND; lpPoints: PPoint; cPoints: UINT): Integer;
|
||||
function MapWindowPoints(hWndFrom, hWndTo: HWND; var lpPoints; cPoints: UINT): Integer;
|
||||
var
|
||||
I:integer;
|
||||
I:Integer;
|
||||
XOffset, YOffset: SmallInt;
|
||||
FromRect,ToRect: TRect;
|
||||
begin
|
||||
Logger.AddCheckPoint(lcDummyFunctions,'MapWiindowsPoints');
|
||||
//todo: implement result
|
||||
GetWindowRect(hWndFrom,FromRect);
|
||||
GetWindowRect(hWndTo,ToRect);
|
||||
XOffset:=(FromRect.Left - ToRect.Left);
|
||||
YOffset:=(FromRect.Top - ToRect.Top);
|
||||
for i:=0 to cPoints - 1 do
|
||||
begin
|
||||
(lpPoints+i)^.x:=(FromRect.Left - ToRect.Left) + (lpPoints+i)^.x;
|
||||
(lpPoints+i)^.y:=(FromRect.Top - ToRect.Top) + (lpPoints+i)^.y;
|
||||
{
|
||||
Mode Delphi does not support treating a pointer as a array
|
||||
if ObjFpc is used than this syntax is preferred
|
||||
PPoint(@lpPoints)[i].x:= XOffset + PPoint(@lpPoints)[i].x;
|
||||
PPoint(@lpPoints)[i].y:= YOffset + PPoint(@lpPoints)[i].y;
|
||||
}
|
||||
PPoint(@lpPoints+i)^.x:= XOffset + PPoint(@lpPoints+i)^.x;
|
||||
PPoint(@lpPoints+i)^.y:= YOffset + PPoint(@lpPoints+i)^.y;
|
||||
end;
|
||||
Result:=MakeLong(XOffset,YOffset);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
function InvalidateRect(aHandle : HWND; ARect : pRect; bErase : Boolean) : Boolean;
|
||||
begin
|
||||
Logger.EnterMethod(lcPaint,'InvalidateRect');
|
||||
|
Reference in New Issue
Block a user