Hello Maillist,

 

maybe you could help me.

 

When I rescale an Image the old image is still seen and not removed. How to
do that?

 

When resizing the main window all is rewritten and looks fine. If I rescale
the image via a button I have the strange effect.

 

Hopefully you understood my issue and can help me?!

 

Many Thanks

 

Here my example:

#perl -w

 

use Win32::GUI;

use Win32::GUI::DIBitmap;

 

$W = new Win32::GUI::Window (

    -title    => "Win32::GUI::DIBitmap test",

    -left     => 100,

    -top      => 100,

    -width    => 600,

    -height   => 400,

    -name     => "Window",

) or die "new Window";

 

         $W->AddButton(-name=>
"MINSIZE",-text=>"PIC",-left=>1,-top=>250,-width=>30,-height=>30,-visible=>1
,);

         my $dib = newFromFile Win32::GUI::DIBitmap ('temp/temp.tif');

         my $x; my $y;

 

$W->Show();

Win32::GUI::Dialog();

sub MINSIZE_Click { $x+=10;  $y+=10; Paint(); }

sub Window_Resize {  Paint(); }

sub Window_Activate { Paint(); }

sub Window_Terminate { $W->PostQuitMessage(0); }

sub Paint {

     Win32::GUI::DC::ReleaseDC($W, $dc);

    $dc = new Win32::GUI::DC ($W);

    $dispdib = $dib -> Rescale(200-$x, 200-$y);

    $dispdib->CopyToDC($dc);

}

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/

Reply via email to