一、目录:
二、源码:
//计算控件按钮响应事件
void CGetWeekDayDlg::OnCal()
{
// TODO: Add your control notification handler code here
UpdateData(true);
int weekday=m_Time.GetDayOfWeek();
switch(weekday)
{
case 1:
m_strWeekDay="星期日";
break;
case 2:
m_strWeekDay="星期一";
break;
case 3:
m_strWeekDay="星期二";
break;
case 4:
m_strWeekDay="星期三";
break;
case 5:
m_strWeekDay="星期四";
break;
case 6:
m_strWeekDay="星期五";
break;
case 7:
m_strWeekDay="星期六";
break;
}
UpdateData(false);
}
三、结果:
四、资源:
https://download.csdn.net/download/sunjikui1255326447/12302724