Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OCX and object property
Message
De
02/04/1998 06:36:30
 
 
À
02/04/1998 05:34:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00088535
Message ID:
00088892
Vues:
28
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform