Newbie question on ActiveX creating ActiveX 
Author Message
 Newbie question on ActiveX creating ActiveX

As a newbie, I am wondering whether the following makes sense/is
possible:

1. I create an ActiveX ctrl using VC++ (Ctrl A)
2. I create another ActiveX ctrl using VJ++ (Ctrl B)
3. I want Ctrl A to dynamically instantiate Ctrl B, and invokes methods
on Ctrl B

What I have tried:
a. Both Ctrl A and B works independently (at least in ActiveX test
container)
b. I have NO IDEA how to instantiate ctrl B from ctrl A
c. I read thru some of the messages here. I tried the "#import
"ctrlb.tbl" and stick it
    into Ctrl A's cpp file
    What I got is bunch of strange errors that I cannot decipher.
d. I couldn't figure out how to use CoCreateInstance() either...

Any help is appreciated. Many thx in advance!



Sat, 26 Jan 2002 03:00:00 GMT  
 Newbie question on ActiveX creating ActiveX
See embedded

Quote:

>As a newbie, I am wondering whether the following makes sense/is
>possible:

>1. I create an ActiveX ctrl using VC++ (Ctrl A)
>2. I create another ActiveX ctrl using VJ++ (Ctrl B)
>3. I want Ctrl A to dynamically instantiate Ctrl B, and invokes methods
>on Ctrl B

>What I have tried:
>a. Both Ctrl A and B works independently (at least in ActiveX test
>container)
>b. I have NO IDEA how to instantiate ctrl B from ctrl A
>c. I read thru some of the messages here. I tried the "#import
>"ctrlb.tbl" and stick it
>    into Ctrl A's cpp file
>    What I got is bunch of strange errors that I cannot decipher.

This should work, what were the errors?

Quote:
>d. I couldn't figure out how to use CoCreateInstance() either...

Same thing, what errors/problems did you encounter?

Quote:
>Any help is appreciated. Many thx in advance!

It should be possible to instaniate any ActiveX component in almost any
language, certainly C++.  How you communicate to it depends on what
interfaces are supported.  Just a guess is that the J++ object only provides
a dispatch interface, in which case there is a bit of work required in C++,
but it's not impossible.  Provide more info and we'll see what we can do.


Sun, 27 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Newbie?ActiveX Control in ActiveX Control

2. Create an ActiveX from inside another ActiveX

3. Creating ActiveX inside of another ActiveX

4. Creating ActiveX control with parent as another ActiveX

5. Creating ActiveX control with parent as another ActiveX

6. Newbie: How can I create a ActiveX component

7. ActiveX...ActiveX...GreenTree DataList...ActiveX

8. Developing mfc activex control and using ActiveX SDK-question

9. Newbie ActiveX question

10. C++ MFC ActiveX / VB Newbie question

11. How to get length of a LPCSTR in ATL ActiveX control (newbie question)

 

 
Powered by phpBB® Forum Software