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

📄 zgriddatetime.cpp

📁 此次上传的使linux下的文件传输协议
💻 CPP
字号:
// zGridDateTime.cpp : implementation file
//

#include "stdafx.h"
#include "Prog.h"
#include "zGridDateTime.h"

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

/////////////////////////////////////////////////////////////////////////////
// zGridDateTime dialog


zGridDateTime::zGridDateTime(CWnd* pParent /*=NULL*/)
	: CDialog(zGridDateTime::IDD, pParent)
{
	//{{AFX_DATA_INIT(zGridDateTime)
	//}}AFX_DATA_INIT
	sDate="";
}

void zGridDateTime::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(zGridDateTime)
	DDX_Control(pDX, IDCANCEL, m_BtnNo);
	DDX_Control(pDX, IDC_BUTTON_YES, m_BtnYes);
	DDX_Control(pDX, IDC_DTPICKER_DATE, m_Date);
	DDX_Control(pDX, IDC_DTPICKER_TIME, m_Time);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(zGridDateTime, CDialog)
	//{{AFX_MSG_MAP(zGridDateTime)
	ON_BN_CLICKED(IDC_BUTTON_YES, OnButtonYes)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// zGridDateTime message handlers

BOOL zGridDateTime::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	CRect r;
	GetClientRect(r);

	rect.right=rect.left+r.Width();
	rect.bottom=rect.top+r.Height();

	MoveWindow(rect);

	m_BtnYes.SetIcon(IDI_ICON_GRIDYES);
	m_BtnNo.SetIcon(IDI_ICON_GRIDNO);

	if(sDate=="")
	{
		theApp.jnt.SetPickerTime(m_Date,theApp.jnt.GetCurSysTime(2));
		theApp.jnt.SetPickerTime(m_Time,theApp.jnt.GetCurSysTime(2));
	}
	else
	{
		theApp.jnt.SetPickerTime(m_Date,sDate);
		theApp.jnt.SetPickerTime(m_Time,sDate);
	}

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void zGridDateTime::OnButtonYes() 
{
	UpdateData();
	sDate=theApp.jnt.TransDate(theApp.jnt.GetPickerDate(m_Date),2);
	sDate+=" ";
	sDate+=theApp.jnt.GetPickerTime(m_Time);
	CDialog::OnOK();	
}

⌨️ 快捷键说明

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