Components & Controls

Posted on 2006-03-29
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
    LVL 43

    Accepted Solution

    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

    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

    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 ensure proper cleanup.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
    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.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now