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

📄 mygeomapview.h

📁 MFC 空间数据的表达与操作
💻 H
字号:
// MyGeoMapView.h : interface of the CMyGeoMapView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MYGEOMAPVIEW_H__7C0B96B4_FB90_4123_B7A5_E56953D68894__INCLUDED_)
#define AFX_MYGEOMAPVIEW_H__7C0B96B4_FB90_4123_B7A5_E56953D68894__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "DialogTab2.h"
#include "DialogTab1.h"

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

// Attributes
public:
	CMyGeoMapDoc* GetDocument();
	CString DataBaseName;
	double m_zooom;

	_RecordsetPtr m_pRecordset;
	_ConnectionPtr m_pConnection;

	CString TreeCurrent,TreeParent;//当前和父级项文本内容
	HTREEITEM hTreeCurrent,hTreeParent;//当前和父级项句柄

	CDialogTab2 *Layers;
	CDialogTab1 *Eagle;

	double mapcenterx,mapcentery;
	double mapcenterxMin,mapcenteryMin;
	double mapcenterxMax,mapcenteryMax;

	int SelectTool;

	CRect rect;

	CDC*     m_pMemDC;				//与pDC兼容的内存设备描述表
	CBitmap* m_pMemBitmap;			//选入内存设备的位图指针
	int Bitmapx,Bitmapy;

	CPoint pointstart,pointend,pointmove;

	int SelectPointNumber;
	double *pointselect;
	CString SelectName;
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyGeoMapView)
	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);
	//}}AFX_VIRTUAL

// Implementation
public:
	double GetTwoPointDiatance(CPoint point ,CPoint point1,CPoint point2);
	void DrawLine(BOOL check);
	void DrawSelect(CDC *pDC,int SelectObjectNumber,CString ObjectName);
	BOOL DrawCurrentObject(CPoint point);
	void DrawSelectObject(CString ObjectName,double *pointint,int pointnuber);
	void ScreenToMap(CPoint point,double  *x,double *y);
	void SetCenterPoint(double centerx,double centery);
	BOOL IfViewChange(CRect rect1);
	CPoint MapToScreen(double centerx,double centery,double pointx,double pointy,double zooom_in_out);
	BOOL GetCenterPoint();
	void DrawLayer(double zoom);
	void OpenDataBase(CString Name);

	void ClearMemScreen(CDC * pDC);	

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

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CMyGeoMapView)
	afx_msg void OnFileOpen();
	afx_msg void OnZooomIn();
	afx_msg void OnZooomOut();
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	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 OnFullsize();
	afx_msg void OnMove();
	afx_msg void OnRedo();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in MyGeoMapView.cpp
inline CMyGeoMapDoc* CMyGeoMapView::GetDocument()
   { return (CMyGeoMapDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_MYGEOMAPVIEW_H__7C0B96B4_FB90_4123_B7A5_E56953D68894__INCLUDED_)

⌨️ 快捷键说明

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