Solved

How do i print ?

Posted on 2000-05-10
1
203 Views
Last Modified: 2013-11-20
I have  aCFormView with three edit boxes:

IDC_MYEDIT1      with CString m_Myedit1
IDC_MYEDIT2      with CString m_Myedit2
IDC_MYEDIT3      with CString m_Myedit3

these are positioned in various parts of the dialog box.

What I want to do is print what's contained in these boxes to a printer.

I've tried various example's but can't get this to work and was wondering if anyone knew of any code examples ?

Thanks !
0
Comment
Question by:KAbbott
[X]
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
1 Comment
 
LVL 1

Accepted Solution

by:
tvanceplus earned 50 total points
ID: 2797795
This won't have any formatting, but you can customize that to whatever you want. This will print your items on three separate lines at the top left of the page when the user clicks File|Print.


CMyFormView::OnPrint(CDC* pDC,
                 CPrintInfo* pInfo){


int line=pDC->GetTextExtent("||").cy;
int y=0;

pDC->TextOut(0,y,m_myEdit1);
y+=line;
pDC->TextOut(0,y,m_myEdit2);
y+=line;
pDC->TextOut(0,y,m_myEdit3);

}


Good Luck!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 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