有没有办法在delphi中禁用TOpenDialog的提示?
我有一个在运行时创建的 TOpenDialog
组件,我想禁用在使用它时在文件上弹出的提示。 除了创建对象、执行对象并提取文件名,然后释放实例之外,我没有为此编写任何 exrta 代码。
我可以做我想做的事吗? 如果是这样,我该怎么做?
I have a TOpenDialog
component I am creating on runtime and I want to disable the hint that pops up over files when it is used. I have not written any exrta code for this than creating the object, executing the object and extracting the filename,, then freeing the instance.
Can I do what I want to do? If so, how do I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于这是一个 Windows 通用对话框,因此您可能必须跳入并挂钩到dialogproc 并手动尝试和处理工具提示消息。 您可以在此处查看有关如何自定义常用对话框的开始信息; http://msdn.microsoft.com/en-us/library/ms646951。 .aspx. 您还可以考虑创建自己的 TOpenDialog 后代并重写 WndProc 受保护方法以访问对话框消息和通知。 我怀疑您还需要进行一些更深入的挂钩并开始处理资源管理器外壳。 该对话框中的文件列表实际上是 Windows 资源管理器外壳的一部分的实例。
另一个问题是,您试图通过向用户隐藏此信息来实现什么目的? 也许还有其他解决方案可以解决您想要做的事情,而不是禁用某些内在功能?
Since this is a Windows common dialog, you may have to jump in and hook into the dialogproc and manually try and process the tooltip messages. You can look here for a start about how to customize the common dialogs; http://msdn.microsoft.com/en-us/library/ms646951.aspx. You can also look at creating your own TOpenDialog descendant and override the WndProc protected method to get access to the dialog messages and notifications. I suspect you'd also need to do some deeper hooking and start getting into dealing with the explorer shell. The file list in that dialog is actually an instance of parts of the Windows Explorer shell.
Another question is what is it you're trying to accomplish by hiding this information from the user? Maybe there is some other solution to what you're trying to do rather than disabling some intrinsic functionality?
我在谷歌上搜索“opendialog crash tooltip”,第一次点击给了我 这个。 他们的问题(也可能是你的问题)的解决方案是这样的:
I googled for "opendialog crash tooltip" and the first hit gave me this. The solution for their problem (and probably yours) is this: