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

📄 timedlg.cpp

📁 通过源代码详细的介绍了VC++的用法
💻 CPP
字号:
// TimeDlg.cpp : implementation file
//

#include "stdafx.h"
#include "WorkThread.h"
#include "TimeDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// TimeDlg dialog


TimeDlg::TimeDlg(CWnd* pParent /*=NULL*/)
	: CDialog(TimeDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(TimeDlg)
	m_time = _T("");
	//}}AFX_DATA_INIT
	thetime=0;
}


void TimeDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(TimeDlg)
	DDX_Text(pDX, IDC_TIME, m_time);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(TimeDlg, CDialog)
	//{{AFX_MSG_MAP(TimeDlg)
	ON_WM_TIMER()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// TimeDlg message handlers

void TimeDlg::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	thetime++;
	m_time.Format("timer is : %d",thetime);
	UpdateData(FALSE);//更新窗口显示
	
	CDialog::OnTimer(nIDEvent);
}

BOOL TimeDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	SetTimer(1,500,NULL);
	
	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 + -