StretchBlt with GetClientRect.
Posted on 2004-04-13
I have an image viewer that does zooming and scroll. this image viewer is built with the document view architecture.
Currently, my program does this,
pDC->StretchBlt(0, 0, srcX * zoomfactor, srcY * zoomfactor, &bmDC, 0, 0, srcX, srcY, SRCCOPY);
This is very inefficient when the zoomfactor is very huge, say 10. I tried to use GetClientRect to restrict the destination DC's area when doing StretchBlt but it does not scroll properly after that.
Anybody knows what is the problem? Or can show me the proper way to do this?