Solved

How do i print ?

Posted on 2000-05-10
1
186 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

760 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

20 Experts available now in Live!

Get 1:1 Help Now