I am having trouble printing a bitmap. The code below works
with my Epson 1500 Laser, gives a black & white copy of the
(color) bitmap on a color postscript printer and garbage on
an HP 712C. Can anybody help?
In the code, all variables a long
pdc = printer device context (no error getting this)
hbm = handle of bitmap
GetObject hbm, SIZEOF(bm), bm
bmx = bm.bmWidth
bmy = bm.bmHeight
hdc = GetDC(Hwnd)
mdc = CreateCompatibleDC(hdc)
SelectObject mdc, hbm
pdcmem = CreateCompatibleDC(pdc)
pbm = CreateCompatibleBitmap(pdc, bmx, bmy)
SelectObject pdcmem, pbm
BitBlt pdcmem, 0, 0, bmx, bmy, mdc, 0, 0, %SRCCOPY
BitBlt pdc, 0, 0, bmx, bmy, pdcmem, 0, 0, bmx, bmy, %SRCCOPY
Now delete objects etc ...
with my Epson 1500 Laser, gives a black & white copy of the
(color) bitmap on a color postscript printer and garbage on
an HP 712C. Can anybody help?
In the code, all variables a long
pdc = printer device context (no error getting this)
hbm = handle of bitmap
GetObject hbm, SIZEOF(bm), bm
bmx = bm.bmWidth
bmy = bm.bmHeight
hdc = GetDC(Hwnd)
mdc = CreateCompatibleDC(hdc)
SelectObject mdc, hbm
pdcmem = CreateCompatibleDC(pdc)
pbm = CreateCompatibleBitmap(pdc, bmx, bmy)
SelectObject pdcmem, pbm
BitBlt pdcmem, 0, 0, bmx, bmy, mdc, 0, 0, %SRCCOPY
BitBlt pdc, 0, 0, bmx, bmy, pdcmem, 0, 0, bmx, bmy, %SRCCOPY
Now delete objects etc ...
Comment