Solved

Printing in MFC

Posted on 1998-12-29
1
242 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
ID: 1326955
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…

685 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