Click here to Skip to main content
15,881,173 members
Articles / Desktop Programming / MFC

MFC Print preview extension DLL for dialogs

Rate me:
Please Sign up or sign in to vote.
4.74/5 (29 votes)
26 Dec 2002CPOL2 min read 276.2K   9.6K   53  
An MFC extension library, so your dialogs can have easy print/print preview support.
// MyPreviewView.h : header file
//

#include "afxpriv.h"

/////////////////////////////////////////////////////////////////////////////
// CMyPreviewView view
#define MAX_DLLS			50

class CPrintPreviewDialog;

class CMyPreviewView : public CPreviewView
{
protected:
	CMyPreviewView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CMyPreviewView)

// Attributes
public:

protected:
// Operations
	CPrintPreviewDialog*	m_pDialog;
public:
// Overrides
	void	SetDialogPointer(CPrintPreviewDialog* pDialog);
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyPreviewView)
protected:
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CMyPreviewView();
#ifdef _DEBUG
	virtual void	AssertValid() const;
	virtual void	Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	//{{AFX_MSG(CMyPreviewView)
	//}}AFX_MSG
	afx_msg void	OnPreviewPrint();
protected:
	DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Sirius Analytical Instruments
United Kingdom United Kingdom
A research and development programmer working for a pharmaceutical instrument company for the past 17 years.

I am one of those lucky people who enjoys his work and spends more time than he should either doing work or reseaching new stuff. I can also be found on playing DDO on the Cannith server (Send a tell to "Maetrim" who is my current main)

I am also a keep fit fanatic, doing cross country running and am seriously into [url]http://www.ryushinkan.co.uk/[/url] Karate at this time of my life, training from 4-6 times a week and recently achieved my 1st Dan after 6 years.

Comments and Discussions