如何以编程方式打开Run c ++? [英] How to programmatically open Run c++?

查看:125
本文介绍了如何以编程方式打开Run c ++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是如何从c ++以编程方式打开?我知道有一些功能可以替代,如shellexec,winexec,但对于某些任务,我只需要运行对话框出现。

the question is how to open Run programmatically from c++? I know that have some function that can replace that, like shellexec, winexec but for some task I need just Run dialog to appear.

推荐答案

p> Run对话框位于shell32.dll中,使用函数 RunFileDlg 。一种方式显示对话框是使用rundll32.exe来调用该函数。使用 CreateProcess Win32 API执行以下命令:

The Run Dialog is located in shell32.dll using the function RunFileDlg. One way show the dialog is to use rundll32.exe to invoke that function. Execute the following command using the CreateProcess Win32 API:

rundll32.exe shell32.dll,#61

(其中#61是 RunFileDlg function)。

(where #61 is the ordinal number of the RunFileDlg function).

参考shell32.dll函数: http://www.geoffchappell.com/viewer.htm?doc=studies/windows/shell/shell32/api/index.htm

Reference for shell32.dll functions: http://www.geoffchappell.com/viewer.htm?doc=studies/windows/shell/shell32/api/index.htm

希望这有助。

这篇关于如何以编程方式打开Run c ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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