CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    2

    Print, Print Preview

    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

  2. #2
    Join Date
    May 1999
    Posts
    36

    Re: Print, Print Preview

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured