本文介绍了如何从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对话框
发布评论