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

📄 skf_mapview.h

📁 这是书上的代码
💻 H
字号:
// Skf_MapView.h : interface of the CSkf_MapView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_SKF_MAPVIEW_H__616F8560_BA8B_4566_81AF_63705C866C25__INCLUDED_)
#define AFX_SKF_MAPVIEW_H__616F8560_BA8B_4566_81AF_63705C866C25__INCLUDED_

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


class CSkf_MapView : public CView
{
protected: // create from serialization only
	CSkf_MapView();
	DECLARE_DYNCREATE(CSkf_MapView)

// Attributes
public:
	CSkf_MapDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSkf_MapView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:


	virtual ~CSkf_MapView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CSkf_MapView)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnBkcolor();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	//}}AFX_MSG

	//以下两行为手工添加
	afx_msg void OnShowLayer(UINT nID);//图层显示开关消息处理
	afx_msg void OnUpdateLayerButtonFace(CCmdUI* pCmdUI);//按钮状态更新

	DECLARE_MESSAGE_MAP()

private:
	short int m_BitLayer;   //图层隐、现示开关标志位
	int      OrgX,OrgY;		// 地图起始点
    BOOL     b_MapMove;		//地图是否处于欲漫游状态	
	COLORREF BKColor;		//背景颜色
	CPoint   MouseDownPoint;  
	CPoint   MouseMovePoint;
	CRect    rect;		   //客户区区域
    CString  pTxt;         //说明文本

	void SKFDrawMap(CDC *pDC,int layer); //绘边界线
	void SKFDrawYellowriver(CDC *pDC);   //黄河
	void SKFDrawText(CDC *pDC);          //说明文本
	void SKFDrawChinese(CDC *pDC);       //中华人民共和国 
	void SKFDrawBitmap(CDC *pDC,int left,int top,UINT ID_BMP);//位图
};

#ifndef _DEBUG  // debug version in Skf_MapView.cpp
inline CSkf_MapDoc* CSkf_MapView::GetDocument()
   { return (CSkf_MapDoc*)m_pDocument; }
#endif

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SKF_MAPVIEW_H__616F8560_BA8B_4566_81AF_63705C866C25__INCLUDED_)

⌨️ 快捷键说明

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