Re: Repaint

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

Renzo Beggia wrote:

> The problem is : after resizing, minimize or
> maximize or even when another program overlapped
> the window, I always have to redraw the Transblitted
> BMP's myself.

There are two seperate events that probably interest you.

[onPaint]

This is called every time a window needs to be redrawn, either because some
hidden portion of the window was either made visible (by maximizing or
resizing), or some part of the window was 'damaged' (typically by an
overlapping window).

[onResize]

This is called when a window changes size - minimize, maximize, user
resizes. After triggering onResize, Win32Lib will automatically call
onPaint, if some portion of the window needs to be redrawn.

[Conclusion]

If you are drawing to a 'canvas' (bitmap the size of the window), you
typically want to trap the onResize event so that you can adjust size of the
canvas to the new window size.

Otherwise, simply trapping the onPaint event should take care of your
problem.

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu