定时让电脑报警

swlilike 2009-11-23 05:21:02
到时间了,让电脑用户 知道,怎么通过声音来报警呢?
请说的详细些,越简单越好
...全文
109 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq14923349 2009-11-23
  • 打赏
  • 举报
回复
beep
xuerenxr 2009-11-23
  • 打赏
  • 举报
回复
设定一个定时器,每隔一段时间获取系统时间,若系统时间等于用户设定的时间,就调用播放声音的API函数来播放声音不就行了吗
zhouzhipen 2009-11-23
  • 打赏
  • 举报
回复
才10分?先BS一下


MessageBeep
  This function plays a waveform sound. (该函数是播放一段系统音乐)
  BOOL MessageBeep(
  UINT uType //根据不同的类型来定
  );
  Parameters(参数)
  uType
  Specifies the sound type, as identified by an entry in the [sounds] section of the registry. It is one of the following values.
  Value Description (数值描述):
  0xFFFFFFFF SystemDefault (从机器的扬声器中发出蜂鸣声)
  MB_ICONASTERISK SystemAsterisk (播放由SystemAsterisk定义的声音)
  MB_ICONEXCLAMATION SystemExclamation (播放由SystemExclamation定义的声音)
  MB_ICONHAND SystemHand (播放由SystemHand定义的声音)
  MB_ICONQUESTION SystemQuestion (播放由SystemQuestion定义的声音)
  MB_OK SystemDefault (播放由SystemDefault定义的声音)
  Return Values(返回值):
  1.Nonzero indicates success. (非零表示成功)
  2.Zero indicates failure. (零表示不成功)
  3.To get extended error information, call GetLastError.(通过GetLastError函数来获取错误信息)
  Remarks(说明):
  After queuing the sound, the MessageBeep function returns control to the calling function and plays the sound asynchronously.
  If it cannot play the specified alert sound, MessageBeep attempts to play the system default sound. If it cannot play the system default sound, the function produces a standard beep sound through the computer speaker.
  The user can disable the warning beep by using the Sound Control Panel application.
  Requirements
  OS Versions: Windows CE 1.0 and later.
  Header: Winbase.h.
  Link Library: Msgbeep.lib.
  See Also
  MessageBox

16,550

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧