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

📄 namegisview.h

📁 电子地图 地理信息系统二次开发实例教程-C#和MapObjects实现程序源码
💻 H
字号:
// NameGisView.h : CNameGisView 类的接口
//


#pragma once
#include "map.h"
#include "InfoDlg.h"
#include "NearestDlg.h"
#include "NetLayer.h"

class CNameGisDoc;

class CNameGisView : public CFormView
{
protected: // 仅从序列化创建
	CNameGisView();
	DECLARE_DYNCREATE(CNameGisView)

public:
	enum{ IDD = IDD_NAMEGIS_FORM };

// 属性
public:
	CNameGisDoc* GetDocument() const;
	UINT m_nCurTool;
	CInfoDlg* m_pInfoDlg;
	CNearestDlg* m_pNearestDlg;

	CMoMapLayer m_netLayer;
	CNetLayer* m_netLayer1;
	CList<double, double&> m_path;

private:
	UINT    m_nTimer;       // 计时器
	double	m_x;			// 当前位置的x坐标
	double	m_y;			// 当前位置的y坐标
	double	m_lastX;		// 当计时开始时鼠标位置的x坐标
	double	m_lastY;		// 当计时开始时鼠标位置的y坐标

// 操作
public:
	void LoadLayers();	
	void ReShowLayers();
	void ReLabelLayers();
	short ReCalcFontSize(short nSize,double dScale);
	BOOL LoadFilter(CComboBox* pComboBox);
	BOOL LoadFilter2(CComboBox* pComboBox, CString szFilter, bool bLayerType);
	CMoRecordset DoSearch();

// 重写
	public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
	virtual void OnInitialUpdate(); // 构造后第一次调用

// 实现
public:
	virtual ~CNameGisView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// 生成的消息映射函数
protected:
	DECLARE_MESSAGE_MAP()
public:
	CMap1 m_Map;
	CStatic m_NameLabel;
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnUpdateAllFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateShopFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateTourFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateSchoolFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateHospitalFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateHotelFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateBankFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateStationFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateMovieFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateRestFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateWCFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePostFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateLibraryFtr(CCmdUI* pCmdUI);
	afx_msg void OnUpdateBusStaFtr(CCmdUI* pCmdUI);

	afx_msg void OnShowAllFeature();
	afx_msg void OnShowShopFeature();
	afx_msg void OnShowTourFeature();
	afx_msg void OnShowSchoolFeature();
	afx_msg void OnShowHospitalFeature();
	afx_msg void OnShowHotelFeature();
	afx_msg void OnShowBankFeature();
	afx_msg void OnShowStationFeature();
	afx_msg void OnShowMovieFeature();
	afx_msg void OnShowRestaurantFeature();
	afx_msg void OnShowWCFeature();
	afx_msg void OnShowPostFeature();
	afx_msg void OnShowLibraryFeature();
	afx_msg void OnShowBusStationFeature();

	afx_msg void OnZoomIn();
	afx_msg void OnZoomOut();
	afx_msg void OnFullExtent();
	afx_msg void OnPanMap();
	afx_msg void OnUpdateZoomIn(CCmdUI* pCmdUI);
	afx_msg void OnUpdateZoomOut(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePanMap(CCmdUI* pCmdUI);

	afx_msg void OnPointSelect();
	afx_msg void OnRectSelect();
	afx_msg void OnPolySelect();
	afx_msg void OnUpdatePointSel(CCmdUI* pCmdUI);
	afx_msg void OnUpdateRectSel(CCmdUI* pCmdUI);	
	afx_msg void OnUpdatePolySel(CCmdUI* pCmdUI);

	afx_msg void OnMapInfo();
	afx_msg void OnUpdateMapInfo(CCmdUI* pCmdUI);

	afx_msg void OnNameQuery();
	afx_msg void OnNearestName();
	afx_msg void OnBusQuery();

	afx_msg void OnNameIndex();

	afx_msg void OnNearestPath();
	afx_msg void OnUpdateNrstPath(CCmdUI* pCmdUI);

	afx_msg void OnLineMeasure();
	afx_msg void OnAreaMeasure();
	afx_msg void OnUpdateLnMsu(CCmdUI* pCmdUI);
	afx_msg void OnUpdateAreaMsu(CCmdUI* pCmdUI);

	afx_msg void OnMapIndex();
	afx_msg void OnLayerControl();
	afx_msg void OnOutputMap();
	afx_msg void OnPrintMap();

	afx_msg void OnShowHelp();

	DECLARE_EVENTSINK_MAP()
	void MouseDownMap1(short Button, short Shift, long X, long Y);
	void MouseMoveMap1(short Button, short Shift, long X, long Y);
	void AfterLayerDrawMap1(short index, BOOL canceled, long hDC);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnTimer(UINT nIDEvent);
	
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
};

#ifndef _DEBUG  // NameGisView.cpp 的调试版本
inline CNameGisDoc* CNameGisView::GetDocument() const
   { return reinterpret_cast<CNameGisDoc*>(m_pDocument); }
#endif

⌨️ 快捷键说明

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