以前在工程中加载过MSCOMM控件,在工程中删除控件和相关文件后,关闭工程,删除了.clw,.ncb,.asp,.opt后,重新打开工程,资源视图中ControlBar还有那个控件的图标,只是不好用哪位高手知道彻底在工程中删除?

解决方案 »

  1.   

    把控件相关的头文件和源文件删除.然后删除dsw文件,再使用dsp编译就可以了.
      

  2.   

    但是这样会把我引入的别的ActiveX控件也在ControlBar看不到了
      

  3.   

    以文本的方式打开DSW文件.
    然后你会看见下面的
    Microsoft Developer Studio Workspace File, Format Version 6.00
    # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!###############################################################################Project: "222"=".\222.dsp" - Package Owner=<4>Package=<5>
    {{{
    }}}Package=<4>
    {{{
    }}}###############################################################################Global:Package=<5>
    {{{
    }}}Package=<3>
    {{{
        {A8F8E829-06DA-11D2-8D70-00A0C98B28E2}   //这个就是你的ACTIVEX控件,你有选择的删除这个就可以了.不过,你要知道他们的ID.呵呵.
    }}}###############################################################################
      

  4.   

    对的,文本方式打开dsw文件删除Package=<3>下的指定guid
      

  5.   

    并且在.dsp里也删除了相关的语句,哪位高手有没有更好的办法?
      

  6.   

    哪位高手知道.dsp和.dsw具体是做什么的?有什么区别?
      

  7.   

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_file_types_created_for_visual_c.2b2b_.projects.asp
      

  8.   

    You have to manually remove it from the project. Please take care the following things: 
    1. Back up the existing files. 
    2. Remove the control from dialogs. 
    3. Remove the files of wrapper classes for the ActiveX control from the project. As you know, Visual C++ IDE will generate and add wrapper classes for an ActiveX control. For example, we can add classes from the type libary of a control. 
    4. If the ActiveX control also listed in the controls list of dialog design view, you should close the project, open the <project>.dsw file in notepad, and delete the reference (UUID) to the ActiveX control. For example: 
    Package=<3> 
    {{{ 
        {F0D2F21C-CCB0-11D0-A316-00AA00688B10}  <<<---------REMOVE THIS LINE 
    }}} However, removing the CLSID from the *WORKSPACE* that this pulls the control from *ALL* projects in the workspace. You may need to go back and re-insert the control in the projects where it is still needed.
      

  9.   

    我用的VC 2003是可以直接从工具箱中删除控件的(右键菜单删除),VC 6记不清楚了。
      

  10.   

    谁能解释一下.dsw里面
    Package=<3> 
    Package=<4>
    Package=<5>
    都是做什么的?有什么区别?
      

  11.   

    to jiangsheng(蒋晟.Net[MVP]) ( ) 信誉:290 .dsp里面也有控件信息,不用删除吗?