问题描述
我一直在尝试使用tomazy的FutureWindows基础结构(请参见或该工具的主页,网址为 https://github.com/tomazy/DelphiUtils ),但想知道是否以及如何将其与标准Windows文件打开对话框一起使用?它们似乎不是从TControl继承的,而FutureWindows下文似乎假定了TControl(除非我误解了).
I've been trying to use tomazy's FutureWindows infrastructure (see his answer at Delphi GUI Testing and Modal Forms or the home of the tool at https://github.com/tomazy/DelphiUtils), but would like to know if and how can it be used with standard Windows file open dialogs? They don't seem to be inheriting from TControl, which the FutureWindows infra seems to assume (unless I've misunderstood it).
我想做的基本上是在OpenFileDialog中选择一个文件,该文件在我的测试中由命令以模态方式打开,但还无法弄清楚该怎么做.
What I'd like to do is basically to just select a file in an OpenFileDialog which is opened modally by a command within my testing, but haven't yet been able to figure out how to do this.
推荐答案
使用 Spy ++ 找出窗口类名称是什么.例如,在我的Windows 7计算机上,系统文件打开对话框的窗口类名称为#32770 (Dialog)
.
Use a tool like Spy++ to find out what the window class name is. For example, on my Windows 7 machine, the window class name for a system file open dialog is #32770 (Dialog)
.
这篇关于(如何)我可以将FutureWindows与标准文件打开对话框一起使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!