CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Print a bitmap

  1. #1
    Join Date
    Jun 1998
    Posts
    8

    Print a bitmap



    How can i print a bitmap ?

  2. #2
    Join Date
    Apr 1999
    Posts
    53

    Re: 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




  3. #3
    Join Date
    Apr 1999
    Posts
    2

    Re: Print a bitmap



    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

  4. #4
    Join Date
    May 1999
    Posts
    1

    Re: Print a bitmap

    Can I get the source code for this????


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured