General information
Category:
Windows API functions
>Hello Remus!
>
>Thank you for your answer. It is very valuable. Where did you find the info, that the properties of a stock font property can accessed by its object property?
>I read an article about LUnknown, so I understand the interface concept. But I dont know what IDispatch does.
>
>BB
Is not only a stock property that can be accessed.
The VFP OLEControls Object property is actually an IUnknow interface to the OCX control. That means that all its COM properties and methods can be accessed via this property by OLE Automation.
If you have a, for instance, lbItems.Object.Ref1.Ref2.Ref3, the Ref1.Ref2.Ref3 part is actually OLE Automation applied to the OCX control. So, any property or method of the OCX can be accessed.
Object property is also important to pass it as a parameter to methods or set properties that are of OLE type. E.g. the TreeView OCX has a ImageList property that you can set it from VFP code to an OLEControl Object property that is a ImageList. In VFP code, when you refer to a OLEControl you refer to the VFP control of type OLEControl, not the actual OLE object. But it's Object property is the actual OCX control.
The IDispatch interface is the main Automation interface, it has methods to interogate automation properties and can invoke automated methods.
Best regards,
Remus
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only