7,656
社区成员
发帖
与我相关
我的任务
分享
//UpdateData(0);get current time
UpdateData(0);
int curyear = m_strDate.GetYear();
int curmonth = m_strDate.GetMonth();
int curday = m_strDate.GetDay();
int curhour = m_strTime.GetHour();
int curminute = m_strTime.GetMinute();
int cursecond = m_strTime.GetSecond();
//get setting time
UpdateData(1);
int year = m_strDate.GetYear();
int month = m_strDate.GetMonth();
int day = m_strDate.GetDay();
int hour = m_strTime.GetHour();
int minute = m_strTime.GetMinute();
int second = m_strTime.GetSecond();
SYSTEMTIME time ;
GetLocalTime(&time);
int nYear =time.wYear % 100;
int nMonth = time.wMonth;
int nDay = time.wDay;
int nHour = time.wHour;
int nMinute = time.wMinute;
int nSecond = time.wSecond;