1、多时区时钟软件的设计与实现多时区时钟软件的设计与实现 摘摘 要要 进入 21 世纪以来,电脑用户数迅速增长,网上的跨国交流也越见频繁,由 于时差的关系,不同国家的作息不同,因此需要经常进行时间的切换。 本系统主要论述如何利用 VC+6.0 应用程序开发环境和微软基础类库 (MFC),设计与实现一个基于对话框的多时区时钟软件。该软件主要包括时钟显 示,闹钟报时以及计时器功能。其中,时钟显示包含单时区时钟显示和多时区时 钟显示,计时器可实现倒计时与正常计时。利用 MFC 中与定时器相关的函数,实 现计时和时钟的定时刷新;运用模运算实现不同时区的时间转换;采用多线程技 术使三个时钟同时运行。 关键词
2、关键词: :VC+;MFC;时钟;多线程 The design and realization of Multi_ time_ zone Clock Abstract Since the 21stCentury, the number of computer users has increased quickly,the communication among different countries on Internet becomes more and more frequent. Because of the time difference, every country has its
3、own timetable, you need to switch the time frequently. This system has discussed how to design and realize a clock with Visual C+6.0 and Microsoft Foundation Class. This software principally contains these functions: the display of clocks, alarm clock and timer. The function of clock display contain
4、s 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 目目 录录