• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

Printing in a CListView based app?

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
stolar
Asked:
stolar
1 Solution
 
mbhaktaCommented:
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
 
stolarAuthor Commented:
What is Crystal Report?
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now