简体   繁体   English

如何在我自己的应用程序中的Explore中创建“打开方式”列表

[英]How can I create a “Open with” list as in Explore in my own application

In my application the user can select reference to file, for example a image file. 在我的应用程序中,用户可以选择对文件的引用,例如图像文件。 I would like to make button with a arrow that opens a list with the programs installed on the system witch can open this file type. 我想用箭头打开一个按钮,打开一个列表,系统上安装的程序可以打开这个文件类型。

I know that I can get the program names from the registry "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts", but how can I filter the entries out that have no meaning - "DllHost.exe, miaui.exe, etc." 我知道我可以从注册表“HKEY_CURRENT_USER \\ Software \\ Microsoft \\ Windows \\ CurrentVersion \\ Explorer \\ FileExts”获取程序名称,但是如何过滤掉没有任何意义的条目 - “DllHost.exe,miaui.exe,等等。” And how can I open the file with program that the user choose? 如何使用用户选择的程序打开文件?

在此输入图像描述

@ Lars Tech If I look in registry "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\" and then "OpenWithList" for the extension ".jpg" I see more entries that if if rigt click on jpg file and choose Open With ( see my first images) and I only want those. @ Lars Tech如果我在注册表“HKEY_CURRENT_USER \\ Software \\ Microsoft \\ Windows \\ CurrentVersion \\ Explorer \\ FileExts \\”然后“OpenWithList”查看扩展名“.jpg”我看到更多条目,如果如果rigt点击jpg文件并选择打开(见我的第一张图片),我只想要那些。 And yes there is program's entries that I properly self have added, but that have no meaning to a jpg file. 是的,我自己已经添加了程序的条目,但这对jpg文件没有意义。 And Windows can filter them out so will I. Windows可以将它们过滤掉。 在此输入图像描述

如果在Vista或更高版本上运行,你可以使用'SHOpenWithDialog'http: //msdn.microsoft.com/en-us/library/bb762234 (v=vs.85) .aspx - 这很简单...... Jens

我认为您可以使用本文来验证并找出哪些适用于您的应用程序并且有效

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM