📄 dlgshptoraster.cpp
字号:
// DlgShpToRaster.cpp : implementation file
//
#include "stdafx.h"
#include "AoConvert.h"
#include "DlgShpToRaster.h"
#include "common.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgShpToRaster dialog
CDlgShpToRaster::CDlgShpToRaster(CWnd* pParent /*=NULL*/)
: CDialog(CDlgShpToRaster::IDD, pParent)
{
m_strRasterPath = "";
m_strShpPath = "";
m_dCellSize = 0.0;
}
void CDlgShpToRaster::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgShpToRaster)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
DDX_Text(pDX,IDC_EDIT3,m_dCellSize);
DDX_Control(pDX,IDC_COMBO_Feauture,m_comboBox);
}
BEGIN_MESSAGE_MAP(CDlgShpToRaster, CDialog)
//{{AFX_MSG_MAP(CDlgShpToRaster)
ON_BN_CLICKED(IDC_BUTTON1, OnSelectShp)
ON_BN_CLICKED(IDC_BUTTON2, OnSelectOut)
ON_CBN_SELENDOK(IDC_COMBO_Feauture, OnSelendokComboFeature)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgShpToRaster message handlers
void CDlgShpToRaster::OnSelectShp()
{
m_strShpPath = gGetShpPath();
GetDlgItem(IDC_EDIT1)->SetWindowText(m_strShpPath);
gGetFeatureArray(m_strShpPath, strArray);
int n = strArray.GetUpperBound();
for(int i = 0; i< n; i++)
{
m_comboBox.InsertString(i,strArray[i]);
}//UpdateDialogControls()
m_comboBox.SetCurSel(0);
// m_strFeature =strArray[m_comboBox.GetCurSel()];
}
void CDlgShpToRaster::OnSelectOut()
{
m_strRasterPath = gGetRasterPath();
GetDlgItem(IDC_EDIT4)->SetWindowText(m_strRasterPath);// TODO: Add your control notification handler code here
}
void CDlgShpToRaster::OnSelendokComboFeature()
{
int i;
i = m_comboBox.GetCurSel();
m_strFeature = strArray[i];
}
BOOL CDlgShpToRaster::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
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 + -