把位图显示在中心的方法:
SetStretchBltMode (hdc, COLORONCOLOR) ;
SetMapMode (hdc, MM_ISOTROPIC) ;
SetWindowExtEx (hdc, cxDib, cyDib, NULL) ;
SetViewportExtEx (hdc, cxClient, cyClient/2, NULL) ;
SetWindowOrgEx (hdc, cxDib / 2 , cyDib /2 , NULL) ;
SetViewportOrgEx (hdc, cxClient / 2, cyClient / 2, NULL) ;
StretchDIBits (hdc, 0, 0, cxDib, cyDib,
0, 0, cxDib, cyDib,
pBits, pbmi, DIB_RGB_COLORS, SRCCOPY) ;