AtiveX 控件中如何产生二级属性和方法,如:test.GetRect().GetWidth();
test.Rect.Width

解决方案 »

  1.   

    VB:
    用结构体嵌套试试:
    type T1
        a1 as string
    end typetype T2
        a2 as T1
    end typet2.a2.a1="123"
    C++:
    用类就更好实现了,对吧!!!
      

  2.   

    假设你的test是IArea接口对象interface IArea
    [
    HRESUTL GetRect([out,retval]IRect ** ppRect);
    ...
    ]interface IRect
    [
    HRESULT GetWidth([out,retval] integer *pWidth);
    ...
    ]