原来显示320*240bmp用的代码。
StretchDIBits(hDC,
0, 0,
giWindowWidth,
giWindowHeight,
0, 0,
320, 240,
DIB_PBITS((PDIB)Images[OffScreen].pDib),
(LPBITMAPINFO)Images[OffScreen].pDib,
DIB_RGB_COLORS,
SRCCOPY );
稍微改了一下source bmp文件的大小的参数。新的是这样,iWindowWidth, giWindowHeight这两个参数是当前的窗口大小。
StretchDIBits(hDC,
0, 0,
giWindowWidth,
giWindowHeight,
0, 0,
640, 480,
DIB_PBITS((PDIB)Images[OffScreen].pDib),
(LPBITMAPINFO)Images[OffScreen].pDib,
DIB_RGB_COLORS,
SRCCOPY );
StretchDIBits(hDC,
0, 0,
giWindowWidth,
giWindowHeight,
0, 0,
320, 240,
DIB_PBITS((PDIB)Images[OffScreen].pDib),
(LPBITMAPINFO)Images[OffScreen].pDib,
DIB_RGB_COLORS,
SRCCOPY );
稍微改了一下source bmp文件的大小的参数。新的是这样,iWindowWidth, giWindowHeight这两个参数是当前的窗口大小。
StretchDIBits(hDC,
0, 0,
giWindowWidth,
giWindowHeight,
0, 0,
640, 480,
DIB_PBITS((PDIB)Images[OffScreen].pDib),
(LPBITMAPINFO)Images[OffScreen].pDib,
DIB_RGB_COLORS,
SRCCOPY );