从ATL项目中调用Windows窗体 [英] invoke the windows form from ATL project

查看:154
本文介绍了从ATL项目中调用Windows窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我创建了ATL项目,该项目将上下文菜单添加到Windows资源管理器中,并进行了一些工作并将其输出为dll.我注册了反映在Windows资源管理器中的dll.我的应用程序的前视图是Windows窗体,即UI.请帮我.如何将表单包括为正视图并如何从用户那里获取输入.然后在内部,表格的输入也传递给atl项目.
有可能吗?
我看到了msdn论坛,他们遇到了同样的问题,即他们创建了类库项目,然后在vc ++中添加了Windows窗体类,并将输出作为dll添加了.然后使用参考将该dll添加到atl项目中.但是我不知道如何在vc ++中的类库项目中创建/调用表单对象.


请帮助我,我正在等待您的回复.

谢谢
K.Prathika

Hi All,

I have created ATL project which adds the context menu to the windows explorer and the doing some work and the output as dll. I registered the dll this was reflected in my windows explorer. Front view of my application is windows form that is UI. Please help me. how to include the form as front view and getting the input from the user. Then internally, input of the form is passed to atl project also.
is it possible.
I saw msdn forum, they faced the same issue i.e., they created class library project then add the windows form class in vc++ and the output as dll. Then this dll was added to atl project using references. But i dont know how to create/invoke the form object with in class library project in vc++.


Please help me, I am waiting for your response.

Thank you,
K.Prathika

推荐答案

使用C ++/CLI.例如,使用gcnew实例化.NET类,然后在C ++代码中使用该对象.

几天前在CP中提出了类似的问题.检查那里的答案:
在c ++项目中调用c#dll或类 [
Use C++/CLI. E.g., use gcnew to instantiate a .NET class and then use the object in your C++ code.

A similar question was asked in CP a few days back. Check the answers there:
call c# dll or class within c++ project[^]


这篇关于从ATL项目中调用Windows窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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