You can subscribe to this list here.
2001 |
Jan
(226) |
Feb
(139) |
Mar
(156) |
Apr
(95) |
May
(181) |
Jun
(166) |
Jul
(80) |
Aug
(59) |
Sep
(69) |
Oct
(83) |
Nov
(142) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(91) |
Mar
(76) |
Apr
(113) |
May
(67) |
Jun
(68) |
Jul
(37) |
Aug
(41) |
Sep
(16) |
Oct
(135) |
Nov
(51) |
Dec
(21) |
2003 |
Jan
(37) |
Feb
(36) |
Mar
(37) |
Apr
(103) |
May
(68) |
Jun
(70) |
Jul
(77) |
Aug
(12) |
Sep
(9) |
Oct
(53) |
Nov
(88) |
Dec
(63) |
2004 |
Jan
(263) |
Feb
(106) |
Mar
(36) |
Apr
(21) |
May
(21) |
Jun
(34) |
Jul
(33) |
Aug
(34) |
Sep
(35) |
Oct
(21) |
Nov
(43) |
Dec
(63) |
2005 |
Jan
(28) |
Feb
(42) |
Mar
(29) |
Apr
(14) |
May
(41) |
Jun
(20) |
Jul
(65) |
Aug
(136) |
Sep
(41) |
Oct
(74) |
Nov
(34) |
Dec
(94) |
2006 |
Jan
(85) |
Feb
(94) |
Mar
(68) |
Apr
(103) |
May
(66) |
Jun
(51) |
Jul
(24) |
Aug
(56) |
Sep
(57) |
Oct
(85) |
Nov
(73) |
Dec
(68) |
2007 |
Jan
(59) |
Feb
(32) |
Mar
(13) |
Apr
(32) |
May
(36) |
Jun
(36) |
Jul
(64) |
Aug
(35) |
Sep
(19) |
Oct
(10) |
Nov
(13) |
Dec
(20) |
2008 |
Jan
(26) |
Feb
(41) |
Mar
(19) |
Apr
(24) |
May
(16) |
Jun
(33) |
Jul
(34) |
Aug
(4) |
Sep
(11) |
Oct
|
Nov
(26) |
Dec
(23) |
2009 |
Jan
(5) |
Feb
(2) |
Mar
(21) |
Apr
(16) |
May
(13) |
Jun
(6) |
Jul
(34) |
Aug
(2) |
Sep
(1) |
Oct
(7) |
Nov
(5) |
Dec
(24) |
2010 |
Jan
(3) |
Feb
(5) |
Mar
(6) |
Apr
(6) |
May
(14) |
Jun
(6) |
Jul
(1) |
Aug
(12) |
Sep
(10) |
Oct
(9) |
Nov
|
Dec
(2) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
(30) |
Apr
(1) |
May
(2) |
Jun
(5) |
Jul
(3) |
Aug
(2) |
Sep
(3) |
Oct
|
Nov
(6) |
Dec
|
2012 |
Jan
|
Feb
(10) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(4) |
2013 |
Jan
(5) |
Feb
(3) |
Mar
|
Apr
(3) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(7) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(5) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Robert M. <rob...@us...> - 2007-06-04 20:23:35
|
On 04/06/07, Robert May <rob...@us...> wrote: > I'll follow-up with a second example showing how to create a memory DC > as a backing store that you only need to draw into when things change. #!perl -w use strict; use warnings; use Win32::GUI qw( CW_USEDEFAULT RDW_VALIDATE RDW_NOCHILDREN COLOR_3DFACE ); my $do_drawing = 0; # The size of the memory DC we will create to draw into my ($WIDTH, $HEIGHT) = (200, 200); my $mw = Win32::GUI::Window->new( -title => 'Draw on click example', -left => CW_USEDEFAULT, -size => [ 400, 300 ], -onPaint => \&paint, ); $mw->AddButton( -text => _get_button_text(), -pos => [150,150], -onClick => \&click, ); # Create a memory DC to act as a buffer into which we'll # do our drawing; then in the paint handler we'll just bitblt() # from the memory DC to the screen. my $memDC; my $mem_bitmap; { my $dc = $mw->GetDC(); $memDC = $dc->CreateCompatibleDC(); $mem_bitmap = $dc->CreateCompatibleBitmap($WIDTH, $HEIGHT); } my $memDC_orig_state = $memDC->Save(); $memDC->SelectObject($mem_bitmap); # Draw into the memory DC MyDraw($memDC); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); # Tidy up $memDC->Restore($memDC_orig_state); Win32::GUI::DC::DeleteObject($mem_bitmap); Win32::GUI::DC::DeleteDC($memDC); exit(0); sub paint { my ($self, $dc) = @_; # This Save() and the final Restore() are one way # to ensure the DC is returned to Win32 in the same # state as when we got it. my $saved = $dc->Save(); # Win32::GUI doesnt use BeginPaint()/EndPaint() for the # DC it passes to its Paint handler. Here we approximate # what BeginPaint does: # (1) Calling GetUpdateRect with FLAG=1 causes the background # of the invalidated area t be cleared (WM_ERASEBKGND sent), # and invalid non-client area to be repainted (WM_NCPAINT sent). # (2) Convert the update rect to a region and select it into the # DC - set up the correct clipping area for us (this is not strictly # necessary, but will help reduce re-draw flicker # (3) We validate the DC. We do this using Window->Redraw() rather than # DC->Validate(), as validating the entire DC validates child windows, # stopping them being repainted (unless we give the main window # the WS_CLIPCHILDREN style). { # Erase background, repaint non-client area and get update rect my($l, $t, $r, $b) = $dc->GetUpdateRect(1); # GetUpdateRect can return undef if there is no update region - # generally a Paint event only happens if there is a non-empty # update region, but it can happen if there are 'internal' paint # events being generated. if(defined $l) { my $clip_rgn = Win32::GUI::Region->CreateRectRgn($l, $t, $r, $b); $dc->SelectClipRgn($clip_rgn); } # Validate the whole window $self->Redraw(RDW_VALIDATE | RDW_NOCHILDREN); } # Eventually .... do our drawing $dc->BitBlt(0,0,$WIDTH,$HEIGHT, $memDC, 0,0); # An alternative strategy would be to only BitBlt the # area of the update rect - might reduce flicker, but # difficult to tell with this simple example #$dc->BitBlt($l, $t, $r-$l, $b-$t, $memDC, $l, $t); # Restore the DC to the state it was in before we got it $dc->Restore(); return 1; } sub click { my ($self) = @_; $do_drawing = !$do_drawing; $self->Text(_get_button_text()); MyDraw($memDC); $self->GetParent->InvalidateRect(1); return 1; } sub _get_button_text { return $do_drawing ? 'Hide ...' : 'Draw ...'; } sub MyDraw { my ($dc) = @_; # Erase the background - COLOR_3DFACE is the window # background color $dc->FillRect( 0,0,200,200, Win32::GUI::Brush->new( -system => COLOR_3DFACE ) ); # Do our (complex) drawing if ($do_drawing) { $dc->Rectangle(10,10,100,100); } return; } __END__ |
From: Robert M. <rob...@us...> - 2007-06-04 20:17:34
|
On 30/05/07, George <sir...@ya...> wrote: > thanks for the response, but where should we insert the invalidate > function, > i am lost completely. and many discussions in the forum are complicated and > for experts only, i have tried many variations with no success. the > available examples in the forum are calling a sub paint which includes the > drawing functions inside it ,and it happend the drawing functions are > speedy, but suppose a function are drawing a fractal and this is a time > consuming, then we will see that this approach is unpractical, we just want > to refresh the points of color ,and not to recalculate the code everytime we > move or hide the window. Unfortunately drawing using the Win32 API, and understanding all the gotchas is not trivial. This is not helped by the way that Win32::GUI exposes the 'Paint' event. I've had it on my list of things to investigate further for some time, and you've spurred me into looking at it in a bit more detail. As a result, I'm not sure how to improve things in a backewards-compatible way. While I think about it some more, here's the first of 2 examples. This example takes the traditional approach of doing all the painting in the 'Paint' handler, determining what to draw, and drawing it, each time the handler is called. I'll follow-up with a second example showing how to create a memory DC as a backing store that you only need to draw into when things change. Hope it is useful. Regards, Rob. #!perl -w use strict; use warnings; use Win32::GUI qw( CW_USEDEFAULT RDW_VALIDATE RDW_NOCHILDREN ); my $do_drawing = 0; my $mw = Win32::GUI::Window->new( -title => 'Draw on click example', -left => CW_USEDEFAULT, -size => [ 400, 300 ], -onPaint => \&paint, ); $mw->AddButton( -text => _get_button_text(), -pos => [150,150], -onClick => \&click, ); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); sub paint { my ($self, $dc) = @_; # This Save() and the final Restore() are one way # to ensure the DC is returned to Win32 in the same # state as when we got it. my $saved = $dc->Save(); # Win32::GUI doesnt use BeginPaint()/EndPaint() for the # DC it passes to its Paint handler. Here we approximate # what BeginPaint does: # (1) Calling GetUpdateRect with FLAG=1 causes the background # of the invalidated area t be cleared (WM_ERASEBKGND sent), # and invalid non-client area to be repainted (WM_NCPAINT sent). # (2) Convert the update rect to a region and select it into the # DC - set up the correct clipping area for us (this is not strictly # necessary, but will help reduce re-draw flicker # (3) We validate the DC. We do this using Window->Redraw() rather than # DC->Validate(), as validating the entire DC validates child windows, # stopping them being repainted (unless we give the main window # the WS_CLIPCHILDREN style). { # Erase background, repaint non-client area and get update rect my($l, $t, $r, $b) = $dc->GetUpdateRect(1); # GetUpdateRect can return undef if there is no update region - # generally a Paint event only happens if there is a non-empty # update region, but it can happen if there are 'internal' paint # events being generated. if(defined $l) { my $clip_rgn = Win32::GUI::Region->CreateRectRgn($l, $t, $r, $b); $dc->SelectClipRgn($clip_rgn); } # Validate the whole window $self->Redraw(RDW_VALIDATE | RDW_NOCHILDREN); } # Eventually .... do our drawing if($do_drawing) { $dc->Rectangle(10,10,100,100); } # Restore the DC to the state it was in before we got it $dc->Restore(); return 1; } sub click { my ($self) = @_; $do_drawing = !$do_drawing; $self->Text(_get_button_text()); $self->GetParent->InvalidateRect(1); return 1; } sub _get_button_text { return $do_drawing ? 'Hide ...' : 'Draw ...'; } __END__ |
From: Jason P. <jp...@un...> - 2007-06-04 13:39:28
|
Brian I've got an app with LOTS of tabs and controls. But, per your description, you would not be exactly able to use the cluster management of the Loft. You'll need to show/hide the individual controls based on the tab's switch event. I can't unfortunately spend the time right now to provide this example as I am sitting at my work desk, but if you need it horrendously let me know and I will provide it as soon as I can. Jason _____ From: per...@li... [mailto:per...@li...] On Behalf Of Brian Rowlands (Greymouth High School) Sent: Monday, June 04, 2007 4:41 AM To: per...@li... Subject: [perl-win32-gui-users] Clusters Hi folks I'm absolutely new to The Loft software but I've been playing with the product to design a screen for use in administration on my school network. One issue I have is over clusters and how they appear to work and I'm wondering if anyone can offer some "Pearls of Wisdom" - forgive the pun. Hypothetical Scenario Assume I have three tabs called A, B and C (on a tabstrip). Also, suppose I have 5 controls named 1 - 5. How can I get: A: to show all of the controls B: to show 2 - 4 C: to show 3 - 5 I ask as my impression is from running Test showing of my screen design: i) anything that is never selected appears on all tabs ii) anything selected and linked to a tab via a cluster only appears on the associated tab and never on multiple tabs. I'm sure I've got a mental block and there is a simple solution but all my testing seems to have me going round in circles. Appreciate any help I can get. Thanks Brian Rowlands We must accept finite disappointment, but we must never lose infinite hope. <file:///\\quotes\k\martinlutherking\> Martin Luther King Jr. |
From: Brian R. (G. H. School) <Row...@gr...> - 2007-06-04 08:39:58
|
Hi folks I'm absolutely new to The Loft software but I've been playing with the product to design a screen for use in administration on my school network. One issue I have is over clusters and how they appear to work and I'm wondering if anyone can offer some "Pearls of Wisdom" - forgive the pun. Hypothetical Scenario Assume I have three tabs called A, B and C (on a tabstrip). Also, suppose I have 5 controls named 1 - 5.=20 How can I get: A: to show all of the controls B: to show 2 - 4 C: to show 3 - 5 I ask as my impression is from running Test showing of my screen design: i) anything that is never selected appears on all tabs ii) anything selected and linked to a tab via a cluster only appears on the associated tab and never on multiple tabs. I'm sure I've got a mental block and there is a simple solution but all my testing seems to have me going round in circles. Appreciate any help I can get. Thanks Brian Rowlands We must accept finite disappointment, but we must never lose infinite hope. Martin Luther King Jr. </quotes/k/martinlutherking/> =20 |
From: pcourterelle <pco...@te...> - 2007-06-01 07:02:50
|
----- Original Message ----- From: "Glenn Linderman" <pe...@Ne...> To: "pcourterelle" <pco...@te...> Cc: <per...@li...> Sent: Thursday, May 31, 2007 10:01 PM Subject: Re: [perl-win32-gui-users] PDF thumbnail display > On approximately 5/31/2007 9:30 PM, came the following characters from the > keyboard of pcourterelle: >> Is it possible to display a thumbnail or preview from a PDF using >> Win32:GUI? PDF is not supported by the DIBitmap package so I thought I'd >> ask, see if something was in development or other avenues exist. >> >> Thanks >> >> Phil Courterelle > > Yes, it is possible to do the display using Win32::GUI. But, as you > discovered, not the reading of the PDF file. Consider using Image::Magick > as a general image manipulation tool, convert the image into a local BMP > blob, and then display it using Win32::GUI. That's what I do. > Glen...thanks....I was thinking I would have to convert it to a bmp or jpeg or something before displaying...thanks for the confirmation and the suggestion...most appreciated. Phil |
From: pcourterelle <pco...@te...> - 2007-06-01 04:29:48
|
Is it possible to display a thumbnail or preview from a PDF using Win32:GUI? PDF is not supported by the DIBitmap package so I thought I'd ask, see if something was in development or other avenues exist. Thanks Phil Courterelle |
From: Fleming, J. M <joh...@ed...> - 2007-05-31 14:36:38
|
I thought it might be a win32 problem. I looked through cvs and tried to build 1.06 but I don't have a c compiler and wasn't sure which one I needed to install, but I didn't put too much into this.=20 I'll try adding those to the cli.=20 BTW this is XP sp2. Thanks for the reply!=20 ------------------- John Fleming INFORMATION SECURITY AMERICAS NETWORK SECURITY SERVICES 5400 Legacy Dr. Plano, TX 75024 Phone:+1-972-605-1232) email: joh...@ed... pager: 877-348-9078 pager email: 877...@sk... -----Original Message----- From: ro...@th... [mailto:ro...@th...] On Behalf Of Robert May Sent: Wednesday, May 30, 2007 2:03 PM To: Fleming, John M Cc: per...@li... Subject: Re: [perl-win32-gui-users] tool tips && Win32::GUI::GetOpenFileName On 30/05/07, Fleming, John M <joh...@ed...> wrote: > Does anyone know how to disable tooltips in a GetOpenFileName window? I'm not aware of any way to do this > I have a problem that I think it related to tool tips. You may be right, but it's more likely that we have a problem in Win32::GUI. > Sometimes (can't tell what > the trigger is) when hovering over a file the perl script will just=20 > exit. No core file or complaints. I tried wrapping the whole program=20 > into an eval { } print $@ if $@ but that didn't show anything. Well, I wouldn't expect a core file on windows. perl -W -MCarp=3Dverbose some_script.pl might give you some additional information. In my experience it's very unusual for perl on Win32 to just give up with no warnings/error from either Perl or the OS. > active state 5.8.8, win32gui- 1.05. I'm using xmlbuilder 0.49 to=20 > handle heavy gui lifting. Which Win32 OS? Regards, Rob. |
From: Robert M. <rob...@us...> - 2007-05-30 19:03:32
|
On 30/05/07, Fleming, John M <joh...@ed...> wrote: > Does anyone know how to disable tooltips in a GetOpenFileName window? I'm not aware of any way to do this > I have a problem that I think it related to tool tips. You may be right, but it's more likely that we have a problem in Win32::GUI. > Sometimes (can't tell what > the trigger is) when hovering over a file the perl script will just exit. No > core file or complaints. I tried wrapping the whole program into an eval { } > print $@ if $@ but that didn't show anything. Well, I wouldn't expect a core file on windows. perl -W -MCarp=verbose some_script.pl might give you some additional information. In my experience it's very unusual for perl on Win32 to just give up with no warnings/error from either Perl or the OS. > active state 5.8.8, win32gui- 1.05. I'm using xmlbuilder 0.49 to handle > heavy gui lifting. Which Win32 OS? Regards, Rob. |
From: <jez...@ho...> - 2007-05-30 15:59:23
|
George, Win32-GUI operates in the same way as any other language - its event driven. How does windows know to update a window? In some cases it can work it out - for example when a window is covered by other windows. In other cases, you have to tell windows to update - you do this by invalidating the window (which then fires the paint event). In your case when the user presses a button - its one method call. In cases were performance is an issue you draw to a DC, and then bitblt this to the screen. From memory there is an example of this in the examples that come with later versions of Win32-GUI. Cheers, Jeremy. -----Original Message----- From: "George" <sir...@ya...> To: "jez...@ho..." <jez...@ho...>; "per...@li..." <per...@li...> Sent: 30/05/07 14:37 Subject: Re: [perl-win32-gui-users] Refreshing the Window thanks for the response, but where should we insert the invalidate function, i am lost completely. and many discussions in the forum are complicated and for experts only, i have tried many variations with no success. the available examples in the forum are calling a sub paint which includes the drawing functions inside it ,and it happend the drawing functions are speedy, but suppose a function are drawing a fractal and this is a time consuming, then we will see that this approach is unpractical, we just want to refresh the points of color ,and not to recalculate the code everytime we move or hide the window. i wish that a future version of win32-gui may have something like AutoRedraw property in visual basic 6 which are refreshing the Form . i repost the example who need a cure, the problem is that i want the rectangle to be drawn uppon a click from a button and not within a paint procedure or a Timer. #!perl -w use strict; use warnings; use Win32::GUI qw(); my $mw = Win32::GUI::Window->new( -title => 'Graphic', -size => [ 400, 300 ], #-onPaint => \&paint, ); $mw->AddButton(-name=>"button1",-text=>"RUN ",-left=>0,-top=>0); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); sub button1_Click { my $dc = $mw->GetDC; #my ($self, $dc) = @_; $dc->Validate(); # Draw a rectangle $dc->Rectangle(100,100,200,200); return 0; } regards --------------------------------- Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. |
From: George <sir...@ya...> - 2007-05-30 13:35:22
|
thanks for the response, but where should we insert the invalidate function, i am lost completely. and many discussions in the forum are complicated and for experts only, i have tried many variations with no success. the available examples in the forum are calling a sub paint which includes the drawing functions inside it ,and it happend the drawing functions are speedy, but suppose a function are drawing a fractal and this is a time consuming, then we will see that this approach is unpractical, we just want to refresh the points of color ,and not to recalculate the code everytime we move or hide the window. i wish that a future version of win32-gui may have something like AutoRedraw property in visual basic 6 which are refreshing the Form . i repost the example who need a cure, the problem is that i want the rectangle to be drawn uppon a click from a button and not within a paint procedure or a Timer. #!perl -w use strict; use warnings; use Win32::GUI qw(); my $mw = Win32::GUI::Window->new( -title => 'Graphic', -size => [ 400, 300 ], #-onPaint => \&paint, ); $mw->AddButton(-name=>"button1",-text=>"RUN ",-left=>0,-top=>0); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); sub button1_Click { my $dc = $mw->GetDC; #my ($self, $dc) = @_; $dc->Validate(); # Draw a rectangle $dc->Rectangle(100,100,200,200); return 0; } regards --------------------------------- Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. |
From: <jez...@ho...> - 2007-05-30 08:10:23
|
Hi George, As a quick reply (I don't have perl on this machine) just invalidate the area that needs to be redrawn and windows will then fire the paint event. You always have your drawing in the paint event. Cheers, jez -----Original Message----- From: "George" <sir...@ya...> To: "per...@li..." <per...@li...> Sent: 26/05/07 08:08 Subject: [perl-win32-gui-users] Refreshing the Window thanks Rob very much for the polygon function. i have noticed that the calls to the functions are within the paint sub. but what if i want to display the graphics uppon a click on a button. indeed i have tried using onPaint with no success. here is an example with my failed lines tries are commented #!perl -w use strict; use warnings; use Win32::GUI qw(); my $mw = Win32::GUI::Window->new( -title => 'Graphic', -size => [ 400, 300 ], #-onPaint => \&paint, ); $mw->AddButton(-name=>"button1",-text=>"RUN ",-left=>0,-top=>0); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); sub button1_Click { my $dc = $mw->GetDC; #my ($self, $dc) = @_; $dc->Validate(); # Draw a rectangle $dc->Rectangle(100,100,200,200); return 0; } --------------------------------- Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. |
From: Fleming, J. M <joh...@ed...> - 2007-05-29 23:19:28
|
Does anyone know how to disable tooltips in a GetOpenFileName window? I = have a problem that I think it related to tool tips. Sometimes (can't = tell what the trigger is) when hovering over a file the perl script will = just exit. No core file or complaints. I tried wrapping the whole = program into an eval { } print $@ if $@ but that didn't show anything.=20 =20 Side note... if anyone else knows of a way to trap a win32 error let me = know. :/ =20 thanks! =20 active state 5.8.8, win32gui- 1.05. I'm using xmlbuilder 0.49 to handle = heavy gui lifting. =20 =20 oh btw, are there any beta builds of 1.06 by any chance? |
From: George <sir...@ya...> - 2007-05-26 07:08:25
|
thanks Rob very much for the polygon function. i have noticed that the calls to the functions are within the paint sub. but what if i want to display the graphics uppon a click on a button. indeed i have tried using onPaint with no success. here is an example with my failed lines tries are commented #!perl -w use strict; use warnings; use Win32::GUI qw(); my $mw = Win32::GUI::Window->new( -title => 'Graphic', -size => [ 400, 300 ], #-onPaint => \&paint, ); $mw->AddButton(-name=>"button1",-text=>"RUN ",-left=>0,-top=>0); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); sub button1_Click { my $dc = $mw->GetDC; #my ($self, $dc) = @_; $dc->Validate(); # Draw a rectangle $dc->Rectangle(100,100,200,200); return 0; } --------------------------------- Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. |
From: Glenn M. <Gle...@pg...> - 2007-05-24 19:20:34
|
Rob, I wasn't sure if you were actively maintaining that module or not, but I'm getting "deprecated usage" warnings because of the 'use Win32::GUI;' line. I imagine that will be easy to fix if you're cracking it open to fix the typo. Cheers, Glenn PS Apologies if this doesn't get posted to the list; I work offshore and the Network Nazis block POP3 access, so I can't use my normal email address, and then Sourceforge complains about that... -----Original Message----- From: per...@li... [mailto:per...@li...] On Behalf Of Robert May Sent: 24 May 2007 13:52 To: Geoffrey Spear Cc: Per...@li... Subject: Re: [perl-win32-gui-users] camel On 24/05/07, Geoffrey Spear <geo...@gm...> wrote: > > $path =3D $ENV{PAR_TEMP} . "/inc" if exists $ENV{PAR_TMP}; > > > > I'd be interested to know if it still works :-) > > It does, except you've got a typo in the second "PAR_TEMP" that just > hurt my brain trying to figure out why $path wasn't getting set. It > works fine now that I found that. Thanks! Oops! That's a bug in Win32::GUI::SplashScreen - I'll have to make sure that gets fixed. Thanks, Rob. ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/ |
From: Robert M. <rob...@us...> - 2007-05-24 18:52:12
|
On 24/05/07, Geoffrey Spear <geo...@gm...> wrote: > > $path = $ENV{PAR_TEMP} . "/inc" if exists $ENV{PAR_TMP}; > > > > I'd be interested to know if it still works :-) > > It does, except you've got a typo in the second "PAR_TEMP" that just > hurt my brain trying to figure out why $path wasn't getting set. It > works fine now that I found that. Thanks! Oops! That's a bug in Win32::GUI::SplashScreen - I'll have to make sure that gets fixed. Thanks, Rob. |
From: Robert M. <rob...@us...> - 2007-05-24 18:49:03
|
On 24/05/07, George <sir...@ya...> wrote: > i am trying to draw a polygon , in the code below wich is adapted from the > Draw.pl demo in the win32-Gui package, the program run successfully if we > uncomment the line : > $DC->Rectangle(100, 100, 300, 200); > and comment the line: > $DC->Polygon(10, 10, 10, 200, 200, 200, 10, 10); > but if we uncomment the $DC->Polygon(10, 10, 10, 200, 200, 200, 10, 10); > and comment the $DC->Rectangle(100, 100, 300, 200); > the program will crash. > can someone tell me how to draw the polygon A quick look at the code shows that Polygon(), PolyBezier(), PolyBezierTo(), PolyLine(), and PolyLineTo() all suffer from array indexing problems, which is causing the allocated memory to overrun. I'll fix this in the next release. In the meantime, here one way to write a replacement function to perform (almost) the same functionality as Polygon(). Thanks for the report. Rob. #!perl -w use strict; use warnings; use Win32::GUI qw(); my $mw = Win32::GUI::Window->new( -title => 'Polygon', -size => [ 400, 300 ], -onPaint => \&paint, ); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); sub paint { my ($self, $dc) = @_; # Must always validate the DC during a paint handler $dc->Validate(); # Draw a rectangle $dc->Rectangle(10,10,100,100); # Draw a polygon - Win32::GUI::DC::Polygon is broken in v1.05 # $dc->Polygon( (110, 110), (115, 200), (300, 150), (150, 150), (200, 50), ); _polygon($dc, (110, 110), (115, 200), (300, 150), (150, 150), (200, 50), ); return 0; } # Perl implementation of Win32::GUI::DC::Polygon(), this will be slow # in comparison, but probably not noticable unless you have many # polygons, or a polygon with many points. sub _polygon { my ($dc, @points) = @_; die unless (@points % 2 == 0); # each point is 2 entries in array die unless @points > 2; # must be at least 1 points # TODO record original position, so we can restore # it at the end - Win32::GUI::DC is missing GetCurrentPositionEx() # my ($orig_x, $orig_y) = $dc->GetCurrentPositionEx(); # Using a path gets us the correct line joins, as opposed # to line ends $dc->BeginPath(); my $i = 0; # Move to the starting point $dc->MoveTo(@points[$i++, $i++]); # Draw the path to each vertex while ( $i < @points ) { $dc->LineTo(@points[$i++, $i++]); } # Select the path into the DC $dc->EndPath(); # Stroke and fill the path; closes the figure for us $dc->StrokeAndFillPath(); # TODO restore the current position to where it was originally # $dc->MoveTo($orig_x, $orig_y); return 1; } |
From: Geoffrey S. <geo...@gm...> - 2007-05-24 13:33:52
|
I've always thought that inlining bitmaps was a bit of an ugly solution, but then again I'm primarily a Mac programmer and I'm used to having everything stuck in nice packages for me. I suppose it's nice if you need to distribute .pl files that will be used as executables and you don't want to have to make sure all of the related resource files go along with them, but in my case the end users don't have Perl installed at all so I'm forced to use pp anyway. On 5/24/07, er...@ki... <er...@ki...> wrote: > Quoting Geoffrey Spear <geo...@gm...>: > > >> > The docs at http://cpan.uwinnipeg.ca/htdocs/PAR-Packer/pp.html mention > > the -a option to add files to the package. -i sets the app's icon, > > but I'm trying to add an icon to use within my program (as a > > NotifyIcon). Oddly enough, while the --help option to the version of > > For that we have the http://search.cpan.org/dist/Win32-GUI/BitmapInline.pm > > > pp I've got doesn't mention the -a option either, if I use the Add > > Packages box in tkpp to try to add my icon to the package, it throws a > > warning about -m being deprecated for adding non-module files to > > packages, and tells me to use -a instead. I think it's a case of the > > documentation with the binary not being up to date. > > > I thought *YOU* made the typo :D Sorry for the lack of trust. ;) > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > -- Geoffrey Spear http://www.geoffreyspear.com/ |
From: <er...@ki...> - 2007-05-24 13:13:41
|
Quoting Geoffrey Spear <geo...@gm...>: >> > The docs at http://cpan.uwinnipeg.ca/htdocs/PAR-Packer/pp.html mention > the -a option to add files to the package. -i sets the app's icon, > but I'm trying to add an icon to use within my program (as a > NotifyIcon). Oddly enough, while the --help option to the version of For that we have the http://search.cpan.org/dist/Win32-GUI/BitmapInline.pm > pp I've got doesn't mention the -a option either, if I use the Add > Packages box in tkpp to try to add my icon to the package, it throws a > warning about -m being deprecated for adding non-module files to > packages, and tells me to use -a instead. I think it's a case of the > documentation with the binary not being up to date. I thought *YOU* made the typo :D Sorry for the lack of trust. ;) |
From: Geoffrey S. <geo...@gm...> - 2007-05-24 12:57:52
|
>And then goes on to do something equivalent to: > > my $file = 'icon.ico'; > my $path = '.'; > $path = $ENV{PAR_TEMP} . "/inc" if exists $ENV{PAR_TMP}; > > my $icon = Win32::GUI::Icon->new("$path/$file"); > > > I'd be interested to know if it still works :-) It does, except you've got a typo in the second "PAR_TEMP" that just hurt my brain trying to figure out why $path wasn't getting set. It works fine now that I found that. Thanks! On 5/23/07, Erik Kieffer <er...@ki...> wrote: > > I built one using "pp script.pl -o script.exe -a icon.ico" but the > > -a or -i? According to the docs, there is no -a The docs at http://cpan.uwinnipeg.ca/htdocs/PAR-Packer/pp.html mention the -a option to add files to the package. -i sets the app's icon, but I'm trying to add an icon to use within my program (as a NotifyIcon). Oddly enough, while the --help option to the version of pp I've got doesn't mention the -a option either, if I use the Add Packages box in tkpp to try to add my icon to the package, it throws a warning about -m being deprecated for adding non-module files to packages, and tells me to use -a instead. I think it's a case of the documentation with the binary not being up to date. -- Geoffrey Spear http://www.geoffreyspear.com/ |
From: George <sir...@ya...> - 2007-05-24 10:06:48
|
hi i am trying to draw a polygon , in the code below wich is adapted from the Draw.pl demo in the win32-Gui package, the program run successfully if we uncomment the line : $DC->Rectangle(100, 100, 300, 200); and comment the line: $DC->Polygon(10, 10, 10, 200, 200, 200, 10, 10); but if we uncomment the $DC->Polygon(10, 10, 10, 200, 200, 200, 10, 10); and comment the $DC->Rectangle(100, 100, 300, 200); the program will crash. can someone tell me how to draw the polygon # perl -w use strict; use warnings; use Win32::GUI(); my $left; my $top; my $right; my $bottom; my $P; my $oldP; my $B; my $oldB; my $Win = new Win32::GUI::Window( -left => 0, -top => 0, -width => 500, -height => 400, -name => "Window", -text => "Win32::GUI drawing demo", ); $Win->AddButton( -name => "Button1", -text => "RUN ", -pos => [ 0, 0 ], ); srand(); $Win->Show(); Win32::GUI::Dialog(); sub Window_Terminate { return -1; } sub Button1_Click { my $DC = $Win->GetDC; my $x = 0; my $y = 0; $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 ] ); $oldP = $DC->SelectObject($P); $oldB = $DC->SelectObject($B); # $DC->Rectangle(100, 100, 300, 200); $DC->Polygon(10, 10, 10, 200, 200, 200, 10, 10); $DC->SelectObject($oldP) if defined $oldP; $DC->SelectObject($oldB) if defined $oldB; } Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.http://us.rd.yahoo.com/evt=48518/*http://autos.yahoo.com/carfinder/;_ylc=X3oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg-- hot CTA = Yahoo! Autos new Car Finder tool |
From: Erik K. <er...@ki...> - 2007-05-23 20:14:07
|
----- Original Message ----- From: "Geoffrey Spear" <geo...@gm...> To: <Per...@li...> Sent: Wednesday, May 23, 2007 9:29 PM Subject: Re: [perl-win32-gui-users] camel > I hate to bring back a nearly 6 month old thread, but is there some > sort of trick to getting Win32::GUI to find icons bundled with a > pp-built .exe? > > I built one using "pp script.pl -o script.exe -a icon.ico" but the -a or -i? According to the docs, there is no -a > icon only displays properly if there's a copy of it in the same > directory as the executable; if the .exe file is moved to another > directory it can't find the icon which should be bundled. Sounds logical. I assume (don't know though) that you could also put the directory of the icon in PATH or name the exact path while packing. That's typical for Windows. Same goes for running the package. When the directory of the package isn't current directory the package will only run when it is in the path. |
From: Robert M. <rob...@us...> - 2007-05-23 20:10:32
|
Geoffrey Spear wrote: > I hate to bring back a nearly 6 month old thread, but is there some > sort of trick to getting Win32::GUI to find icons bundled with a > pp-built .exe? > > I built one using "pp script.pl -o script.exe -a icon.ico" but the > icon only displays properly if there's a copy of it in the same > directory as the executable; if the .exe file is moved to another > directory it can't find the icon which should be bundled. > > Geoffrey I've got some code in Win32::GUI::SplashScreen that attempts to work with PAR packed icon/bitmap files. I think it used to work, but it's pretty old. There's a comment that says: # try to load the splash image from the PAR_TEMP directory # this is for exes built with PAR's pp -a xxxxx.bmp ... And then goes on to do something equivalent to: my $file = 'icon.ico'; my $path = '.'; $path = $ENV{PAR_TEMP} . "/inc" if exists $ENV{PAR_TMP}; my $icon = Win32::GUI::Icon->new("$path/$file"); I'd be interested to know if it still works :-) Rob. > > On 11/29/06, Glenn Linderman <pe...@ne...> wrote: >> On approximately 11/29/2006 1:41 AM, came the following characters from >> the keyboard of Steve Loughran: >>> yes, aparantly you can :) >>> >>> http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi?doc=bitmapinline >>> >> Aparantly :) Or Apparently :) >> >> But in a PAR context, there is little incentive to do that, vs. bundling >> the file into the pp-built .exe >> >> OK, I admit to bringing up the PAR context, but if you are looking to >> bundle everything into a single file for easier distribution, PAR goes a >> lot further toward that goal than BitmapInline :) >>> Steve Loughran wrote: >>> >>>> This was on my "to-find-out" list :) Can you use DIBitmap for inline icons? >>>> >>>> Steve >>>> >>>> Glenn Linderman wrote: >>>> >>>>> On approximately 11/28/2006 9:08 PM, came the following characters from >>>>> the keyboard of Apu islam: >>>>> >>>>>> anyone knows how I can replace the camel logo on the >>>>>> Main window with my smily face ? >>>>>> >>>>>> >>>>>> -Apu >>>>>> >>>>>> >>>>> Assuming $mw points to the main window, use >>>>> >>>>> $my_smily_face_icon = new Win32::GUI::Icon( $iconfile ); >>>>> $mw->SetIcon ( $my_smily_face_icon ); >>>>> >> -- >> Glenn -- http://nevcal.com/ >> =========================== >> A protocol is complete when there is nothing left to remove. >> -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share your >> opinions on IT & business topics through brief surveys - and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Perl-Win32-GUI-Users mailing list >> Per...@li... >> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >> http://perl-win32-gui.sourceforge.net/ >> > > |
From: Geoffrey S. <geo...@gm...> - 2007-05-23 19:29:19
|
I hate to bring back a nearly 6 month old thread, but is there some sort of trick to getting Win32::GUI to find icons bundled with a pp-built .exe? I built one using "pp script.pl -o script.exe -a icon.ico" but the icon only displays properly if there's a copy of it in the same directory as the executable; if the .exe file is moved to another directory it can't find the icon which should be bundled. Geoffrey On 11/29/06, Glenn Linderman <pe...@ne...> wrote: > On approximately 11/29/2006 1:41 AM, came the following characters from > the keyboard of Steve Loughran: > > yes, aparantly you can :) > > > > http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi?doc=bitmapinline > > > > Aparantly :) Or Apparently :) > > But in a PAR context, there is little incentive to do that, vs. bundling > the file into the pp-built .exe > > OK, I admit to bringing up the PAR context, but if you are looking to > bundle everything into a single file for easier distribution, PAR goes a > lot further toward that goal than BitmapInline :) > > Steve Loughran wrote: > > > >> This was on my "to-find-out" list :) Can you use DIBitmap for inline icons? > >> > >> Steve > >> > >> Glenn Linderman wrote: > >> > >>> On approximately 11/28/2006 9:08 PM, came the following characters from > >>> the keyboard of Apu islam: > >>> > >>>> anyone knows how I can replace the camel logo on the > >>>> Main window with my smily face ? > >>>> > >>>> > >>>> -Apu > >>>> > >>>> > >>> Assuming $mw points to the main window, use > >>> > >>> $my_smily_face_icon = new Win32::GUI::Icon( $iconfile ); > >>> $mw->SetIcon ( $my_smily_face_icon ); > >>> > > -- > Glenn -- http://nevcal.com/ > =========================== > A protocol is complete when there is nothing left to remove. > -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > -- Geoffrey Spear http://www.geoffreyspear.com/ |
From: Robert M. <rob...@us...> - 2007-05-16 22:34:53
|
Roode, Eric wrote: > Okay, I've done pretty much what you said: > > I've loaded the DLL (successfully). > I've created a class to represent my control. > In that class's new() function, I invoke Win32::GUI->_new. > In my main program, I position the control as usual. > > The control is not rendered properly. Its "text" attribute is > displayed on the main window, just as a Label would appear. > I get no errors, but no features either. > > Question: What is the "type" parameter to _new? All the controls > in Win32::GUI.pm load constants from deep in the bowels of XS. > What should it be for my custom control? > > For my test control, I used the RoundButton control at > http://www.ondotnet.com/pub/a/dotnet/2002/03/18/customcontrols.html?page=2 OK, so I think we've had a disconnect on our definition of a 'control library'. That is not a 'standard' win32 control library (at least by my terminology) - it's not a window, with a window class that can be created using CreateWindow() and controlled using SendMessage(). It's some .NET dll. I'm way out of my depth when it comes to using anything above the Win32 API, but from a quick web search, and assuming that your building RoundButton.dll yourself (I couldn't see a download link) - then there may be a way to do it. Sadly I cna't find the particular article I was reading, but the steps appear to go something like this: (1) Create the DLL (you've already done this) (2) Register the DLL as callable via the .NET COM interop layer (there's a tool REGASM to do this, or, I beleive, a tickbox on one of the Visual Studio dialogs that would have the same effect) (3) You might now be able to use the library, using Win32::GUI::AxWindow to host the control. Afraid I can't offer more than that, as I say I'm out of my depth here. Rob. |
From: Devon M. <dev...@gm...> - 2007-05-10 15:31:52
|
Mike's question from 2007-05-01 10:39 >As standard I seem to output a file which when i read back in i see what appears to be double line spacing. If i open the file in vi i see ^M chars at the end of each line. >How do i get rid of this to give me a regular file? For an explanation and a solution see: http://perldoc.perl.org/functions/binmode.html |