Board index » cppbuilder » ActiveX control based on TImage

ActiveX control based on TImage

Hi,

I use BCB 4 and when I try to create a new ActiveX control I can't
choose a TImage as parent.

Is it possible to create an ActiveX control based on the TImage class ??

 

Re:ActiveX control based on TImage


Hi, Robert!

I don't think so, because TImage is a TGraphicControl descendant, not a
TWinControl. Create your control as a TPanel descendant parenting a
TImage and you should be fine.

This is a problem because a TImage has no window handle, which, I
believe, is required.

------
Mark Cashman, TeamB C++ Builder
http://www.temporaldoorway.com/programming/index.htm
C++ Builder, JBuilder programming information
Home of The C++ Builder Programmer's Webring - Join us!
------

Re:ActiveX control based on TImage


Thanks for the tip !

I was beginning to think that I was going to be obliged to use an ActiveX
form instead of an ActiveX control.

May your road be full of success.

Quote
"Mark Cashman (TeamB)" wrote:
> Hi, Robert!

> I don't think so, because TImage is a TGraphicControl descendant, not a
> TWinControl. Create your control as a TPanel descendant parenting a
> TImage and you should be fine.

> This is a problem because a TImage has no window handle, which, I
> believe, is required.

> ------
> Mark Cashman, TeamB C++ Builder
> http://www.temporaldoorway.com/programming/index.htm
> C++ Builder, JBuilder programming information
> Home of The C++ Builder Programmer's Webring - Join us!
> ------

Re:ActiveX control based on TImage


Quote
In article <38C3AFB0.6395F...@caramail.com>, Robert  <r...@caramail.com> wrote:
>Hi,

>I use BCB 4 and when I try to create a new ActiveX control I can't
>choose a TImage as parent.

>Is it possible to create an ActiveX control based on the TImage class ??

Almost certainly not; VCL classes must derive from TWinControl in order
to convert nicely to AX controls.
--
Si vales, valeo.

Other Threads