Daniel Fernandez wrote:
Hi,
I'm trying to implement the StretchBlt function using a call to
gdi32.dll in order to fill the window with the image.
here, I load the dll
my $ApiObj = new Win32::API ("gdi32", "StretchBlt", "PIIIIPIIIIN", "I");
my $ApiObj = new Win32::API ("gdi32", "StretchBlt", "NIIIINIIIIN", "I")
or die ("Can't load StretchBlt");
The src and dest DC parameters are handles to DC's (HDC), not Pointers.
Here, I call the StretchBlt
$ApiObj->Call($dc, 0, 0, $ww, $wh, $memDC, $bmw, $bmh, 13369376);
$ApiObj->Call($dc>{-handle}, 0, 0, $ww, $wh, $memDC->{-handle}, 0, 0,
$bmw, $bmh, 13369376);
- You need to get the window's DC handle from the DC object, and pass
that (as Win32 api calls expect Win32 handles, not Perl objects).
- You were missing two parameters from the call
[I've not tested this]
Regards,
Rob.