Gajo Istvan asks:

> So my question is: is there a way to make moving images 
> without all the flickering?

The usual way to solve this problem is to process the WM_ERASEBACKGROUND
message. This is the message that causes the background of a form, or other
control, to be erased before its is repainted, iand is the primary cause of
flickering.

If you are certain that you are going to be repainting the entirely of a
window's surface during your WM_PAINT handling, then you can override the
WM_ERASEBACKGROUND to do no work. This eliminates the erase and repaint
behaviour at the expense of having the image 'dirty' for a slightly longer
period.

If this doen't completely eliminate the flicker dur to having to draw so
many images then you you need top start double buffering your drawing into
an off screen bitmap, and then blitting that onto the screen all in one
action. This will eliminate any relaining flicker caused by multiple drawing
actions.

Cheers, Max.


_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to