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

📄 mapxsampview.h

📁 mapx地图
💻 H
字号:
// mapxsampView.h : interface of the CMapxSampleView class
//
/////////////////////////////////////////////////////////////////////////////
/* 
 * This sample application and corresponding sample code is provided 
 * for example purposes only.  It has not undergone rigorous testing
 * and as such should not be shipped as part of a final application
 * without extensive testing on the part of the organization releasing
 * the end-user product.
 */

#include "MapX.h"
#include "UsCustRecordset.h"

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

// Attributes
public:
	CMapxSampleDoc* GetDocument();
	CUsCustRecordset m_daoUSCust;

	BOOL m_bODBCDynamic;

// Operations
public:
	void NotifyPaletteChanged(CWnd* pFocusWnd);
	void NotifyQueryNewPalette();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMapxSampleView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	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 ~CMapxSampleView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	CMapX m_ctrlMapX;

	double m_dPrevZoom, m_dCurZoom;
	double m_dPrevX, m_dCurX;
	double m_dPrevY, m_dCurY;
	BOOL m_bScaleBar;

	// Generated message map functions
protected:
	//{{AFX_MSG(CMapxSampleView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnMapAdddata();
	afx_msg void OnMapAddtheme();
	afx_msg void OnViewProperties();
	afx_msg void OnMapAddmultivartheme();
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	afx_msg void OnMapToolArrow();
	afx_msg void OnMapToolCenter();
	afx_msg void OnMapToolPan();
	afx_msg void OnMapToolRadiusselect();
	afx_msg void OnMapToolRectangleselect();
	afx_msg void OnMapToolSelect();
	afx_msg void OnMapToolZoomout();
	afx_msg void OnMapToolZoomin();
	afx_msg void OnContextPreviousview();
	afx_msg void OnUpdateContextPreviousview(CCmdUI* pCmdUI);
	afx_msg void OnEditCopy();
	afx_msg void OnFileOpen();
	afx_msg void OnViewViewentiremap();
	afx_msg void OnViewLayercontrol();
	afx_msg void OnUpdateViewScalebar(CCmdUI* pCmdUI);
	afx_msg void OnViewScalebar();
	afx_msg void OnMapAdddaodata();
	afx_msg void OnMapToolDistancetool();
	afx_msg void OnMapToolInfotool();
	afx_msg void OnMapToolPolygonselect();
	afx_msg void OnOdbcNormalAuto();
	afx_msg void OnOdbcNormalFields();
	afx_msg void OnOdbcXybind();
	afx_msg void OnOdbcZipcode();
	afx_msg void OnOdbcDynamic();
	afx_msg void OnUpdateOdbcDynamic(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOdbcXybind(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOdbcZipcode(CCmdUI* pCmdUI);
	afx_msg void OnMapAddunbounddata();
	afx_msg void OnViewProjection();
	afx_msg void OnDatasestFromLayer();
	afx_msg void OnMapRemovealldatasets();
	afx_msg void OnUpdateMapRemovealldatasets(CCmdUI* pCmdUI);
	afx_msg void OnMapAddsafearraydataset();
	//}}AFX_MSG

	BOOL OnMouseMoveInMap(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y);
	BOOL OnMouseUpInMap(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y);
	BOOL OnMapViewChanged();
	void OnThemeModifyRequested(LPDISPATCH Theme);
	void OnToolUsed(short ToolNum, double X1, double Y1, double X2, double Y2, double Distance, BOOL Shift, BOOL Ctrl, BOOL* EnableDefault);
	void OnDrawUserLayer(LPDISPATCH Layer, long hOutputDC, long hAttributeDC, LPDISPATCH RectFull, LPDISPATCH RectInvalid);

	void OnPolyToolUsedMap(short ToolNum, long Flags, LPDISPATCH Points, BOOL bShift, BOOL bCtrl, BOOL FAR* EnableDefault);
	void OnSelchangeTools();
	void OnClickMap();
	void OnDblClickMap();
	void OnErrorMap(short Number, BSTR FAR* Description, long Scode, LPCTSTR Source, LPCTSTR HelpFile, long HelpContext, BOOL FAR* CancelDisplay);
	void OnKeyDownMap(short FAR* KeyCode, short Shift);
	void OnKeyPressMap(short FAR* KeyAscii);
	void OnKeyUpMap(short FAR* KeyCode, short Shift);
	void OnMouseDownMap(short Button, short Shift, float X, float Y);
	void OnSelectionChangedMap();
	void OnResolveDataBindMap(short Flag, short NumMatches, const VARIANT FAR& Matches, short FAR* Choice, BOOL FAR* Cancel);
	void OnRequestDataMap(LPCTSTR DataSetName, long Row, short Field, VARIANT FAR* Value, BOOL FAR* Done);
	void OnDataMismatchMap(LPCTSTR DataSetName, long Row, BSTR FAR* GeoFieldValue);
	void OnAnnotationAddedMap(LPDISPATCH Annotation);
	void OnAnnotationChangedMap(short ChangeType, LPDISPATCH Annotation, BOOL FAR* EnableDefault);
	void OnThemeModifyRequestedMap(LPDISPATCH Theme);

	DECLARE_MESSAGE_MAP()
	DECLARE_EVENTSINK_MAP()
};

#ifndef _DEBUG  // debug version in mapxsampView.cpp
inline CMapxSampleDoc* CMapxSampleView::GetDocument()
   { return (CMapxSampleDoc*)m_pDocument; }
#endif

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

⌨️ 快捷键说明

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