I'm developing an MFC Doc/View application to display an image with functions zoom in, zoom out etc. I'm using stretchBlt in CScrollview::OnDraw While zooming out the image, the remaining view area where not repainting not getting cleared, ie part of the image of previous draws remaining as such. While doing minimize & maximize after zoomout, they becoming cleared. Also I tried to paint the view area with its background color using FillSolidRect method, then its working, but problem is it adding an annoying flicker in image display.
I tried Invalidate & UpdateWindow in functions in my Zoomout()method but it is not working.
The actual problem is while I zooming out, the StretchBlt the painting area of StretchBlt getting lesser than previous rectangle and remaining part of the view remaining unchanged.
Have method to refresh & clear the view area were not repainted?