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
Solved

Printing in MFC

Posted on 1998-12-29
1
241 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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 …
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…

828 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