I'm have Delphi 6 with all patches applied. I'm using the following code which I've taken from the Delphi 4 Unleashed book:
procedure TChildFrm.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.WndParent := (Owner as TForm).Handle;
Params.Style := WS_CHILD or WS_CLIPSIBLINGS;
Params.X := 0;
Params.Y := 0;
end;
When I compile my application I receive the following error:
"Exception EInvalidCast in module xxxx at xxxxx. Invalid class subtype."
What I'm trying to do is to display a form inside a container like a TPageControl or a TPanel.
procedure TChildFrm.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.WndParent := (Owner as TForm).Handle;
Params.Style := WS_CHILD or WS_CLIPSIBLINGS;
Params.X := 0;
Params.Y := 0;
end;
When I compile my application I receive the following error:
"Exception EInvalidCast in module xxxx at xxxxx. Invalid class subtype."
What I'm trying to do is to display a form inside a container like a TPageControl or a TPanel.