CTime begtime(m_BeginDate.GetYear(),m_BeginDate.GetMonth(),m_BeginDate.GetDay(),m_BeginTime.GetHour(),m_BeginTime.GetMinute(),m_BeginTime.GetSecond());
CTime entime(m_EndDate.GetYear(),m_EndDate.GetMonth(),m_EndDate.GetDay(),m_EndTime.GetHour(),m_EndTime.GetMinute(),m_EndTime.GetSecond());
if (begtime>entime||begtime==entime)//
{
MessageBox("起始时间不能晚于或等于结束时间!");
} m_BeginDate,m_BeginTime,m_EndDate,m_EndTime都是CTime对象。可以这样比较么?CTime