Well, you're code works fine here, do you have the latest dev build
from http://perso.club-internet.fr/rocherl/Win32-GUI-Dev/index.html?

cheers, YorHel

On Tue, 17 Aug 2004 23:47:25 -0600, Greg Osborne
<[EMAIL PROTECTED]> wrote:
> Hello :-)
> 
> I'd like to apologize in advance if the answer to this is posted somewhere
> already.  I've done several websearches, dove into the documentation, and
> even searched this group's archives looking for answers, but if they're
> out there, I missed them.
> 
> I'm trying to load a bitmap image and place it on top of or inside of a
> control such as a button, a checkbox, or a label - anything where I can
> get events from it fairly easily.  I have noticed that checkboxes don't
> seem to have support for bitmaps in/on them, even though buttons and
> checkboxes otherwise share most options.
> 
> Here's some example code of what I've tried.  It more or less outlines
> what I seem to find posted on the net/in the documentation.  It doesn't
> give any run-time errors, but it won't display the images either.  The
> same code applies to labels - yep, tried it on them too.
> 
> use Win32::GUI;
> 
> my( $Bitmap, $Window );
> 
> $Window = new Win32::GUI::Window(
> -name => "Window",
> -title => "Bitmap Button Test",
> -height => 300,
> -width => 300,
> -top => 0,
> -left => 0
> );
> 
> # I'm asuming either of these are fine, but I've tried both
> # just-in-case
> # $Bitmap = Win32::GUI::Bitmap->new( "Button.bmp" );
> $Bitmap = new Win32::GUI::Bitmap( "Button.bmp" );
> 
> $Window->AddButton(
> -name => "Button",
> -text => "Bitmap Button",
> -top => 50,
> -left => 50,
> -height => 200,
> -width => 200,
> # Shouldn't this work???
> -bitmap => $Bitmap
> );
> 
> # Or this???
> $Window->Button->SetImage( $Bitmap );
> 
> $Window->Show();
> Win32::GUI::Dialog();
> 
> sub Window_Terminate {
> return -1;
> }
> 
> I've also worked with the Win32::GUI::DIBitmap package just to make sure
> the bitmap images I am trying to load are compatible - not an odd bit
> resolution that the normal Bitmap stuff doesn't support.  All, with no
> results.
> 
> Any and all help is greatly appreciated.
> 
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>

Reply via email to