文档介绍:多时区时钟软件的设计与实现
摘要
进入21世纪以来,电脑用户数迅速增长,网上的跨国交流也越见频繁,由于时差的关系,不同国家的作息不同,因此需要经常进行时间的切换。
本系统主要论述如何利用VC++(MFC),设计与实现一个基于对话框的多时区时钟软件。该软件主要包括时钟显示,闹钟报时以及计时器功能。其中,时钟显示包含单时区时钟显示和多时区时钟显示,计时器可实现倒计时与正常计时。利用MFC中与定时器相关的函数,实现计时和时钟的定时刷新;运用模运算实现不同时区的时间转换;采用多线程技术使三个时钟同时运行。
关键词:VC++;MFC;时钟;多线程
The design and realization of Multi_ time_ zone Clock
Abstract
Since the 21stCentury, the number puter users has increased quickly,munication among different countries on es more and more frequent. Because of the time difference, every country has its own timetable, you need to switch the time frequently.
This system has discussed how to design and realize a clock with Visual C++ and Microsoft Foundation Class. This software principally contains these functions: the display of clocks, alarm clock and timer. The function of clock display contains the displays of single time zone clocks and multi time zone clocks. The timer can realize functions of countdown and clock. Take use of the functions related to the timer in Microsoft Foundation Class library to implement time and regular update of the clocks; the time conversion of different time zone could use modular arithmetic to realize; and taking advantage of multithreading could make three clocks run at the same time.
Key words: Visual C++; MFC; clock; multithreading
目录
论文总页数:27页
1 引言 1
1
课题的研究方法 1
2 程序功能描述 1
时钟显示 1
单时钟显示 1
多时钟显示 1
1
2
倒计时 2
正常计时 2
开发环境 2
开发环境 2
Visual C++ 2
3 主要开发技术 3
MFC简介 3
MFC的线程 3
3
MFC的线程 4
4 程序功能实现 5
5
10
13
17
17
20
结论 22
参考文献 23
附录 24
致谢 26
声明 27
1 引言
随着社会的发展,进入21世纪,个人电脑已经进入千家万户,人们已习惯于以互联网的方式交流,学习和娱乐。网上跨国交流也越见频繁,由于时差的关系,人们在浏览国外新闻时经常需要进行时间的换算。不同地区作息时间的不同也影响到人们的交流。因此,一种能显示多个时区时间的时钟程序,将给人们的生活与交流带来极大地方便。
课题的研究方法
通过对VC++可视化编程的学习以及各地区时间差的查询,本文主要采用MFC控件和多线程编程技术,以及三个与时间有关的函数SetTimer()、OnTimer()和