MapView.h
资源名称:vc++gps.zip [点击查看]
上传用户:jc6688
上传日期:2013-05-06
资源大小:344k
文件大小:6k
源码类别:
GPS编程
开发平台:
Visual C++
- // MapView.h : interface of the CMapView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MAPVIEW_H__991DAAAE_6771_11D3_92B5_0000E826141B__INCLUDED_)
- #define AFX_MAPVIEW_H__991DAAAE_6771_11D3_92B5_0000E826141B__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "TargetSet.h"
- #define CUSTOM_DRAW_TEXT_TOOL 21
- #define CUSTOM_DRAW_SYMBOL_TOOL 22
- #define CUSTOM_DRAW_LINE_TOOL 23
- #define CUSTOM_DRAW_ELLIPSE_TOOL 24
- #define CUSTOM_DRAW_REGION_TOOL 25
- #define CUSTOM_DRAW_RECT_TOOL 26
- #define CUSTOM_DRAW_ARC_TOOL 27
- class CMapView : public CView
- {
- protected: // create from serialization only
- CMapView();
- DECLARE_DYNCREATE(CMapView)
- // Attributes
- public:
- CMapDemoDoc* GetDocument();
- public:
- CMapX m_ctrlMapX; //声明一个MapX对象
- CString m_strEditLayer;//当前动态编辑图层名字
- double m_dPrevZoom, m_dCurZoom;
- double m_dPrevX, m_dCurX;
- double m_dPrevY, m_dCurY;
- BOOL m_bScaleBar;
- int m_nGpsOperation;
- BOOL m_bIsStartGps;
- BOOL m_bIsAutoLable;
- CGpsSet gpsTarget;
- CGpsSet* m_pTarget;
- CGpsSetArray gpsTargetArray;
- // Operations
- public:
- //调色板设置 在MapX4.0下,真彩色已成缺省设置,可以不采用256色调色板
- void NotifyPaletteChanged(CWnd* pFocusWnd);
- void NotifyQueryNewPalette();
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMapView)
- public:
- virtual void OnDraw(CDC* pDC); // overridden to draw this view
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
- virtual void OnInitialUpdate();
- virtual BOOL DestroyWindow();
- protected:
- virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
- virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
- virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
- virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- void ClearAllTarget();
- void SetAnimationLayer();
- void UpdateSense();
- BOOL FindLayer(CString strLayerName);
- BOOL FindLayer(CString strLayerName,CMapXLayer& layer);
- void OnInfoToolUsed(CMapX &cMapX);
- void SetTitleVisible(BOOL bState);
- void SetTitle(CString str);
- void DrawScaleBar(CDC * pDC);
- virtual ~CMapView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(CMapView)
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnFileOpengeoset();
- afx_msg void OnViewSysoption();
- afx_msg void OnMapToolSelect();
- afx_msg void OnMapToolZoomin();
- afx_msg void OnMapToolZoomout();
- afx_msg void OnMapToolPan();
- afx_msg void OnMapToolRadiusselect();
- afx_msg void OnMapToolRectangleselect();
- afx_msg void OnMapToolInformation();
- afx_msg void OnViewLayercontrol();
- afx_msg void OnViewScalebar();
- afx_msg void OnUpdateViewScalebar(CCmdUI* pCmdUI);
- afx_msg void OnToolUnselectall();
- afx_msg void OnMapeditSelettable();
- afx_msg void OnMapeditAddtext();
- afx_msg void OnMapeditAddsymbol();
- afx_msg void OnUpdateMapeditAddtext(CCmdUI* pCmdUI);
- afx_msg void OnUpdateMapeditAddsymbol(CCmdUI* pCmdUI);
- afx_msg void OnMapeditAddline();
- afx_msg void OnUpdateMapeditAddline(CCmdUI* pCmdUI);
- afx_msg void OnMapeditAddpolygon();
- afx_msg void OnUpdateMapeditAddpolygon(CCmdUI* pCmdUI);
- afx_msg void OnMapeditAddrect();
- afx_msg void OnUpdateMapeditAddrect(CCmdUI* pCmdUI);
- afx_msg void OnMapeditAddepplise();
- afx_msg void OnUpdateMapeditAddepplise(CCmdUI* pCmdUI);
- afx_msg void OnMapeditAddarc();
- afx_msg void OnUpdateMapeditAddarc(CCmdUI* pCmdUI);
- afx_msg void OnDestroy();
- afx_msg void OnAddTarget();
- afx_msg void OnEditTarget();
- afx_msg void OnStartGps();
- afx_msg void OnUpdateStartGps(CCmdUI* pCmdUI);
- afx_msg void OnEndGps();
- afx_msg void OnUpdateEndGps(CCmdUI* pCmdUI);
- afx_msg void OnUpdateAddTarget(CCmdUI* pCmdUI);
- afx_msg void OnUpdateEditTarget(CCmdUI* pCmdUI);
- afx_msg void OnGpsChangesymbol();
- afx_msg void OnUpdateGpsChangesymbol(CCmdUI* pCmdUI);
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnChangeSymbol();
- afx_msg void OnUpdateChangeSymbol(CCmdUI* pCmdUI);
- afx_msg void OnLineChange();
- afx_msg void OnReagionChange();
- afx_msg void OnMapxProperty();
- afx_msg void OnDatabindNormal();
- afx_msg void OnUpdateDatabindNormal(CCmdUI* pCmdUI);
- afx_msg void OnBinddataOdbc();
- afx_msg void OnUpdateBinddataOdbc(CCmdUI* pCmdUI);
- afx_msg void OnBinddataArray();
- afx_msg void OnUpdateBinddataArray(CCmdUI* pCmdUI);
- afx_msg void OnBinddataNobind();
- afx_msg void OnUpdateBinddataNobind(CCmdUI* pCmdUI);
- afx_msg void OnThemeReange();
- afx_msg void OnUpdateThemeReange(CCmdUI* pCmdUI);
- afx_msg void OnThemeDot();
- afx_msg void OnUpdateThemeDot(CCmdUI* pCmdUI);
- afx_msg void OnThemePie();
- afx_msg void OnUpdateThemePie(CCmdUI* pCmdUI);
- afx_msg void OnThemeSymbol();
- afx_msg void OnUpdateThemeSymbol(CCmdUI* pCmdUI);
- afx_msg void OnThemeIndiv();
- afx_msg void OnUpdateThemeIndiv(CCmdUI* pCmdUI);
- afx_msg void OnThemeBar();
- afx_msg void OnUpdateThemeBar(CCmdUI* pCmdUI);
- //}}AFX_MSG
- //MapX事件函数声明
- void OnDrawUserLayer(LPDISPATCH Layer, long hOutputDC, long hAttributeDC, LPDISPATCH RectFull, LPDISPATCH RectInvalid);
- void OnToolUsed(short ToolNum, double X1, double Y1, double X2, double Y2, double Distance, BOOL Shift, BOOL Ctrl, BOOL* EnableDefault);
- void OnPolyToolUsedMap(short ToolNum, long Flags, LPDISPATCH Points, BOOL bShift, BOOL bCtrl, BOOL FAR* EnableDefault);
- void OnMouseDownMap(short Button, short Shift, float X, float Y);
- 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);
- DECLARE_MESSAGE_MAP()
- DECLARE_EVENTSINK_MAP()
- };
- #ifndef _DEBUG // debug version in MapView.cpp
- inline CMapDemoDoc* CMapView::GetDocument()
- { return (CMapDemoDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_MAPVIEW_H__991DAAAE_6771_11D3_92B5_0000E826141B__INCLUDED_)