如何在wpf中调用dll mfc? [英] How to call the dll mfc in wpf?

查看:102
本文介绍了如何在wpf中调用dll mfc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在有一个其他人组合编写的MFC OSG 3D控件,我想在wpf中调用show it,但找不到方法。我希望有一个例子。

解决方案

没有调用DLL这样的概念。您只能调用一些函数/方法/属性/过程/子例程/运算符。您可以通过P / Invoke在.NET中使用一些本机DLL,阅读它。另一个不错的选择是使用C ++ / CLI,混合模式(托管+非托管,你可以自由地使用这种语言)。



我没有提供任何细节,因为你在这一点上几乎不需要它们。 在WPF中使用MFC UI的任何部分它完全无望地无用。此外,它在任何.NET解决方案中都是无用的。我最好的建议是:忘掉它,再也不记得了。解释为什么会太长而且太无聊。



-SA


There is now a combination of others written MFC OSG 3D controls, I want to call in wpf show it, but can not find methods. I hope there is a case in point.

解决方案

There is no such concept as "call a DLL". You can only call some function/method/property/procedure/subroutine/operator. You can use some native DLLs in .NET via P/Invoke, read about it. Another good option is using C++/CLI, mixed mode (managed + unmanaged which you can freely combine with this language).

I did not provide any detail, because you will hardly need them at this point. Using any part of MFC UI in WPF it totally and hopelessly useless. Moreover, it is useless in any .NET solution. My best advice would be: forget about it and never remember again. Explaining why would be too long and too boring.

—SA


这篇关于如何在wpf中调用dll mfc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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