Solved

Printing in MFC

Posted on 1998-12-29
1
232 Views
Last Modified: 2013-11-25
How to print a text file in MFC?
0
Comment
Question by:dmittar
1 Comment
 
LVL 1

Accepted Solution

by:
perrizo earned 100 total points
Comment Utility
In your view class overload the function

OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)

you can do this in class wizard.  The pDC variable is you printer device context.  If its just simple text you can use the function

pDC->TextOut(0, 100, _T("some text"));

the first two parameters are the x and y coordinates and then the text you want to print.  The real job of printing, which is different for everyone is getting the text to come out looking like you want.  Good luck
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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 is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now