Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OCX and object property
Message
From
02/04/1998 06:36:30
 
 
To
02/04/1998 05:34:39
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00088535
Message ID:
00088892
Views:
32
>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
Map
View

Click here to load this message in the networking platform