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

📄 coordinatedlg.cpp

📁 实现正轴等角割圆锥投影,可以通过输入参数.程序会生成相应的经纬度,并给予直观描绘
💻 CPP
字号:
// coordinatedlg.cpp : implementation file
//

#include "stdafx.h"
#include "projection.h"
#include "coordinatedlg.h"
#include "cirPro.h"

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

/////////////////////////////////////////////////////////////////////////////
// coordinatedlg dialog


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


void coordinatedlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(coordinatedlg)
	DDX_Control(pDX, IDC_LIST1, m_coor);


	
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// coordinatedlg message handlers

BOOL coordinatedlg::OnInitDialog()
{
	CDialog::OnInitDialog();  
	DWORD dwStyle = m_coor.GetExtendedStyle();
	
	dwStyle |= LVS_EX_GRIDLINES;
	
	m_coor.SetExtendedStyle(dwStyle);


	m_coor.InsertColumn(0,"纬度",LVCFMT_LEFT,50);
	m_coor.InsertColumn(1,"经度",LVCFMT_LEFT,50);
	m_coor.InsertColumn(2,"X坐标值",LVCFMT_LEFT,130);
	m_coor.InsertColumn(3,"Y坐标值",LVCFMT_LEFT,130);
	
	CString str;
	cirPro pic;
	pic.calculate();
	int n=0;
	for(int fai=36;fai<=43;fai++)
	{
		
		for(int lam=112;lam<=120;lam++)
		{
		    str.Format("%i",fai);
	        m_coor.InsertItem(n, str);
			 // 设置第一行第2列的内容
			str.Format("%i",lam);
			m_coor.SetItemText( n,1, str);
			str.Format("%f",(double)pic.co[lam][fai].x);
			m_coor.SetItemText( n,2,str );
			str.Format("%f",(double)pic.co[lam][fai].y);
			m_coor.SetItemText( n,3,str);
			n++;
		}
	}
    
  return   TRUE;     //   return   TRUE   unless   you   set   the   focus   to   a   control   
                              //   EXCEPTION:   OCX   Property   Pages   should   return   FALSE   


}

⌨️ 快捷键说明

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