#24 Use -style option with use Archive::Zip;

closed
None
5
2004-06-01
2004-04-26
Anonymous
No

Win32::GUI: the -style option is deprecated! at
C:/Perl/site/lib/Win32/GUI.pm line 586.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    #perl -v
    #
    # Load image from a zip file.
    #
    use Win32::GUI;
    use Win32::GUI::DIBitmap;
    use Archive::Zip;

    $W = new Win32::GUI::Window (
    -title => "Win32::GUI::DIBitmap load from a zipfile",
    -left => 100,
    -top => 100,
    -width => 400,
    -height => 400,
    -style => ms_caption,
    -name => "Window",
    ) or die "new Window";

    ($width, $height) = ($W->GetClientRect)[2..3];

    # Open Zipfile
    $zip = Archive::Zip->new( 'zapotec.zip' ) or die "ZipFile";
    # Open image file in zipfile
    $member = $zip->memberNamed( 'Zapotec.JPG' ) or
    die "member ZipFile";
    # Load data image in memory
    $data = $member->contents();
    # Load data immage in a dibbitmap
    $dib = newFromData Win32::GUI::DIBitmap ($data) or
    die "Load zapotec.jpg";
    $hbitmap = $dib->ConvertToBitmap();

    undef $member;
    undef $zip;
    undef $data;
    undef $dib;

    $BITMAP = $W->AddLabel (
    -pos => [0 , 0],
    -size => [$width, $height],
    -bitmap => $hbitmap,
    -name => "Bitmap",
    -visible => 1,
    );

    $BITMAP->SetImage ($hbitmap);

    $W->Show();
    Win32::GUI::Dialog();

    sub Window_Resize {
    $W->Bitmap->Resize($W->ScaleWidth, $W->ScaleHeight);
    }

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

     
  • Rocher Laurent

    Rocher Laurent - 2004-05-19
    • assigned_to: nobody --> lrocher
     
  • Rocher Laurent

    Rocher Laurent - 2004-05-19

    Logged In: YES
    user_id=142891

    -style option generate a waming message when warm
    message is on.

    Replace -style option by a -addstyle/-remstyle for
    respectively add and remove style.

    I don't think ms_caption is a valide style option.

    Laurent

     
  • Nobody/Anonymous

    Logged In: NO

    Thank you! No more waming message.

     
  • Nobody/Anonymous

    Logged In: NO

    Thank you! No more waming message.

     
  • Nobody/Anonymous

    Logged In: NO

    Thank You!

     
  • Rocher Laurent

    Rocher Laurent - 2004-06-01
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks