We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

How to print a CBitmap with print and print preview?

AlainRoyer
AlainRoyer asked
on
Medium Priority
425 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
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
Also pls refer to the online help at:
Platform SDK -> Graphics and Multimedia Services -> 2-D Graphics -> Printing and Print Spooler -> Printing a Document

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

Phillip
 
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.