#!perl -w use strict; use warnings; use Win32::GUI qw(WS_CLIPCHILDREN); use Win32::OLE(); use Win32::GUI::AxWindow(); use threads; # main Window my $Window = new Win32::GUI::Window ( -title => "Win32::GUI::AxWindow", -pos => [100, 100], -size => [600, 600], -name => "Window", -addstyle => WS_CLIPCHILDREN, ) or die "new Window"; # A button my $Button = $Window->AddButton ( -name => "Button", -pos => [0, 25], -size => [600, 50], -text => "Click me !!!", ); # Create AxWindow my $Control = new Win32::GUI::AxWindow ( -parent => $Window, -name => "Control", -pos => [0, 100], -size => [600, 500], -control => "Shell.Explorer.2", ) or die "new Control"; # Get Ole object my $OLEControl = $Control->GetOLE(); $OLEControl->Navigate("about:blank"); # Clear control threads->create(\&thrTest); $Window->Show(); Win32::GUI::Dialog(); $Window->Hide(); exit(0); # Running with Button Click event sub Button_Click { my $text = "Click!!"; $OLEControl->{Document}->{body}->insertAdjacentHTML("AfterBegin",$text); } sub thrTest { my $text = "Thread test on AxWindow"; $OLEControl->{Document}->{body}->insertAdjacentHTML("AfterBegin",$text); }