怎样取得系统的时间? 包括年月日时分秒! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 应该用 GetLocalTime() 函数 CTime tim; tim=CTime::GetCurrentTime(); CString str; nYear=tim.GetYear(); nMonth=tim.GetMonth(); nDay=tim.GetDay(); nHour=tim.GetHour(); nMinute=tim.GetMinute(); nSecond=tim.GetSecond(); str.Format("%d:%d:%d",nHour,nMinute,nSecond); m_edtDesignTime.SetWindowText(str); str.Format("%d-%d-%d",nYear,nMonth,nDay); m_edtDesignDate.SetWindowText(str);看看我这个吧其中m_edt等变量是与对话框中的CEdit 控件关联的弯量 SYSTEMTIME SystemTime; GetSystemTime(&SystemTime); WORD year, month, day; year=SystemTime.wYear; month=SystemTime.wMonth; day=SystemTime.wDay; 如何抓网页图片 VC6.0代码出错分析。。 关于载入图片 DirectSound和ADO数据库冲突问题 请教Edit或者Richedit换行问题,中英文混和下会“提前”换行??? 关于List Control控件的一点问题 求助!编译后提示错误:'SetRect' : no overloaded function takes 0 parameters 如何设置socket为非阻塞式 关于对N个节点的KD树的穷举,以及计数公式 请解释一下LOWORD(...)和HIWORD(...)函数的意义 线程的疑惑(1) 各位 我的信誉分 怎么越来越少啊?
tim=CTime::GetCurrentTime();
CString str; nYear=tim.GetYear();
nMonth=tim.GetMonth();
nDay=tim.GetDay();
nHour=tim.GetHour();
nMinute=tim.GetMinute();
nSecond=tim.GetSecond();
str.Format("%d:%d:%d",nHour,nMinute,nSecond);
m_edtDesignTime.SetWindowText(str); str.Format("%d-%d-%d",nYear,nMonth,nDay);
m_edtDesignDate.SetWindowText(str);看看我这个吧
其中m_edt等变量是与对话框中的CEdit 控件关联的弯量
GetSystemTime(&SystemTime);
WORD year, month, day;
year=SystemTime.wYear;
month=SystemTime.wMonth;
day=SystemTime.wDay;