如何强制visual studio 2010为activex重新生成idispatch包装器类 [英] How to force visual studio 2010 to re generate idispatch wrapper class for activex

查看:255
本文介绍了如何强制visual studio 2010为activex重新生成idispatch包装器类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
- 我正在写一个(activex mfc c ++)并在(visual studio 2010)的(对话框mfc c ++)中使用它。



- 在第一次尝试中,我添加了一个DISPATCH_METHOD,如:void firstfunc();

in(activex mfc c ++),我在容器中添加(activex mfc c ++)资源(对话框mfc c ++)设计器并在对话框中使用firstfunc()非常容易。



- 在第二次尝试中,我添加了另一个DISPATCH_METHOD链接:void secondfunc();

in(activex mfc c ++)和我有预测在容器(对话框mfc c ++)中使用此函数,如fistfunc(),但它在容器中不存在(对话框mfc c ++)。 br $> b $ b

- 我的问题是=我如何强制Visual Studio刷新(IDispatch包装类)以将我在activex中的更改添加到(IDispatch包装类)? />


我尝试了什么:



我重命名activex控件并再次添加在容器(对话框mfc c ++)和(IDispatch包装器类)再次生成。

但我不认为这是强制刷新包装类的好方法。

hi - I am writing a (activex mfc c++) and use it in a (dialog box mfc c++) in (visual studio 2010).

- in first try , i added one DISPATCH_METHOD like : void firstfunc();
in (activex mfc c++) and i added (activex mfc c++) in container (dialog box mfc c++) by resource designer and used firstfunc() in dialog box very easy.

- in second try, i added another DISPATCH_METHOD link : void secondfunc();
in (activex mfc c++) and i had Forecast for use this function in container (dialog box mfc c++) like fistfunc() , but it was not exist in container (dialog box mfc c++).

-My question is = how can i force the visual studio to refresh (IDispatch wrapper class) for adds my changes in the activex to (IDispatch wrapper class)?

What I have tried:

I rename activex control and Added it again in Container(dialog box mfc c++) and (IDispatch wrapper class) was generated again.
but i don't think it be a good solution for force refresh the wrapper class.

推荐答案

我找到了一个解决此问题的愚蠢解决方案。

在.vcxproj文件中,您可以看到以下行:



< pre lang =HTML> < projectextensions>

< visualstudio>

< userproperties resource_file =MyApp.rc_x007b_c2569ef0-cf7b-494c-9526-5058e1dd9465_x007d _ =CMyctrl1/>

< / visualstudio>

< / projectextensions>< / pre>



你必须删除

_x007B_C2569EF0-CF7B-494C-9526-5058E1DD9465_x007D _ =CMyctrl1



你必须从gui删除activeX控件。

,您必须删除activeX控件的变量并删除包装器。

你必须编译ActiveX并在Gui中添加它并通过向导为它创建变量。





在通过向导创建变量之后,您可以看到再次生成包装器。
I found a stupid solution for this problem.
In .vcxproj file you can see lines below:

<pre lang="HTML"> <projectextensions>
<visualstudio>
<userproperties resource_file="MyApp.rc" _x007b_c2569ef0-cf7b-494c-9526-5058e1dd9465_x007d_="CMyctrl1" />
</visualstudio>
</projectextensions></pre>

and you must delete
_x007B_C2569EF0-CF7B-494C-9526-5058E1DD9465_x007D_="CMyctrl1"

and you must delete activeX control from gui .
and you must delete variable of activeX control and delete wrapper.
and you must compile ActiveX and Add it in Gui and create variable for it by wizard.


after create variable by wizard you can see wrapper re generated again.


这篇关于如何强制visual studio 2010为activex重新生成idispatch包装器类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆