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

📄 gpssimview.h

📁 GPS信号模拟器源代码
💻 H
字号:
// GPSSimView.h : interface of the CGPSSimView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_GPSSIMVIEW_H__C9328D46_269D_4F21_A567_98A95A8B2A01__INCLUDED_)
#define AFX_GPSSIMVIEW_H__C9328D46_269D_4F21_A567_98A95A8B2A01__INCLUDED_

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

#include "HMXChart.h"
#include "HMXDataset.h"
#include "FloatDlg.h"
#include "afxcmn.h"


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

public:
	//{{AFX_DATA(CGPSSimView)
	enum { IDD = IDD_GPSSIM_FORM };
	CTabCtrl	m_table;
	CString	m_textRaw;
	CSliderCtrl m_slider;
	//}}AFX_DATA

// Attributes
public:
	CGPSSimDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGPSSimView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	//}}AFX_VIRTUAL

// Implementation
public:
	void RefreshChart();
    void RefreshText();

	void SetTrackScale(long scaleLngi, long scaleLati);
	void SetTrackCenter(long lngi, long lati);
    void DrawTrack(CDC *pDC, long lngi,  long lati, COLORREF color, int size);

    void DrawAllTrack(CDC *pDC);
    
protected:

    // 将地理坐标转换为屏幕坐标
    void CoordToPixel(long lngi, long lati, int &x, int &y);

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


protected:

    CHMXChart m_chart;

    // 轨迹窗口中心经/纬度
    long m_centerLati;
    long m_centerLngi;

    // 轨迹窗口坐标范围
    long m_scaleLati; 
    long m_scaleLngi;
   
    bool m_bSignalStart;
    bool m_bSignalPause;

    bool m_bShowSignal;

	CString m_strPort;
	DWORD m_dwBand;

// Generated message map functions
protected:
	//{{AFX_MSG(CGPSSimView)
	afx_msg void OnSelchangeTab1(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnPaint();
	afx_msg void OnSignalBegin();
	afx_msg void OnSignalPause();
	afx_msg void OnSignalStop();
	afx_msg void OnUpdateSignalPause(CCmdUI* pCmdUI);
	afx_msg void OnUpdateSignalStop(CCmdUI* pCmdUI);
	afx_msg void OnUpdateSignalBegin(CCmdUI* pCmdUI);
	afx_msg void OnSetScaleAdd();
	afx_msg void OnSetScaleSub();
	afx_msg void OnUpdateSignalTrn(CCmdUI* pCmdUI);
	afx_msg void OnUpdateSignalOri(CCmdUI* pCmdUI);
	afx_msg void OnSignalOri();
	afx_msg void OnSignalTrn();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	CListCtrl m_list;
	void RefreshList(void);
	afx_msg void OnSetProperty();
protected:
	virtual void OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/);
public:
	afx_msg void OnNMReleasedcaptureSlider1(NMHDR *pNMHDR, LRESULT *pResult);
};

#ifndef _DEBUG  // debug version in GPSSimView.cpp
inline CGPSSimDoc* CGPSSimView::GetDocument()
   { return (CGPSSimDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_GPSSIMVIEW_H__C9328D46_269D_4F21_A567_98A95A8B2A01__INCLUDED_)

⌨️ 快捷键说明

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