[perl-win32-gui-users] Perl-Win32-GUI-Users digest, Vol 1 #511 - Jonathan Southwick - refreshing DC

2002-11-13 Thread Alan Lindsey
I think you may be looking in the wrong direction! The key to updating is in handling the Paint event triggered whenever Windows thinks a window (or part thereof) should be repainted. This covers the situations you describe. Win32::GUI uses an approach that means you must redraw *everything* that i

Re: [perl-win32-gui-users] need subroutine to run when Window gets focus

2002-11-13 Thread Johan Lindstrom
At 16:31 2002-11-13 -0500, Jonathan Southwick wrote: How difficult is it to paint on a Graphics control? The graphics stuff is new to me. It's the same thing as paiting on a DC (because that's what you actually do :). The Graphics control doesn't seem too well documented (and I have forgot

Re: [perl-win32-gui-users] need subroutine to run when Window gets focus

2002-11-13 Thread Jonathan Southwick
Thanks. That worked. I just wish the stuff would stay on the graphic window as I drag other windows away from the face of it. But this works as a work-around. How difficult is it to paint on a Graphics control? The graphics stuff is new to me. Thanks again. Jonathan At 11/13/2002 10:04

RE: [perl-win32-gui-users] need subroutine to run when Window get s focus

2002-11-13 Thread Jonathan Southwick
Isn't there a method that I can use? I tried: sub MainWindow_GetFoucus { ## code here } but that did not work. I need to have the routine to run as soon as the window gets focus or is brought to the front of other windows. Jonathan At 11/13/2002 03:05 PM, you wrote: Not sure of the

Re: [perl-win32-gui-users] need subroutine to run when Window gets focus

2002-11-13 Thread Johan Lindstrom
At 11:45 2002-11-13 -0500, Jonathan Southwick wrote: Is there any way to get a routine to run when a window is brought to the top or receives focus? That seems to be the only way I can get a DC object to refresh after it is covered by another window. The event Activate is triggered when the w

RE: [perl-win32-gui-users] need subroutine to run when Window get s focus

2002-11-13 Thread Peter Eisengrein
Not sure of the exact syntax but it would be something like: if ($Window->GetFocus()) { &do_something; } > -Original Message- > From: Jonathan Southwick [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 13, 2002 11:45 > To: perl-win32-gui-users@lists.sourceforge.net > Subjec

[perl-win32-gui-users] need subroutine to run when Window gets focus

2002-11-13 Thread Jonathan Southwick
Is there any way to get a routine to run when a window is brought to the top or receives focus? That seems to be the only way I can get a DC object to refresh after it is covered by another window. Jonathan