How can i print a bitmap ?
Printable View
How can i print a bitmap ?
Dear Eran,
Printing a bitmap is exactly like displaying one:
You just do a bitblt, etc. to the printer DC, the same as to a display DC.
Be aware, however, that printers don't always support all the raster operation codes you might be using. You should do a GetDeviceCaps to make sure
that your blitting will work on the device
Also, postscript printers will not interpret most raster operation codes correctly in any event; this is frustrating if you have a transparency color in your bitmap.
Yours,
Wes Rogers
I have to disagee with Wes's suggestion. Very few printer drivers support BitBlt, except for monochrome (2-color) bitmaps.
The approach that will work over the widest range of printer drivers is to use StretchDIBits(). But, this will require converting a device dependant bitmap (either a CBitmap or HBITMAP) to a DIB.
Larry Widing /WUGNET
MVP, CSP
Can I get the source code for this????