kmenzel
asked on
How to print contents of a CListCtrl
I have been able to get the contents of a CListCtrl to print to the printer and to the preview screen, but the font that it is using is so small, it is unreadable. I tried setting the font for the CListCtrl before printing ( in the onprint meathod). I does make the text larger, but then the area where the text prints is clipped. It seems I can only print to the top one fifth of the page if the application is at maximized before printing. If I shrink the size of the app before printing, the size of the print area also shrinks. Seems like I need to somehow tell the CListCtrl to use the whole print page. How do I do that? Not sure what all I need to set up before I print. Do you have any examples of printing a CListCtrl from a SDI application? Thanks
ASKER
I used the code from codeguru.com. It prints the CListCtrl ok, but when I look at the print preview, all I see is really tiny text (not readable) that takes up just the top 1/8 th of the screen.
I figured out that if I change the DPI from 300 to 75, the text becomes readable and covers the page in the print preview window. Changing the DPI seems to have no effect on the actual printout though.
How do I make the print preview window look like what will actually be printed? If nothing else, I would just like to have the text visiable and cover the entire print preview window.
I figured out that if I change the DPI from 300 to 75, the text becomes readable and covers the page in the print preview window. Changing the DPI seems to have no effect on the actual printout though.
How do I make the print preview window look like what will actually be printed? If nothing else, I would just like to have the text visiable and cover the entire print preview window.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hey . I told you where to get all that printing code and I didn't get any points. Then you ask another question (about the font) and someone else gets them.
Could you please put up a question so that I can get the points for directing you to the code that solved 90% of your problem?
Could you please put up a question so that I can get the points for directing you to the code that solved 90% of your problem?
ASKER
Sure. I do appreciate you directing me to the codeguru site. It helped. My biggest problem was in the fonts. I actually had something working, just unreadable fonts in the preview.
Thanks again.
Thanks again.
They have a list control code section.
That has (I believe) articlts and code on how to print a list control