VC6 CEditView and Print Preview Questions - Programmer

This is a discussion on VC6 CEditView and Print Preview Questions - Programmer ; I've got 2 questions that I would greatly appreciate some help on, as it relates to a MDI app that I wrote using VC6. 1. I've got an edit view in the app which displays a report, and I've added ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: VC6 CEditView and Print Preview Questions

  1. VC6 CEditView and Print Preview Questions

    I've got 2 questions that I would greatly appreciate some help on, as it
    relates to a MDI app that I wrote using VC6.

    1. I've got an edit view in the app which displays a report, and I've added
    the option of letting the user select which font to display the report in.
    Unfortunately, the print preview does not reflect any of the font changes,
    not even if I hard code a font change in initially, the font
    remains the same in Print Preview. I'm using SetFont to set the font. I'm
    calling CEditView::OnPrintPreview to generate the print preview. Any ideas
    how to fix this?

    2. I'm trying to add a header and a footer to each page of the report. Is
    there any way to retrieve the information from the edit view in terms of the
    pages, or is there another way to accomplish the headers and footers easily?

    Once again, thanks for any help you can give me.

    Nick



  2. Re: VC6 CEditView and Print Preview Questions

    "Nicholas Sacevich" wrote in message news:<10j7gba7qgdha0@corp.supernews.com>...
    > I've got 2 questions that I would greatly appreciate some help on, as it
    > relates to a MDI app that I wrote using VC6.
    >
    > 1. I've got an edit view in the app which displays a report, and I've added
    > the option of letting the user select which font to display the report in.
    > Unfortunately, the print preview does not reflect any of the font changes,
    > not even if I hard code a font change in initially, the font
    > remains the same in Print Preview. I'm using SetFont to set the font. I'm
    > calling CEditView::OnPrintPreview to generate the print preview. Any ideas
    > how to fix this?


    Does it print OK in the new font? AFAIK, Print Preview uses the same
    printing code (i.e OnDraw() or OnPrint()) as the printing code, so if
    one works...

    >
    > 2. I'm trying to add a header and a footer to each page of the report. Is
    > there any way to retrieve the information from the edit view in terms of the
    > pages, or is there another way to accomplish the headers and footers easily?
    >


    You can keep track of page numbers from OnPrepareDC(). The PrintInfo
    structure has a member called m_nCurPage that's the current page
    number.

    HTH

    Paul.

+ Reply to Thread