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

📄 firstmapview.h

📁 具有地图的放大、缩小、漫游、属性查询、图层控制等功能。
💻 H
字号:
// FirstMapView.h : interface of the CFirstMapView class
//
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INCLUDES()
#include "DlgMultList.h"	// Added by ClassView
#include "motabledesc.h"	// Added by ClassView
#include "molayers.h"
#include "map.h"
#include "motrackinglayer.h"
#include "morecordset.h"
#include "_scalebar.h"
//}}AFX_INCLUDES
#include "ScaleDlg.h"
#include "DlgSacleSet.h"	// Added by ClassView
#include "DlgList.h"	// Added by ClassView

#if !defined(AFX_FIRSTMAPVIEW_H__074A907A_C421_4981_AF81_49532A94914D__INCLUDED_)
#define AFX_FIRSTMAPVIEW_H__074A907A_C421_4981_AF81_49532A94914D__INCLUDED_

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


class CFirstMapView : public CFormView
{
protected: // create from serialization only
	CFirstMapView();
	DECLARE_DYNCREATE(CFirstMapView)

public:
	//{{AFX_DATA(CFirstMapView)
	enum { IDD = IDD_FIRSTMAP_FORM };
	CListCtrl	m_list;
	CMoMap	m_map;
	CMoMap	m_map2;
	C_ScaleBar	m_scaleBar;
	//}}AFX_DATA

// Attributes
public:
	CFirstMapDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFirstMapView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	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);
	virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
	virtual void OnDraw(CDC* pDC);
	//}}AFX_VIRTUAL

// Implementation
public:
	CDlgMultList* m_multList;
	CDlgList* m_dlglist;
	
	CDlgList dlg_list;
	int scale_index;
	CDlgSacleSet dlgscale;
	BOOL SelectFeatureOnMap(CMoMap& map,long X,long Y,double ptSize,CMoRecordset& set,long& ShapeType);
	void SelectFeatToSelection(CMoMap& m_Map, short Shift, long X, long Y);
	CMoTrackingLayer tLayer;
	CString m_comboxEdit;
	CString m_comboxEdit1;
	void OnSetNavigationViewMapLayer();
	void OnRefreshNavigationWindow();
	void OnClearOriginalRect();
	void SetMapScale(CMoMap& map,double scale);
	
	enum { Query_Point,Query_Rectangle,Query_Ellipse,Query_Polygon ,Null_Query}m_CurrentOperation;

	CMoLayers Layers;
	CScaleDlg dlg;
	short nItem;
	CPoint m_point;

	LV_ITEM lvitem;
	UINT m_nCurTool;
	
	CString PathName[20];
	UINT index;
	
	int index_seled;
	int width;				//工作区的宽度
	int height;				//工作区的高度

	int m_yPrev;
	int m_xPrev;
	int m_yMax;
	int m_xMax;
	int m_yMin;
	int m_xMin;

	BOOL m_firstStart;       //判定是否为第一次启动
	BOOL m_DragRectFlag;     //判定光标是否在矩形筐内,从而选择

	HDC m_hDC;
	HWND m_hWnd;
	double m_startPointX;
	double m_startPointY;
	BOOL m_RefreshOriginalRect;      //判定是否擦去原始矩形


	CMoRecordset m_SelectedRecSet;
	CMoLayers layers;
	CString GetFileName(const CString& path);
	CString GetFileTitle(const CString& path);
	CString GetFileDirectory(const CString& path);
	CString AddShpLayer(const CString & path, COLORREF color, short symbolSize, short symbolStyle);
	virtual ~CFirstMapView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CFirstMapView)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnFileOpen();
	afx_msg void OnMapTool(UINT nID);
	afx_msg void OnUpdateMapTool(CCmdUI* pCmdUI);
	afx_msg void OnMouseDownMap1(short Button, short Shift, long X, long Y);
	afx_msg void OnClickList2(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnRclickList2(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnMenuRemoveall();
	afx_msg void OnMenuRemove();
	afx_msg void OnTurnOn();
	afx_msg void OnTurnOff();
	afx_msg void OnBegindragList2(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnButtonUp();
	afx_msg void OnButtonDown();
	afx_msg void OnUpTop();
	afx_msg void OnDownBottom();
	afx_msg void OnScaleWind();
	afx_msg void OnQueryPoint();
	afx_msg void OnQueryEllipse();
	afx_msg void OnQueryPolygon();
	afx_msg void OnQueryRectangle();
	afx_msg void OnMouseDownMap2(short Button, short Shift, long X, long Y);
	afx_msg void OnMouseMoveMap2(short Button, short Shift, long X, long Y);
	afx_msg void OnMouseUpMap2(short Button, short Shift, long X, long Y);
	afx_msg void OnAfterTrackingLayerDrawMap2(long hDC);
	afx_msg void OnMapSearch();
	afx_msg void OnCloseupCombo();
	afx_msg void OnBtnScale();	
	afx_msg void OnMapFullextent();
	afx_msg void OnAfterTrackingLayerDrawMap1(long hDC);
	afx_msg void OnShowPropery();
	afx_msg void OnDblClickScalebar();
	afx_msg void OnDeleteLabal();
	afx_msg void OnProTable();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in FirstMapView.cpp
inline CFirstMapDoc* CFirstMapView::GetDocument()
   { return (CFirstMapDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_FIRSTMAPVIEW_H__074A907A_C421_4981_AF81_49532A94914D__INCLUDED_)

⌨️ 快捷键说明

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