📄 subject_58243.htm
字号:
<p>
序号:58243 发表者:esong 发表日期:2003-10-30 22:34:27
<br>主题:在对话框里显示时间???
<br>内容:怎样在对话框的CEdit控件或其他的控件上显示系统时间,就像window 98状态栏那样??
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:Nightmare 回复日期:2003-10-31 08:30:29
<br>内容:处理 WM_TIMER 消息 。
<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>回复者:狂战士 回复日期:2003-10-31 09:02:18
<br>内容:处理 WM_TIMER 消息<BR>BOOL XXXXXXDlg::OnInitDialog()<BR>{<BR> CDialog::OnInitDialog();<BR>// TODO: Add extra initialization here<BR> SetTimer(0,1000,NULL);<BR>}<BR>void XXXXXXDlg::OnTimer(UINT nIDEvent) <BR>{<BR> // TODO: Add your message handler code here and/or call default<BR> OnUpdateTimer();<BR> CDialog::OnTimer(nIDEvent);<BR>}<BR><BR>void XXXXXXDlg::OnUpdateTimer()<BR>{<BR> CTime time=CTime::GetCurrentTime();<BR> int year =time.GetYear();<BR> int month =time.GetMonth();<BR> int day =time.GetDay();<BR> int hour =time.GetHour();<BR> int minutes =time.GetMinute();<BR> int second =time.GetSecond();<BR> m_strtime_day.Format(_T("%0.2d-%0.2d-%0.2d %0.2d:%0.2d:%0.2d"),year,month,day,hour,minutes,second);<BR> UpdateData(FALSE);<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 + -