invalidate ??

  • Thread starter Thread starter Marge Inoferror
  • Start date Start date
M

Marge Inoferror

I am trying to display a number of images and have them scale when the
window is resized.

I have all the code to draw the window in an OnPaint() override.

However, it only draws correctly the first time it is displayed. When I
resize the window, it keeps the remnants of the first window and redraws
only in "new" areas of the window.

Is there a way to invalidate the entire window when OnPaint is invoked? I
thought I would get that automatically and that I would have to code smaller
invalidated rectangles if that's what I needed...

Thanks,
Marge
 
Daniel,

Thank you very much.

Is there another event to override for when the window gets covered by
another window (and then uncovered)?

Marge
 
This will refresh automatically when there is some idle time ...

If you're talking about when this form acts as a parent to another form, and
then you move that form around, then call Refresh() in the move event of the
child. If this is a form that is being "Show'n" as a progress dialog for
example, ( I.E. no "ShowDialog()" call is made), then call the refresh in
the parent form each time an event occurs.

If you give more details on your details I'll see what more I could suggest.

Thanks.
Dan.
 
Back
Top