How to invoke methods of contained ActiveX control from ATL Composite Control 
Author Message
 How to invoke methods of contained ActiveX control from ATL Composite Control

I wrote composite control that contains Far Point Spread ActiveX control. I
get events but can't find the way to invoke methods and set properties.
When I included Spread control in my project, .cpp and .h files were
generated with IDispatch wrappers for its methods and properties. But I
can't use them because Spread control was not created through the MFC and
site wasn't set.
I can get IDispatch interface for Spread control using GetDlgControl .
Should I use it to invoke methods through their dispatch ID or there is
better way to do it?


Mon, 17 Jan 2005 21:49:45 GMT  
 How to invoke methods of contained ActiveX control from ATL Composite Control
You can always QI it for its dual interface... #import is of immense
help here - assign the interface you got from GetDlgControl to
an instance of the wrapper class generated by #import. This means
you need exception handling of course (thus the CRT, so remove
_ATL_MIN_CRT from the release builds)...

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

Quote:

> I wrote composite control that contains Far Point Spread ActiveX control. I
> get events but can't find the way to invoke methods and set properties.
> When I included Spread control in my project, .cpp and .h files were
> generated with IDispatch wrappers for its methods and properties. But I
> can't use them because Spread control was not created through the MFC and
> site wasn't set.
> I can get IDispatch interface for Spread control using GetDlgControl .
> Should I use it to invoke methods through their dispatch ID or there is
> better way to do it?



Tue, 18 Jan 2005 08:36:37 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using ActiveX controls in ATL Composite control

2. Problem with Composite Control containing a Full Control

3. Z -order between contained controls inside a composite control

4. Controling contained control from Composite Control

5. composite controls: protection from UNregistered contained controls

6. Need help with ActiveX control containing other activex controls

7. Need help with ActiveX control containing other activex controls

8. Invoking methods on ActiveX control from JScript in Pocket IE

9. scripting - font - ATL Composite Activex Controls

10. ATL composite ActiveX control

11. ATL ActiveX Composite Control WITHOUT a dialog box?

12. ATL ActiveX composite Control and drawing

 

 
Powered by phpBB® Forum Software