使用 Delphi 打开对话框的自定义预览

发布于 2024-08-20 16:46:15 字数 179 浏览 5 评论 0原文

我需要在 Windows 7 / Vista 的文件打开对话框中预览几种 CAD 格式。过去我使用 Delphi 预览打开对话框,我可以注册并实现我必须预览的 CAD 格式。我找到了一些关于如何在 Vista 中创建预览处理程序的文章,不幸的是这对我不起作用。我想知道是否有一种方法可以获取我创建的对话框的 IPreviewHandler 接口

I need to preview several CAD formats in the file open dialog box in Windows 7 / Vista. In the past I used a Delphi Preview Open Dialog and I could register and implement the CAD format that I had to preview. I have found some articles on how to create a preview handler in Vista, this is unfortunately not going to work for me. What I would like to know if there is a way that I can get hold of the IPreviewHandler interface of the dialog that I have created

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

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

发布评论

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

评论(1

给妤﹃绝世温柔 2024-08-27 16:46:15

我之前搜索过这些,但找不到确切的解决方案。

我发现微软提供了 IFileDialogCustomize 界面修改 vista 或更高版本的新文件对话框。
根据这篇文章,我们无法添加任何自定义像XP或之前的控件一样,我们可以添加的控件非常有限,如下所示。

提供的控件是:

<前><代码>* 菜单
* 按钮
* 组合框
* 单选按钮列表
* 复选按钮(复选框)
* 编辑
* 分隔符
* 标签

如果MS没有提供其他接口,我们就无法正确扩展文件对话框。

我认为此时我们可以提供的东西是:

  • 在文件对话框侧面打开自定义窗口。

    您使用过IrfanView 吗?如果将图像保存为 png 或 jpeg 格式,IrfanView 会在保存对话框的右侧显示选项设置窗口(下面的窗口是按传统方式自定义的,但也许我们可以使用新对话框执行类似操作)。
    替代文本 http://img208.imageshack.us/img208/9128/irfanviewsaveas.png< /a>


  • 使用 shell 控件模拟新对话框一些新的自定义控件

    这可能不太好,因为也许我们在左侧找不到增强的树控件,但是使用 rkSmartPath 我们可以模仿新的路径栏,如下所示。
    (我认为这是一项伟大的工作!)

alt text

如果有人使用虚拟树视图或其他东西来实现对 Windows 7 新位置栏/树的模拟控制,我们可以提供良好的自定义对话框。 (即使是 XP 用户。)

# 我认为组件供应商有机会为这个问题开发解决方案...

# 这是 Microsoft 送给您的礼物! :-)

I've searched about these before, but I couldn't find exact solution.

I found that Microsoft offers the IFileDialogCustomize interface to modify new file dialogs for vista or later.
According to this article, we can't add any custom controls like as XP or before, and the controls we can add are very limited as below.

The provided controls are:

* Menu
* Button
* Combo box
* Radio button list
* Check button (check box)
* Edit
* Separator
* Label

If there's no other interfaces provided from MS, we can't properly extend the file dialog.

I think the things we can provide at this time is:

  • open custom window on the side of the file dialog.

    Have you ever used IrfanView ? If you save image as png or jpeg format, IrfanView shows option setting window on the right side of the save dialog(below one is customized in traditional way, but perhaps we can do similar with new dialog).
    alt text http://img208.imageshack.us/img208/9128/irfanviewsaveas.png

  • mimic new dialog using shell controls & some new custom controls

    It's probably not so good because perhaps we can't find enhanced tree control on the left side, but with rkSmartPath we can mimic new path bar as below.
    (I think it's great work!)

alt text

If someone implement mimic control of Windows 7's new place bar/tree using virtual tree view or something, we could provide good customized dialog. (even for XP users.)

# I think it's chance for component vendors to develop solution for this problem...

# It's a gift from Microsoft for you! :-)

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