CRect rect;
viewWnd->GetWindowRect(&rect);
CDC *dc=viewWnd->GetDC();
smart_ptr<BITMAPINFOHEADER> pInf = pBuffer->getBitmapInfoHeader();
SetStretchBltMode(dc->m_hDC , COLORONCOLOR);
int nLines = StretchDIBits(
dc->GetSafeHdc(), // handle to the device context of the window
0,
0,
rect.Width(),
rect.Height(),
0, // x-coordinate of lower-left corner of the source rect
0, // y-coordinate of lower-left corner of the source rect
abs(pInf->biWidth),
abs(pInf->biHeight),
pBuffer->getPtr(), // modified address of array with DIB bits
reinterpret_cast<LPBITMAPINFO>( &*pInf ), // address of structure with bitmap info
DIB_RGB_COLORS, // RGB or palette indices
SRCCOPY
);
ReleaseDC(viewWnd->m_hWnd,dc->GetSafeHdc());
}
现在想用qt根据
pBuffer->getPtr(), // modified address of array with DIB bits
reinterpret_cast<LPBITMAPINFO>( &*pInf ), // address of structure with bitmap info
这两个参数展示图片 有做过的吗