I have been writing custom components for quite some time now. I've also converted some things to ActiveX. What I'm working on now I've already converted to an ActiveX control, but now for some reason, when I try to build the ActiveX control (based on my existing control), I get this error "Control ' has no parent window".
I am using Delphi7 and its option to create an ActiveX control based on any TWinControl inheritance. In this case, I'm basing my control off of a TCustomControl. I suspect my problem is coming from within this control's constructor...
The control wraps another existing non-visual component (TJDChatClient: TComponent). Like I said, it was working fine the first time I made it into an ActiveX control, but this second time is failing with this error.
JD Solutions
I am using Delphi7 and its option to create an ActiveX control based on any TWinControl inheritance. In this case, I'm basing my control off of a TCustomControl. I suspect my problem is coming from within this control's constructor...
Code:
constructor TJDChatClientWrap.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Parent:= TWinControl(AOwner);
fCli:= TJDChatClient.Create(Self);
fCli.OnLog:= CliLog;
fCli.OnLoginResponse:= CliLoginResult;
Font.Color:= clSkyBlue;
Font.Size:= 10;
Font.Style:= [fsBold];
Paint;
end;
The control wraps another existing non-visual component (TJDChatClient: TComponent). Like I said, it was working fine the first time I made it into an ActiveX control, but this second time is failing with this error.
JD Solutions