Click here to Skip to main content
15,893,644 members
Articles / Desktop Programming / MFC

Print ListCtrl on multiple pages

Rate me:
Please Sign up or sign in to vote.
4.96/5 (14 votes)
26 Mar 2000CPOL 165.8K   2.7K   55  
Printing the contents of a CListCtrl or CListView with multiple pages
// listPrintView.h : Schnittstelle der Klasse CListPrintView
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_LISTPRINTVIEW_H__F159F56B_00DF_11D4_9847_00201828908C__INCLUDED_)
#define AFX_LISTPRINTVIEW_H__F159F56B_00DF_11D4_9847_00201828908C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CListPrintView : public CListView
{
	DECLARE_DYNCREATE(CListPrintView)

public:
	CListPrintView();
	virtual ~CListPrintView();

	CListPrintDoc	*GetDocument();

protected:

	void			OnViewStyle(UINT nCommandID);

	int			m_nCols,
				m_nRows;
	CUIntArray	m_ColSortOrder;
	BOOL		m_bFilled,
				m_bUseSetup;
	
	//{{AFX_VIRTUAL(CListPrintView)
	protected:
	virtual void OnInitialUpdate(); // das erste mal nach der Konstruktion aufgerufen
	//}}AFX_VIRTUAL

	//{{AFX_MSG(CListPrintView)
	afx_msg void OnFill();
	afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnFilePrintDirect();
	afx_msg void OnUpdateFilePrintDirect(CCmdUI* pCmdUI);
	afx_msg void OnButtonSetup();
	afx_msg void OnUpdateButtonSetup(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ f�gt unmittelbar vor der vorhergehenden Zeile zus�tzliche Deklarationen ein.

#endif // !defined(AFX_LISTPRINTVIEW_H__F159F56B_00DF_11D4_9847_00201828908C__INCLUDED_)

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
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions