Hai Pfoto,
bei mir geht es. Allerdings habe ich den Constructor angepasst da der Constructor von THindWindow mit
Create (aOwner : TComponent) deklariert ist.
Delphi-Quellcode:
type
TMyHintWindow = class(THintWindow)
private
FImage: TImage;
protected
procedure Paint; override;
public
MaxWidth: integer;
property Image : TImage read FImage write FImage;
constructor Create (aOwner : TComponent);
destructor Destroy; override;
end;
{ TMyHintWindow }
constructor TMyHintWindow.Create (aOwner : TComponent);
begin
inherited Create(aOwner);
end;
destructor TMyHintWindow.Destroy;
begin
inherited;
end;
procedure TMyHintWindow.Paint;
begin
inherited;
end;
Und im Programm dann:
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
MyHint := TMyHintWindow.Create (self);
MyHint.Image := Image1;
end;
Stephan B.
"Lasst den Gänsen ihre Füßchen"