怎样获取Calendar日历控件当前月份
展开全部
CTime time ;
((CMonthCalCtrl*)GetDlgItem(IDC_MONTHCALENDAR2))->GetCurSel(time);
UINT nYear,nMonth,nDay;
nYear = time.GetYear();
nMonth = time.GetMonth();
nDay = time.GetDay();
szStr.Format(_T("%d-%d-%d"),nYear,nMonth,nDay);
((CMonthCalCtrl*)GetDlgItem(IDC_MONTHCALENDAR2))->GetCurSel(time);
UINT nYear,nMonth,nDay;
nYear = time.GetYear();
nMonth = time.GetMonth();
nDay = time.GetDay();
szStr.Format(_T("%d-%d-%d"),nYear,nMonth,nDay);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询