time_set.cpp

来自「时钟程序」· C++ 代码 · 共 81 行

CPP
81
字号
// time_set.cpp : implementation file
//

#include "stdafx.h"
#include "clock.h"
#include "time_set.h"
int h;

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

/////////////////////////////////////////////////////////////////////////////
// time_set dialog


time_set::time_set(CWnd* pParent /*=NULL*/)
	: CDialog(time_set::IDD, pParent)
{
	//{{AFX_DATA_INIT(time_set)
	m_second = 0.0f;
	m_minit = 0.0f;
	m_hour = 10.0f;
	//}}AFX_DATA_INIT
}


void time_set::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(time_set)
	DDX_Text(pDX, IDC_second, m_second);
	DDV_MinMaxFloat(pDX, m_second, 0.f, 60.f);
	DDX_Text(pDX, IDC_minit, m_minit);
	DDV_MinMaxFloat(pDX, m_minit, 0.f, 60.f);
	DDX_Text(pDX, IDC_hour, m_hour);
	DDV_MinMaxFloat(pDX, m_hour, 0.f, 60.f);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(time_set, CDialog)
	//{{AFX_MSG_MAP(time_set)
	ON_WM_CANCELMODE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// time_set message handlers



BOOL time_set::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
}

void time_set::OnCancelMode() 
{
	CDialog::OnCancelMode();
	
	// TODO: Add your message handler code here
	
}

void time_set::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData();
   
	CDialog::OnOK();
}

⌨️ 快捷键说明

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