Einzelnen Beitrag anzeigen

Benutzerbild von Flocke
Flocke

Registriert seit: 9. Jun 2005
Ort: Unna
1.172 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#6

Re: Eigenen Funktionsaufruf in vorhandene Klasse "einha

  Alt 26. Apr 2007, 22:56
Zitat von winkel79:
Ich habe das Problem, daß CreateParams sowohl bei TCustomForm als auch TForm im protected Bereich steht.
Das kannst du relativ einfach umgehen. Einfach in deiner Unit eine Klasse davon ableiten und über die darauf zugreifen:
Delphi-Quellcode:
type
  TCustomFormHack = class(TCustomForm)
  end;

procedure EstablishHook;
begin
  if not Assigned(OldCreateParams) then
    CreateGenericCodeHook(@TCustomFormHack.CreateParams, @NewCreateParams, @OldCreateParams);
end;
Volker
Besucht meine Garage
Aktuell: RtfLabel 1.3d, PrintToFile 1.4
  Mit Zitat antworten Zitat