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

📄 simplemapview.h

📁 evc下ArcInfo操作程序源代码
💻 H
字号:
// SimpleMapView.h : interface of the CSimpleMapView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_SIMPLEMAPVIEW_H__4C4CCC87_5E33_4C4C_95DA_6E43C16A7137__INCLUDED_)
#define AFX_SIMPLEMAPVIEW_H__4C4CCC87_5E33_4C4C_95DA_6E43C16A7137__INCLUDED_

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

#define CMD_NOTHING  0
#define CMD_ZOOMIN        1
#define CMD_ZOOMIN_WINDOW 2
#define CMD_ZOOMOUT       3
#define CMD_ZOOMPAN       4           
#define CMD_SRHPT         5
#define CMD_COORD         6

#include "LayerManageDlg.h"

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

// Attributes
public:
	CSimpleMapDoc* GetDocument();

// Operations
public:

	void InitScale();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSimpleMapView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	//}}AFX_VIRTUAL

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

protected:
	int   m_Operation;             //设置当前操作状态
	int   m_isDownMouse;          //鼠标是否按下过  
	CPoint m_StartPt;             //记录鼠标操作起始点 
	CPoint m_SecondPt;            //记录鼠标操作第二点

	int     m_FixedScale;

// Generated message map functions
protected:
	//{{AFX_MSG(CSimpleMapView)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnMapNothing();
	afx_msg void OnMapZoomIn();
	afx_msg void OnMapZoomOut();
	afx_msg void OnMapZoomAll();
	afx_msg void OnMapPan();
	afx_msg void OnMapZoomWindow();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnUpdateMapNothing(CCmdUI* pCmdUI);
	afx_msg void OnUpdateMapPan(CCmdUI* pCmdUI);
	afx_msg void OnUpdateMapZoomIn(CCmdUI* pCmdUI);
	afx_msg void OnUpdateMapZoomOut(CCmdUI* pCmdUI);
	afx_msg void OnUpdateMapZoomWindow(CCmdUI* pCmdUI);
	afx_msg void OnMapSrhpt();
	afx_msg void OnUpdateMapSrhpt(CCmdUI* pCmdUI);
	afx_msg void OnLayerManage();
	afx_msg void OnMapCoord();
	afx_msg void OnUpdateMapCoord(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	DRAWPARAM m_DrawParam;

	void ShowCoordinate(CMapPoint& pt);
	void Dispatch(CPoint pt);  
	void ZoomInWindows();
	void ZoomIn();
	void ZoomOut();
	void Pan();
	void PtSelected(CPoint& pt);
};

#ifndef _DEBUG  // debug version in SimpleMapView.cpp
inline CSimpleMapDoc* CSimpleMapView::GetDocument()
   { return (CSimpleMapDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_SIMPLEMAPVIEW_H__4C4CCC87_5E33_4C4C_95DA_6E43C16A7137__INCLUDED_)

⌨️ 快捷键说明

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