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

📄 gpsdlg.h

📁 GPS数据接收及分析测试程序,由魏先生完成,本人收集整理,绝对可用.
💻 H
字号:
// GPSDlg.h : header file
//

#if !defined(AFX_GPSDLG_H__0F4214F4_F527_4882_A0D7_772B6A17453D__INCLUDED_)
#define AFX_GPSDLG_H__0F4214F4_F527_4882_A0D7_772B6A17453D__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CGPSDlg dialog


#define		MAXLENGTH		2048								//最大字节数


class CGPSDlg : public CDialog
{
// Construction
public:
	CGPSDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CGPSDlg)
	enum { IDD = IDD_GPS_DIALOG };
	CComboBox	m_Comm;
	CString	m_strCourse;
	CString	m_strDate;
	CString	m_strLatitude;
	CString	m_strLongitude;
	CString	m_strSpeed;
	CString	m_strTime;
	CString	m_strStatus;
	int		m_nCommIndex;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGPSDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);			// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;
	//
	HANDLE m_hComm;												//串口句柄
	CString m_strRecv;											//接收到的GPS数据
	DWORD m_dwRwByte;											//读写字节数
	DWORD m_dwError;											//错误码
	COMSTAT m_CommStat;											//通信状态结构
	BYTE m_RecvBuf[MAXLENGTH];									//接收缓冲区
	//
	void ClearRecvBuf();										//接收缓冲区清0
	void ClearEdit();											//清除编辑框显示
	BOOL InitComm(CString strComm);								//初始化串口
	BOOL GetGPSParam();											//获得GPS参数
	
	// Generated message map functions
	//{{AFX_MSG(CGPSDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnStart();
	afx_msg void OnStop();
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_GPSDLG_H__0F4214F4_F527_4882_A0D7_772B6A17453D__INCLUDED_)

⌨️ 快捷键说明

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