首先用控制台应用程序
调用三个静态文本框,再调入三个文本框
分别设置三个变量
调入两个按钮;
m_strTime
m_strData
m_strDateTime
代码:
void CMyDlg::OnOK()
{
// TODO: Add extra validation here
CTime m_time;
m_time=CTime::GetCurrentTime();
m_strTime=m_time.Format("%X");
m_strData=m_time.Format("%x");
m_strDateTime=m_time.Format("%Y-%m-%d %H:%M:%S 第%W周");
UpdateData(false);
//CDialog::OnOK();
}