Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Enumerate a Win32 Treeview

by slloyd (Hermit)
on Jul 25, 2005 at 21:25 UTC ( [id://477975]=note: print w/replies, xml ) Need Help??


in reply to Re: Enumerate a Win32 Treeview
in thread Enumerate a Win32 Treeview

The treeview is a SysTreeView32 class. I am using Win32::GuiTest and Win32::API for the calls not supported in Win32::GuiTest. My Win32 programmers reference does not mention any way to enumerate the treeview. I was hoping to find some Win32 API that I could call using the Win32::API module. I have tried GetWindowText and SendMessageA but to no avail. Ultimately I would like to write a sub that returned a hash of the treeview structure.
############### sub getWindowText{ my $hwnd = shift || return; $GetWindowText ||= new Win32::API("user32", "GetWindowText", ['N', + 'P', 'N'], 'N') || return; my $title = " " x 1024; my $titleLen = 1024; my $result = $GetWindowText->Call($hwnd, $title, $titleLen); if($result){return substr($title, 0, $result);} #if no result send a WM_GetText message to the window $WmSendMessage ||= new Win32::API("user32", "SendMessageA", [N, N, + N, P],'N') || return; my $WM_GETTEXT=13; my $text = " " x 2048; my $textLen = 2048; my $result = $WmSendMessage->Call($hwnd,$WM_GETTEXT, $textLen, $te +xt); if($result){return substr($text, 0, $result);} }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://477975]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-20 05:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found