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

📄 layer.cpp

📁 用Visual C++编写的地震记录显示程序
💻 CPP
字号:
// layer.cpp : implementation file
//

#include "stdafx.h"
#include "showsgy.h"
#include "layer.h"

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

/////////////////////////////////////////////////////////////////////////////
// layer dialog


layer::layer(CWnd* pParent /*=NULL*/)
	: CDialog(layer::IDD, pParent)
{
	//{{AFX_DATA_INIT(layer)
	m_LayerFile = _T("");
	//}}AFX_DATA_INIT
}


void layer::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(layer)
	DDX_Control(pDX, IDC_EDIT1, m_controlit);
	DDX_Text(pDX, IDC_EDIT1, m_LayerFile);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(layer, CDialog)
	//{{AFX_MSG_MAP(layer)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// layer message handlers

void layer::OnButton1() 
{
	// TODO: Add your control notification handler code here
	
	CFileDialog dlg(TRUE);
	if(dlg.DoModal()==IDOK)  
	{
		m_LayerFile=dlg.GetPathName();
		UpdateData(FALSE);
	}
		
	else return;	
}

void layer::OnChangeEdit1() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	char ss[250];
	m_controlit.GetLine(1,ss,250); 
	m_LayerFile=CString(ss);
	
}

⌨️ 快捷键说明

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