time_slice.cpp

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

CPP
64
字号
// Time_Slice.cpp : implementation file
//

#include "stdafx.h"
#include "showsgy.h"
#include "Time_Slice.h"

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

/////////////////////////////////////////////////////////////////////////////
// Time_Slice dialog


Time_Slice::Time_Slice(CWnd* pParent /*=NULL*/)
	: CDialog(Time_Slice::IDD, pParent)
{
	//{{AFX_DATA_INIT(Time_Slice)
	m_TimeRange = _T("");
	m_Time = 0;
	//}}AFX_DATA_INIT
}


void Time_Slice::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Time_Slice)
	DDX_Control(pDX, IDC_EDIT1, m_TimeSlice);
	DDX_Text(pDX, IDC_STATIC1, m_TimeRange);
	DDX_Text(pDX, IDC_EDIT1, m_Time);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// Time_Slice message handlers

void Time_Slice::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_TimeSlice.GetLine(1,ss,20); 
	m_Time=atoi(ss);
	UpdateData(TRUE);	


	
}

⌨️ 快捷键说明

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