如何从C#应用程序启动MFC对话框

编程入门 行业动态 更新时间:2024-10-28 01:19:04
本文介绍了如何从C#应用程序启动MFC对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我必须启动一个对话框,该对话框是通过C#应用程序在MFC中开发的. 谁能给我一步一步的程序? 如果我可以获取一些示例代码,这将更有用.

Hello All, I have to launch a dialog which is developed in MFC through C# application. Can anybody give me the step by step prodedure? It would be more helpful if i can get some sample code.

推荐答案

您是否有一个包含对话框的exe?如果是,则只需要使用Process 类启动可执行文件. 如果只有源,则将其添加到C ++/CLI项目中,并编写一些托管方法,使托管程序员可以与该本机对话框进行交互.在C#应用程序中编译并使用混合模式DLL. Do you have an exe which has the dialog? If yes, you just need to start the executable using the Process class. If you have got only the source, add it to a C++/CLI project and write some managed methods that allows managed programmers to interact with this native dialog. Compile and use the mixed mode DLL in your C# application.

您可以使用流程类 [ ^ ],或者导入并使用 ShellExecute [ ^ ](首选前一种,因为您已经在.NET上) You could use the Process Class[^] from System.Diagnostics as suggested by the other poster, or alternatively import and use ShellExecute[^] (the former one is preferred because you''re already on .NET)

更多推荐

如何从C#应用程序启动MFC对话框

本文发布于:2023-11-02 13:10:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1552493.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:对话框   应用程序   MFC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!