The information in this article applies to:
SUMMARYIt is possible to pass an OLE Automation Object as a parameter to a method of a custom OLE control (.OCX). To do this, declare the OCX method to take a parameter of type IDispatch *. An OLE control is essentially an OLE Automation Object, so you can then pass one OLE Control to another using this technique. MORE INFORMATION
In Visual Basic 4.0, all OLE controls except the intrinsic controls
(TextBox, PictureBox, Label, and so on) implement an Object Property.
Except for the OLE container control, this Object property refers to the
primary IDispatch interface of that OLE control. So, if you pass the object
property of any OLE control except the OLE container control to a method of
another custom OLE control, a pointer to the primary IDispatch interface
(LPDISPATCH) of the source OLE control is what is passed, so you can then
access the methods and properties of the source OLE control through this
LPDISPATCH inside your custom OLE control method.
You can call this from Visual Basic as follows:
Additional query words: 4.00 vb4win vb4all vbctrl
Keywords : IAPOLE |
Last Reviewed: August 31, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |