use strict; use Win32::GUI; sub TVI_FIRST { 0xFFFF0001 } my $Window = new Win32::GUI::Window( -name => "Window", -text => "Win32::GUI v. $Win32::GUI::VERSION TreeView: 32bit vs. 64bit", -height => 200, -width => 350, -left => 100, -top => 100, ); my $TV = $Window->AddTreeView( -width => $Window->ScaleWidth, -height => $Window->ScaleHeight, -left => 0, -top => 0, -lines => 1, -rootlines => 1, -buttons => 1 ); my $rootNode = $TV->InsertItem( -text => "rootNode", ); my $childNode = $TV->InsertItem( -parent => $rootNode, -text => "childNode", -item => TVI_FIRST ); my $childAtt2 = $TV->InsertItem( -parent => $childNode, -text => "childAtt2", -item => TVI_FIRST ); my $childAtt1 = $TV->InsertItem( -parent => $childNode, -text => "childAtt1", -item => TVI_FIRST ); # root attribute inserted _after_ inserting child nodes, but should # display _before_ child nodes my $rootAtt1 = $TV->InsertItem( -parent => $rootNode, -text => "rootAtt1", -item => TVI_FIRST ); $TV->Expand($_) for($rootNode, $childNode); $Window->Show(); Win32::GUI::Dialog(); # eof #### Insert.hInsertAfter = (HTREEITEM) handle_From(NOTXSCALL ST(next_i)); #### switch(SvIV(ST(next_i))){ case 0xFFFF0001: Insert.hInsertAfter = TVI_FIRST; break; case 0xFFFF0002: Insert.hInsertAfter = TVI_LAST; break; case 0xFFFF0003: Insert.hInsertAfter = TVI_SORT; break; default: Insert.hInsertAfter = (HTREEITEM) handle_From(NOTXSCALL ST(next_i)); break; }