xline_number.cpp

来自「用Visual C++编写的地震记录显示程序」· C++ 代码 · 共 61 行

CPP
61
字号
// Xline_number.cpp : implementation file
//

#include "stdafx.h"
#include "showsgy.h"
#include "Xline_number.h"

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

/////////////////////////////////////////////////////////////////////////////
// Xline_number dialog


Xline_number::Xline_number(CWnd* pParent /*=NULL*/)
	: CDialog(Xline_number::IDD, pParent)
{
	//{{AFX_DATA_INIT(Xline_number)
	m_xlineno = 1;
	m_xlinerange = _T("");
	//}}AFX_DATA_INIT
}


void Xline_number::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Xline_number)
	DDX_Control(pDX, IDC_EDIT1, m_getxline);
	DDX_Text(pDX, IDC_EDIT1, m_xlineno);
	DDX_Text(pDX, IDC_STATIC1, m_xlinerange);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(Xline_number, CDialog)
	//{{AFX_MSG_MAP(Xline_number)
	ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Xline_number message handlers

void Xline_number::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[20];
	m_getxline.GetLine(1,ss,20); 
	m_xlineno=atoi(ss);
	UpdateData(TRUE);	
}

⌨️ 快捷键说明

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