資源簡介
gps電腦接收端上位機(jī)源碼 通過串口顯示GPS收到的信息 分享給大家

代碼片段和文件信息
/*
** FILENAME ConfigDlg.cpp
**
** PURPOSE Here?the?ports?can?be?configured
**
** CREATION?DATE 15-09-1997
** LAST?MODIFICATION 12-11-1997
**
** AUTHOR Remon?Spekreijse
**
*/
#include?“stdafx.h“
#include?“resource.h“
#include?“ConfigDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CConfigDlg?dialog
CConfigDlg::CConfigDlg(CWnd*?pParent?/*=NULL*/)
:?CDialog(CConfigDlg::IDD?pParent)
{
//{{AFX_DATA_INIT(CConfigDlg)
m_strBaudRate?=?_T(““);
m_strDataBits?=?_T(““);
m_strParity?=?_T(““);
m_strStopBits?=?_T(““);
m_strComm?=?_T(“COM1“);
//}}AFX_DATA_INIT
}
CConfigDlg::CConfigDlg(CWnd*?pParent?DCB?dcb)
:?CDialog(CConfigDlg::IDD?pParent)
{
m_dcb?=?dcb;
}
CConfigDlg::CConfigDlg(CWnd*?pParent?CSerialPortEx*?pPort)
:?CDialog(CConfigDlg::IDD?pParent)
{
m_dcb?=?pPort->GetDCB();
char?temp[10];
m_strComm=_T(CString(“COM“)+itoa(pPort->m_nPortNrtemp10));
}
void?CConfigDlg::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CConfigDlg)
DDX_CBString(pDX?IDC_BAUDRATECOMBO?m_strBaudRate);
DDX_CBString(pDX?IDC_DATABITSCOMBO?m_strDataBits);
DDX_CBString(pDX?IDC_PARITYCOMBO?m_strParity);
DDX_CBString(pDX?IDC_STOPBITSCOMBO?m_strStopBits);
DDX_CBString(pDX?IDC_COMMCOMBO?m_strComm);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CConfigDlg?CDialog)
//{{AFX_MSG_MAP(CConfigDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CConfigDlg?message?handlers
BOOL?CConfigDlg::OnInitDialog()?
{
CDialog::OnInitDialog();
CString?strTemp;
strTemp.Format(“%d“?m_dcb.BaudRate);
((CComboBox*)GetDlgItem(IDC_BAUDRATECOMBO))->SelectString(0?strTemp);
((CComboBox*)GetDlgItem(IDC_PARITYCOMBO))->SetCurSel(m_dcb.Parity);
((CComboBox*)GetDlgItem(IDC_STOPBITSCOMBO))->SetCurSel(m_dcb.StopBits);
strTemp.Format(“%d“?m_dcb.ByteSize);
((CComboBox*)GetDlgItem(IDC_DATABITSCOMBO))->SelectString(0?strTemp);
CComboBox*?pcommChoice=(CComboBox*)this->GetDlgItem(IDC_COMMCOMBO);
switch(m_strComm[3])
{
case?‘1‘:
pcommChoice->SetCurSel(0);
break;
case?‘2‘:
pcommChoice->SetCurSel(1);
break;
case?‘3‘:
pcommChoice->SetCurSel(2);
break;
case?‘4‘:
pcommChoice->SetCurSel(3);
break;
default:
break;
}
return?TRUE;??//?return?TRUE?unless?you?set?the?focus?to?a?control
??????????????//?EXCEPTION:?OCX?Property?Pages?should?return?FALSE
}
??
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????2664??2002-11-06?08:10??VC_GPS數(shù)據(jù)產(chǎn)集程序\ConfigDlg.cpp
?????文件???????1444??2002-11-06?08:09??VC_GPS數(shù)據(jù)產(chǎn)集程序\ConfigDlg.h
?????文件???????1933??2002-11-07?05:03??VC_GPS數(shù)據(jù)產(chǎn)集程序\datetime.cpp
?????文件????????325??2002-11-07?05:03??VC_GPS數(shù)據(jù)產(chǎn)集程序\datetime.h
?????文件???????2098??2002-11-05?01:08??VC_GPS數(shù)據(jù)產(chǎn)集程序\font.cpp
?????文件???????1461??2002-11-05?01:08??VC_GPS數(shù)據(jù)產(chǎn)集程序\font.h
?????文件??????53520??2009-09-11?13:26??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPS.APS
?????文件???????4557??2009-09-11?13:27??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPS.clw
?????文件???????4370??2002-11-06?19:32??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPS.cpp
?????文件???????6409??2009-09-11?13:27??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPS.dsp
?????文件????????619??2002-11-05?01:45??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPS.dsw
?????文件???????1344??2002-11-04?22:11??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPS.h
?????文件??????91136??2009-09-11?13:27??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPS.ncb
?????文件??????55808??2009-09-11?13:27??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPS.opt
?????文件??????35817??2009-09-11?13:26??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPS.rc
?????文件?????155648??2009-09-11?16:31??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPSData.mdb
?????文件???????1703??2002-11-03?06:25??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPSDoc.cpp
?????文件???????1483??2002-11-03?06:26??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPSDoc.h
?????文件???????1566??2002-11-04?20:55??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPSSet.cpp
?????文件???????1344??2002-11-04?20:55??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPSSet.h
?????文件???????6129??2009-09-11?13:24??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPSView.cpp
?????文件???????2495??2009-09-11?11:57??VC_GPS數(shù)據(jù)產(chǎn)集程序\GPSView.h
?????文件???????7757??2009-09-11?11:53??VC_GPS數(shù)據(jù)產(chǎn)集程序\MainFrm.cpp
?????文件???????1884??2009-09-11?12:07??VC_GPS數(shù)據(jù)產(chǎn)集程序\MainFrm.h
?????文件??????14224??2002-11-05?01:08??VC_GPS數(shù)據(jù)產(chǎn)集程序\msdgridctrl.cpp
?????文件???????4837??2002-11-05?01:08??VC_GPS數(shù)據(jù)產(chǎn)集程序\msdgridctrl.h
?????文件???????1128??2002-11-05?01:08??VC_GPS數(shù)據(jù)產(chǎn)集程序\picture.cpp
?????文件???????1295??2002-11-05?01:08??VC_GPS數(shù)據(jù)產(chǎn)集程序\picture.h
?????文件??????12292??2002-11-05?01:31??VC_GPS數(shù)據(jù)產(chǎn)集程序\rdc.cpp
?????文件???????4032??2002-11-05?01:31??VC_GPS數(shù)據(jù)產(chǎn)集程序\rdc.h
............此處省略16個(gè)文件信息
評論
共有 條評論