Please use StretchBlt function to create zoomed effect.
BOOL StretchBlt(
HDC hdcDest,
int nXOriginDest,
int nYOriginDest,
int nWidthDest,
int nHeightDest,
HDC hdcSrc,
int nXOriginSrc,
int nYOriginSrc,
int nWidthSrc,
int nHeightSrc,
DWORD dwRop
);
Change nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc to according to zoom and Pan.
Changing nXOriginSrc, nYOriginSrc will provide pan effect. Changing nWidthSrc, nHeightSrc will provide Zoom/Unzoom effect.
The following article might help you to create a zoom/pan effect of your bitmap.
CZoomCtrl: A Picture Control with Zooming and Scrolling[
^]