使用 Delphi 打开对话框的自定义预览
我需要在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我之前搜索过这些,但找不到确切的解决方案。
我发现微软提供了 IFileDialogCustomize 界面修改 vista 或更高版本的新文件对话框。
根据这篇文章,我们无法添加任何自定义像XP或之前的控件一样,我们可以添加的控件非常有限,如下所示。
如果MS没有提供其他接口,我们就无法正确扩展文件对话框。
我认为此时我们可以提供的东西是:
在文件对话框侧面打开自定义窗口。
您使用过IrfanView 吗?如果将图像保存为 png 或 jpeg 格式,IrfanView 会在保存对话框的右侧显示选项设置窗口(下面的窗口是按传统方式自定义的,但也许我们可以使用新对话框执行类似操作)。
替代文本 http://img208.imageshack.us/img208/9128/irfanviewsaveas.png< /a>
使用 shell 控件模拟新对话框一些新的自定义控件
这可能不太好,因为也许我们在左侧找不到增强的树控件,但是使用 rkSmartPath 我们可以模仿新的路径栏,如下所示。
(我认为这是一项伟大的工作!)
如果有人使用虚拟树视图或其他东西来实现对 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.
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!)
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! :-)