什么是Com,什么是类
以下内容是本人学习理解笔记,不一定正确。
TOleControl2 = class(TOleControl) //这是一个类
TOleControl2 = class(TOleControl, IDispatch) //拥有接口的类,被称为Com对象,所以说Com对象也是一个类。
----------------
constructor TOleControl2.Create(AOwner: TComponent); //构造函数;
begin
inherited;
FScript := true;
end;
Ole2 := TOleControl2.Create(Self);
Ole2.成员变量;
Ole2.成员函数;
//无论Com对象还是类 都要通过实例化后 才可以调用里面的成员,或者叫方法。
//被继承的基类,基接口也是要通过这样的形式调用里面的成员,或者叫方法。