Solved

Printing in a CListView based app?

Posted on 1997-05-19
2
220 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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 …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 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

12 Experts available now in Live!

Get 1:1 Help Now