Print grafics/pictures/logos RRS feed

  • Question

  • My program print a report. It uses CDC to set up printer, set font, set colour, set mapping mode and so on. So far the report only include plain text and boxes. Which I manages with CDC->MoveTo, CDC->LineTo and CDC->ExtTextOut. Now I want the report to include logos which comes from e.g a *.jpb or *.tif file. I have tried with the functions LoadIcon and       CDC->DrawIcon but the logo/picture do not get printed on the report.

    The program is a VS 2008 MFC project.

    I would be grateful if someone have a solution to this. Thanks in advance.

    Tuesday, March 30, 2010 7:28 AM


  • I make a reply to myself incase someone else have the same problem.

    To print a bitmap in my report I used the following code.


    CDC dcMemory;

    CBitmap MyBitMap ;

    HBITMAP hbm = (HBITMAP)LoadImage(NULL,









    • Marked as answer by SivKM Wednesday, April 7, 2010 6:56 AM
    Wednesday, April 7, 2010 6:56 AM