Board index » cppbuilder » ActiveX Control Wizard not working?

ActiveX Control Wizard not working?

Hi,

I have created a VCL component (descended from TWinControl) and installed it
on the component palette.

However - when I start the ActiveX Control Wizard
(File/New/Other/ActiveX/ActiveX Control),  My control does not appear in the
drop down list of available controls...

I have checked that the control is both installed on the palette (it is) and
that it is descended from TWinControl (it is).     I have also tried simply
including the component source in the ActiveX library directly with no luck,
it still will not appear.  I have also tried moving the bpi and lib files
into the default directory (/LIB)... no luck.

Any ideas why it wont show up?
All suggestions appreciated.

BCB6 - patched.

Zack.

 

Re:ActiveX Control Wizard not working?


"Richard Yu" <rich...@colorselector.com> wrote in
news:3dee9943@newsgroups.borland.com:

Quote
> add the visible property in the component.
> you will see it.

Hi,

I had the same problem, but u solved this one
for me: I added

__property bool Visible = {read=FVisible, write=SetVisible,
stored=IsVisibleStored, default=1};

to my vcl component,

and now i can create an activex control using
my component. But when I compile the code auto-
created by bcb, I get following error:
[C++ Error] atlvcl.h(906): E2247 'TControl::FVisible' is not accessible

Do you know how to solve this plz?

regards,

Koen

Re:ActiveX Control Wizard not working?


Just a guess:

Try to make FVisible "protected" in scope ...

Quote
"Koen" <k...@not.this.cerm.be> wrote in message

news:Xns92EDB0A2A652Fkoencermbe@207.105.83.65...

[...]

Quote
> __property bool Visible = {read=FVisible, write=SetVisible,
> stored=IsVisibleStored, default=1};
[...]
> I get following error:
> [C++ Error] atlvcl.h(906): E2247 'TControl::FVisible' is not accessible

Zack.

Re:ActiveX Control Wizard not working?


"Zack" <zawic...@colorslector.com> wrote in news:3e1096eb$1
@newsgroups.borland.com:

Quote
> Just a guess:

> Try to make FVisible "protected" in scope ...

Hi.

First of all: thanks for your answer!

making FVisible protected didn't completely
solve my problem though. When compiling the active
x control, i got other errors then concerning
the visible property. However I also added the
function SetVisible to my class, whith following
definition:

void __fastcall TDoQuery::SetVisible (bool Value)
{
FVisible = Value;
TButton::Visible = Value;

Quote
}

and then everything worked all right. (I also moved
FVisible from protected to private)

But I this a correct construction? Or will this have
side effects, or not do what it is expected to do?

regards,

Koen

Other Threads