From: Jonathan S. <jso...@al...> - 2002-11-13 16:45:43
|
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 |
From: Johan L. <jo...@ba...> - 2002-11-13 21:05:59
|
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 window is activated. sub yourWindowName_Activate { refreshMyStuff(); return(1); } But if you drag another window over your DC, it won't be repainted like this (the event will never trigger). For that you need to paint on a Graphics control and use the Paint event to trigger the refresh. /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "Perfect Productivity - Tony Bowden Understandin..." http://www.tmtm.com/insanity/2002/11/12.html dmoz (1 of 22): /Society/Activism/Media/Radio/ 63 |
From: Jonathan S. <jso...@al...> - 2002-11-13 21:32:18
|
Thanks. That worked. I just wish the stuff would stay on the graphic=20 window as I drag other windows away from the face of it. But this works as= =20 a work-around. How difficult is it to paint on a Graphics control? The graphics stuff is= =20 new to me. Thanks again. Jonathan At 11/13/2002 10:04 PM, you wrote: >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= =20 >>top or receives focus? That seems to be the only way I can get a DC=20 >>object to refresh after it is covered by another window. > >The event Activate is triggered when the window is activated. > >sub yourWindowName_Activate { > refreshMyStuff(); > return(1); >} > >But if you drag another window over your DC, it won't be repainted like=20 >this (the event will never trigger). For that you need to paint on a=20 >Graphics control and use the Paint event to trigger the refresh. > > >/J > >-------- ------ ---- --- -- -- -- - - - - - >Johan Lindstr=F6m Sourcerer @ Boss Casinos jo...@ba... > >Latest bookmark: "Perfect Productivity - Tony Bowden Understandin..." >http://www.tmtm.com/insanity/2002/11/12.html >dmoz (1 of 22): /Society/Activism/Media/Radio/ 63 > > > > >------------------------------------------------------- >This sf.net email is sponsored by: Are you worried about your web server=20 >security? Click here for a FREE Thawte Apache SSL Guide and answer your=20 >Apache SSL security needs: http://www.gothawte.com/rd523.html >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Johan L. <jo...@ba...> - 2002-11-13 21:51:20
|
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 the exact syntax), but this is the Design window in The GUI Loft (slightly edited): sub ::grCanvas_Paint { my($dcDev) = @_; #Now you paint on the $dcDev which is a DC object. Look at the documentation for the DC control, and at the Win32::GUI::AdHoc module for additional ways to paint stuff on a DC. The Win32 SDK documentation is also useful to read. /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "Perfect Productivity - Tony Bowden Understandin..." http://www.tmtm.com/insanity/2002/11/12.html dmoz (1 of 22): /Society/Activism/Media/Radio/ 63 |