Thanks for your answer
The following code work for me.
my ($width, $height) = ($Window->GetClientRect)[2..3];
my $B = new Win32::GUI::Bitmap('backgound.bmp') or die("new Bitmap");
my $bgimg = new Win32::GUI::Label (
-parent => $Window,
-name => 'BGImg',
-left => 0,
-top => 0,
-width => $width,
-height => $height - $stb_$height,
-addstyle => 14,
-visible => 1,
#-text => "ouch",
) or die "BGImg";
$bgimg->SetImage($B);
$bgimg->Resize($width, $height - $kk);
....
$bgimg->Show();
I see the problems that you comments.
Do you know how any solution for these problems (URL, docs,etc) or is
there are an easy way to associate an bitmap to MDIFrame?
Thanks very much
Kind, Uwe escribió:
Hello, perl-win32-gui-users,
Anybody knows if it's possible to display a background bitmap image in a
MDIFrame? If it's possible, I will appreciate a short example .
I'm using de MDI.pl example (Win32-GUI examples) for test.
Thanks!
One possibility is to add a Label with a bitmap to the MDIFrame:
$Window = new Win32::GUI::MDIFrame (
...
-onResize => sub { $Window->{BGImg}->Resize($Window->ScaleWidth(),
$Window->ScaleHeight())
},
) or die "Window";
my $bgimg = new Win32::GUI::Label (
-parent => $Window,
-name => 'BGImg',
-bitmap => my $bitmap = new Win32::GUI::BitmapInline(q( ... )),
) or die "BGImg";
The problem is, that you will have to catch quite a lot of messages/events
because the repainting of the Label and sometimes even the MDIChilds isn't
done in the way one would expect and so you'll have to take care of it on
your own.
Regards,
Uwe.
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users