Re: repainting all windows in rectangle

new topic     » goto parent     » topic index » view thread      » older message » newer message

>From: Brian Broker <bkb at CNW.COM>

> On Sun, 5 Nov 2000 13:21:12 +0100, <tone.skoda at SIOL.NET> wrote:
>
> >Can anybody write a procedure which will repaint all windows which lie
> >under/in given rectangle?
> >Like when you minimize a window and all windows under it are repainted.
> >
> >
> >--arg. rect has screen coordinates {left, top, right, bottom}
> >procedure RepaintWindowsInRect(sequence rect)
> >
> >-- ... here's job for you
> >
> >end procedure
>
> If you are using Win32Lib, why not just create a Pixmap buffer for your
> windows?  Then you just do something like this for each window:
>
> constant
>   SomeWin = create( Window, ... )
>   Buffer  = create( Pixmap, ... )
>
> -- when you want to update your window, you make corresponding changes to
> --   your Pixmap 'Buffer'
>
> ---------------------------------------------
> -- then you can repaint your window by copying Buffer to Window
> procedure onPaint_SomeWin( integer x1, integer y1, integer x2, integer
y2 )
>   copyBlt( SomeWin, 0, 0, Buffer )
> end procedure
> onPaint[SomeWin] = routine_id( "onPaint_SomeWin" )


Window doesn't neccessarey need to be child of my progam, it can be any
window in the system. So i don't know how can i get onPaint for a window
from another program.


>
> -- I hope this helps (and I hope I didn't miss your point)
> -- See my RGBview demo in Wolf's tutorial for a simple example
> -- Brian


I was thinking of doing it like this:
In loop I would get handle of every Window that is in rectangle, with some
WindowFromPoint() function, if it exists. Then i would send WM_PAINT message
to this window.
The problem is that i can't get those windows, it's complicated. I could get
window for every point in rectangle, that would work, but it would be very
slow.

The function GetWindowHandlesInRect(sequence rect) would be equaly good, and
it's equaly difficult to write.

This would also work: When i want to repint windows in rect, I would show
and hide a  temporary popup window, but it wouldn't look too good.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu