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

📄 advancedlg.cpp

📁 这个程序包含了wince串口、GPS信号处理
💻 CPP
字号:
// AdvanceDlg.cpp : implementation file
//

#include "stdafx.h"
#include "gmark.h"
#include "AdvanceDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAdvanceDlg dialog


CAdvanceDlg::CAdvanceDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CAdvanceDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CAdvanceDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CAdvanceDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAdvanceDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAdvanceDlg, CDialog)
	//{{AFX_MSG_MAP(CAdvanceDlg)
	ON_BN_CLICKED(IDC_BUTTON_RTCMON, OnButtonRtcmon)
	ON_BN_CLICKED(IDC_BUTTON_RTCMOFF, OnButtonRtcmoff)
	ON_BN_CLICKED(IDC_BUTTON_INIT, OnButtonInit)
	ON_BN_CLICKED(IDC_BUTTON_GGA2S, OnButtonGga2s)
	ON_BN_CLICKED(IDC_BUTTON_GGAOFF, OnButtonGgaoff)
	ON_BN_CLICKED(IDC_BUTTON_PBNON, OnButtonPbnon)
	ON_BN_CLICKED(IDC_BUTTON_PBNOFF, OnButtonPbnoff)
	ON_BN_CLICKED(IDC_BUTTON_INI, OnButtonIni)
	ON_BN_CLICKED(IDC_BUTTON_PAR, OnButtonPar)
	ON_BN_CLICKED(IDC_BUTTON_INI5, OnButtonIni5)
	ON_BN_CLICKED(IDC_BUTTON_GSAON, OnButtonGsaon)
	ON_BN_CLICKED(IDC_BUTTON_GSAOFF, OnButtonGsaoff)
	ON_BN_CLICKED(IDC_BUTTON_CRTON, OnButtonCrton)
	ON_BN_CLICKED(IDC_BUTTON_CRTOFF, OnButtonCrtoff)
	ON_BN_CLICKED(IDC_BUTTON_GLLON, OnButtonGllon)
	ON_BN_CLICKED(IDC_BUTTON_GLLOFF, OnButtonGlloff)
	ON_BN_CLICKED(IDC_BUTTON_MCAON, OnButtonMcaon)
	ON_BN_CLICKED(IDC_BUTTON_MCAOFF, OnButtonMcaoff)
	ON_BN_CLICKED(IDC_BUTTON_SNVON, OnButtonSnvon)
	ON_BN_CLICKED(IDC_BUTTON_SNVOFF, OnButtonSnvoff)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAdvanceDlg message handlers

void CAdvanceDlg::OnButtonRtcmon() 
{
	// TODO: Add your control notification handler code here
	CWnd * pWnd = GetParent()->GetParent();
	pWnd->SendMessage(WM_COMMAND, (BN_CLICKED<<8) + IDC_BUTTON_RTCMON, 0);
}

void CAdvanceDlg::OnButtonRtcmoff() 
{
	// TODO: Add your control notification handler code here
	CWnd * pWnd = GetParent()->GetParent();
	pWnd->SendMessage(WM_COMMAND, (BN_CLICKED<<8) + IDC_BUTTON_RTCMOFF, 0);
}

void CAdvanceDlg::OnButtonInit() 
{
	// TODO: Add your control notification handler code here
	CWnd * pWnd = GetParent()->GetParent();
	pWnd->SendMessage(WM_COMMAND, (BN_CLICKED<<8) + IDC_BUTTON_INIT, 0);
}

void CAdvanceDlg::OnButtonGga2s() 
{
	// TODO: Add your control notification handler code here
	CWnd * pWnd = GetParent()->GetParent();
	pWnd->SendMessage(WM_COMMAND, (BN_CLICKED<<8) + IDC_BUTTON_GGA2S, 0);
}

void CAdvanceDlg::OnButtonGgaoff() 
{
	// TODO: Add your control notification handler code here
	CWnd * pWnd = GetParent()->GetParent();
	pWnd->SendMessage(WM_COMMAND, (BN_CLICKED<<8) + IDC_BUTTON_GGAOFF, 0);
}

void CAdvanceDlg::OnButtonPbnon() 
{
	// TODO: Add your control notification handler code here
	CWnd * pWnd = GetParent()->GetParent();
	pWnd->SendMessage(WM_COMMAND, (BN_CLICKED<<8) + IDC_BUTTON_PBNON2, 0);
}

void CAdvanceDlg::OnButtonPbnoff() 
{
	// TODO: Add your control notification handler code here
	CWnd * pWnd = GetParent()->GetParent();
	pWnd->SendMessage(WM_COMMAND, (BN_CLICKED<<8) + IDC_BUTTON_PBNOFF, 0);
}

void CAdvanceDlg::SetGps(CGps * pGps)
{
	m_pGps = pGps;
}

void CAdvanceDlg::OnButtonIni() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,INI,9,8,,,1,");
}

void CAdvanceDlg::OnButtonPar() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHQ,PAR,A");
}

void CAdvanceDlg::OnButtonIni5() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,INI,9,8,,,5,");
}

void CAdvanceDlg::OnButtonGsaon() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,NME,GSA,A,ON,1");
}

void CAdvanceDlg::OnButtonGsaoff() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,NME,GSA,A,OFF");
}

void CAdvanceDlg::OnButtonCrton() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,NME,CRT,A,ON,1");
}

void CAdvanceDlg::OnButtonCrtoff() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,NME,CRT,A,OFF");
}

void CAdvanceDlg::OnButtonGllon() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,NME,GLL,A,ON,1");
}

void CAdvanceDlg::OnButtonGlloff() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,NME,GLL,A,OFF");
}

void CAdvanceDlg::OnButtonMcaon() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,NME,MCA,A,ON,1");
}

void CAdvanceDlg::OnButtonMcaoff() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,NME,MCA,A,OFF");
}

void CAdvanceDlg::OnButtonSnvon() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,NME,SNV,A,ON,1");
}

void CAdvanceDlg::OnButtonSnvoff() 
{
	// TODO: Add your control notification handler code here
	m_pGps->SendCmd("$PASHS,NME,SNV,A,OFF");
}

⌨️ 快捷键说明

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