Perl 如何使用Win32::GuiTest检查树视图控件的扩展状态?

Perl 如何使用Win32::GuiTest检查树视图控件的扩展状态?,perl,winapi,Perl,Winapi,在中,我只能找到两个处理树控件的函数,GetTreeViewSelPath和SelTreeViewTempath。有谁能推荐一种方法来检测树中节点的打开/关闭状态吗?我的树视图实际上是一片森林,一堆树。我发现我可以通过以下方法穿越树根: my $i = 0; my @states; for (my $node = Win32::GuiTest::SendMessage($windows[0], 0x1100 + 10, # Get next

在中,我只能找到两个处理树控件的函数,GetTreeViewSelPath和SelTreeViewTempath。有谁能推荐一种方法来检测树中节点的打开/关闭状态吗?

我的树视图实际上是一片森林,一堆树。我发现我可以通过以下方法穿越树根:

my $i = 0;
my @states;
for (my $node = Win32::GuiTest::SendMessage($windows[0], 
                    0x1100 + 10, # Get next
                    0,           # root
                    0);          # N/A
 $node != 0;
 $node = Win32::GuiTest::SendMessage($windows[0], 
                     0x1100 + 10, # Get next
                     1,           # Sibling
                     $node)) {    # from current

my $state = Win32::GuiTest::SendMessage($windows[0], 0x1100 + 39,
                    $node, 0xff);
$states[$i] = $state;
$i++;
}
我在以下位置找到了根、兄弟等常量:

如果我有一棵普通的树,我可能会:

node = root
for (node = child; node != 0; node = sibling) {
   ...
}
node = root
for (node = child; node != 0; node = sibling) {
   ...
}