Click to See Complete Forum and Search --> : Print, Print Preview


Robert McLean
May 8th, 1999, 03:59 PM
I am using Visual C++ 4. I have created an MFC EXE application using the Appwizard. When I created it I deselected the print and print preview options, so skeleton code for those functions was not generated. After producing much of the application I have changed my mind and now want to be able to print. How do I get the skeleton code for the print functions ? Do I have to start over completely ? If so how do I keep all my dialogs and menus etc ?


Robert McLean

Harvey Hawes
May 8th, 1999, 04:59 PM
Hi,

All is not lost. Read the doc "Multipage printing" (I think its in Vc++4, maybe only in 5). All you have to do is override the functions it lists. Off the top of my head, look up:

OnBeginPrinting
OnPrint
OnPrepareDC
OnEndPrinting
OnPreparePrinting

These functions are all from CView, so see the docs.

HTH,

Harvey Hawes

Software Engineer
BioScience Analysis Software Ltd.

Masters Candidate
Cardiovascular/Respiratory Sciences
Faculty of Medicine
University of Calgary
Calgary, Alberta, Canada