在目录列表控件中显示文件 [英] Display files in a directory list control

查看:29
本文介绍了在目录列表控件中显示文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用户是否可以使用 BrowseDlg 选择特定文件?我能找到的就是你只能选择一个文件夹!!我相信文件选择是使用中的常见"功能之一.

Is there a way for user to select a specific file using BrowseDlg? All i can find is that you can select only a folder!! I believe File selection is one of the "common" functionality in use.

任何人都可以就如何实现这一目标提供一些建议.

Can anyone provide some suggestion on how this can be achieved.

谢谢!

我正在考虑为此创建一个 C# 自定义 aciton,因为项目中的所有其他 CA 都在 C# 中.但我不确定一些事情......

I am thinking of creating a C# custom aciton for this, as all other CA in project are in C#. But I am not sure about few things....

  1. 如何使用现有的 UI 序列对这个 CA 对话框进行排序.
  2. 如何在我的自定义对话框之一中单击按钮时触发 CA.
  3. 如何从 File Browse CA 取回文件路径以供 WIX 进一步使用.

我创建的其他 CA 没有任何关联的 UI.

The other CAs that I have created does not have any UI associated.

请指教.谢谢!

推荐答案

实际上,Windows Installer 没有为浏览文件"对话框内置任何内容.各种供应商提供他们的定制解决方案,例如 Advanced InstallerInstallShield.

Actually, Windows Installer doesn't have anything built-in for the "Browse for file" dialog. Various vendors offer their custom solutions, like Advanced Installer and InstallShield.

无论如何,这一切都以自定义对话框和浏览按钮的自定义操作结束.您可以在此处找到此示例(搜索文件浏览对话框""在那个页面).您将找到的包包含自定义操作、示例解决方案和一些注释.它基于 InstallShield,但您至少可以从那里采取自定义操作(在 WiX 中创建自定义对话框并不难).作为最后的手段,您可以尝试自己实现此 CA.

Anyway, this all ends up in a custom dialog and custom action for Browse button. You can find an example of this here (search for "File Browse Dialog" on that page). The package you'll find contains the custom action, sample solution and some notes. It is based on InstallShield, but you can take at least custom action from there (creating a custom dialog in WiX is not that hard). As a last resort, you can try to implement this CA yourself.

这篇关于在目录列表控件中显示文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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