TargetSet.cpp
资源名称:vc++gps.zip [点击查看]
上传用户:jc6688
上传日期:2013-05-06
资源大小:344k
文件大小:2k
源码类别:
GPS编程
开发平台:
Visual C++
- // TargetSet.cpp : implementation file
- //
- #include "stdafx.h"
- #include "MapDemo.h"
- #include "TargetSet.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CTargetSet dialog
- CTargetSet::CTargetSet(CWnd* pParent /*=NULL*/)
- : CDialog(CTargetSet::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CTargetSet)
- m_dDirect = 0.0;
- m_dSpeed = 0.0;
- m_X = 0.0;
- m_Y = 0.0;
- m_strName = _T("");
- //}}AFX_DATA_INIT
- }
- CTargetSet::CTargetSet(CGpsSet& gps,CWnd* pParent)
- : CDialog(CTargetSet::IDD, pParent)
- {
- m_dDirect = gps.dDirectory;
- m_dSpeed = gps.dSpeed;
- m_X = gps.StartX;
- m_Y = gps.StartY;
- m_strName=gps.strName;
- }
- void CTargetSet::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CTargetSet)
- DDX_Text(pDX, IDC_EDIT_GPS_DIRECT, m_dDirect);
- DDX_Text(pDX, IDC_EDIT_GPS_SPEED, m_dSpeed);
- DDX_Text(pDX, IDC_EDIT_GPS_X, m_X);
- DDX_Text(pDX, IDC_EDIT_GPS_Y, m_Y);
- DDX_Text(pDX, IDC_EDIT_NAME, m_strName);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CTargetSet, CDialog)
- //{{AFX_MSG_MAP(CTargetSet)
- // NOTE: the ClassWizard will add message map macros here
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CTargetSet message handlers
- void CTargetSet::GetGpsData(CGpsSet &gps)
- {
- gps.dDirectory=m_dDirect;
- gps.dSpeed=m_dSpeed ;
- gps.StartX= m_X ;
- gps.StartY= m_Y ;
- gps.strName=m_strName;
- }