松果法杖哪里掉:vc++编程 设计一个时钟类Clock并编写主程序,使其能在屏幕上以时分秒的形式动态显

来源:百度文库 编辑:高考问答 时间:2024/05/15 19:16:01
设计一个时钟类Clock并编写主程序,使其能在屏幕上以时分秒的形式动态显示时间。

用vc++
谢谢

得到系统时间日期(使用GetLocalTime)
SYSTEMTIME st;
CString strDate,strTime;GetLocalTime(&st);
strDate.Format("%4d-%2d-%2d",st.wYear,st.wMonth,st.wDay);
strTime.Format("%2d:%2d:%2d",st.wHour,st.wMinute,st.wSecond);
其他的自己搞定把,不好意思了