Components & Controls

Posted on 2006-03-29
Medium Priority
Last Modified: 2013-11-20

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,
Question by:qocarlos
  • 2
LVL 45

Accepted Solution

AndyAinscow earned 500 total points
ID: 16319252
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).
LVL 22

Expert Comment

ID: 16319267
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.


LVL 22

Assisted Solution

mahesh1402 earned 500 total points
ID: 16319635
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..


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.


Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question