Robert May wrote:
foreach my $tempwin (@windows)
{
# $tempwin->InvalidateRect(1);
Win32::GUI::InvalidateRect($tmpwin, 1);
# $tmpwin is a scalar not an object
my $tempdib = newFromWindow Win32::GUI::DIBitmap ($tempwin,1);
$tempdib->SaveToFile("saved-image.bmp");
}
>
$tmpwin isn't a pakcakge or object reference.
Odd that DIBitmap newFromWindow copes with it being passed a window, but
InvalidateRect() barfs. What am I doing wrong here, or more to the
point, would using InvalidateRect() actually do what I want it to?
I doubt it, but now you can try.
Regards,
Rob.
doh! That fixed it, but you were right (as always), it didnt do what I
was expecting (or maybe just hoping :) )
So, on to the WM_PRINT event method. If I cant do:
$tempwin->GetDC();
because its a scalar, and
Win32::GUI:GetDC($tempwin);
doesnt seem to be able to find GetDC in the Win32::GUI package, how can
I find the DC for the scalar $tempwin entry? (I picked a bad week to
give up smoking AND caffeine)
Steve