⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listview.h

📁 VC++技术内幕(第四版)的实例
💻 H
字号:
// matvw1.h : interface of the CListView class
//
// Microsoft Foundation Classes C++ library.
// Copyright (C) 1992 Microsoft Corporation
// All rights reserved.
//
/////////////////////////////////////////////////////////////////////////////

class CListView : public CView
{
/****************************************************************/
private:
	CListBox* m_pListBox;
	CMatplanDialog* m_pDialog;
	CPiece* m_pPiece; // currently selected element
	int m_xChar, m_yChar; // character width and height
	CSize m_drawOffset;
	CFont* m_pPrintFont;
	int m_nPage, m_nLinesPerPage;
/****************************************************************/
protected: // create from serialization only
	CListView();
	DECLARE_DYNCREATE(CListView)

// Attributes
public:
	CMatplanDoc* GetDocument()
		{
			ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMatplanDoc)));
			return (CMatplanDoc*) m_pDocument;
		}

// Operations
public:

// Implementation
public:
	virtual ~CListView();
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

// Generated message map functions
/****************************************************************/
private:
	void StartNewList();
	void PrintPageHeader(CDC* pDC);
	void PrintPageFooter(CDC* pDC);
	void UpdatePlanDocument();
/****************************************************************/
protected:
/****************************************************************/
	virtual	void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
/****************************************************************/
	//{{AFX_MSG(CListView)
		afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
		afx_msg void OnPaint();
		afx_msg void OnSize(UINT nType, int cx, int cy);
		afx_msg void OnListBoxDblClk();
		afx_msg LRESULT OnCommandHelp(WPARAM wParam, LPARAM lParam);
		afx_msg LRESULT OnHelpHitTest(WPARAM wParam, LPARAM lParam);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -