Components & Controls

Hi,

I have inserted an ActiveX control into one application via 'Components & controls' option in my VC 6.0.
Now the company that created this control released a new version which is not compatible with the   one I was working with. So I need to get rid of the first one and insert the new component.
The question is: how can I remove the control from my project? Note that the interface of the new control is not compatible at all with the old one so all the classes generated are different.

Thanks for your help,
qocarlos
LVL 3
qocarlosAsked:
Who is Participating?
 
AndyAinscowFreelance programmer / ConsultantCommented:
You have probably guessed the answer already.

You delete the control from the window it was placed on.  
You remove the classes generated by the old control from the project (remove the .cpp/.h files).
Delete the .clw file (class wizard will rebuild it).
You add the new ActiveX control as you did the old one.
You create the .cpp/.h classes as you did before.
Then comes the difficult bit - you rewrite the code that used the old classes to use the new classes (doing a rebuild all will find a lot of errors).
0
 
mahesh1402Commented:
Delete ActiveX manually from your resource editor. Delete associated generated class files .CPP and .H from your source directories and remove them from workspace.

You need to again insert new activex and generate associated class files and need to change your src accordingly.

MAHESH

0
 
mahesh1402Commented:
I am not sure this make any difference by modifying entries in .dsp file of your project as suggested at end of this KB article..

http://support.microsoft.com/kb/q142318/

But addition to above you need to :

- Remove COM object from object map (BEGIN_OBJECT_MAP)
- Remove IDL code
- Remove COM object registry information from *.rc file
- Remove  *.rgs files from project

......to ensure proper cleanup.

MAHESH
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.