From: Jeremy W. <jez...@ho...> - 2004-03-23 20:42:42
|
Today has been one of those days - if it can go wrong, it has! Anyway, I've retested - and there is a problem - although I'm having difficult in getting a small enough example working (I'll try again in the morning). However, I came across another issue with PPM 671 and 671 built with ming. The issue is with the -flicker option. I'm on XP, with 5.6.1 (I'll do testing on win98 boxes tomorrow). The example below (created by Steve a couple of months back) runs fine on ming 671, but with the PPM version the background of the window isn't painted, causing a mess in the window. Very strange. Cheers, jez. ======================= use Win32::GUI; use Win32::API; use warnings; use strict; # Our MAIN window on the desktop. my $mainwindow = new Win32::GUI::Window( -name => "mainwindow", -pos => [100, 100], -size => [200,200], -text => "Scrolling subwindow demo", -noflicker => 1, -onResize => \&mainresize ); # Our window with horizontal scrollbar inside the main window my $scrollwindow = new Win32::GUI::Window ( -parent => $mainwindow, -name => "scrollwindow", -pos => [20,20], -size => [$mainwindow->ScaleWidth - 40,$mainwindow->ScaleHeight - 40], -popstyle => WS_CAPTION | WS_SIZEBOX, # Remove caption and sizing handles -pushstyle => WS_CHILD, -hscroll => 1, -noflicker => 1, -onScroll => \&scrolled ); # Our scrollable area inside the window with scrollbars my $scrollarea = new Win32::GUI::Window ( -parent => $scrollwindow, -name => "scrollarea", -pos => [0,0], -noflicker => 1, -size => [400,$scrollwindow->ScaleHeight], -popstyle => WS_CAPTION | WS_SIZEBOX, -pushstyle => WS_CHILD ); # Define some scrolling parameters $scrollwindow->ScrollRange(0,0,$scrollarea->ScaleWidth); $scrollwindow->ScrollPage(0,$scrollwindow->ScaleWidth); # Add some buttons: for(0..4) { $scrollarea->AddButton( -name => "Button".$_, -pos => [$_ * 100,0], -size => [100,$scrollwindow->ScaleHeight], -text => "Button $_", -onClick => sub { print 'click';} ); } $mainwindow->Show(); $scrollwindow->Show(); $scrollarea->Show(); Win32::GUI::Dialog; sub scrolled { # scrolling handler. my($obj, $scrollbar, $operation, $position) = @_; # Move the scrollbar and set the left edge of the scrollarea at the same time: my $realpos = $scrollwindow->Scroll($scrollbar, $operation, $position); # If we're dragging the thumb we want a live update: if($operation == SB_THUMBTRACK) { $realpos = $position }; $scrollarea->Left(0 - $realpos); } sub mainresize { $scrollwindow->Width($mainwindow->ScaleWidth - 40); $scrollwindow->Height($mainwindow->ScaleHeight - 40); $scrollarea->Height($scrollwindow->ScaleHeight); $scrollwindow->ScrollRange(0,0,$scrollarea->ScaleWidth); $scrollwindow->ScrollPage(0,$scrollwindow->ScaleWidth); $scrollarea->Left(0 - $scrollwindow->ScrollPos(0)); for(0..4) { $scrollarea->{"Button$_"}->Height($scrollarea->ScaleHeight); } } _________________________________________________________________ Sign-up for a FREE BT Broadband connection today! http://www.msn.co.uk/specials/btbroadband |
From: Laurent R. <ro...@cl...> - 2004-03-23 21:24:24
|
I have the backgound paint problem only in perl 5.6 with VC. But, work nice in perl5.005 (VC), perl56 (MinGW) and perl 5.8 (VC & MINGW). I don't know what wrong. Laurent. > Today has been one of those days - if it can go wrong, it has! > > Anyway, I've retested - and there is a problem - although I'm having > difficult in getting a small enough example working (I'll try again in the > morning). However, I came across another issue with PPM 671 and 671 built > with ming. The issue is with the -flicker option. > > I'm on XP, with 5.6.1 (I'll do testing on win98 boxes tomorrow). > > The example below (created by Steve a couple of months back) runs fine on > ming 671, but with the PPM version the background of the window isn't > painted, causing a mess in the window. > > Very strange. > > Cheers, > > jez. |
From: Jez W. <je...@je...> - 2004-03-24 12:04:46
|
Ok, below is another example of issues between a Ming built 671 and VC built 671 (via the sourceforge PPM). This one is more worrying since it is effecting NEM/OEM. The Ming built 671 works correctly. The example creates a main window, with a child window contained with in it. The child window has two NEM events, scroll and resize. The main window has code for the OEM event Resize. Under VC: The only event that works is the NEM scroll event in the child window. Under Ming: All events work (the OEM parent window resize, and the child NEM resize and NEM scroll) Both examples were run under perl 5.6. Very strange. jez. =========================== use Win32::GUI; use strict; my $mainwin = new Win32::GUI::Window( -name => 'Main', -text => 'Main', -width => 686, -height => 566, ); my $win = new Win32::GUI::Window ( -parent => $mainwin, -name => "TabWindow", -height => 200, -width => 200, -top => 0, -left => 0, -popstyle => WS_CAPTION | WS_SIZEBOX, -pushstyle => WS_CHILD, -pushexstyle => WS_EX_CLIENTEDGE, -hscroll => 1, -onResize => sub {print "NEM TabWindow resize \n"}, -onScroll => sub {print "NEM TabWindow scroll \n"}, ); $mainwin->Show(); $win->Show(); Win32::GUI::Dialog; sub ::Main_Resize { my ($width, $height) = ($mainwin->GetClientRect)[2..3]; print "main resize \n"; $win->Resize($width,$height); return 1; } ----- Original Message ----- From: "Laurent ROCHER" <ro...@cl...> To: "Jeremy White" <jez...@ho...>; <je...@je...>; <per...@li...> Sent: Tuesday, March 23, 2004 9:23 PM Subject: Re: [perl-win32-gui-hackers] Odd problem with 671 > > I have the backgound paint problem only in perl 5.6 with VC. > But, work nice in perl5.005 (VC), perl56 (MinGW) and perl 5.8 (VC & MINGW). > > I don't know what wrong. > > Laurent. > > > Today has been one of those days - if it can go wrong, it has! > > > > Anyway, I've retested - and there is a problem - although I'm having > > difficult in getting a small enough example working (I'll try again in the > > morning). However, I came across another issue with PPM 671 and 671 built > > with ming. The issue is with the -flicker option. > > > > I'm on XP, with 5.6.1 (I'll do testing on win98 boxes tomorrow). > > > > The example below (created by Steve a couple of months back) runs fine on > > ming 671, but with the PPM version the background of the window isn't > > painted, causing a mess in the window. > > > > Very strange. > > > > Cheers, > > > > jez. > |
From: Laurent R. <ro...@cl...> - 2004-03-24 21:39:18
|
I think i found problem. I solve multiple problem of uninitialised variable. I have commit my change on 655-Fix CVS. - GUI_MessageLoops.cpp : Fix multiple problem with NEM event and painting problem. - GUI.xs : Correct problem with wndprocPreNEM changed two time. - GUI_Options.cpp : Correct uninitialised variable problem. I think it's explain why it's different from compiler and perl version. I use generaly Perl58 and i not use lot of NEM event in my script. So it's explain why it can show this problem before. I have made dev PPM, can you test it with your scipts : http://perso.club-internet.fr/rocherl/Win32-GUI-Dev/index.html The good news it's, i haven't this problem with my new base code ;o) I preparing it for commit in Win32-GUI MAIN branch. Laurent. > Ok, below is another example of issues between a Ming built 671 and VC built > 671 (via the sourceforge PPM). This one is more worrying since it is > effecting NEM/OEM. The Ming built 671 works correctly. > > The example creates a main window, with a child window contained with in it. > The child window has two NEM events, scroll and resize. The main window has > code for the OEM event Resize. > > Under VC: The only event that works is the NEM scroll event in the child > window. > Under Ming: All events work (the OEM parent window resize, and the child NEM > resize and NEM scroll) > > Both examples were run under perl 5.6. > > Very strange. > > jez. |
From: Jez W. <je...@je...> - 2004-03-25 10:03:55
|
Ok, I've tested your changes and it all looks good. I'll continue to use the dev PPM today, just to make sure. Looking forward to the new code line:) Cheers, jez. ----- Original Message ----- From: "Laurent ROCHER" <ro...@cl...> To: "Jez White" <je...@je...> Cc: <per...@li...> Sent: Wednesday, March 24, 2004 9:38 PM Subject: Re: [perl-win32-gui-hackers] Odd problem with 671 > I think i found problem. > > I solve multiple problem of uninitialised variable. > I have commit my change on 655-Fix CVS. > - GUI_MessageLoops.cpp : Fix multiple problem with NEM event and > painting problem. > - GUI.xs : Correct problem with wndprocPreNEM changed two time. > - GUI_Options.cpp : Correct uninitialised variable problem. > > I think it's explain why it's different from compiler and perl version. > > I use generaly Perl58 and i not use lot of NEM event in my script. > So it's explain why it can show this problem before. > I have made dev PPM, can you test it with your scipts : > http://perso.club-internet.fr/rocherl/Win32-GUI-Dev/index.html > > The good news it's, i haven't this problem with my new base code ;o) > I preparing it for commit in Win32-GUI MAIN branch. > > Laurent. > > > > Ok, below is another example of issues between a Ming built 671 and VC > built > > 671 (via the sourceforge PPM). This one is more worrying since it is > > effecting NEM/OEM. The Ming built 671 works correctly. > > > > The example creates a main window, with a child window contained with in > it. > > The child window has two NEM events, scroll and resize. The main window > has > > code for the OEM event Resize. > > > > Under VC: The only event that works is the NEM scroll event in the child > > window. > > Under Ming: All events work (the OEM parent window resize, and the child > NEM > > resize and NEM scroll) > > > > Both examples were run under perl 5.6. > > > > Very strange. > > > > jez. > |