TROGDOR has asked for the wisdom of the Perl Monks concerning the following question:
It produces the following output:use Win32::GUI; use Win32::GUI::DIBitmap; use Win32::GuiTest qw(FindWindowLike GetWindowText); my @windows = FindWindowLike(0, qr/^search.cpan.org/); my $hdc = Win32::GUI::DC->new($windows[0]); print "hcd is $hdc\n"; print "Window name is '" . GetWindowText($windows[0]) . "'\n"; my $bmap = newFromDC Win32::GUI::DIBitmap ($hdc); print "bmap is $bmap\n";
If the code were working correctly, bmap should be Win32::GUI::Bitmap=HASH(0x224de0). But it's coming back undefined. The $hdc is obviously defined, so what am I doing wrong here? Can anyone suggest a way to get more debug info from the method?C:\apps\Perl\dev>perl grabscreen.pl hcd is Win32::GUI::DC=HASH(0x224dbc) Window name is 'search.cpan.org: The CPAN Search Site - Microsoft Inte +rnet Explorer' bmap is
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Win32::GUI::DIBitmap for screen capture
by critter (Acolyte) on Jul 29, 2005 at 18:34 UTC | |
by ChrisR (Hermit) on Jul 29, 2005 at 19:39 UTC | |
by critter (Acolyte) on Jul 31, 2005 at 19:53 UTC | |
|
Re: Using Win32::GUI::DIBitmap for screen capture
by ChrisR (Hermit) on Jul 29, 2005 at 19:21 UTC |