求帮忙看一下这段代码是什么意思void CEx_FileSimilarityDlg::OnTimer(UINT nIDEvent) {\x09// TODO: Add your message handler code here and/or call default\x09int m_nDayOfWeek;\x09CString str;\x09m_Time = CTime::GetCurrentTime();\x09m_strT

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/20 06:38:04
求帮忙看一下这段代码是什么意思void CEx_FileSimilarityDlg::OnTimer(UINT nIDEvent) {\x09// TODO: Add your message handler code here and/or call default\x09int m_nDayOfWeek;\x09CString str;\x09m_Time   = CTime::GetCurrentTime();\x09m_strT
xTmOP+7$KȘO֍ĬbBTz}!]y1:/EQcd#""|Fg-t]o~hsι<9=mdrf6"2s\l6Ij|j/jy ۞VEĆg#,J&saلe1S@sPу0H% S4 l@W j`\5h /I@9p\bbgw`,kY]s|9msDA̶XcSF>J-g;Sy5<_$NxǗk+dG[70j23}cژx ȡ6+ڤY/:Q%j@{mpwTuh ؏MOu(3q.[P꣢"3)83^?`/s"/ev3#ɡa-_g\/)Ώ [<66: :(5 8`xH @{ /,s[jT] tnmwHwjʟ bRL<*9|Id}CWq |]ȑ)ǻ·˂lj[_~j79.9#szyWm=kgpvW QH

求帮忙看一下这段代码是什么意思void CEx_FileSimilarityDlg::OnTimer(UINT nIDEvent) {\x09// TODO: Add your message handler code here and/or call default\x09int m_nDayOfWeek;\x09CString str;\x09m_Time = CTime::GetCurrentTime();\x09m_strT
求帮忙看一下这段代码是什么意思
void CEx_FileSimilarityDlg::OnTimer(UINT nIDEvent)
{
\x09// TODO: Add your message handler code here and/or call default
\x09int m_nDayOfWeek;
\x09CString str;
\x09m_Time = CTime::GetCurrentTime();
\x09m_strTime = m_Time.Format("\r\n%Y-%m-%d\r\n%H:%M:%S\r\n");
m_nDayOfWeek = m_Time.GetDayOfWeek();
str.Format(" 星期%d",m_nDayOfWeek-1);
m_strTime = m_strTime + str;
\x09
\x09if(nIDEvent == 1)
\x09{
\x09\x09GetDlgItem(IDC_EDIT3)->SetWindowText(m_strTime);
\x09}
\x09CDialog::OnTimer(nIDEvent);
}

求帮忙看一下这段代码是什么意思void CEx_FileSimilarityDlg::OnTimer(UINT nIDEvent) {\x09// TODO: Add your message handler code here and/or call default\x09int m_nDayOfWeek;\x09CString str;\x09m_Time = CTime::GetCurrentTime();\x09m_strT
这相当于一个定时器 就是将时间的变化作为窗体的text.
先是 获取当前的系统时间getcurrentTime() 将时间进行格式化处理,然后是获取是星期几
最后拼成字符串 作为window的text.
一旦定义了每隔多长时间来触发这个定时器,就会看到窗体的内容在不断的变化,就像钟表一样.