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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mahesh1402IT ProfessionalCommented:
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

mahesh1402IT ProfessionalCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.