Click to See Complete Forum and Search --> : Subclassing an ActiveX control


jpropper
June 20th, 2002, 10:31 PM
Hello -

I'm trying to figure out how to subclass an ActiveX control. I need to
extend the functionality of it. Ultimately I need to intercept OnPaint and
OnMouseXXX events. Once I have processed them, I then need to pass them on
to the ActiveX control so that it can process them.

I'm trying to do something like:

public class MyClass : AxTheActiveXControl
{
public MyClass() {}
}

I was thinking that I would inherit the ActiveX controls properties.

So, in the code that instantiates MyClass

MyClass myClass = new MyClass();
myClass.property = 1;

I don't seem to be getting anywhere with this. Obviously I'm missing
something.

Any thoughts, pointers, etc would be appreciated.

Thanks,
john