|
|
|
|
// LineDesign.cpp : ʵ<><CAB5><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
#include "GISDlg.h"
|
|
|
|
|
#include "LineDesign.h"
|
|
|
|
|
#include "afxdialogex.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CLineDesign <20>Ի<EFBFBD><D4BB><EFBFBD>
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_DYNAMIC(CLineDesign, CDialog)
|
|
|
|
|
|
|
|
|
|
CLineDesign::CLineDesign(CWnd* pParent /*=NULL*/)
|
|
|
|
|
: CDialog(CLineDesign::IDD, pParent)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CLineDesign::~CLineDesign()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CLineDesign::DoDataExchange(CDataExchange* pDX)
|
|
|
|
|
{
|
|
|
|
|
CDialog::DoDataExchange(pDX);
|
|
|
|
|
DDX_Control(pDX, IDC_LIST_LINE, m_list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CLineDesign, CDialog)
|
|
|
|
|
ON_WM_NOTIFYFORMAT(NM_RCLICK, IDC_LIST_LINE, OnRclickList)
|
|
|
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CLineDesign <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CLineDesign::OnInitDialog()
|
|
|
|
|
{
|
|
|
|
|
CDialog::OnInitDialog();
|
|
|
|
|
|
|
|
|
|
// TODO: <20>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ij<EFBFBD>ʼ<EFBFBD><CABC>
|
|
|
|
|
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>չ<EFBFBD><D5B9>ʽ
|
|
|
|
|
DWORD dwstyle = m_list.GetExtendedStyle();
|
|
|
|
|
|
|
|
|
|
//ѡ<><D1A1>ij<EFBFBD><C4B3>ʹ<EFBFBD><CAB9><EFBFBD>и<EFBFBD><D0B8><EFBFBD><EFBFBD><EFBFBD>report<72><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
dwstyle = LVS_EX_FULLROWSELECT;
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ߣ<EFBFBD>report<72><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
dwstyle |= LVS_EX_GRIDLINES;
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
dwstyle |= LVS_EX_ONECLICKACTIVATE;
|
|
|
|
|
|
|
|
|
|
//<2F><>item֮ǰ<D6AE><C7B0><EFBFBD><EFBFBD>checkout<75>ؼ<EFBFBD>
|
|
|
|
|
dwstyle |= LVS_EX_CHECKBOXES;
|
|
|
|
|
|
|
|
|
|
m_list.SetExtendedStyle(dwstyle);
|
|
|
|
|
|
|
|
|
|
CRect rect;
|
|
|
|
|
|
|
|
|
|
m_list.GetWindowRect(&rect);
|
|
|
|
|
|
|
|
|
|
int listwidth = rect.Width();
|
|
|
|
|
|
|
|
|
|
m_list.InsertColumn(0,"<EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD>",LVCFMT_CENTER,listwidth/12,-1);
|
|
|
|
|
m_list.InsertColumn(1,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",LVCFMT_CENTER,listwidth/8,-1);
|
|
|
|
|
m_list.InsertColumn(2,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",LVCFMT_CENTER,listwidth/8,-1);
|
|
|
|
|
m_list.InsertColumn(3,"γ<EFBFBD><EFBFBD>",LVCFMT_CENTER,listwidth/8,-1);
|
|
|
|
|
m_list.InsertColumn(4,"<EFBFBD>߶<EFBFBD>",LVCFMT_CENTER,listwidth/8,-1);
|
|
|
|
|
m_list.InsertColumn(5,"<EFBFBD>ٶ<EFBFBD>",LVCFMT_CENTER,listwidth/8,-1);
|
|
|
|
|
m_list.InsertColumn(6,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",LVCFMT_CENTER,listwidth/8,-1);
|
|
|
|
|
m_list.InsertColumn(7,"<EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",LVCFMT_CENTER,listwidth/7,-1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i=0; i < 40; i++)
|
|
|
|
|
{
|
|
|
|
|
CString tstr;
|
|
|
|
|
tstr.Format("%d",i);
|
|
|
|
|
m_list.InsertItem(i,tstr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
|
|
|
// <20>쳣: OCX <20><><EFBFBD><EFBFBD>ҳӦ<D2B3><D3A6><EFBFBD><EFBFBD> FALSE
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>γ<EFBFBD><CEB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
void CLineDesign::ShowLonLat(double lon, double lat)
|
|
|
|
|
{
|
|
|
|
|
CString str;
|
|
|
|
|
str.Format("%.6f", lon);
|
|
|
|
|
m_list.SetItemText(0, 2, str);
|
|
|
|
|
|
|
|
|
|
str.Format("%.6f", lat);
|
|
|
|
|
m_list.SetItemText(0, 3, str);
|
|
|
|
|
UpdateData(FALSE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// void CLineDesign::InsertPt(tmpPT pData)
|
|
|
|
|
// {
|
|
|
|
|
// CString tstr;
|
|
|
|
|
// m_nowPt = pData.pt_id;
|
|
|
|
|
//
|
|
|
|
|
// tstr.Format("%d",m_nowPt);
|
|
|
|
|
// m_list.SetItemText(m_nowPt, 1, tstr);
|
|
|
|
|
//
|
|
|
|
|
// tstr.Format("%.6f", pData.pt_Lon);
|
|
|
|
|
// m_list.SetItemText(m_nowPt, 2, tstr);
|
|
|
|
|
//
|
|
|
|
|
// tstr.Format("%.6f", pData.pt_Lat);
|
|
|
|
|
// m_list.SetItemText(m_nowPt, 3, tstr);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
void CLineDesign::InsertPt(PtStruct pData)
|
|
|
|
|
{
|
|
|
|
|
CString tstr;
|
|
|
|
|
m_nowPt = pData.nPt;
|
|
|
|
|
|
|
|
|
|
tstr.Format("%d",m_nowPt);
|
|
|
|
|
m_list.SetItemText(m_nowPt, 1, tstr);
|
|
|
|
|
|
|
|
|
|
tstr.Format("%.6f", pData.dX);
|
|
|
|
|
m_list.SetItemText(m_nowPt, 2, tstr);
|
|
|
|
|
|
|
|
|
|
tstr.Format("%.6f", pData.dY);
|
|
|
|
|
m_list.SetItemText(m_nowPt, 3, tstr);
|
|
|
|
|
|
|
|
|
|
tstr.Format("%.6f", pData.nH);
|
|
|
|
|
m_list.SetItemText(m_nowPt, 4, tstr);
|
|
|
|
|
|
|
|
|
|
tstr.Format("%.6f", pData.nV);
|
|
|
|
|
m_list.SetItemText(m_nowPt, 5, tstr);
|
|
|
|
|
|
|
|
|
|
tstr.Format("0x%02x", pData.ch1);
|
|
|
|
|
m_list.SetItemText(m_nowPt, 6, tstr);
|
|
|
|
|
|
|
|
|
|
tstr.Format("0x%02x", pData.ch2);
|
|
|
|
|
m_list.SetItemText(m_nowPt, 7, tstr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UINT CLineDesign::OnNotifyFormat(CWnd *pWnd, UINT nCommand)
|
|
|
|
|
{
|
|
|
|
|
// TODO: <20>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><C4AC>ֵ
|
|
|
|
|
|
|
|
|
|
return CDialog::OnNotifyFormat(pWnd, nCommand);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//BOOL CLineDesign::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
|
|
|
|
|
//{
|
|
|
|
|
// // TODO: <20>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD>ר<EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>
|
|
|
|
|
//
|
|
|
|
|
// return CDialog::OnNotify(wParam, lParam, pResult);
|
|
|
|
|
//}
|