📄 subject_15222.htm
字号:
<p>
序号:15222 发表者:小矮人 发表日期:2002-09-16 16:34:03
<br>主题:如何获得计算机的时间?
<br>内容:有什么函数可以获得计算机的时间(年、月、日、时、分、秒)?<BR><BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:天花乱追 回复日期:2002-09-16 16:38:40
<br>内容:CTime::GetCurrentTime()
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:杀手 回复日期:2002-09-16 16:55:13
<br>内容:void CFfDlg::OnTimer(UINT nIDEvent) <BR>{<BR> // TODO: Add your message handler code here and/or call default<BR> CTime ctCurrentTime;<BR> ctCurrentTime = CTime::GetCurrentTime();<BR> int h=ctCurrentTime.GetHour();<BR> //int y=ctCurrentTime.GetYear();<BR> //int m=ctCurrentTime.GetMonth();<BR> //int d=ctCurrentTime.GetDay();<BR> int f=ctCurrentTime.GetMinute();<BR> int s=ctCurrentTime.GetSecond();<BR> if (m_nSecond==s)<BR> return;<BR> else<BR> m_nSecond=s;<BR> <BR> m_ns1=m_nSecond/10;<BR> m_ns2=m_nSecond%10;<BR> <BR> m_nh1=h/10;<BR> m_nh2=h%10;<BR> <BR> <BR> m_nm1=f/10;<BR> m_nm2=f%10;<BR><BR> m_time.Format("%d%d:%d%d:%d%d",m_nh1,m_nh2,m_nm1,m_nm2,m_ns1,m_ns2);<BR> UpdateData(false);<BR> Invalidate(FALSE);<BR>}
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:杀手 回复日期:2002-09-16 16:56:44
<br>内容:去邮箱看看!!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:小矮人 回复日期:2002-09-16 20:40:05
<br>内容:谢谢天花乱追,虽然没有选择你的答复,但是还是很谢谢你!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -