Solved

Printing in a CListView based app?

Posted on 1997-05-19
2
224 Views
Last Modified: 2013-11-19
Hello,

I wrote an application in MFC VC++ 4.0.  The view is CListView based.  How am I to print it?

I do have the following code, generated by the AppWizard --
      void CPrnttstView::OnDraw(CDC* pDC) {
              CPrnttstDoc* pDoc = GetDocument();
                    ASSERT_VALID(pDoc);
            // TODO: add draw code for native data here
      }
as well as the OnPreparePrinting.... OnBeginPrinting.... OnEndPrinting.... empty functions.  

How do I continue?  Can anyone give me a lead to some example of printing a CListView based application?

Any help is most cordially welcomed.
Moshe.
0
Comment
Question by:stolar
2 Comments
 
LVL 4

Accepted Solution

by:
mbhakta earned 50 total points
ID: 1301645
You have to iterate through each item and print it seperately. Alternately , try using Crystal Report to pass the list control items to it. Another way to approach this problem is to create multiple views in a SDI (search for 'Switch' near 'views' in MSDN for an example. Transfer the contents of the listview to the other view before printing and print from that view.
0
 

Author Comment

by:stolar
ID: 1301646
What is Crystal Report?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

895 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

15 Experts available now in Live!

Get 1:1 Help Now