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
Printable View
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
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.
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
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
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!
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 itQuote:
Originally Posted by anantwakode
Jonny Poet :wave:
Files deleted
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
Additional note: The files I pointed him too was tstcon32.exe which is contained totally within sourcecode in VS.net 2003 !
Take a look at CWnd::CreateControl(). I think that's what you want.