📄 zgriddate.cpp
字号:
// zGridDate.cpp : implementation file
//
#include "stdafx.h"
#include "Prog.h"
#include "zGridDate.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// zGridDate dialog
zGridDate::zGridDate(CWnd* pParent /*=NULL*/)
: CDialog(zGridDate::IDD, pParent)
{
//{{AFX_DATA_INIT(zGridDate)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
sDate="";
}
void zGridDate::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(zGridDate)
DDX_Control(pDX, IDCANCEL, m_BtnNo);
DDX_Control(pDX, IDC_BUTTON_YES, m_BtnYes);
DDX_Control(pDX, IDC_DTPICKER_DATE, m_Date);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(zGridDate, CDialog)
//{{AFX_MSG_MAP(zGridDate)
ON_BN_CLICKED(IDC_BUTTON_YES, OnButtonYes)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// zGridDate message handlers
void zGridDate::OnOK()
{
NextDlgCtrl();
}
BOOL zGridDate::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));
}
else
{
theApp.jnt.SetPickerTime(m_Date,sDate);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void zGridDate::OnButtonYes()
{
UpdateData();
sDate=theApp.jnt.TransDate(theApp.jnt.GetPickerDate(m_Date),2);
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -