Hi,
I didn't know how the phrase the subject line.
The point is that I have a class called cField with interface iField. This is
the base class. Then i have a derived class that inherits cField and iField which is called e.g. cTreeView, iTreeView.
ON a form i have the method AddField. This method takes an iField as parameter.
Here is my first question, is it ok to use the base class interface for all inherited
classes if I would need to add an inherited interface to a collection ?
It seems not to work correctly. Especially when getting an instance back from a collection I get GPF's.
So, there should be a way to have a generic approach to store and retrieve
base classes and their inheritance into/from colelctions.
I have been fiddling around with Dispatch but then the Dispatch doesn't know anything about the methods and properties of the class.
I hope you understand what I'm trying to achieve here.
Cheers
Steven
I didn't know how the phrase the subject line.
The point is that I have a class called cField with interface iField. This is
the base class. Then i have a derived class that inherits cField and iField which is called e.g. cTreeView, iTreeView.
ON a form i have the method AddField. This method takes an iField as parameter.
Here is my first question, is it ok to use the base class interface for all inherited
classes if I would need to add an inherited interface to a collection ?
It seems not to work correctly. Especially when getting an instance back from a collection I get GPF's.
So, there should be a way to have a generic approach to store and retrieve
base classes and their inheritance into/from colelctions.
I have been fiddling around with Dispatch but then the Dispatch doesn't know anything about the methods and properties of the class.
I hope you understand what I'm trying to achieve here.
Cheers
Steven