- memset( info , 0 , sizeof( BITMAPINFOHEADER ) );
-
- info->bmiHeader.biSize = sizeof( BITMAPINFOHEADER );
- info->bmiHeader.biWidth = width;
- info->bmiHeader.biHeight = height;
- info->bmiHeader.biPlanes = 1;
- info->bmiHeader.biBitCount = 8;
- info->bmiHeader.biCompression = BI_RGB;
-
- ScreenHDC display;
- if ( !::GetDIBits(display, GetHbitmapOf(bmp), 0,
- height, bits, info, DIB_RGB_COLORS) )
- {
- wxLogLastError(wxT("GetDIBits"));
-
- success = FALSE;
- }
-
- if ( success )
- {
- success = ::StretchDIBits(GetHdc(), xdest, ydest,
- width, height,
- xsrc, ysrc,
- width, height,
- bits, info ,
- DIB_RGB_COLORS,
- SRCCOPY) != GDI_ERROR;
- if ( !success )
- {
- wxLogLastError(wxT("StretchDIBits"));
- }
- }
-
- free(bits);
- free(info);
- }
- else // no support for StretchDIBits
- {
- // as we are printing, source colours are screen colours not printer
- // colours and so we need copy the bitmap pixel by pixel.
- HDC dc_src = GetHdcOf(*source);
+ // as we are printing, source colours are screen colours not
+ // printer colours and so we need copy the bitmap pixel by pixel.
+ HDC dcSrc = GetHdcOf(*source);