CPrtPreviewModel Class

class CPrtPreviewModel

This class implements the print preview model. It derives from IPrintJobImpl and contains a pointer to the IPrintable interface of the object that is being printed.

Defined in: PrintPreviewModel.h

Class Members

CPrintDoc* GetPrintDoc()

Get a pointer to the print document object.

virtual IPrintable* GetPrintable()

Get a pointer to the object being printed.

int GetNumVisiblePages() const

Return the number of pages currently visible.

void SetNumVisiblePages(const int nNumVisiblePages)

Set the number of pages currently visible.

int GetFirstVisiblePage() const

Return the page number of the first page currently visible.

void SetFirstVisiblePage(const int nFirstVisiblePage)

Set the page number of the first page currently visible.

virtual void GotoNextPage()

Preview the next page.

virtual void GotoPrevPage()

Preview the next page.

virtual COLORREF GetBackgroundColor()

Return the print preview background color.

virtual COLORREF GetPageColor()

Return the print preview page color.

virtual bool Start(IPrintable* pIPrintable, CPrintDoc* pPrintDoc)

Start the print job.