坐标转换源代码.docx

上传人:b****1 文档编号:2336864 上传时间:2022-10-28 格式:DOCX 页数:27 大小:21.36KB
下载 相关 举报
坐标转换源代码.docx_第1页
第1页 / 共27页
坐标转换源代码.docx_第2页
第2页 / 共27页
坐标转换源代码.docx_第3页
第3页 / 共27页
坐标转换源代码.docx_第4页
第4页 / 共27页
坐标转换源代码.docx_第5页
第5页 / 共27页
点击查看更多>>
下载资源
资源描述

坐标转换源代码.docx

《坐标转换源代码.docx》由会员分享,可在线阅读,更多相关《坐标转换源代码.docx(27页珍藏版)》请在冰豆网上搜索。

坐标转换源代码.docx

坐标转换源代码

坐标转换源代码

//Convert.cpp:

implementationfile

//

#include"stdafx.h"

#include"坐标转换.h"

#include"Convert.h"

#include"Converting.h"

#include"zbxtsz.h"

#include"gybl.h"

#ifdef_DEBUG

#definenewDEBUG_NEW

#undefTHIS_FILE

staticcharTHIS_FILE[]=__FILE__;

#endif

/////////////////////////////////////////////////////////////////////////////

//CConvertdialog

CConvert:

:

CConvert(CWnd*pParent/*=NULL*/)

:

CDialog(CConvert:

:

IDD,pParent)

{

//{{AFX_DATA_INIT(CConvert)

m_s21=-1;

m_s22=-1;

m_s23=-1;

m_s24=-1;

m_s25=-1;

m_s26=-1;

m_s27=-1;

m_New_Zyzwx=0.0;

m_Zyzwx=0.0;

//}}AFX_DATA_INIT

}

voidCConvert:

:

DoDataExchange(CDataExchange*pDX)

{

CDialog:

:

DoDataExchange(pDX);

//{{AFX_DATA_MAP(CConvert)

DDX_Control(pDX,IDC_NEW_Zyzwx,m_C_New_Zyzwx);

DDX_Control(pDX,IDC_Zyzwx,m_C_Zyzwx);

DDX_Control(pDX,IDC_ZBXT,m_Zbxt);

DDX_Control(pDX,IDC_New_ZBXT,m_New_Zbxt);

DDX_Control(pDX,IDC_Txfs1,m_Txfs1);

DDX_Control(pDX,IDC_a21,m_c21);

DDX_Control(pDX,IDC_a22,m_c22);

DDX_Control(pDX,IDC_a23,m_c23);

DDX_Control(pDX,IDC_a24,m_c24);

DDX_Control(pDX,IDC_a25,m_c25);

DDX_Control(pDX,IDC_a26,m_c26);

DDX_Control(pDX,IDC_a27,m_c27);

DDX_Radio(pDX,IDC_a21,m_s21);

DDX_Radio(pDX,IDC_a22,m_s22);

DDX_Radio(pDX,IDC_a23,m_s23);

DDX_Radio(pDX,IDC_a24,m_s24);

DDX_Radio(pDX,IDC_a25,m_s25);

DDX_Radio(pDX,IDC_a26,m_s26);

DDX_Radio(pDX,IDC_a27,m_s27);

DDX_Text(pDX,IDC_NEW_Zyzwx,m_New_Zyzwx);

DDX_Text(pDX,IDC_Zyzwx,m_Zyzwx);

DDX_Control(pDX,IDC_Grid1,m_Grid1);

DDX_Control(pDX,IDC_Grid2,m_Grid2);

DDX_Control(pDX,IDC_Grid3,m_Grid3);

DDX_Control(pDX,IDC_Grid4,m_Grid4);

DDX_Control(pDX,IDC_Grid5,m_Grid5);

DDX_Control(pDX,IDC_Grid6,m_Grid6);

DDX_Control(pDX,IDC_Grid7,m_Grid7);

//}}AFX_DATA_MAP

}

BEGIN_MESSAGE_MAP(CConvert,CDialog)

//{{AFX_MSG_MAP(CConvert)

ON_BN_CLICKED(IDC_Dyzbxt,OnDyzbxt)

ON_BN_CLICKED(IDC_Txfs1,OnTxfs1)

ON_BN_CLICKED(IDC_Txfs2,OnTxfs2)

ON_BN_CLICKED(IDC_Txfs3,OnTxfs3)

ON_BN_CLICKED(IDC_Txfs4,OnTxfs4)

ON_BN_CLICKED(IDC_a21,Ona21)

ON_BN_CLICKED(IDC_a22,Ona22)

ON_BN_CLICKED(IDC_a23,Ona23)

ON_BN_CLICKED(IDC_a24,Ona24)

ON_BN_CLICKED(IDC_a25,Ona25)

ON_BN_CLICKED(IDC_a26,Ona26)

ON_BN_CLICKED(IDC_a27,Ona27)

ON_CBN_SELCHANGE(IDC_New_ZBXT,OnSelchangeNewZBXT)

ON_CBN_SELCHANGE(IDC_ZBXT,OnSelchangeZbxt)

ON_BN_CLICKED(ID_Insert,OnInsert)

ON_BN_CLICKED(ID_Delete,OnDelete)

ON_BN_CLICKED(ID_change,Onchange)

ON_BN_CLICKED(ID_Input,OnInput)

ON_BN_CLICKED(ID_Output,OnOutput)

//}}AFX_MSG_MAP

END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////

//CConvertmessagehandlers

voidCConvert:

:

OnDyzbxt()

{

CZbxtSzdlg;

dlg.DoModal();

inti,j;

i=m_Zbxt.GetCount();

for(j=0;j

{m_Zbxt.DeleteString(0);

m_New_Zbxt.DeleteString(0);

}

GyBl.Zbxt_work=GyBl.Zbxt_head;

while(GyBl.Zbxt_work!

=NULL)

{

m_Zbxt.AddString(GyBl.Zbxt_work->XtName);

m_New_Zbxt.AddString(GyBl.Zbxt_work->XtName);

GyBl.Zbxt_work=GyBl.Zbxt_work->next;

}

SzzbxtName();

}

BOOLCConvert:

:

OnInitDialog()

{

inti;

k_mode=1;

CDialog:

:

OnInitDialog();

CStringsHeading;

sHeading=_T("序号|点号|转换前X坐标|转换前Y坐标|转换后X坐标|转换后Y坐标");

m_Grid1.SetFormatString(sHeading);

sHeading=_T("序号|点号|纬度|经度|转换后X坐标|转换后Y坐标");

m_Grid2.SetFormatString(sHeading);

sHeading=_T("序号|点号|X坐标|Y坐标|纬度|经度");

m_Grid3.SetFormatString(sHeading);

sHeading=_T("序号|点号|B|L|H|X|Y|Z");

m_Grid4.SetFormatString(sHeading);

sHeading=_T("序号|点号|X|Y|Z|B|L|H");

m_Grid5.SetFormatString(sHeading);

for(i=1;i<8;i++)

{m_Grid4.SetColWidth(i,1500);

m_Grid5.SetColWidth(i,1500);

}

sHeading=_T("序号|点号|转换前X坐标|转换前Y坐标|转换后X坐标|转换后Y坐标");

m_Grid6.SetFormatString(sHeading);

sHeading=_T("序号|点号|转换前X坐标|转换前Y坐标|转换前Z坐标|转换后X坐标|转换后Y坐标|转换前Y坐标");

m_Grid7.SetFormatString(sHeading);

m_Grid1.SetAllowUserResizing

(1);

m_Grid2.SetAllowUserResizing

(1);

m_Grid3.SetAllowUserResizing

(1);

m_Grid4.SetAllowUserResizing

(1);

m_Grid5.SetAllowUserResizing

(1);

m_Grid6.SetAllowUserResizing

(1);

m_Grid7.SetAllowUserResizing

(1);

m_Txfs1.SetCheck

(1);

Szzhfs();

GyBl.Zbxt_work=GyBl.Zbxt_head;

while(GyBl.Zbxt_work!

=NULL)

{

m_Zbxt.AddString(GyBl.Zbxt_work->XtName);

m_New_Zbxt.AddString(GyBl.Zbxt_work->XtName);

GyBl.Zbxt_work=GyBl.Zbxt_work->next;

}

SzzbxtName();

ReadData();

returnTRUE;//returnTRUEunlessyousetthefocustoacontrol

//EXCEPTION:

OCXPropertyPagesshouldreturnFALSE

}

voidCConvert:

:

OnTxfs1()

{

GyBl.WorkData.Mode=1;

Szzhfs();

}

voidCConvert:

:

OnTxfs2()

{

GyBl.WorkData.Mode=2;

Szzhfs();

}

voidCConvert:

:

OnTxfs3()

{

GyBl.WorkDa

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 中国风

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1