Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to print a CBitmap with print and print preview?

Posted on 1998-07-29
3
Medium Priority
?
409 Views
Last Modified: 2013-11-20
I have a CBitmap in a CView. When I try to print it, I only have a small black rectangle. When I used print preview it's ok but my CBitmap is too small. I know that I must convert it to a DIB but how can I transfert a CBitmap to a DIB and how can I make my DIB use the entire page?

Thanks
0
Comment
Question by:AlainRoyer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
trestan earned 200 total points
ID: 1319905
Pls see the following instructions for convert BMP to DIB:
http://www.codeguru.com/bitmap/ddb_to_dib.shtml
http://www.codeguru.com/bitmap/dibsection_from_bmp.shtml
Good luck.
0
 
LVL 8

Expert Comment

by:trestan
ID: 1319906
Also pls refer to the online help at:
Platform SDK -> Graphics and Multimedia Services -> 2-D Graphics -> Printing and Print Spooler -> Printing a Document
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1319907
Also extremely useful is StretchDIBits.  Once you have a DIB, stretch the bitmap to the page to get the printed size you want.

Phillip
 
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question