At 07:25 2003-04-12 -0400, Stuart Arnold wrote:
I'll assume the "Picture" is a bitmap or icon?
This works for a bitmap, and icon is just as easy.
Here's a sniplet.

BEGIN{
        our $bitmap;
}

Putting the declaration in a BEGIN block seems redundant. Why do you do that?


But be aware of a Win32::GUI flaw.  The $bitmap var must be kept around,
ie, global !

The "our" declaration takes care of that. It could also be declare with "my" outside any subroutine in the package.

The variable doesn't _have_ to be global, it has to be in scope as long as the button can be displayed. Keeping it in a global can be a convenient way of doing that, but there are other ways.


/J

-------- ------ ---- --- -- --  --  -    -     -      -         -
Johan Lindström    Sourcerer @ Boss Casinos     [EMAIL PROTECTED]

Latest bookmark: "search.cpan.org Gadabout"
<http://search.cpan.org/author/JESUS/Gadabout-1.0002/Gadabout.pm>
dmoz (1 of 21): /Computers/Software/Shareware/Windows/ 34



Reply via email to