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

📄 mainfrm.h

📁 一个非常好的GPS应用软件
💻 H
字号:
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINFRM_H__1A390AE1_B6D2_45AB_BEF7_A903D6CF662E__INCLUDED_)
#define AFX_MAINFRM_H__1A390AE1_B6D2_45AB_BEF7_A903D6CF662E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define MINX 1024
#define MINY 690
#define MAXX 1024
#define MAXY 690

#include "MyEditView.h"
#include "MyView.h"
#include "SerialPort.h"

#include "MyFormView.h"

#include "math.h"
#include "Struct.h"

const int N=1024;
const int M=154;
const double A0=6378137.;
const double ALFA0=298.257223563;
const double A1=6378140.;
const double ALFA1=298.257;
const double  PI=3.1415926535897932384626433832795;
const double  P1=180.0/PI*3600;
const double  P2=180.0/PI;
const double  E=1e-20;



class CStroke;

class CMainFrame : public CFrameWnd
{
	
protected: // create from serialization only
	CMainFrame();
	DECLARE_DYNCREATE(CMainFrame)
		
	CSplitterWnd m_wndSplitter;
	CMyFormView * pMyFormView;
	CMyView * pMyView;
	int nPort;	
	int nBaud;
	CSerialPort	*	m_pPort;
	unsigned char m_strReceived[N];
	int index;
	CFile *pMotFile;
	CString strLog;
	CFile *pLogFile;
	bool bWrite;
	bool bOpen;
	CStroke*    m_pStrokeCur;   //线条指针

// Attributes
public:

// Operations
public:
	BOOL ReadHexFile(const CString &fpn);
	void ReadHa(const unsigned char *szBuf,int i,Ha& ha);
	unsigned long ReadBit(const unsigned char *szBuf,int i,int num);
	BOOL CheckOut(const unsigned char *szBuf,int i);
	RESULT ProcessHa(const Ha &ha,const double a[],const double alfa[],CFile *pLog);
	double NavelMer(double lon,int base,int &index);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMainFrame)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
	//}}AFX_VIRTUAL

// Implementation
public:
	CString ToStr(const unsigned char *szBuf,int nRet);
	bool bStart;
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
	CStatusBar  m_wndStatusBar;
	CToolBar    m_wndToolBar;

// Generated message map functions
protected:
	//{{AFX_MSG(CMainFrame)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnMENUReadFile();
	afx_msg void OnMenustart();
	afx_msg void OnMenumot();
	afx_msg LONG OnCommunication(WPARAM ch, LPARAM port);
	afx_msg LONG OnCTSDetected(UINT, LONG);
	afx_msg int OnMENUsetup();
	afx_msg void OnMENUstop();
	afx_msg void OnClose();
	afx_msg void OnAppExit();
	afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
	afx_msg void OnUpdateMenumot(CCmdUI* pCmdUI);
	afx_msg void OnUpdateMENUstop(CCmdUI* pCmdUI);
	afx_msg void OnUpdateMenustart(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_MAINFRM_H__1A390AE1_B6D2_45AB_BEF7_A903D6CF662E__INCLUDED_)

⌨️ 快捷键说明

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