Hab da noch ein kleines problem
bzw.. glaube das hier was nicht stimmt.
PB:
Delphi-Quellcode:
TYPE ANCHORPROPERTY
hWnd AS LONG
anchor AS LONG
rc AS RECT
centerx AS LONG
centery AS LONG
END TYPE
pZP = zAnchorItem(hWnd)
IF pZP = 0 THEN ' If the object already exist then we ReUse it
pZP = MAX&(UBOUND(gProp) + 1, 1)
REDIM PRESERVE gProp(1 TO pZP) AS ANCHORPROPERTY
END IF
FUNCTION zAnchorItem (BYVAL hWnd AS LONG) AS LONG
LOCAL Item AS LONG
IF UBOUND(gProp) > 0 THEN
ARRAY SCAN gProp(), FROM 1 TO 4, = MKL$(hWnd), TO Item
END IF
FUNCTION = Item
END FUNCTION
--------------------------------------------------
Meine Übersetzung .. denke mal mit Fehlern
Delphi-Quellcode:
type
PAnchorProperty = ^TAnchorProperty;
TAnchorProperty = array of Record
hWnd : HWND;
anchor : Integer;
rc : TRect;
centerx : Integer;
centery : Integer;
end;
gProp : TAnchorProperty;
Delphi-Quellcode:
pZP := AnchorItem(WinHandle);
if pZP = 0 then
SetLength(gProp, Succ(Length(gProp)));
pZP := High(gProp);
Delphi-Quellcode:
function TSkinEngine.AnchorItem(WinHandle: HWND): Integer;
var
Item: Integer;
begin
if High(gProp) > 0 then
begin
Item := High(gProp);
Result := IndexOf(gProp, Item);
end else
Result := 0;
end;
Hat sich erledigt!
Ein netter Mensch hat mir geholfen.
gruss Emil