www.pudn.com > NetPaw.rar > NetPawView.h


// NetPawView.h : CNetPawView 类的接口 
// 
#pragma once 
#include "afxwin.h" 
#include "afxcmn.h" 
 
 
class CNetPawDoc; 
class CNetPawView : public CScrollView 
{ 
protected: // 仅从序列化创建 
	CNetPawView(); 
	DECLARE_DYNCREATE(CNetPawView) 
 
// 属性 
public: 
	CNetPawDoc* GetDocument() const; 
 
// 重写 
public: 
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 
	virtual void OnInitialUpdate(); // 构造后第一次调用 
	virtual void OnDraw(CDC* pDC); 
	virtual void OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/); 
 
// 实现 
	virtual ~CNetPawView(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
// 生成的消息映射函数 
protected: 
	afx_msg BOOL OnEraseBkgnd(CDC* pDC); 
	DECLARE_MESSAGE_MAP() 
 
protected: 
	int m_nTotalCells; 
	int m_nLineCells; 
	int m_nCellWidth; 
	int m_nCellHeight; 
	CImageList m_ilMeters; 
	COLORREF m_clrBackgrnd; 
 
public: 
	void DrawDone(CDC *pDC); 
	void DrawMeter(CDC *pDC); 
	void ComputeCells(CRect& rect); 
	void DrawBackCells(CDC* pDC, CRect& rectDC); 
	void DrawCell(CDC* pDC, CRect& rectDC); 
	void DrawOneSegment(CDC* pDC, CRect& rectDC, int nFromCell, int nToCell, int nDoneCells); 
	int GetCurrentClassID(void); 
	void DrawFavorites(CDC* pDC); 
}; 
 
#ifndef _DEBUG  // NetPawView.cpp 的调试版本 
inline CNetPawDoc* CNetPawView::GetDocument() const 
   { return reinterpret_cast(m_pDocument); } 
#endif