Update of /cvsroot/perl-win32-gui/Win32-GUI/samples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32576/samples
Modified Files:
Animation.pl BitmapScroll.pl DateTime.pl Draw.pl EventModel.pl
GetOpenFileName.pl MDI.pl MonthCal.pl Notepad.pl NotifyIcon.pl
Region.pl SplashScreen.pl listview_drag_drop.pl
Log Message:
More Win32::GUI::Constants support
Index: MDI.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/MDI.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MDI.pl 30 Apr 2004 18:05:57 -0000 1.2
--- MDI.pl 16 May 2006 18:57:26 -0000 1.3
***************
*** 1,8 ****
! #! perl
#
# MDI sample
#
- use Win32::GUI;
use strict;
# My child counter for unique name.
--- 1,9 ----
! #! perl -w
#
# MDI sample
#
use strict;
+ use warnings;
+ use Win32::GUI();
# My child counter for unique name.
***************
*** 80,82 ****
# TextField take all client aera
$self->{Edit}->Resize($width, $height) if exists $self->{Edit};
! }
\ No newline at end of file
--- 81,83 ----
# TextField take all client aera
$self->{Edit}->Resize($width, $height) if exists $self->{Edit};
! }
Index: Draw.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Draw.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Draw.pl 2 Oct 2004 12:47:52 -0000 1.1
--- Draw.pl 16 May 2006 18:57:26 -0000 1.2
***************
*** 3,9 ****
# Drawing sample
#
! use Win32::GUI;
! $Menu = Win32::GUI::MakeMenu(
"&Draw" => "&Draw",
"> &Dots" => "DrawDots",
--- 3,12 ----
# Drawing sample
#
! use strict;
! use warnings;
! use Win32::GUI();
!
! my $Menu = Win32::GUI::MakeMenu(
"&Draw" => "&Draw",
"> &Dots" => "DrawDots",
***************
*** 13,17 ****
);
! $Win = new Win32::GUI::Window(
-left => 100,
-top => 100,
--- 16,20 ----
);
! my $Win = new Win32::GUI::Window(
-left => 100,
-top => 100,
***************
*** 23,27 ****
);
! $Timer = $Win->AddTimer("Timer1", 1);
srand();
--- 26,30 ----
);
! my $Timer = $Win->AddTimer("Timer1", 1);
srand();
***************
*** 75,79 ****
--- 78,84 ----
my $bottom;
my $P;
+ my $oldP;
my $B;
+ my $oldB;
if($Menu->{DrawDots}->Checked) {
***************
*** 93,98 ****
[ rand()*255, rand()*255, rand()*255 ]
);
! $DC->SelectObject($P);
! $DC->SelectObject($B);
$left = rand()*$W;
$top = rand()*$H;
--- 98,103 ----
[ rand()*255, rand()*255, rand()*255 ]
);
! $oldP = $DC->SelectObject($P);
! $oldB = $DC->SelectObject($B);
$left = rand()*$W;
$top = rand()*$H;
***************
*** 108,113 ****
[ rand()*255, rand()*255, rand()*255 ]
);
! $DC->SelectObject($P);
! $DC->SelectObject($B);
$left = rand()*$W;
$top = rand()*$H;
--- 113,118 ----
[ rand()*255, rand()*255, rand()*255 ]
);
! $oldP = $DC->SelectObject($P);
! $oldB = $DC->SelectObject($B);
$left = rand()*$W;
$top = rand()*$H;
***************
*** 120,124 ****
-width => rand()*5,
);
! $DC->SelectObject($P);
$DC->BeginPath();
$DC->MoveTo(rand()*$W, rand()*$H);
--- 125,129 ----
-width => rand()*5,
);
! $oldP = $DC->SelectObject($P);
$DC->BeginPath();
$DC->MoveTo(rand()*$W, rand()*$H);
***************
*** 127,132 ****
$DC->StrokePath();
}
}
-
-
-
--- 132,139 ----
$DC->StrokePath();
}
+
+ # put the old brush/pen back, so that the new ones are correctly
+ # released when their destructors are called
+ $DC->SelectObject($oldP) if defined $oldP;
+ $DC->SelectObject($oldB) if defined $oldB;
}
Index: GetOpenFileName.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/GetOpenFileName.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GetOpenFileName.pl 17 May 2004 21:23:01 -0000 1.1
--- GetOpenFileName.pl 16 May 2006 18:57:26 -0000 1.2
***************
*** 1,4 ****
use strict;
! use Win32::GUI;
# This sample demonstrates GetOpenFileName
--- 1,6 ----
+ #!perl -w
use strict;
! use warnings;
! use Win32::GUI();
# This sample demonstrates GetOpenFileName
***************
*** 8,11 ****
--- 10,14 ----
# single file with graphics file filters
+ {
my ( @file, $file );
my ( @parms );
***************
*** 21,32 ****
-title => 'Select a file';
push @parms, -file => $lastfile if $lastfile;
! @file = & Win32::GUI::GetOpenFileName ( @parms );
print "$_\n" for @file;
print "index of null:", index( $file[ 0 ], "\0" ), "\n";
print "index of space:", index( $file[ 0 ], " " ), "\n";
!
# allow multiple files, only one filter
!
my ( @file, $file );
my ( @parms );
--- 24,35 ----
-title => 'Select a file';
push @parms, -file => $lastfile if $lastfile;
! @file = Win32::GUI::GetOpenFileName ( @parms );
print "$_\n" for @file;
print "index of null:", index( $file[ 0 ], "\0" ), "\n";
print "index of space:", index( $file[ 0 ], " " ), "\n";
! }
# allow multiple files, only one filter
! {
my ( @file, $file );
my ( @parms );
***************
*** 39,52 ****
-title => 'Select a file';
push @parms, -file => $lastfile if $lastfile;
! @file = & Win32::GUI::GetOpenFileName ( @parms );
print "$_\n" for @file;
print "index of null:", index( $file[ 0 ], "\0" ), "\n";
print "index of space:", index( $file[ 0 ], " " ), "\n";
!
# old style dialog, multiple file selection enabled, no filters.
# User has to type in a filter, to see anything. Always good to have a
# filter. But it isn't required....
!
my ( @file, $file );
my ( @parms );
--- 42,55 ----
-title => 'Select a file';
push @parms, -file => $lastfile if $lastfile;
! @file = Win32::GUI::GetOpenFileName ( @parms );
print "$_\n" for @file;
print "index of null:", index( $file[ 0 ], "\0" ), "\n";
print "index of space:", index( $file[ 0 ], " " ), "\n";
! }
# old style dialog, multiple file selection enabled, no filters.
# User has to type in a filter, to see anything. Always good to have a
# filter. But it isn't required....
! {
my ( @file, $file );
my ( @parms );
***************
*** 57,62 ****
-title => 'Select a file';
push @parms, -file => $lastfile if $lastfile;
! @file = & Win32::GUI::GetOpenFileName ( @parms );
print "$_\n" for @file;
print "index of null:", index( $file[ 0 ], "\0" ), "\n";
print "index of space:", index( $file[ 0 ], " " ), "\n";
--- 60,66 ----
-title => 'Select a file';
push @parms, -file => $lastfile if $lastfile;
! @file = Win32::GUI::GetOpenFileName ( @parms );
print "$_\n" for @file;
print "index of null:", index( $file[ 0 ], "\0" ), "\n";
print "index of space:", index( $file[ 0 ], " " ), "\n";
+ }
Index: NotifyIcon.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/NotifyIcon.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NotifyIcon.pl 14 Apr 2006 01:52:28 -0000 1.2
--- NotifyIcon.pl 16 May 2006 18:57:26 -0000 1.3
***************
*** 809,813 ****
=item Icon
! Set the system icon that is disaplyed next to the balloon tooltip title.
One of: none (no icon), info, warn or error. The icon is not displayed if
there is no title.
--- 809,813 ----
=item Icon
! Set the system icon that is displyed next to the balloon tooltip title.
One of: none (no icon), info, warn or error. The icon is not displayed if
there is no title.
Index: Region.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Region.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Region.pl 1 May 2004 09:13:19 -0000 1.2
--- Region.pl 16 May 2006 18:57:26 -0000 1.3
***************
*** 1,6 ****
#This example uses regions to create clipping areas in an DC.
-
- use Win32::GUI;
use strict;
my $regiontype=0;
--- 1,10 ----
+ #!perl -w
#This example uses regions to create clipping areas in an DC.
use strict;
+ use warnings;
+
+ use Win32::GUI 1.03_03, qw( SB_THUMBTRACK SB_LINEDOWN SB_LINEUP
+ WS_CAPTION WS_SIZEBOX WS_CHILD
+ WS_CLIPCHILDREN WS_EX_CLIENTEDGE RGN_DIFF);
my $regiontype=0;
***************
*** 59,63 ****
my $H = $ChildWin->ScaleHeight;
! #set the scroll bar range and position based upon the height of the child
window.
$ChildWin->ScrollRange(0,0,$H);
$ChildWin->ScrollPos(0,$H/2);
--- 63,68 ----
my $H = $ChildWin->ScaleHeight;
! #set the scroll bar range and position based upon
! #the height of the child window.
$ChildWin->ScrollRange(0,0,$H);
$ChildWin->ScrollPos(0,$H/2);
***************
*** 69,83 ****
sub Scroll {
! #scoll handler.
! my($win,$scrollbar, $operation, $position) = @_;
! if($operation == SB_THUMBTRACK) {
! $win->ScrollPos(0,$position);
}
- elsif($operation == SB_LINEDOWN) {
- $win->ScrollPos(0,$win->ScrollPos(0)+1);
- }
- elsif($operation == SB_LINEUP) {
- $win->ScrollPos(0,$win->ScrollPos(0)-1);
- }
}
--- 74,88 ----
sub Scroll {
! #scoll handler.
! my($win,$scrollbar, $operation, $position) = @_;
! if($operation == SB_THUMBTRACK) {
! $win->ScrollPos(0,$position);
! }
! elsif($operation == SB_LINEDOWN) {
! $win->ScrollPos(0,$win->ScrollPos(0)+1);
! }
! elsif($operation == SB_LINEUP) {
! $win->ScrollPos(0,$win->ScrollPos(0)-1);
}
}
***************
*** 87,138 ****
my $H = $ChildWin->ScaleHeight;
my $DC = $ChildWin->GetDC;
! my ($left,$top,$right,$bottom,$P,$B,$region,$size);
! #We could draw directly to the window, but to remove drawing flicker we
! #create a memory DC and draw to that. Once drawing has been finished, we
BitBlt
! #the memory DC direct into the window DC.
#
! #For a large amount of GDI drawing, the use of a memory DC can also be
quicker.
#
! #We create a Compatible DC, and a Compatible Bitmap. To improve
performance you would
! #only recreate these objects if the dimentions of the source DC have
change.
my $DC2=$DC->CreateCompatibleDC();
my $bit=$DC->CreateCompatibleBitmap($W,$H);
#Select the bitmap into the new DC
! $DC2->SelectObject($bit);
#The size of the region is based upon the scroll bar position
! $size=$ChildWin->ScrollPos(0);
if ($regiontype==0) {
! #create a rectangle region
! $region=CreateRectRgn Win32::GUI::Region(0,0,$size,$size);
}
elsif ($regiontype==1) {
! #create a Elliptic region (in this case a circle)
! $region=CreateEllipticRgn Win32::GUI::Region(0,0,$size,$size);
}
else {
! $region=CreateRoundRectRgn Win32::GUI::Region(0,0,$size,$size,20,20);
}
! #Use the region for clipping for all GDI operations.
$DC2->SelectClipRgn($region);
for(1..40) {
! #create a randon pen and brush, and select them into the DC
! $P = new Win32::GUI::Pen(-color => [ rand()*255, rand()*255, rand()*255
], -width => rand()*5);
! $B = new Win32::GUI::Brush([ rand()*255, rand()*255, rand()*255]);
! $DC2->SelectObject($P);
! $DC2->SelectObject($B);
! $left = rand()*$W;
! $top = rand()*$H;
! $right = $left + rand()*($W-$left);
! $bottom = $top + rand()*($H-$top);
! #create a random rectangle
! $DC2->Rectangle($left, $top, $right, $bottom);
! $P = new Win32::GUI::Pen(-color => [ rand()*255, rand()*255, rand()*255
], -width => rand()*5,);
! $DC2->SelectObject($P);
! #create a random line
! $DC2->Line(rand()*$W,rand()*$H,rand()*$W, rand()*$H );
}
#We now update the screen in one action
$DC->BitBlt(0, 0, $W,$H,$DC2, 0, 0);
! #We now delete the DC
$DC2->DeleteDC();
! }
\ No newline at end of file
--- 92,179 ----
my $H = $ChildWin->ScaleHeight;
my $DC = $ChildWin->GetDC;
! #We could draw directly to the window, but to remove
! #drawing flicker we create a memory DC and draw to that.
! #Once drawing has been finished, we BitBlt the memory DC
! #direct into the window DC.
#
! #For a large amount of GDI drawing, the use of a memory DC
! #can also be quicker.
#
! #We create a Compatible DC, and a Compatible Bitmap. To
! #improve performance you would
! #only recreate these objects if the dimentions of the source
! #DC have change.
my $DC2=$DC->CreateCompatibleDC();
my $bit=$DC->CreateCompatibleBitmap($W,$H);
#Select the bitmap into the new DC
! my $oldbit = $DC2->SelectObject($bit);
!
#The size of the region is based upon the scroll bar position
! #Don't allow it to be zero
! my $size=$ChildWin->ScrollPos(0) || 1;
!
! #Create a region
! my $region;
if ($regiontype==0) {
! #create a rectangle region
! $region=CreateRectRgn Win32::GUI::Region(0,0,$size,$size);
}
elsif ($regiontype==1) {
! #create a Elliptic region (in this case a circle)
! $region=CreateEllipticRgn Win32::GUI::Region(0,0,$size,$size);
}
else {
! #create a rectangle region with rounded corners
! $region=CreateRoundRectRgn Win32::GUI::Region(0,0,$size,$size,20,20);
}
!
! #Clear the area outside the region we are painting into:
! my $region2 = CreateRectRgn Win32::GUI::Region(0,0,$W,$H);
! my $region3 = CreateRectRgn Win32::GUI::Region(0,0,$W,$H);
! $region3->CombineRgn($region2,$region,RGN_DIFF);
! $DC2->PaintRgn($region3);
!
! #Use the region for clipping for the rest of the GDI operations.
$DC2->SelectClipRgn($region);
+
for(1..40) {
! #create a randon pen and brush, and select them into the DC
! my $P1 = new Win32::GUI::Pen(
! -color => [ rand()*255, rand()*255, rand()*255 ],
! -width => rand()*5,
! );
! my $B = new Win32::GUI::Brush([ rand()*255, rand()*255, rand()*255]);
! my $oldP = $DC2->SelectObject($P1);
! my $oldB = $DC2->SelectObject($B);
! my $left = rand()*$W;
! my $top = rand()*$H;
! my $right = $left + rand()*($W-$left);
! my $bottom = $top + rand()*($H-$top);
! #create a random rectangle
! $DC2->Rectangle($left, $top, $right, $bottom);
!
! my $P2 = new Win32::GUI::Pen(
! -color => [ rand()*255, rand()*255, rand()*255 ],
! -width => rand()*5,
! );
! $DC2->SelectObject($P2);
! #create a random line
! $DC2->Line(rand()*$W,rand()*$H,rand()*$W, rand()*$H );
!
! #restore the original Pen and Brush so that the new ones
! #are not selected into the DC, and they get destroyed
! #when they go out of scope, otherwise we have a huge
! #resource leak, and quickly stop drawing correctly
! $DC2->SelectObject($oldP);
! $DC2->SelectObject($oldB);
}
+
#We now update the screen in one action
$DC->BitBlt(0, 0, $W,$H,$DC2, 0, 0);
!
! #As for the Pen and Brush above, restore the original bitmap
! $DC2->SelectObject($oldbit);
!
! #We now delete the memory DC
$DC2->DeleteDC();
! }
Index: Animation.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Animation.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Animation.pl 2 Oct 2004 12:47:52 -0000 1.1
--- Animation.pl 16 May 2006 18:57:26 -0000 1.2
***************
*** 4,8 ****
#
use strict;
! use Win32::GUI;
# Create your main window
--- 4,8 ----
#
use strict;
! use Win32::GUI();
# Create your main window
***************
*** 40,44 ****
);
! # Add a load button.
$Window->AddButton (
-name => "Start",
--- 40,44 ----
);
! # Add a start button.
$Window->AddButton (
-name => "Start",
***************
*** 49,53 ****
);
! # Add a load button.
$Window->AddButton (
-name => "Stop",
--- 49,53 ----
);
! # Add a stop button.
$Window->AddButton (
-name => "Stop",
Index: Notepad.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Notepad.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Notepad.pl 31 May 2004 17:41:29 -0000 1.1
--- Notepad.pl 16 May 2006 18:57:26 -0000 1.2
***************
*** 5,9 ****
use strict;
! use Win32::GUI;
my $CurrentFile = "";
--- 5,11 ----
use strict;
! use warnings;
! use Win32::GUI qw( MB_ICONQUESTION MB_ICONINFORMATION MB_YESNOCANCEL
! MB_OK IDYES IDCANCEL );
my $CurrentFile = "";
Index: EventModel.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/EventModel.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** EventModel.pl 25 Mar 2004 22:46:56 -0000 1.1
--- EventModel.pl 16 May 2006 18:57:26 -0000 1.2
***************
*** 2,6 ****
#
# This sample show different event model availlabnle in Win32::GUI
! # - OEM (Old Event Model) : Call a function venet based on control name and
event name
# - NEM (Nem Event Model) : Associate a sub event for a control.
# It present how to use both event model for a control.
--- 2,6 ----
#
# This sample show different event model availlabnle in Win32::GUI
! # - OEM (Old Event Model) : Call a function evnet based on control name and
event name
# - NEM (Nem Event Model) : Associate a sub event for a control.
# It present how to use both event model for a control.
***************
*** 11,18 ****
#
use strict;
! use Win32::GUI;
# Load a cursor bitmap
! my $C = new Win32::GUI::Bitmap("harrow.cur", 2);
# Register a BUTTON class with cursor
--- 11,21 ----
#
use strict;
! use warnings;
!
! use Win32::GUI qw(BS_NOTIFY);
! use FindBin();
# Load a cursor bitmap
! my $C = new Win32::GUI::Bitmap("$FindBin::Dir/harrow.cur", 2);
# Register a BUTTON class with cursor
***************
*** 183,185 ****
sub BOTH_MouseMove {
print "BOTH_MouseMouve using OEM !!!\n";
! }
\ No newline at end of file
--- 186,188 ----
sub BOTH_MouseMove {
print "BOTH_MouseMouve using OEM !!!\n";
! }
Index: MonthCal.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/MonthCal.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MonthCal.pl 8 May 2004 17:31:22 -0000 1.1
--- MonthCal.pl 16 May 2006 18:57:26 -0000 1.2
***************
*** 4,8 ****
#
use strict;
! use Win32::GUI;
# main Window
--- 4,9 ----
#
use strict;
! use warnings;
! use Win32::GUI();
# main Window
Index: SplashScreen.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/SplashScreen.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SplashScreen.pl 15 Nov 2004 10:48:58 -0000 1.1
--- SplashScreen.pl 16 May 2006 18:57:26 -0000 1.2
***************
*** 1,17 ****
! use Win32::GUI;
use strict;
- my ($width,$height);
- my $mainwin;
-
#try to load the splash bitmap from the exe that is running
my $splashimage= new Win32::GUI::Bitmap('SPLASH');
unless ($splashimage) {
! #bitmap is not in exe, load from file
! $splashimage= new Win32::GUI::Bitmap('SPLASH.bmp');
! die 'could not find splash bitmap' unless $splashimage;
! #get the dimensions of the bitmap
! ($width,$height) = $splashimage->Info();
! }
#create the splash window
--- 1,26 ----
! #!perl -w
!
! # Demonstrate how to do a Splash Screen for your application
! # Original code by Jeremy White, modified by Robert May
! # Note that the package Win32::GUI::SplashScreen, available
! # from CPAN and from http://www.robmay.me.uk/win32gui/ can
! # do all this and more for you
!
use strict;
+ use warnings;
+ use FindBin();
+ use Win32::GUI qw( WS_POPUP WS_CAPTION WS_THICKFRAME WS_EX_TOPMOST );
#try to load the splash bitmap from the exe that is running
my $splashimage= new Win32::GUI::Bitmap('SPLASH');
+
unless ($splashimage) {
! #bitmap is not in exe, load from file
! $splashimage= new Win32::GUI::Bitmap("$FindBin::Dir/SPLASH.bmp");
! }
!
! die 'could not find splash bitmap' unless $splashimage;
! #get the dimensions of the bitmap
! my ($width,$height) = $splashimage->Info();
#create the splash window
***************
*** 37,70 ****
-bitmap => $splashimage,
);
- $bitmap->SetImage( $splashimage );
#center the splash and show it
! $splash->Center;
$splash->Show();
#call do events - not Dialog - this will display the window and let us
#build the rest of the application.
! Win32::GUI::DoEvents;
! #A good way of building your application is to keep everything in packages,
and eval those
! #into scope in this phase. In this case, we'll create the main window and
sleep to simulate
! #some work.
! my $string = q `
! $mainwin = new Win32::GUI::Window (
! -name => "Main",
! -text => "Main window",
! -height => 400,
! -width => 400,
! );
! sleep(2);
! $mainwin->Center();
! $mainwin->Show();
! `;
! #eval the code and report any errors
! eval $string;
! if ($@) {
! my $message = $@;
! Win32::GUI::MessageBox($splash, $message ,"Build Error", MB_OK |
MB_ICONWARNING);
! }
! #hide the splash and enter the Dialog phase
$splash->Hide;
! Win32::GUI::Dialog();
\ No newline at end of file
--- 46,76 ----
-bitmap => $splashimage,
);
#center the splash and show it
! $splash->Center();
$splash->Show();
#call do events - not Dialog - this will display the window and let us
#build the rest of the application.
! Win32::GUI::DoEvents();
! #In this case, we'll create the main window and
! #sleep to simulate doing some work.
! my $mainwin = new Win32::GUI::Window (
! -name => "Main",
! -text => "Main window",
! -height => 400,
! -width => 500,
! );
! $mainwin->Center();
!
! sleep(2);
!
! #Show the main window ...
! $mainwin->Show();
! Win32::GUI::DoEvents();
!
! sleep(1);
!
! # ... hide the splash and enter the Dialog phase
$splash->Hide;
! Win32::GUI::Dialog();
Index: listview_drag_drop.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/listview_drag_drop.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** listview_drag_drop.pl 3 Aug 2005 21:45:59 -0000 1.1
--- listview_drag_drop.pl 16 May 2006 18:57:26 -0000 1.2
***************
*** 8,12 ****
use warnings;
! use Win32::GUI 1.02;
use Win32::GUI::BitmapInline ();
--- 8,17 ----
use warnings;
! use Win32::GUI 1.03_03, qw(TPM_LEFTALIGN TPM_TOPALIGN TPM_RIGHTBUTTON
! ILC_COLOR ILC_COLOR24 ILC_MASK
! WM_CONTEXTMENU CW_USEDEFAULT
! LVS_ICON LVS_REPORT LVS_SMALLICON LVS_LIST
! LVIR_SELECTBOUNDS LVSIL_SMALL);
!
use Win32::GUI::BitmapInline ();
***************
*** 24,55 ****
######################################################################
- # Some Useful Constants
- # This style for defining constants is more compatible with older
- # versions of Perl than 'use constant', and still gets inlined.
-
- # ImageList Create
- sub ILC_COLOR() {0};
- sub ILC_COLOR24() {24};
- sub ILC_MASK() {1};
-
- # Window Message
- sub WM_CONTEXTMENU() {123};
-
- # Create Window
- sub CW_USEDEFAULT() {0x80000000};
-
- # ListView Styles
- sub LVS_ICON() {0};
- sub LVS_REPORT() {1};
- sub LVS_SMALLICON() {2};
- sub LVS_LIST() {3};
-
- # ListView Image Rect
- sub LVIR_SELECTBOUNDS() {3};
-
- # ListView Set Image List
- sub LVSIL_SMALL() {1};
-
- ######################################################################
# Cursor for use when dragging
my $curDrag = newCursor Win32::GUI::BitmapInline( q(
--- 29,32 ----
Index: DateTime.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/DateTime.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DateTime.pl 2 Oct 2004 12:47:52 -0000 1.1
--- DateTime.pl 16 May 2006 18:57:26 -0000 1.2
***************
*** 4,8 ****
#
use strict;
! use Win32::GUI;
# main Window
--- 4,10 ----
#
use strict;
! use warnings;
!
! use Win32::GUI();
# main Window
Index: BitmapScroll.pl
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/BitmapScroll.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** BitmapScroll.pl 1 Oct 2004 02:43:29 -0000 1.5
--- BitmapScroll.pl 16 May 2006 18:57:26 -0000 1.6
***************
*** 2,8 ****
#a hooked event to paint to the window directly, rather than using a Graphic
#Control.
-
- use Win32::GUI;
use strict;
#create a new class which stops the WM_ERASEBKGND message from erasing the
background
--- 2,11 ----
#a hooked event to paint to the window directly, rather than using a Graphic
#Control.
use strict;
+ use warnings;
+
+ use Win32::GUI qw(WS_CLIPCHILDREN WS_CAPTION WS_SIZEBOX
+ WS_CHILD WS_EX_CLIENTEDGE
+ SB_ENDSCROLL SB_THUMBPOSITION);
#create a new class which stops the WM_ERASEBKGND message from erasing the
background