|
|
|
@ -230,10 +230,10 @@ BOOL CModifyLinePointDlg::OnInitDialog()
|
|
|
|
|
cstr.Format(_T("%d"), i+1);
|
|
|
|
|
m_PointID.InsertString(i,cstr);
|
|
|
|
|
}
|
|
|
|
|
m_PointID.SetCurSel(m_selectedPointID);
|
|
|
|
|
cstr.Format(_T("%f"), m_editLineDataGroup.pts[m_selectedPointID].dX);
|
|
|
|
|
m_PointID.SetCurSel(m_selectedPointID-1);
|
|
|
|
|
cstr.Format(_T("%f"), m_editLineDataGroup.pts[m_selectedPointID-1].dX);
|
|
|
|
|
SetDlgItemText(IDC_EDIT_LON,cstr);
|
|
|
|
|
cstr.Format(_T("%f"), m_editLineDataGroup.pts[m_selectedPointID].dY);
|
|
|
|
|
cstr.Format(_T("%f"), m_editLineDataGroup.pts[m_selectedPointID-1].dY);
|
|
|
|
|
SetDlgItemText(IDC_EDIT_LAT,cstr);
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
@ -369,6 +369,7 @@ void CModifyLinePointDlg::OnEnKillfocusEditLat()
|
|
|
|
|
|
|
|
|
|
void CModifyLinePointDlg::SetSelectedPointID(int PointID){
|
|
|
|
|
m_selectedPointID = PointID + 1;
|
|
|
|
|
//m_selectedPointID = PointID;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 选择航点下拉列表变化时触发
|
|
|
|
@ -379,18 +380,19 @@ void CModifyLinePointDlg::OnCbnSelchangeComboPointid()
|
|
|
|
|
TRACE(_T("当前选中航点ID: %d \n"),m_selectedPointID);
|
|
|
|
|
//修改经纬度文本框的值
|
|
|
|
|
CString cstr;
|
|
|
|
|
if(posTypeID==0){ //度
|
|
|
|
|
if(posTypeID==0)
|
|
|
|
|
{ //度
|
|
|
|
|
cstr.Format(_T("%f"), m_editLineDataGroup.pts[m_selectedPointID-1].dX);
|
|
|
|
|
SetDlgItemText(IDC_EDIT_LON,cstr);
|
|
|
|
|
cstr.Format(_T("%f"), m_editLineDataGroup.pts[m_selectedPointID-1].dY);
|
|
|
|
|
SetDlgItemText(IDC_EDIT_LAT,cstr);
|
|
|
|
|
}
|
|
|
|
|
else if(posTypeID==1){ // 度分秒
|
|
|
|
|
else if(posTypeID==1)
|
|
|
|
|
{ // 度分秒
|
|
|
|
|
string str_lon, str_lat;
|
|
|
|
|
getDMSString(m_editLineDataGroup.pts[m_selectedPointID-1].dX, m_editLineDataGroup.pts[m_selectedPointID-1].dY,str_lon, str_lat);
|
|
|
|
|
SetDlgItemText(IDC_EDIT_LON,str_lon.c_str());
|
|
|
|
|
SetDlgItemText(IDC_EDIT_LAT,str_lat.c_str());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|