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

📄 hangji.cpp

📁 一个VC写的直接读取MIF文件的GIS系统
💻 CPP
字号:
// HangJI.cpp : implementation file
//

#include "stdafx.h"
#include "demo4.h"
#include "HangJI.h"

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

/////////////////////////////////////////////////////////////////////////////
// CHangJi dialog

CHangJi::CHangJi(CWnd* pParent /*=NULL*/)
	: CDialog(CHangJi::IDD, pParent)
{
	//{{AFX_DATA_INIT(CHangJi)
	m_strBp = _T("1234");
	m_fJing = 122.f;//长江口附近
	m_fWei = 28.3;
	m_fHx = 30.f;
	m_fHs = 10.f;
	m_nLx = 0;
	m_nDt = 3;
	m_nSelect = 0;
	//}}AFX_DATA_INIT
}


void CHangJi::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CHangJi)
	DDX_Text(pDX, IDC_EDIT1, m_strBp);
	DDV_MaxChars(pDX, m_strBp, MAX_BP_LEN-1);
	DDX_Text(pDX, IDC_EDIT2, m_fJing);
	DDV_MinMaxDouble(pDX, m_fJing, -180.f, 180.f);
	DDX_Text(pDX, IDC_EDIT3, m_fWei);
	DDV_MinMaxDouble(pDX, m_fWei, -90.f, 90.f);
	DDX_Text(pDX, IDC_EDIT4, m_fHx);
	DDV_MinMaxDouble(pDX, m_fHx, 0.f, 360.f);
	DDX_Text(pDX, IDC_EDIT5, m_fHs);
	DDV_MinMaxDouble(pDX, m_fHs, 0.f, 200.f);
	DDX_Radio(pDX, IDC_RADIO1, m_nLx);
	DDX_Text(pDX, IDC_EDIT6, m_nDt);
	DDV_MinMaxUInt(pDX, m_nDt, 0, 10000);
	DDX_Radio(pDX, IDC_RADIO3, m_nSelect);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CHangJi, CDialog)
	//{{AFX_MSG_MAP(CHangJi)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CHangJi message handlers

void CHangJi::ReadData(TRACK0_10H_A* t)
{
	m_fHs     = t->t.hs;
	m_fHx     = t->t.hx;
	m_fJing   = t->t.j;
	m_fWei    = t->t.w;
	m_nSelect = t->select;
	m_nLx     = t->t.lx;
	m_strBp   = t->t.bp;
	m_nDt     = t->dt;
}

void CHangJi::WriteData(TRACK0_10H_A* t)
{
	t->t.hs   = m_fHs;
	t->t.hx   = m_fHx;
	t->t.j    = m_fJing;
	t->t.w    = m_fWei;
	t->t.corp = 1 << m_nSelect;
	t->select = m_nSelect;
	t->t.lx   = m_nLx;
	t->dt     = m_nDt;
	strncpy(t->t.bp, LPCTSTR(m_strBp), MAX_BP_LEN-1);
}

⌨️ 快捷键说明

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