|
-
May 17th, 2005, 04:03 AM
#1
How to add ActiveX control at runtime
Hi
I want to build a program which can add any registered activeX control in the client area at runtime and use its functionality. Is there any way to do this .
Thanks in Advance
Anant
-
May 17th, 2005, 04:41 AM
#2
Re: How to add ActiveX control at runtime
If you are using mfc you create the generated mfc application when you finished the wizard you then you select click on the projects menu ->add to project then-> select control and components.
-
May 19th, 2005, 07:07 AM
#3
Re: How to add ActiveX control at runtime
Hi g_gili
My problem is to add the activex at runtime where i will know only the class id of activex control, There is one dialog box in my application which shows all registered controls , now When user will select particular activex from list it should be added in to client area i.e creation of object as well as calling the functions on the control.
I am expecting the same mechanism which is used by visual studio itself when we insert the component.
Is it possible to create the object using class ID and name of class ( "String" )
Thanks in Advance
Anant
-
May 19th, 2005, 07:25 AM
#4
Re: How to add ActiveX control at runtime
Hi Anant,
Cool question Indeed. Good that you brought this back. Unfortunately I am very poor (must say close to 0) in COM. So COM guru Siddhartha would you please answer to this question.
Regards,
Ashwin
-
May 19th, 2005, 07:50 AM
#5
Re: How to add ActiveX control at runtime
I have an idea for solving this problem.
Maybe you should handle all the ActiveX you have first. Such as derive a new class for each ActiceX object, and use DECLARE_DYNCREAT and IMPLEMENT_DYNCREAT macros to make your new classes have the ability to be created at runtime.
Basicly, if you want to creat an object at runtime, you MUST have an CLASS MAP first. And when the application get an class name at runtime, it can find the rigth element from the CLASS MAP.
You can reference the CRuntimeClass in MFC.
Wish this would be helpful!
-
May 21st, 2005, 07:58 AM
#6
Re: How to add ActiveX control at runtime
Hi JonyPoet
Firstly Thanks for quick attention , I can't find the source code. Please send me that source code if uoy can.
Thanks
Anant
-
May 21st, 2005, 10:33 AM
#7
Re: How to add ActiveX control at runtime
 Originally Posted by anantwakode
Hi JonyPoet
Firstly Thanks for quick attention , I can't find the source code. Please send me that source code if uoy can.
Thanks
Anant
I have compressed it, but in the smallest form its more then 100k so I put it into parts. put part1 and Part 2 into the same directory. then it should compile and work. Tell me when you have it, by private message because its useless space on the server and I'll delete when u have it
Jonny Poet 
Files deleted
Last edited by JonnyPoet; May 23rd, 2005 at 12:55 PM.
 Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
-
May 23rd, 2005, 12:51 AM
#8
Re: How to add ActiveX control at runtime
Hi,
If you want to create a visio 2003 like application that contain the activex control with editing and moving,I think a good way is to use DrawCli application,or other third party MFC Kit,such as XD++ MFC Library with http://www.********.net
Jack
-
August 4th, 2005, 09:10 AM
#9
Re: How to add ActiveX control at runtime
Additional note: The files I pointed him too was tstcon32.exe which is contained totally within sourcecode in VS.net 2003 !
 Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
-
August 4th, 2005, 03:18 PM
#10
Re: How to add ActiveX control at runtime
Take a look at CWnd::CreateControl(). I think that's what you want.
Gort...Klaatu, Barada Nikto!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|