#Draw rectangle with the image as brush
my $brsBitmap = Win32::GUI::Brush->new(
-style => 3, #BS_PATTERN
-pattern => $bmBitmap,
);
...
$dcDev->SelectObject($rhBrush->{noPen});
Win32::GUI::AdHoc::SetBrushOrgEx($dcDev, #Move the brush or
+igin
$rhPosCache->{left} + $leftBitmap,
$rhPosCache->{top} + $topBitmap);
$dcDev->SelectObject($brsBitmap);
$dcDev->Rectangle(
$rhPosCache->{left} + $leftBitmap,
$rhPosCache->{top} + $topBitmap,
$rhPosCache->{left} + $leftBitmap + $widthBitmap + 1,
$rhPosCache->{top} + $topBitmap + $heightBitmap + 1,
);
The example is far from complete, but you get the idea.
I think you can "scroll" which parts within the image to display by moving it's origin, but I'm not sure.
If you want, you can download The GUI Loft and look at the source (PPM\Loft\lib\Win32\GUI\Loft\Control.pm and lib\TGL\WindowDesign.pm).
/J
|