Danke an Marabu .. und hier die lösung
bevor wieder dumme Bemerkungen kommen.
Delphi-Quellcode:
type
PAnchorProperty = ^TAnchorProperty;
TAnchorProperty =
record
hWnd : HWND;
anchor : Integer;
rc : TRect;
centerx : Integer;
centery : Integer;
end;
var
gProp:
array of TAnchorProperty;
function zAnchorItem(h: HWND): Integer;
begin
Result := High(gProp);
while (Result >= Low(gProp))
and (gProp[Result].hWnd <> h)
do
Dec(Result);
end;
function SetAnchorMode(WinHandle: HWND; AnchorMode: Integer): Integer;
var
pZP: Integer;
// ...
begin
pZP := zAnchorItem(WinHandle);
if pZP < 0
then
begin
pZP := Length(gProp);
SetLength(gProp, Succ(pZP));
end;
// ...
end;
War aber nahe dran
gruss Emil