显示目录列表控件中的文件

发布于 2024-10-08 15:46:13 字数 380 浏览 0 评论 0原文

有没有办法让用户使用 BrowseDlg 选择特定文件?我所能找到的是你只能选择一个文件夹!我相信文件选择是正在使用的“常见”功能之一。

任何人都可以提供一些关于如何实现这一目标的建议。

谢谢!

更新

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

  1. 我怎样才能用我现有的 UI 序列来排序这个 CA 对话框。
  2. 如何在我的自定义对话框之一中单击按钮时触发 CA。
  3. 如何从文件浏览 CA 获取文件路径以供 WIX 进一步使用。

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

请指教。 谢谢!

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.

Thanks!

Update

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. How can I sequence this CA dialog with my exsiting UI sequence.
  2. How to trigger a CA on a button click from one of my custom dialog.
  3. How to get the file path back from File Browse CA to be further used by WIX.

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

Please advice.
Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

永言不败 2024-10-15 15:46:13

实际上,Windows Installer 没有任何内置的“浏览文件”对话框。不同的供应商提供了他们的定制解决方案,例如高级安装程序InstallShield

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

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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文